[glade] Seal needed deprecated API.



commit 8568b61fac9d7b638316ef727e5ce5efe2e15578
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date:   Tue May 6 19:23:39 2014 -0300

    Seal needed deprecated API.

 gladeui/glade-builtins.c                   |   15 +++++++++++-
 gladeui/glade-project.c                    |    2 +
 gladeui/glade-utils.c                      |    6 +++++
 plugins/gtk+/glade-accels.c                |   22 ++++++++++++-------
 plugins/gtk+/glade-action-editor.c         |    2 +
 plugins/gtk+/glade-gtk-action-group.c      |   25 ++++++++++++++++-----
 plugins/gtk+/glade-gtk-action.c            |   11 +++++++-
 plugins/gtk+/glade-gtk-dialog.c            |    2 +
 plugins/gtk+/glade-gtk-icon-factory.c      |   32 ++++++++++++++++++++++++++++
 plugins/gtk+/glade-gtk-image-menu-item.c   |   13 +++++++---
 plugins/gtk+/glade-gtk-menu-bar.c          |    2 +
 plugins/gtk+/glade-gtk-menu-shell.c        |   18 ++++++++++++---
 plugins/gtk+/glade-gtk-message-dialog.c    |   10 ++++++++
 plugins/gtk+/glade-gtk-tool-button.c       |    2 +
 plugins/gtk+/glade-gtk-tool-palette.c      |    7 ++++-
 plugins/gtk+/glade-gtk-toolbar.c           |    7 ++++-
 plugins/gtk+/glade-icon-sources.c          |   29 +++++++++++++++++++++++-
 plugins/gtk+/glade-image-item-editor.c     |    2 +
 plugins/gtk+/glade-recent-chooser-editor.c |    2 +
 19 files changed, 177 insertions(+), 32 deletions(-)
---
diff --git a/gladeui/glade-builtins.c b/gladeui/glade-builtins.c
index e38cc2c..7eb6f2a 100644
--- a/gladeui/glade-builtins.c
+++ b/gladeui/glade-builtins.c
@@ -171,7 +171,9 @@ list_stock_items (gboolean include_images)
       return values;
     }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   stock_list = g_slist_reverse (gtk_stock_list_ids ());
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   values = g_array_sized_new (TRUE, TRUE, sizeof (GEnumValue),
                               g_slist_length (stock_list));
@@ -188,9 +190,11 @@ list_stock_items (gboolean include_images)
       for (l = stock_list; l; l = g_slist_next (l))
         {
           stock_id = l->data;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
           if (g_str_has_prefix (stock_id, prefix) == FALSE ||
               gtk_stock_lookup (stock_id, &item) == FALSE)
             continue;
+G_GNUC_END_IGNORE_DEPRECATIONS
 
           gsi = new_from_values (item.label, stock_id, stock_enum++);
           gsi_list =
@@ -291,7 +295,11 @@ glade_standard_stock_get_type (void)
       /* Register displayable by GType, i.e. after the types been created. */
       for (i = 0; i < n_values; i++)
         {
-          if (gtk_stock_lookup (enum_values[i].value_nick, &item))
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+          gboolean valid_item = gtk_stock_lookup (enum_values[i].value_nick, &item);
+G_GNUC_END_IGNORE_DEPRECATIONS
+
+          if (valid_item)
             {
               gchar *clean_name = clean_stock_name (item.label);
 
@@ -324,7 +332,10 @@ glade_standard_stock_image_get_type (void)
       /* Register displayable by GType, i.e. after the types been created. */
       for (i = 0; i < n_values; i++)
         {
-          if (gtk_stock_lookup (enum_values[i].value_nick, &item))
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+          gboolean valid_item = gtk_stock_lookup (enum_values[i].value_nick, &item);
+G_GNUC_END_IGNORE_DEPRECATIONS
+          if (valid_item)
             {
               gchar *clean_name = clean_stock_name (item.label);
 
diff --git a/gladeui/glade-project.c b/gladeui/glade-project.c
index 3ec748e..3a0de59 100644
--- a/gladeui/glade-project.c
+++ b/gladeui/glade-project.c
@@ -2501,6 +2501,7 @@ glade_project_add_hardcoded_dependencies (GList *edges, GladeProject *project)
       GObject *predecessor = l->data;
 
       /* Looking for a GtkIconFactory */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       if (GTK_IS_ICON_FACTORY (predecessor))
         {
           GladeWidget *predecessor_top = glade_widget_get_from_gobject (predecessor);
@@ -2517,6 +2518,7 @@ glade_project_add_hardcoded_dependencies (GList *edges, GladeProject *project)
                                             glade_widget_get_from_gobject (successor));
             }
         }
+G_GNUC_END_IGNORE_DEPRECATIONS
     }
 
   return edges;
diff --git a/gladeui/glade-utils.c b/gladeui/glade-utils.c
index 36b0490..6fddc3e 100644
--- a/gladeui/glade-utils.c
+++ b/gladeui/glade-utils.c
@@ -415,8 +415,10 @@ glade_util_compare_stock_labels (gconstpointer a, gconstpointer b)
   gboolean founda, foundb;
   gint retval;
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   founda = gtk_stock_lookup (stock_ida, &itema);
   foundb = gtk_stock_lookup (stock_idb, &itemb);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   if (founda)
     {
@@ -1686,7 +1688,9 @@ glade_utils_cairo_draw_line (cairo_t *cr,
 {
   cairo_save (cr);
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gdk_cairo_set_source_color (cr, color);
+G_GNUC_END_IGNORE_DEPRECATIONS
   cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE);
 
   cairo_move_to (cr, x1 + 0.5, y1 + 0.5);
@@ -1704,7 +1708,9 @@ glade_utils_cairo_draw_rectangle (cairo_t *cr,
                                   gint x, gint y,
                                   gint width, gint height)
 {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gdk_cairo_set_source_color (cr, color);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   if (filled)
     {
diff --git a/plugins/gtk+/glade-accels.c b/plugins/gtk+/glade-accels.c
index b412be6..1710bfb 100644
--- a/plugins/gtk+/glade-accels.c
+++ b/plugins/gtk+/glade-accels.c
@@ -212,6 +212,9 @@ glade_eprop_accel_populate_view (GladeEditorProperty * eprop,
   GList *l, *found, *accelerators;
   gchar *name, *accel_text;
   const GList *list;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+  GType type_action = GTK_TYPE_ACTION;
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   accelerators = g_value_get_boxed (glade_property_inline_value (property));
 
@@ -222,8 +225,8 @@ glade_eprop_accel_populate_view (GladeEditorProperty * eprop,
       sclass = list->data;
 
       /* Special case for GtkAction accelerators  */
-      if (glade_widget_adaptor_get_object_type (adaptor) == GTK_TYPE_ACTION ||
-          g_type_is_a (glade_widget_adaptor_get_object_type (adaptor), GTK_TYPE_ACTION))
+      if (glade_widget_adaptor_get_object_type (adaptor) == type_action ||
+          g_type_is_a (glade_widget_adaptor_get_object_type (adaptor), type_action))
         {
           if (g_strcmp0 (glade_signal_class_get_type (sclass), "GtkAction") != 0 ||
               g_strcmp0 (glade_signal_class_get_name (sclass), "activate") != 0)
@@ -259,8 +262,8 @@ glade_eprop_accel_populate_view (GladeEditorProperty * eprop,
       sclass = list->data;
 
       /* Special case for GtkAction accelerators  */
-      if (glade_widget_adaptor_get_object_type (adaptor) == GTK_TYPE_ACTION ||
-          g_type_is_a (glade_widget_adaptor_get_object_type (adaptor), GTK_TYPE_ACTION))
+      if (glade_widget_adaptor_get_object_type (adaptor) == type_action ||
+          g_type_is_a (glade_widget_adaptor_get_object_type (adaptor), type_action))
         {
           if (g_strcmp0 (glade_signal_class_get_type (sclass), "GtkAction") != 0 ||
               g_strcmp0 (glade_signal_class_get_name (sclass), "activate") != 0)
@@ -306,8 +309,8 @@ glade_eprop_accel_populate_view (GladeEditorProperty * eprop,
             }
 
           /* Special case for GtkAction accelerators  */
-          if ((glade_widget_adaptor_get_object_type (adaptor) == GTK_TYPE_ACTION ||
-               g_type_is_a (glade_widget_adaptor_get_object_type (adaptor), GTK_TYPE_ACTION)) &&
+          if ((glade_widget_adaptor_get_object_type (adaptor) == type_action ||
+               g_type_is_a (glade_widget_adaptor_get_object_type (adaptor), type_action)) &&
               g_list_length (accelerators) > 0)
             continue;
 
@@ -343,6 +346,9 @@ accel_edited (GtkCellRendererAccel * accel,
   GladePropertyClass *pclass;
   GladeWidgetAdaptor *adaptor;
   gboolean is_action;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+  GType type_action = GTK_TYPE_ACTION;
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   pclass = glade_editor_property_get_pclass (GLADE_EDITOR_PROPERTY (eprop_accel));
   adaptor = glade_property_class_get_adaptor (pclass);
@@ -351,8 +357,8 @@ accel_edited (GtkCellRendererAccel * accel,
                                             &iter, path_string))
     return;
 
-  is_action = (glade_widget_adaptor_get_object_type (adaptor) == GTK_TYPE_ACTION ||
-               g_type_is_a (glade_widget_adaptor_get_object_type (adaptor), GTK_TYPE_ACTION));
+  is_action = (glade_widget_adaptor_get_object_type (adaptor) == type_action ||
+               g_type_is_a (glade_widget_adaptor_get_object_type (adaptor), type_action));
 
   gtk_tree_model_get (eprop_accel->model, &iter,
                       ACCEL_COLUMN_KEY_ENTERED, &key_was_set, -1);
diff --git a/plugins/gtk+/glade-action-editor.c b/plugins/gtk+/glade-action-editor.c
index 5c68ade..19e4e8e 100644
--- a/plugins/gtk+/glade-action-editor.c
+++ b/plugins/gtk+/glade-action-editor.c
@@ -98,8 +98,10 @@ glade_action_editor_load (GladeEditable *editable,
   if (gwidget)
     {
       GObject *object = glade_widget_get_object (gwidget);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       gboolean is_toggle = GTK_IS_TOGGLE_ACTION (object);
       gboolean is_radio = GTK_IS_RADIO_ACTION (object);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
       /* Update subclass specific editor visibility */
       gtk_widget_set_visible (priv->toggle_title, is_toggle);
diff --git a/plugins/gtk+/glade-gtk-action-group.c b/plugins/gtk+/glade-gtk-action-group.c
index 8e05b1d..bcac7be 100644
--- a/plugins/gtk+/glade-gtk-action-group.c
+++ b/plugins/gtk+/glade-gtk-action-group.c
@@ -34,13 +34,16 @@ glade_gtk_action_group_add_verify (GladeWidgetAdaptor *adaptor,
                                   GtkWidget          *child,
                                   gboolean            user_feedback)
 {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   if (!GTK_IS_ACTION (child))
+G_GNUC_END_IGNORE_DEPRECATIONS
     {
       if (user_feedback)
        {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
          GladeWidgetAdaptor *action_adaptor = 
            glade_widget_adaptor_get_by_type (GTK_TYPE_ACTION);
-
+G_GNUC_END_IGNORE_DEPRECATIONS
          glade_util_ui_message (glade_app_get_window (),
                                 GLADE_UI_INFO, NULL,
                                 ONLY_THIS_GOES_IN_THAT_MSG,
@@ -58,7 +61,9 @@ void
 glade_gtk_action_group_add_child (GladeWidgetAdaptor * adaptor,
                                   GObject * container, GObject * child)
 {
-  if (GTK_IS_ACTION (child))
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+    if (GTK_IS_ACTION (child))
+G_GNUC_END_IGNORE_DEPRECATIONS
     {
       /* Dont really add/remove actions (because name conflicts inside groups)
        */
@@ -81,7 +86,9 @@ void
 glade_gtk_action_group_remove_child (GladeWidgetAdaptor * adaptor,
                                      GObject * container, GObject * child)
 {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   if (GTK_IS_ACTION (child))
+G_GNUC_END_IGNORE_DEPRECATIONS
     {
       /* Dont really add/remove actions (because name conflicts inside groups)
        */
@@ -195,6 +202,12 @@ glade_gtk_action_launch_editor (GObject  *action)
   GladeBaseEditor    *editor;
   GladeEditable      *action_editor;
   GtkWidget          *window;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+  GType type_action = GTK_TYPE_ACTION;
+  GType type_toggle_action = GTK_TYPE_TOGGLE_ACTION;
+  GType type_radio_action  = GTK_TYPE_RADIO_ACTION;
+  GType type_recent_action = GTK_TYPE_RECENT_ACTION;
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   /* Make sure we get the group here */
   widget = glade_widget_get_toplevel (widget);
@@ -203,10 +216,10 @@ glade_gtk_action_launch_editor (GObject  *action)
 
   /* Editor */
   editor = glade_base_editor_new (glade_widget_get_object (widget), action_editor,
-                                 _("Action"), GTK_TYPE_ACTION,
-                                 _("Toggle"), GTK_TYPE_TOGGLE_ACTION,
-                                 _("Radio"), GTK_TYPE_RADIO_ACTION,
-                                 _("Recent"), GTK_TYPE_RECENT_ACTION,
+                                 _("Action"), type_action,
+                                 _("Toggle"), type_toggle_action,
+                                 _("Radio"),  type_radio_action,
+                                 _("Recent"), type_recent_action,
                                  NULL);
 
   g_signal_connect (editor, "child-selected", G_CALLBACK (glade_gtk_action_child_selected), NULL);
diff --git a/plugins/gtk+/glade-gtk-action.c b/plugins/gtk+/glade-gtk-action.c
index 49c4f83..f510f50 100644
--- a/plugins/gtk+/glade-gtk-action.c
+++ b/plugins/gtk+/glade-gtk-action.c
@@ -38,8 +38,12 @@ glade_gtk_action_post_create (GladeWidgetAdaptor * adaptor,
   if (reason == GLADE_CREATE_REBUILD)
     return;
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   if (!gtk_action_get_name (GTK_ACTION (object)))
-    glade_widget_property_set (gwidget, "name", "untitled");
+G_GNUC_END_IGNORE_DEPRECATIONS
+    {
+      glade_widget_property_set (gwidget, "name", "untitled");
+    }
 
   glade_widget_set_action_sensitive (gwidget, "launch_editor", FALSE);
   glade_widget_property_set_sensitive (gwidget, "accelerator", FALSE, 
@@ -51,12 +55,15 @@ glade_gtk_action_create_editable (GladeWidgetAdaptor * adaptor,
                                  GladeEditorPageType type)
 {
   GladeEditable *editable;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+  GType type_recent_action = GTK_TYPE_RECENT_ACTION;
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   if (type == GLADE_PAGE_GENERAL)
     {
       GType action_type = glade_widget_adaptor_get_object_type (adaptor);
 
-      if (g_type_is_a (action_type, GTK_TYPE_RECENT_ACTION))
+      if (g_type_is_a (action_type, type_recent_action))
        editable = (GladeEditable *) glade_recent_action_editor_new ();
       else
        editable = (GladeEditable *) glade_action_editor_new ();
diff --git a/plugins/gtk+/glade-gtk-dialog.c b/plugins/gtk+/glade-gtk-dialog.c
index fb9cccc..543e87d 100644
--- a/plugins/gtk+/glade-gtk-dialog.c
+++ b/plugins/gtk+/glade-gtk-dialog.c
@@ -85,7 +85,9 @@ glade_gtk_dialog_post_create (GladeWidgetAdaptor *adaptor,
     }
 
   vbox_widget = glade_widget_get_from_gobject (gtk_dialog_get_content_area (dialog));
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   actionarea_widget = glade_widget_get_from_gobject (gtk_dialog_get_action_area (dialog));
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   /* We need to stop default emissions of "hierarchy-changed" and 
    * "screen-changed" of GtkFileChooserDefault to avoid an abort()
diff --git a/plugins/gtk+/glade-gtk-icon-factory.c b/plugins/gtk+/glade-gtk-icon-factory.c
index 3935012..fe8e7f4 100644
--- a/plugins/gtk+/glade-gtk-icon-factory.c
+++ b/plugins/gtk+/glade-gtk-icon-factory.c
@@ -41,14 +41,18 @@ void
 glade_gtk_icon_factory_post_create (GladeWidgetAdaptor * adaptor,
                                     GObject * object, GladeCreateReason reason)
 {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_icon_factory_add_default (GTK_ICON_FACTORY (object));
+G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 void
 glade_gtk_icon_factory_destroy_object (GladeWidgetAdaptor * adaptor,
                                       GObject *object)
 {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_icon_factory_remove_default (GTK_ICON_FACTORY (object));
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   GWA_GET_CLASS (G_TYPE_OBJECT)->destroy_object (adaptor, object);
 }
@@ -96,7 +100,9 @@ glade_gtk_icon_factory_read_sources (GladeWidget * widget, GladeXmlNode * node)
       if (!current_icon_name || strcmp (current_icon_name, icon_name) != 0)
         current_icon_name = (g_free (current_icon_name), g_strdup (icon_name));
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       source = gtk_icon_source_new ();
+G_GNUC_END_IGNORE_DEPRECATIONS
 
       /* Deal with the filename... */
       value = glade_utils_value_from_string (GDK_TYPE_PIXBUF, str, glade_widget_get_project (widget));
@@ -104,7 +110,9 @@ glade_gtk_icon_factory_read_sources (GladeWidget * widget, GladeXmlNode * node)
       g_value_unset (value);
       g_free (value);
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       gtk_icon_source_set_pixbuf (source, pixbuf);
+G_GNUC_END_IGNORE_DEPRECATIONS
       g_object_unref (G_OBJECT (pixbuf));
       g_free (str);
 
@@ -115,8 +123,10 @@ glade_gtk_icon_factory_read_sources (GladeWidget * widget, GladeXmlNode * node)
         {
           GtkTextDirection direction =
               glade_utils_enum_value_from_string (GTK_TYPE_TEXT_DIRECTION, str);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
           gtk_icon_source_set_direction_wildcarded (source, FALSE);
           gtk_icon_source_set_direction (source, direction);
+G_GNUC_END_IGNORE_DEPRECATIONS
           g_free (str);
         }
 
@@ -125,8 +135,10 @@ glade_gtk_icon_factory_read_sources (GladeWidget * widget, GladeXmlNode * node)
         {
           GtkIconSize size =
               glade_utils_enum_value_from_string (GTK_TYPE_ICON_SIZE, str);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
           gtk_icon_source_set_size_wildcarded (source, FALSE);
           gtk_icon_source_set_size (source, size);
+G_GNUC_END_IGNORE_DEPRECATIONS
           g_free (str);
         }
 
@@ -136,8 +148,10 @@ glade_gtk_icon_factory_read_sources (GladeWidget * widget, GladeXmlNode * node)
         {
           GtkStateType state =
               glade_utils_enum_value_from_string (GTK_TYPE_STATE_TYPE, str);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
           gtk_icon_source_set_state_wildcarded (source, FALSE);
           gtk_icon_source_set_state (source, state);
+G_GNUC_END_IGNORE_DEPRECATIONS
           g_free (str);
         }
 
@@ -217,9 +231,11 @@ write_icon_sources (gchar * icon_name, GList * sources, SourceWriteTab * tab)
       glade_xml_node_set_property_string (source_node, GLADE_TAG_STOCK_ID,
                                           icon_name);
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       if (!gtk_icon_source_get_direction_wildcarded (source))
         {
           GtkTextDirection direction = gtk_icon_source_get_direction (source);
+G_GNUC_END_IGNORE_DEPRECATIONS
           string =
               glade_utils_enum_string_from_value (GTK_TYPE_TEXT_DIRECTION,
                                                   direction);
@@ -228,9 +244,11 @@ write_icon_sources (gchar * icon_name, GList * sources, SourceWriteTab * tab)
           g_free (string);
         }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       if (!gtk_icon_source_get_size_wildcarded (source))
         {
           GtkIconSize size = gtk_icon_source_get_size (source);
+G_GNUC_END_IGNORE_DEPRECATIONS
           string =
               glade_utils_enum_string_from_value (GTK_TYPE_ICON_SIZE, size);
           glade_xml_node_set_property_string (source_node, GLADE_TAG_SIZE,
@@ -238,9 +256,11 @@ write_icon_sources (gchar * icon_name, GList * sources, SourceWriteTab * tab)
           g_free (string);
         }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       if (!gtk_icon_source_get_state_wildcarded (source))
         {
           GtkStateType state = gtk_icon_source_get_state (source);
+G_GNUC_END_IGNORE_DEPRECATIONS
           string =
               glade_utils_enum_string_from_value (GTK_TYPE_STATE_TYPE, state);
           glade_xml_node_set_property_string (source_node, GLADE_TAG_STATE,
@@ -248,7 +268,9 @@ write_icon_sources (gchar * icon_name, GList * sources, SourceWriteTab * tab)
           g_free (string);
         }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       pixbuf = gtk_icon_source_get_pixbuf (source);
+G_GNUC_END_IGNORE_DEPRECATIONS
       string = g_object_get_data (G_OBJECT (pixbuf), "GladeFileName");
 
       glade_xml_node_set_property_string (source_node,
@@ -308,6 +330,7 @@ apply_icon_sources (gchar * icon_name,
   GtkIconSet *set;
   GList *l;
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   set = gtk_icon_set_new ();
 
   for (l = sources; l; l = l->next)
@@ -317,6 +340,7 @@ apply_icon_sources (gchar * icon_name,
     }
 
   gtk_icon_factory_add (factory, icon_name, set);
+G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 static void
@@ -356,14 +380,18 @@ serialize_icon_sources (gchar * icon_name, GList * sources, GString * string)
       GdkPixbuf *pixbuf;
       gchar *str;
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       pixbuf = gtk_icon_source_get_pixbuf (source);
+G_GNUC_END_IGNORE_DEPRECATIONS
       str = g_object_get_data (G_OBJECT (pixbuf), "GladeFileName");
 
       g_string_append_printf (string, "%s[%s] ", icon_name, str);
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       if (!gtk_icon_source_get_direction_wildcarded (source))
         {
           GtkTextDirection direction = gtk_icon_source_get_direction (source);
+G_GNUC_END_IGNORE_DEPRECATIONS
           str =
               glade_utils_enum_string_from_value (GTK_TYPE_TEXT_DIRECTION,
                                                   direction);
@@ -371,17 +399,21 @@ serialize_icon_sources (gchar * icon_name, GList * sources, GString * string)
           g_free (str);
         }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       if (!gtk_icon_source_get_size_wildcarded (source))
         {
           GtkIconSize size = gtk_icon_source_get_size (source);
+G_GNUC_END_IGNORE_DEPRECATIONS
           str = glade_utils_enum_string_from_value (GTK_TYPE_ICON_SIZE, size);
           g_string_append_printf (string, "size-%s ", str);
           g_free (str);
         }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       if (!gtk_icon_source_get_state_wildcarded (source))
         {
           GtkStateType state = gtk_icon_source_get_state (source);
+G_GNUC_END_IGNORE_DEPRECATIONS
           str = glade_utils_enum_string_from_value (GTK_TYPE_STATE_TYPE, state);
           g_string_append_printf (string, "state-%s ", str);
           g_free (str);
diff --git a/plugins/gtk+/glade-gtk-image-menu-item.c b/plugins/gtk+/glade-gtk-image-menu-item.c
index b09ed05..8d76bee 100644
--- a/plugins/gtk+/glade-gtk-image-menu-item.c
+++ b/plugins/gtk+/glade-gtk-image-menu-item.c
@@ -51,7 +51,9 @@ glade_gtk_image_menu_item_set_use_stock (GObject * object, const GValue * value)
                                            NOT_SELECTED_MSG);
     }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_image_menu_item_set_use_stock (GTK_IMAGE_MENU_ITEM (object), use_stock);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   glade_gtk_sync_use_appearance (widget);
 }
@@ -76,17 +78,20 @@ glade_gtk_image_menu_item_set_label (GObject * object, const GValue * value)
     {
       GtkWidget *image;
       GtkStockItem item;
+      gboolean valid_item;
 
-      image =
-          gtk_image_new_from_stock (g_value_get_string (value),
-                                    GTK_ICON_SIZE_MENU);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+      image = gtk_image_new_from_stock (g_value_get_string (value),
+                                        GTK_ICON_SIZE_MENU);
       gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (object), image);
+      valid_item = (text) ? gtk_stock_lookup (text, &item) : FALSE;
+G_GNUC_END_IGNORE_DEPRECATIONS
 
       if (use_underline)
         gtk_label_set_use_underline (GTK_LABEL (label), TRUE);
 
       /* Get the label string... */
-      if (text && gtk_stock_lookup (text, &item))
+      if (valid_item)
         gtk_label_set_label (GTK_LABEL (label), item.label);
       else
         gtk_label_set_label (GTK_LABEL (label), text ? text : "");
diff --git a/plugins/gtk+/glade-gtk-menu-bar.c b/plugins/gtk+/glade-gtk-menu-bar.c
index 11be0b4..0d18816 100644
--- a/plugins/gtk+/glade-gtk-menu-bar.c
+++ b/plugins/gtk+/glade-gtk-menu-bar.c
@@ -56,8 +56,10 @@ glade_gtk_menu_bar_append_new_item (GladeWidget * parent,
   if (item_adaptor == NULL)
     {
       item_adaptor = glade_widget_adaptor_get_by_type (GTK_TYPE_MENU_ITEM);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       image_item_adaptor =
           glade_widget_adaptor_get_by_type (GTK_TYPE_IMAGE_MENU_ITEM);
+G_GNUC_END_IGNORE_DEPRECATIONS
       separator_adaptor =
           glade_widget_adaptor_get_by_type (GTK_TYPE_SEPARATOR_MENU_ITEM);
     }
diff --git a/plugins/gtk+/glade-gtk-menu-shell.c b/plugins/gtk+/glade-gtk-menu-shell.c
index 384f0b2..e2c4ad5 100644
--- a/plugins/gtk+/glade-gtk-menu-shell.c
+++ b/plugins/gtk+/glade-gtk-menu-shell.c
@@ -432,11 +432,15 @@ glade_gtk_menu_shell_change_type (GladeBaseEditor * editor,
     return TRUE;
 
   /* Delete the internal image of an image menu item before going ahead and changing types. */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   if (GTK_IS_IMAGE_MENU_ITEM (child))
+G_GNUC_END_IGNORE_DEPRECATIONS
     {
       GList list = { 0, };
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       GtkWidget *image =
           gtk_image_menu_item_get_image (GTK_IMAGE_MENU_ITEM (child));
+G_GNUC_END_IGNORE_DEPRECATIONS
       GladeWidget *widget;
 
       if (image && (widget = glade_widget_get_from_gobject (image)))
@@ -455,11 +459,14 @@ glade_gtk_menu_shell_launch_editor (GObject * object, gchar * title)
 {
   GladeBaseEditor *editor;
   GtkWidget *window;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+  GType type_image_menu_item = GTK_TYPE_IMAGE_MENU_ITEM;
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   /* Editor */
   editor = glade_base_editor_new (object, NULL,
                                   _("Normal item"), GTK_TYPE_MENU_ITEM,
-                                  _("Image item"), GTK_TYPE_IMAGE_MENU_ITEM,
+                                  _("Image item"), type_image_menu_item,
                                   _("Check item"), GTK_TYPE_CHECK_MENU_ITEM,
                                   _("Radio item"), GTK_TYPE_RADIO_MENU_ITEM,
                                   _("Separator item"),
@@ -467,7 +474,7 @@ glade_gtk_menu_shell_launch_editor (GObject * object, gchar * title)
 
   glade_base_editor_append_types (editor, GTK_TYPE_MENU_ITEM,
                                   _("Normal item"), GTK_TYPE_MENU_ITEM,
-                                  _("Image item"), GTK_TYPE_IMAGE_MENU_ITEM,
+                                  _("Image item"), type_image_menu_item,
                                   _("Check item"), GTK_TYPE_CHECK_MENU_ITEM,
                                   _("Radio item"), GTK_TYPE_RADIO_MENU_ITEM,
                                   _("Separator item"), GTK_TYPE_SEPARATOR_MENU_ITEM, 
@@ -565,6 +572,9 @@ glade_gtk_menu_shell_tool_item_child_selected (GladeBaseEditor * editor,
 {
   GObject *child = glade_widget_get_object (gchild);
   GType type = G_OBJECT_TYPE (child);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+  GType image_menu_item = GTK_TYPE_IMAGE_MENU_ITEM;
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   if (GTK_IS_TOOL_ITEM (child))
     {
@@ -594,7 +604,7 @@ glade_gtk_menu_shell_tool_item_child_selected (GladeBaseEditor * editor,
 
   glade_base_editor_add_label (editor, _("Properties"));
 
-  if (type != GTK_TYPE_IMAGE_MENU_ITEM)
+  if (type != image_menu_item)
     glade_base_editor_add_properties (editor, gchild, FALSE, 
                                      "label", 
                                      "tooltip-text",
@@ -606,7 +616,7 @@ glade_gtk_menu_shell_tool_item_child_selected (GladeBaseEditor * editor,
                                      "accelerator", 
                                      NULL);
 
-  if (type == GTK_TYPE_IMAGE_MENU_ITEM)
+  if (type == image_menu_item)
     glade_base_editor_add_editable (editor, gchild, GLADE_PAGE_GENERAL);
   else if (type == GTK_TYPE_CHECK_MENU_ITEM)
     glade_base_editor_add_properties (editor, gchild, FALSE,
diff --git a/plugins/gtk+/glade-gtk-message-dialog.c b/plugins/gtk+/glade-gtk-message-dialog.c
index 0c7b2b9..385947a 100644
--- a/plugins/gtk+/glade-gtk-message-dialog.c
+++ b/plugins/gtk+/glade-gtk-message-dialog.c
@@ -35,12 +35,16 @@ glade_gtk_message_dialog_reset_image (GtkMessageDialog * dialog)
   if (message_type != GTK_MESSAGE_OTHER)
     return FALSE;
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   image = gtk_message_dialog_get_image (dialog);
+G_GNUC_END_IGNORE_DEPRECATIONS
   if (glade_widget_get_from_gobject (image))
     {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       gtk_message_dialog_set_image (dialog,
                                     gtk_image_new_from_stock (NULL,
                                                               GTK_ICON_SIZE_DIALOG));
+G_GNUC_END_IGNORE_DEPRECATIONS
       gtk_widget_show (image);
 
       return TRUE;
@@ -62,7 +66,9 @@ glade_gtk_message_dialog_image_determine_action (GtkMessageDialog * dialog,
                                                  GtkWidget ** image,
                                                  GladeWidget ** gimage)
 {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   GtkWidget *dialog_image = gtk_message_dialog_get_image (dialog);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   *image = g_value_get_object (value);
 
@@ -127,7 +133,9 @@ glade_gtk_message_dialog_set_property (GladeWidgetAdaptor * adaptor,
       if (gtk_widget_get_parent (image))
         g_critical ("Image should have no parent now");
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       gtk_message_dialog_set_image (dialog, image);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
       {
         /* syncing "message-type" property */
@@ -195,7 +203,9 @@ glade_gtk_message_dialog_get_property (GladeWidgetAdaptor * adaptor,
   if (!strcmp (property_name, "image"))
     {
       GtkMessageDialog *dialog = GTK_MESSAGE_DIALOG (object);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       GtkWidget *image = gtk_message_dialog_get_image (dialog);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
       if (!glade_widget_get_from_gobject (image))
         g_value_set_object (value, NULL);
diff --git a/plugins/gtk+/glade-gtk-tool-button.c b/plugins/gtk+/glade-gtk-tool-button.c
index 8bee483..a1aa7f9 100644
--- a/plugins/gtk+/glade-gtk-tool-button.c
+++ b/plugins/gtk+/glade-gtk-tool-button.c
@@ -115,7 +115,9 @@ glade_gtk_tool_button_set_stock_id (GObject * object, const GValue * value)
   if (stock_id && strlen (stock_id) == 0)
     stock_id = NULL;
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_tool_button_set_stock_id (GTK_TOOL_BUTTON (object), stock_id);
+G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 static void
diff --git a/plugins/gtk+/glade-gtk-tool-palette.c b/plugins/gtk+/glade-gtk-tool-palette.c
index 5d65bb3..f791a7b 100644
--- a/plugins/gtk+/glade-gtk-tool-palette.c
+++ b/plugins/gtk+/glade-gtk-tool-palette.c
@@ -167,6 +167,9 @@ static void
 glade_gtk_tool_palette_launch_editor (GladeWidgetAdaptor * adaptor,
                                      GObject * palette)
 {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+  GType image_menu_item = GTK_TYPE_IMAGE_MENU_ITEM;
+G_GNUC_END_IGNORE_DEPRECATIONS
   GladeBaseEditor *editor;
   GtkWidget *window;
 
@@ -186,7 +189,7 @@ glade_gtk_tool_palette_launch_editor (GladeWidgetAdaptor * adaptor,
 
   glade_base_editor_append_types (editor, GTK_TYPE_MENU_TOOL_BUTTON,
                                   _("Normal"), GTK_TYPE_MENU_ITEM,
-                                  _("Image"), GTK_TYPE_IMAGE_MENU_ITEM,
+                                  _("Image"), image_menu_item,
                                   _("Check"), GTK_TYPE_CHECK_MENU_ITEM,
                                   _("Radio"), GTK_TYPE_RADIO_MENU_ITEM,
                                   _("Separator"), GTK_TYPE_SEPARATOR_MENU_ITEM,
@@ -195,7 +198,7 @@ glade_gtk_tool_palette_launch_editor (GladeWidgetAdaptor * adaptor,
 
   glade_base_editor_append_types (editor, GTK_TYPE_MENU_ITEM,
                                   _("Normal"), GTK_TYPE_MENU_ITEM,
-                                  _("Image"), GTK_TYPE_IMAGE_MENU_ITEM,
+                                  _("Image"), image_menu_item,
                                   _("Check"), GTK_TYPE_CHECK_MENU_ITEM,
                                   _("Radio"), GTK_TYPE_RADIO_MENU_ITEM,
                                   _("Separator"), GTK_TYPE_SEPARATOR_MENU_ITEM,
diff --git a/plugins/gtk+/glade-gtk-toolbar.c b/plugins/gtk+/glade-gtk-toolbar.c
index 2102a01..b5a5a3d 100644
--- a/plugins/gtk+/glade-gtk-toolbar.c
+++ b/plugins/gtk+/glade-gtk-toolbar.c
@@ -224,6 +224,9 @@ static void
 glade_gtk_toolbar_launch_editor (GladeWidgetAdaptor * adaptor,
                                  GObject * toolbar)
 {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+  GType image_menu_item = GTK_TYPE_IMAGE_MENU_ITEM;
+G_GNUC_END_IGNORE_DEPRECATIONS
   GladeBaseEditor *editor;
   GtkWidget *window;
 
@@ -240,7 +243,7 @@ glade_gtk_toolbar_launch_editor (GladeWidgetAdaptor * adaptor,
 
   glade_base_editor_append_types (editor, GTK_TYPE_MENU_TOOL_BUTTON,
                                   _("Normal"), GTK_TYPE_MENU_ITEM,
-                                  _("Image"), GTK_TYPE_IMAGE_MENU_ITEM,
+                                  _("Image"), image_menu_item,
                                   _("Check"), GTK_TYPE_CHECK_MENU_ITEM,
                                   _("Radio"), GTK_TYPE_RADIO_MENU_ITEM,
                                   _("Separator"), GTK_TYPE_SEPARATOR_MENU_ITEM,
@@ -248,7 +251,7 @@ glade_gtk_toolbar_launch_editor (GladeWidgetAdaptor * adaptor,
 
   glade_base_editor_append_types (editor, GTK_TYPE_MENU_ITEM,
                                   _("Normal"), GTK_TYPE_MENU_ITEM,
-                                  _("Image"), GTK_TYPE_IMAGE_MENU_ITEM,
+                                  _("Image"), image_menu_item,
                                   _("Check"), GTK_TYPE_CHECK_MENU_ITEM,
                                   _("Radio"), GTK_TYPE_RADIO_MENU_ITEM,
                                   _("Separator"), GTK_TYPE_SEPARATOR_MENU_ITEM,
diff --git a/plugins/gtk+/glade-icon-sources.c b/plugins/gtk+/glade-icon-sources.c
index 61ac4f8..832ac40 100644
--- a/plugins/gtk+/glade-icon-sources.c
+++ b/plugins/gtk+/glade-icon-sources.c
@@ -36,7 +36,9 @@ icon_set_copy (GList * set)
 
   for (l = set; l; l = l->next)
     {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       source = gtk_icon_source_copy ((GtkIconSource *) l->data);
+G_GNUC_END_IGNORE_DEPRECATIONS
       dup_set = g_list_prepend (dup_set, source);
     }
   return g_list_reverse (dup_set);
@@ -46,7 +48,9 @@ icon_set_copy (GList * set)
 static void
 icon_set_free (GList * list)
 {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   g_list_foreach (list, (GFunc) gtk_icon_source_free, NULL);
+G_GNUC_END_IGNORE_DEPRECATIONS
   g_list_free (list);
 }
 
@@ -174,7 +178,9 @@ populate_store_foreach (const gchar * icon_name,
       gchar *str;
 
       source = l->data;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       pixbuf = gtk_icon_source_get_pixbuf (source);
+G_GNUC_END_IGNORE_DEPRECATIONS
       str = g_object_get_data (G_OBJECT (pixbuf), "GladeFileName");
 
       gtk_tree_store_append (eprop_sources->store, &iter, &parent_iter);
@@ -185,9 +191,11 @@ populate_store_foreach (const gchar * icon_name,
                           COLUMN_TEXT_EDITABLE, TRUE,
                           COLUMN_TEXT_WEIGHT, PANGO_WEIGHT_NORMAL, -1);
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       if (!gtk_icon_source_get_direction_wildcarded (source))
         {
           GtkTextDirection direction = gtk_icon_source_get_direction (source);
+G_GNUC_END_IGNORE_DEPRECATIONS
           str =
               glade_utils_enum_string_from_value_displayable
               (GTK_TYPE_TEXT_DIRECTION, direction);
@@ -197,9 +205,11 @@ populate_store_foreach (const gchar * icon_name,
           g_free (str);
         }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       if (!gtk_icon_source_get_size_wildcarded (source))
         {
           GtkIconSize size = gtk_icon_source_get_size (source);
+G_GNUC_END_IGNORE_DEPRECATIONS
           str =
               glade_utils_enum_string_from_value_displayable
               (GTK_TYPE_ICON_SIZE, size);
@@ -208,9 +218,11 @@ populate_store_foreach (const gchar * icon_name,
           g_free (str);
         }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       if (!gtk_icon_source_get_state_wildcarded (source))
         {
           GtkStateType state = gtk_icon_source_get_state (source);
+G_GNUC_END_IGNORE_DEPRECATIONS
           str =
               glade_utils_enum_string_from_value_displayable
               (GTK_TYPE_STATE_TYPE, state);
@@ -458,7 +470,9 @@ delete_clicked (GtkWidget * button, GladeEditorProperty * eprop)
           list = g_list_nth (new_list_head, index);
           new_list_head = g_list_remove_link (new_list_head, list);
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
           gtk_icon_source_free ((GtkIconSource *) list->data);
+G_GNUC_END_IGNORE_DEPRECATIONS
           g_list_free (list);
 
           /* We copied all that above cause this will free the old list */
@@ -514,12 +528,17 @@ value_filename_edited (GtkCellRendererText * cell,
 
       if (index >= 0 &&
           (source = get_icon_source (icon_sources, icon_name, index)) != NULL)
-        gtk_icon_source_set_pixbuf (source, pixbuf);
+        {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+          gtk_icon_source_set_pixbuf (source, pixbuf);
+G_GNUC_END_IGNORE_DEPRECATIONS
+        }
       else
         {
-
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
           source = gtk_icon_source_new ();
           gtk_icon_source_set_pixbuf (source, pixbuf);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
           if ((source_list = g_hash_table_lookup (icon_sources->sources,
                                                   icon_name)) != NULL)
@@ -537,8 +556,10 @@ value_filename_edited (GtkCellRendererText * cell,
   else
     {
       icon_sources = glade_icon_sources_new ();
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       source = gtk_icon_source_new ();
       gtk_icon_source_set_pixbuf (source, pixbuf);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
       source_list = g_list_prepend (NULL, source);
       g_hash_table_insert (icon_sources->sources, g_strdup (icon_name),
@@ -584,6 +605,7 @@ value_attribute_toggled (GtkCellRendererToggle * cell_renderer,
       (source = get_icon_source (icon_sources, icon_name, index)) != NULL)
     {
       /* Note the reverse meaning of active toggles vs. wildcarded sources... */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       switch (edit_column)
         {
           case COLUMN_DIRECTION_ACTIVE:
@@ -599,6 +621,7 @@ value_attribute_toggled (GtkCellRendererToggle * cell_renderer,
           default:
             break;
         }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
       update_icon_sources (eprop, icon_sources);
       g_free (icon_name);
@@ -649,6 +672,7 @@ value_attribute_edited (GtkCellRendererText * cell,
       GtkIconSize size;
       GtkStateType state;
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       switch (edit_column)
         {
           case COLUMN_DIRECTION:
@@ -672,6 +696,7 @@ value_attribute_edited (GtkCellRendererText * cell,
           default:
             break;
         }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
       update_icon_sources (eprop, icon_sources);
       g_free (icon_name);
diff --git a/plugins/gtk+/glade-image-item-editor.c b/plugins/gtk+/glade-image-item-editor.c
index d6d855b..2b2f03b 100644
--- a/plugins/gtk+/glade-image-item-editor.c
+++ b/plugins/gtk+/glade-image-item-editor.c
@@ -61,7 +61,9 @@ static GladeWidget *
 get_image_widget (GladeWidget * widget)
 {
   GtkWidget *image;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   image = gtk_image_menu_item_get_image (GTK_IMAGE_MENU_ITEM (glade_widget_get_object (widget)));
+G_GNUC_END_IGNORE_DEPRECATIONS
   return image ? glade_widget_get_from_gobject (image) : NULL;
 }
 
diff --git a/plugins/gtk+/glade-recent-chooser-editor.c b/plugins/gtk+/glade-recent-chooser-editor.c
index cc27284..064e27d 100644
--- a/plugins/gtk+/glade-recent-chooser-editor.c
+++ b/plugins/gtk+/glade-recent-chooser-editor.c
@@ -71,7 +71,9 @@ glade_recent_chooser_editor_load (GladeEditable *editable,
   if (gwidget)
     {
       GObject *object = glade_widget_get_object (gwidget);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       gboolean has_show_numbers = (GTK_IS_RECENT_ACTION (object) || GTK_IS_RECENT_CHOOSER_MENU (object));
+G_GNUC_END_IGNORE_DEPRECATIONS
 
       /* Update subclass specific editor visibility */
       gtk_widget_set_visible (priv->select_multiple_editor, !has_show_numbers);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]