Avoid deprecation warnings

This commit is contained in:
Matthias Clasen 2013-08-20 00:14:00 -04:00
parent 417d6666e5
commit 8383f003f3
2 changed files with 22 additions and 0 deletions

View File

@ -1164,7 +1164,9 @@ gtk_combo_box_set_property (GObject *object,
break;
case PROP_ADD_TEAROFFS:
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_combo_box_set_add_tearoffs (combo_box, g_value_get_boolean (value));
G_GNUC_END_IGNORE_DEPRECATIONS;
break;
case PROP_HAS_FRAME:
@ -1187,7 +1189,9 @@ gtk_combo_box_set_property (GObject *object,
break;
case PROP_TEAROFF_TITLE:
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_combo_box_set_title (combo_box, g_value_get_string (value));
G_GNUC_END_IGNORE_DEPRECATIONS;
break;
case PROP_POPUP_SHOWN:
@ -1281,7 +1285,9 @@ gtk_combo_box_get_property (GObject *object,
break;
case PROP_ADD_TEAROFFS:
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
g_value_set_boolean (value, gtk_combo_box_get_add_tearoffs (combo_box));
G_GNUC_END_IGNORE_DEPRECATIONS;
break;
case PROP_HAS_FRAME:
@ -1293,7 +1299,9 @@ gtk_combo_box_get_property (GObject *object,
break;
case PROP_TEAROFF_TITLE:
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
g_value_set_string (value, gtk_combo_box_get_title (combo_box));
G_GNUC_END_IGNORE_DEPRECATIONS;
break;
case PROP_POPUP_SHOWN:
@ -5074,8 +5082,10 @@ gtk_combo_box_update_title (GtkComboBox *combo_box)
if (combo_box->priv->popup_widget &&
GTK_IS_MENU (combo_box->priv->popup_widget))
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_menu_set_title (GTK_MENU (combo_box->priv->popup_widget),
combo_box->priv->tearoff_title);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
/**

View File

@ -918,10 +918,14 @@ gtk_menu_set_property (GObject *object,
}
break;
case PROP_TEAROFF_STATE:
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_menu_set_tearoff_state (menu, g_value_get_boolean (value));
G_GNUC_END_IGNORE_DEPRECATIONS;
break;
case PROP_TEAROFF_TITLE:
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_menu_set_title (menu, g_value_get_string (value));
G_GNUC_END_IGNORE_DEPRECATIONS;
break;
case PROP_MONITOR:
gtk_menu_set_monitor (menu, g_value_get_int (value));
@ -958,10 +962,14 @@ gtk_menu_get_property (GObject *object,
g_value_set_object (value, gtk_menu_get_attach_widget (menu));
break;
case PROP_TEAROFF_STATE:
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
g_value_set_boolean (value, gtk_menu_get_tearoff_state (menu));
G_GNUC_END_IGNORE_DEPRECATIONS;
break;
case PROP_TEAROFF_TITLE:
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
g_value_set_string (value, gtk_menu_get_title (menu));
G_GNUC_END_IGNORE_DEPRECATIONS;
break;
case PROP_MONITOR:
g_value_set_int (value, gtk_menu_get_monitor (menu));
@ -2183,7 +2191,9 @@ gtk_menu_update_title (GtkMenu *menu)
const gchar *title;
GtkWidget *attach_widget;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
title = gtk_menu_get_title (menu);
G_GNUC_END_IGNORE_DEPRECATIONS;
if (!title)
{
attach_widget = gtk_menu_get_attach_widget (menu);
@ -2226,7 +2236,9 @@ static void
tearoff_window_destroyed (GtkWidget *widget,
GtkMenu *menu)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_menu_set_tearoff_state (menu, FALSE);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
/**