]> Pileus Git - ~andy/gtk/blobdiff - gtk/tests/object.c
Change FSF Address
[~andy/gtk] / gtk / tests / object.c
index f0af1d3aef11b2534df959cbf5677cbe088fa82a..ff3979ecc046d85f61533bcc62b29297dccd0839 100644 (file)
@@ -13,9 +13,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 #include <gtk/gtk.h>
 #include <string.h>
@@ -55,7 +53,6 @@ list_ignore_properties (gboolean buglist)
 {
   /* currently untestable properties */
   static const IgnoreProperty ignore_properties[] = {
-    { "GtkCurve",               "",                     NULL, },                        /* Just ignore it, not worth fixing */
     { "GtkContainer",           "child",                NULL, },                        /* needs working child widget */
     { "GtkRadioMenuItem",       "group",                NULL, },                        /* needs working sibling */
     { "GtkWidget",              "parent",               NULL, },                        /* needs working parent widget */
@@ -73,7 +70,6 @@ list_ignore_properties (gboolean buglist)
     { "GtkColorSelection",      "current-color",        (void*) NULL, },                /* not a valid boxed color */
     { "GtkComboBox",            "row-span-column",      (void*) MATCH_ANY_VALUE },      /* GtkComboBoxEntry needs a tree model for this */
     { "GtkComboBox",            "column-span-column",   (void*) MATCH_ANY_VALUE },      /* GtkComboBoxEntry needs a tree model for this */
-    { "GtkComboBoxEntry",       "text-column",          (void*) MATCH_ANY_VALUE },      /* GtkComboBoxEntry needs a tree model for this */
     { "GtkFileChooserButton",   "select-multiple",      (void*) MATCH_ANY_VALUE },      /* property disabled */
     { "GtkFileChooserButton",   "action",               (void*) GTK_FILE_CHOOSER_ACTION_SAVE },
     { "GtkFileChooserButton",   "action",               (void*) GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER },
@@ -181,15 +177,15 @@ value_as_pointer (GValue *value)
   if (g_value_fits_pointer (value))
     return g_value_peek_pointer (value);
   if (G_VALUE_HOLDS_BOOLEAN (value))
-    return (void*) g_value_get_boolean (value);
+    return GINT_TO_POINTER(g_value_get_boolean (value));
   if (G_VALUE_HOLDS_CHAR (value))
     return (void*) (gssize) g_value_get_char (value);
   if (G_VALUE_HOLDS_UCHAR (value))
     return (void*) (gsize) g_value_get_uchar (value);
   if (G_VALUE_HOLDS_INT (value))
-    return (void*) g_value_get_int (value);
+    return GINT_TO_POINTER(g_value_get_int (value));
   if (G_VALUE_HOLDS_UINT (value))
-    return (void*) g_value_get_uint (value);
+    return GUINT_TO_POINTER(g_value_get_uint (value));
   if (G_VALUE_HOLDS_LONG (value))
     return (void*) g_value_get_long (value);
   if (G_VALUE_HOLDS_ULONG (value))
@@ -214,7 +210,7 @@ object_test_property (GObject           *object,
   if (pspec->flags & G_PARAM_WRITABLE &&
       !(pspec->flags & (G_PARAM_CONSTRUCT | G_PARAM_CONSTRUCT_ONLY)))
     {
-      GValue value = { 0, };
+      GValue value = G_VALUE_INIT;
       guint i;
       const IgnoreProperty *ignore_properties;
       /* select value to set */
@@ -280,14 +276,7 @@ static void
 widget_fixups (GtkWidget *widget)
 {
   /* post-constructor for widgets that need additional settings to work correctly */
-  if (GTK_IS_COMBO_BOX_ENTRY (widget))
-    {
-      GtkListStore *store = gtk_list_store_new (1, G_TYPE_STRING);
-      g_object_set (widget, "model", store, "text-column", 0, NULL);
-      g_object_unref (store);
-      gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "test text");
-    }
-  else if (GTK_IS_COMBO_BOX (widget))
+  if (GTK_IS_COMBO_BOX (widget))
     {
       GtkListStore *store = gtk_list_store_new (1, G_TYPE_STRING);
       g_object_set (widget, "model", store, NULL);