diff options
-rw-r--r-- | gtk/a11y/gtkimageaccessible.c | 4 | ||||
-rw-r--r-- | gtk/gtkaction.c | 16 | ||||
-rw-r--r-- | gtk/gtkbutton.c | 43 | ||||
-rw-r--r-- | gtk/gtkbutton.h | 6 | ||||
-rw-r--r-- | gtk/gtkcellrendererpixbuf.c | 9 | ||||
-rw-r--r-- | gtk/gtkdialog.c | 30 | ||||
-rw-r--r-- | gtk/gtkdnd.c | 8 | ||||
-rw-r--r-- | gtk/gtkdnd.h | 4 | ||||
-rw-r--r-- | gtk/gtkentry.c | 18 | ||||
-rw-r--r-- | gtk/gtkentry.h | 4 | ||||
-rw-r--r-- | gtk/gtkimage.c | 15 | ||||
-rw-r--r-- | gtk/gtkimage.h | 6 | ||||
-rw-r--r-- | gtk/gtkimagemenuitem.c | 26 | ||||
-rw-r--r-- | gtk/gtkimagemenuitem.h | 8 | ||||
-rw-r--r-- | gtk/gtkinfobar.c | 23 | ||||
-rw-r--r-- | gtk/gtkmenutoolbutton.c | 5 | ||||
-rw-r--r-- | gtk/gtkmenutoolbutton.h | 2 | ||||
-rw-r--r-- | gtk/gtkradiotoolbutton.c | 20 | ||||
-rw-r--r-- | gtk/gtkradiotoolbutton.h | 4 | ||||
-rw-r--r-- | gtk/gtkstatusicon.c | 17 | ||||
-rw-r--r-- | gtk/gtkstatusicon.h | 6 | ||||
-rw-r--r-- | gtk/gtkstock.h | 212 | ||||
-rw-r--r-- | gtk/gtktoggletoolbutton.c | 7 | ||||
-rw-r--r-- | gtk/gtktoggletoolbutton.h | 2 | ||||
-rw-r--r-- | gtk/gtktoolbutton.c | 37 | ||||
-rw-r--r-- | gtk/gtktoolbutton.h | 6 | ||||
-rw-r--r-- | gtk/gtktooltip.c | 6 | ||||
-rw-r--r-- | gtk/gtktooltip.h | 2 | ||||
-rw-r--r-- | gtk/gtkwidget.c | 2 | ||||
-rw-r--r-- | gtk/gtkwidget.h | 2 |
30 files changed, 472 insertions, 78 deletions
diff --git a/gtk/a11y/gtkimageaccessible.c b/gtk/a11y/gtkimageaccessible.c index 704dd1b102..53625685fb 100644 --- a/gtk/a11y/gtkimageaccessible.c +++ b/gtk/a11y/gtkimageaccessible.c @@ -76,6 +76,8 @@ gtk_image_accessible_get_name (AtkObject *accessible) g_free (image_accessible->priv->stock_name); image_accessible->priv->stock_name = NULL; + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + if (gtk_image_get_storage_type (image) != GTK_IMAGE_STOCK) return NULL; @@ -86,6 +88,8 @@ gtk_image_accessible_get_name (AtkObject *accessible) if (!gtk_stock_lookup (stock_id, &stock_item)) return NULL; + G_GNUC_END_IGNORE_DEPRECATIONS; + image_accessible->priv->stock_name = _gtk_toolbar_elide_underscores (stock_item.label); return image_accessible->priv->stock_name; } diff --git a/gtk/gtkaction.c b/gtk/gtkaction.c index 6bb0ae9d7b..06138cbbf2 100644 --- a/gtk/gtkaction.c +++ b/gtk/gtkaction.c @@ -884,17 +884,23 @@ gtk_action_unblock_activate (GtkAction *action) GtkWidget * gtk_action_create_icon (GtkAction *action, GtkIconSize icon_size) { + GtkWidget *widget = NULL; + g_return_val_if_fail (GTK_IS_ACTION (action), NULL); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + if (action->private_data->stock_id && gtk_icon_factory_lookup_default (action->private_data->stock_id)) - return gtk_image_new_from_stock (action->private_data->stock_id, icon_size); + widget = gtk_image_new_from_stock (action->private_data->stock_id, icon_size); else if (action->private_data->gicon) - return gtk_image_new_from_gicon (action->private_data->gicon, icon_size); + widget = gtk_image_new_from_gicon (action->private_data->gicon, icon_size); else if (action->private_data->icon_name) - return gtk_image_new_from_icon_name (action->private_data->icon_name, icon_size); - else - return NULL; + widget = gtk_image_new_from_icon_name (action->private_data->icon_name, icon_size); + + G_GNUC_END_IGNORE_DEPRECATIONS; + + return widget; } /** diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index 7f38b49b46..dcc15d5d48 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -260,6 +260,11 @@ gtk_button_class_init (GtkButtonClass *klass) FALSE, GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT)); + /** + * GtkButton:use-stock: + * + * Deprecated: 3.10 + */ g_object_class_install_property (gobject_class, PROP_USE_STOCK, g_param_spec_boolean ("use-stock", @@ -779,7 +784,9 @@ gtk_button_set_property (GObject *object, gtk_button_set_use_underline (button, g_value_get_boolean (value)); break; case PROP_USE_STOCK: + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; gtk_button_set_use_stock (button, g_value_get_boolean (value)); + G_GNUC_END_IGNORE_DEPRECATIONS; break; case PROP_FOCUS_ON_CLICK: gtk_button_set_focus_on_click (button, g_value_get_boolean (value)); @@ -906,10 +913,18 @@ static void activatable_update_stock_id (GtkButton *button, GtkAction *action) { - if (!gtk_button_get_use_stock (button)) + gboolean use_stock; + + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + use_stock = gtk_button_get_use_stock (button); + G_GNUC_END_IGNORE_DEPRECATIONS; + + if (!use_stock) return; + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; gtk_button_set_label (button, gtk_action_get_stock_id (action)); + G_GNUC_END_IGNORE_DEPRECATIONS; } static void @@ -918,8 +933,13 @@ activatable_update_short_label (GtkButton *button, { GtkWidget *child; GtkWidget *image; + gboolean use_stock; + + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + use_stock = gtk_button_get_use_stock (button); + G_GNUC_END_IGNORE_DEPRECATIONS; - if (gtk_button_get_use_stock (button)) + if (use_stock) return; image = gtk_button_get_image (button); @@ -940,8 +960,13 @@ activatable_update_icon_name (GtkButton *button, GtkAction *action) { GtkWidget *image; - - if (gtk_button_get_use_stock (button)) + gboolean use_stock; + + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + use_stock = gtk_button_get_use_stock (button); + G_GNUC_END_IGNORE_DEPRECATIONS; + + if (use_stock) return; image = gtk_button_get_image (button); @@ -1142,6 +1167,8 @@ gtk_button_construct_child (GtkButton *button) if (child) gtk_container_remove (GTK_CONTAINER (button), child); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + if (priv->use_stock && priv->label_text && gtk_stock_lookup (priv->label_text, &item)) @@ -1154,6 +1181,8 @@ gtk_button_construct_child (GtkButton *button) else label_text = priv->label_text; + G_GNUC_END_IGNORE_DEPRECATIONS; + if (image) { priv->image = image; @@ -1258,6 +1287,8 @@ gtk_button_new_with_label (const gchar *label) * label (as for gtk_button_new_with_mnemonic()). * * Returns: a new #GtkButton + * + * Deprecated: 3.10: Use gtk_button_new_with_label() instead. **/ GtkWidget* gtk_button_new_from_stock (const gchar *stock_id) @@ -2312,6 +2343,8 @@ gtk_button_get_use_underline (GtkButton *button) * * If %TRUE, the label set on the button is used as a * stock id to select the stock item for the button. + * + * Deprecated: 3.10 */ void gtk_button_set_use_stock (GtkButton *button, @@ -2344,6 +2377,8 @@ gtk_button_set_use_stock (GtkButton *button, * Return value: %TRUE if the button label is used to * select a stock item instead of being * used directly as the label text. + * + * Deprecated: 3.10 */ gboolean gtk_button_get_use_stock (GtkButton *button) diff --git a/gtk/gtkbutton.h b/gtk/gtkbutton.h index 075db736b9..7c31994251 100644 --- a/gtk/gtkbutton.h +++ b/gtk/gtkbutton.h @@ -80,7 +80,7 @@ GDK_AVAILABLE_IN_ALL GtkWidget* gtk_button_new (void); GDK_AVAILABLE_IN_ALL GtkWidget* gtk_button_new_with_label (const gchar *label); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10_FOR(gtk_button_new_with_label) GtkWidget* gtk_button_new_from_stock (const gchar *stock_id); GDK_AVAILABLE_IN_ALL GtkWidget* gtk_button_new_with_mnemonic (const gchar *label); @@ -110,10 +110,10 @@ void gtk_button_set_use_underline (GtkButton *button, gboolean use_underline); GDK_AVAILABLE_IN_ALL gboolean gtk_button_get_use_underline (GtkButton *button); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10 void gtk_button_set_use_stock (GtkButton *button, gboolean use_stock); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10 gboolean gtk_button_get_use_stock (GtkButton *button); GDK_AVAILABLE_IN_ALL void gtk_button_set_focus_on_click (GtkButton *button, diff --git a/gtk/gtkcellrendererpixbuf.c b/gtk/gtkcellrendererpixbuf.c index 90fc9fece0..dc25648d3f 100644 --- a/gtk/gtkcellrendererpixbuf.c +++ b/gtk/gtkcellrendererpixbuf.c @@ -33,8 +33,8 @@ * * A #GtkCellRendererPixbuf can be used to render an image in a cell. It allows * to render either a given #GdkPixbuf (set via the - * #GtkCellRendererPixbuf:pixbuf property) or a stock icon (set via the - * #GtkCellRendererPixbuf:stock-id property). + * #GtkCellRendererPixbuf:pixbuf property) or a named icon (set via the + * #GtkCellRendererPixbuf:icon-name property). * * To support the tree view, #GtkCellRendererPixbuf also supports rendering two * alternative pixbufs, when the #GtkCellRenderer:is-expander property is %TRUE. @@ -169,6 +169,11 @@ gtk_cell_renderer_pixbuf_class_init (GtkCellRendererPixbufClass *class) GDK_TYPE_PIXBUF, GTK_PARAM_READWRITE)); + /** + * GtkCellRendererPixbuf:stock-id: + * + * Deprecated: 3.10: Use #GtkCellRendererPixbuf:icon-name instead. + */ g_object_class_install_property (object_class, PROP_STOCK_ID, g_param_spec_string ("stock-id", diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c index 22b8525be7..8aeb8dc040 100644 --- a/gtk/gtkdialog.c +++ b/gtk/gtkdialog.c @@ -40,6 +40,7 @@ #include "gtkprivate.h" #include "gtkbuildable.h" #include "gtksettings.h" +#include "gtkstock.h" /** * SECTION:gtkdialog @@ -563,7 +564,7 @@ gtk_dialog_new_empty (const gchar *title, * @title: (allow-none): Title of the dialog, or %NULL * @parent: (allow-none): Transient parent of the dialog, or %NULL * @flags: from #GtkDialogFlags - * @first_button_text: (allow-none): stock ID or text to go in first button, or %NULL + * @first_button_text: (allow-none): text to go in first button, or %NULL * @...: response ID for first button, then additional buttons, ending with %NULL * * Creates a new #GtkDialog with title @title (or %NULL for the default @@ -573,8 +574,7 @@ gtk_dialog_new_empty (const gchar *title, * and/or to have it destroyed along with its transient parent * (#GTK_DIALOG_DESTROY_WITH_PARENT). After @flags, button * text/response ID pairs should be listed, with a %NULL pointer ending - * the list. Button text can be either a stock ID such as - * #GTK_STOCK_OK, or some arbitrary text. A response ID can be + * the list. Button text can be arbitrary text. A response ID can be * any positive number, or one of the values in the #GtkResponseType * enumeration. If the user clicks one of these dialog buttons, * #GtkDialog will emit the #GtkDialog::response signal with the corresponding @@ -720,14 +720,14 @@ gtk_dialog_add_action_widget (GtkDialog *dialog, /** * gtk_dialog_add_button: * @dialog: a #GtkDialog - * @button_text: text of button, or stock ID + * @button_text: text of button * @response_id: response ID for the button * - * Adds a button with the given text (or a stock button, if @button_text is a - * stock ID) and sets things up so that clicking the button will emit the - * #GtkDialog::response signal with the given @response_id. The button is - * appended to the end of the dialog's action area. The button widget is - * returned, but usually you don't need it. + * Adds a button with the given text and sets things up so that + * clicking the button will emit the #GtkDialog::response signal with + * the given @response_id. The button is appended to the end of the + * dialog's action area. The button widget is returned, but usually + * you don't need it. * * Return value: (transfer none): the #GtkButton widget that was added **/ @@ -741,7 +741,15 @@ gtk_dialog_add_button (GtkDialog *dialog, g_return_val_if_fail (GTK_IS_DIALOG (dialog), NULL); g_return_val_if_fail (button_text != NULL, NULL); - button = gtk_button_new_from_stock (button_text); + button = gtk_button_new_with_label (button_text); + gtk_button_set_use_underline (GTK_BUTTON (button), TRUE); + + if (button_text) + { + GtkStockItem item; + if (gtk_stock_lookup (button_text, &item)) + g_object_set (button, "use-stock", TRUE, NULL); + } gtk_widget_set_can_default (button, TRUE); gtk_widget_set_valign (button, GTK_ALIGN_BASELINE); @@ -785,7 +793,7 @@ gtk_dialog_add_buttons_valist (GtkDialog *dialog, /** * gtk_dialog_add_buttons: * @dialog: a #GtkDialog - * @first_button_text: button text or stock ID + * @first_button_text: button text * @...: response ID for first button, then more text-response_id pairs * * Adds more buttons, same as calling gtk_dialog_add_button() diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c index aecb769927..cf4db840a5 100644 --- a/gtk/gtkdnd.c +++ b/gtk/gtkdnd.c @@ -2940,9 +2940,11 @@ gtk_drag_source_set_icon_pixbuf (GtkWidget *widget, * @stock_id: the ID of the stock icon to use * * Sets the icon that will be used for drags from a particular source - * to a stock icon. + * to a stock icon. + * + * Deprecated: 3.10: Use gtk_drag_source_set_icon_name() instead. **/ -void +void gtk_drag_source_set_icon_stock (GtkWidget *widget, const gchar *stock_id) { @@ -3297,6 +3299,8 @@ gtk_drag_set_icon_pixbuf (GdkDragContext *context, * @hot_y: the Y offset within the icon of the hotspot. * * Sets the icon for a given drag from a stock ID. + * + * Deprecated: 3.10: Use gtk_drag_set_icon_name() instead. **/ void gtk_drag_set_icon_stock (GdkDragContext *context, diff --git a/gtk/gtkdnd.h b/gtk/gtkdnd.h index 408320b82f..3ac12cd08a 100644 --- a/gtk/gtkdnd.h +++ b/gtk/gtkdnd.h @@ -173,7 +173,7 @@ void gtk_drag_source_add_uri_targets (GtkWidget *widget); GDK_AVAILABLE_IN_ALL void gtk_drag_source_set_icon_pixbuf (GtkWidget *widget, GdkPixbuf *pixbuf); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10_FOR(gtk_drag_source_set_icon_name) void gtk_drag_source_set_icon_stock (GtkWidget *widget, const gchar *stock_id); GDK_AVAILABLE_IN_ALL @@ -206,7 +206,7 @@ void gtk_drag_set_icon_pixbuf (GdkDragContext *context, GdkPixbuf *pixbuf, gint hot_x, gint hot_y); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10_FOR(gtk_drag_set_icon_name) void gtk_drag_set_icon_stock (GdkDragContext *context, const gchar *stock_id, gint hot_x, diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 0861fa6842..bc5f6e3815 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -1065,6 +1065,8 @@ gtk_entry_class_init (GtkEntryClass *class) * The stock id to use for the primary icon for the entry. * * Since: 2.16 + * + * Deprecated: 3.10: Use #GtkEntry:primary-icon-name instead. */ g_object_class_install_property (gobject_class, PROP_STOCK_PRIMARY, @@ -1080,6 +1082,8 @@ gtk_entry_class_init (GtkEntryClass *class) * The stock id to use for the secondary icon for the entry. * * Since: 2.16 + * + * Deprecated: 3.10: Use #GtkEntry:secondary-icon-name instead. */ g_object_class_install_property (gobject_class, PROP_STOCK_SECONDARY, @@ -2161,15 +2165,19 @@ gtk_entry_set_property (GObject *object, break; case PROP_STOCK_PRIMARY: + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; gtk_entry_set_icon_from_stock (entry, GTK_ENTRY_ICON_PRIMARY, g_value_get_string (value)); + G_GNUC_END_IGNORE_DEPRECATIONS; break; case PROP_STOCK_SECONDARY: + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; gtk_entry_set_icon_from_stock (entry, GTK_ENTRY_ICON_SECONDARY, g_value_get_string (value)); + G_GNUC_END_IGNORE_DEPRECATIONS; break; case PROP_ICON_NAME_PRIMARY: @@ -2403,15 +2411,19 @@ gtk_entry_get_property (GObject *object, break; case PROP_STOCK_PRIMARY: + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; g_value_set_string (value, gtk_entry_get_icon_stock (entry, GTK_ENTRY_ICON_PRIMARY)); + G_GNUC_END_IGNORE_DEPRECATIONS; break; case PROP_STOCK_SECONDARY: + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; g_value_set_string (value, gtk_entry_get_icon_stock (entry, GTK_ENTRY_ICON_SECONDARY)); + G_GNUC_END_IGNORE_DEPRECATIONS; break; case PROP_ICON_NAME_PRIMARY: @@ -8134,6 +8146,8 @@ gtk_entry_set_icon_from_pixbuf (GtkEntry *entry, * If @stock_id is %NULL, no icon will be shown in the specified position. * * Since: 2.16 + * + * Deprecated: 3.10: Use gtk_entry_set_icon_from_icon_name() instead. */ void gtk_entry_set_icon_from_stock (GtkEntry *entry, @@ -8476,6 +8490,8 @@ gtk_entry_get_icon_gicon (GtkEntry *entry, * wasn't set from a stock id * * Since: 2.16 + * + * Deprecated: 3.10: Use gtk_entry_get_icon_name() instead. */ const gchar * gtk_entry_get_icon_stock (GtkEntry *entry, @@ -10297,7 +10313,7 @@ remove_capslock_feedback (GtkEntry *entry) if (priv->caps_lock_warning_shown) { - gtk_entry_set_icon_from_stock (entry, GTK_ENTRY_ICON_SECONDARY, NULL); + gtk_entry_set_icon_from_icon_name (entry, GTK_ENTRY_ICON_SECONDARY, NULL); priv->caps_lock_warning_shown = FALSE; } } diff --git a/gtk/gtkentry.h b/gtk/gtkentry.h index 3bbc5af63a..3ca818bc0c 100644 --- a/gtk/gtkentry.h +++ b/gtk/gtkentry.h @@ -266,7 +266,7 @@ GDK_AVAILABLE_IN_ALL void gtk_entry_set_icon_from_pixbuf (GtkEntry *entry, GtkEntryIconPosition icon_pos, GdkPixbuf *pixbuf); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10_FOR(gtk_entry_set_icon_from_icon_name) void gtk_entry_set_icon_from_stock (GtkEntry *entry, GtkEntryIconPosition icon_pos, const gchar *stock_id); @@ -284,7 +284,7 @@ GtkImageType gtk_entry_get_icon_storage_type (GtkEntry * GDK_AVAILABLE_IN_ALL GdkPixbuf* gtk_entry_get_icon_pixbuf (GtkEntry *entry, GtkEntryIconPosition icon_pos); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10_FOR(gtk_entry_get_icon_name) const gchar* gtk_entry_get_icon_stock (GtkEntry *entry, GtkEntryIconPosition icon_pos); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c index 79e47db3f5..83c107c066 100644 --- a/gtk/gtkimage.c +++ b/gtk/gtkimage.c @@ -238,6 +238,11 @@ gtk_image_class_init (GtkImageClass *class) GTK_PARAM_READWRITE)); + /** + * GtkImage:stock: + * + * Deprecated: 3.10: Use #GtkImage:icon-name instead. + */ g_object_class_install_property (gobject_class, PROP_STOCK, g_param_spec_string ("stock", @@ -420,8 +425,10 @@ gtk_image_set_property (GObject *object, gtk_image_set_from_file (image, g_value_get_string (value)); break; case PROP_STOCK: + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; gtk_image_set_from_stock (image, g_value_get_string (value), icon_size); + G_GNUC_END_IGNORE_DEPRECATIONS; break; case PROP_ICON_SET: gtk_image_set_from_icon_set (image, g_value_get_boxed (value), @@ -625,6 +632,8 @@ gtk_image_new_from_pixbuf (GdkPixbuf *pixbuf) * gtk_icon_factory_add_default() and gtk_icon_factory_add(). * * Return value: a new #GtkImage displaying the stock icon + * + * Deprecated: 3.10: Use gtk_image_new_from_icon_name() instead. **/ GtkWidget* gtk_image_new_from_stock (const gchar *stock_id, @@ -634,7 +643,9 @@ gtk_image_new_from_stock (const gchar *stock_id, image = g_object_new (GTK_TYPE_IMAGE, NULL); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; gtk_image_set_from_stock (image, stock_id, size); + G_GNUC_END_IGNORE_DEPRECATIONS; return GTK_WIDGET (image); } @@ -905,6 +916,8 @@ gtk_image_set_from_pixbuf (GtkImage *image, * @size: (type int): a stock icon size * * See gtk_image_new_from_stock() for details. + * + * Deprecated: 3.10: Use gtk_image_set_from_icon_name() instead. **/ void gtk_image_set_from_stock (GtkImage *image, @@ -1142,6 +1155,8 @@ gtk_image_get_pixbuf (GtkImage *image) * %GTK_IMAGE_STOCK (see gtk_image_get_storage_type()). * The returned string is owned by the #GtkImage and should not * be freed. + * + * Deprecated: 3.10: Use gtk_image_get_icon_name() instead. **/ void gtk_image_get_stock (GtkImage *image, diff --git a/gtk/gtkimage.h b/gtk/gtkimage.h index 43a76502db..4174f5abf5 100644 --- a/gtk/gtkimage.h +++ b/gtk/gtkimage.h @@ -116,7 +116,7 @@ GDK_AVAILABLE_IN_ALL GtkWidget* gtk_image_new_from_resource (const gchar *resource_path); GDK_AVAILABLE_IN_ALL GtkWidget* gtk_image_new_from_pixbuf (GdkPixbuf *pixbuf); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10_FOR(gtk_image_new_from_icon_name) GtkWidget* gtk_image_new_from_stock (const gchar *stock_id, GtkIconSize size); GDK_AVAILABLE_IN_ALL @@ -142,7 +142,7 @@ void gtk_image_set_from_resource (GtkImage *image, GDK_AVAILABLE_IN_ALL void gtk_image_set_from_pixbuf (GtkImage *image, GdkPixbuf *pixbuf); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10_FOR(gtk_image_set_from_icon_name) void gtk_image_set_from_stock (GtkImage *image, const gchar *stock_id, GtkIconSize size); @@ -170,7 +170,7 @@ GtkImageType gtk_image_get_storage_type (GtkImage *image); GDK_AVAILABLE_IN_ALL GdkPixbuf* gtk_image_get_pixbuf (GtkImage *image); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10_FOR(gtk_image_get_icon_name) void gtk_image_get_stock (GtkImage *image, gchar **stock_id, GtkIconSize *size); diff --git a/gtk/gtkimagemenuitem.c b/gtk/gtkimagemenuitem.c index 28bc76ca28..bce335f8e4 100644 --- a/gtk/gtkimagemenuitem.c +++ b/gtk/gtkimagemenuitem.c @@ -166,6 +166,8 @@ gtk_image_menu_item_class_init (GtkImageMenuItemClass *klass) * stock id to select the stock item for the item. * * Since: 2.16 + * + * Deprecated: 3.10 */ g_object_class_install_property (gobject_class, PROP_USE_STOCK, @@ -200,6 +202,8 @@ gtk_image_menu_item_class_init (GtkImageMenuItemClass *klass) * The Accel Group to use for stock accelerator keys * * Since: 2.16 + * + * Deprecated: 3.10 */ g_object_class_install_property (gobject_class, PROP_ACCEL_GROUP, @@ -252,13 +256,17 @@ gtk_image_menu_item_set_property (GObject *object, gtk_image_menu_item_set_image (image_menu_item, (GtkWidget *) g_value_get_object (value)); break; case PROP_USE_STOCK: + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; gtk_image_menu_item_set_use_stock (image_menu_item, g_value_get_boolean (value)); + G_GNUC_END_IGNORE_DEPRECATIONS; break; case PROP_ALWAYS_SHOW_IMAGE: gtk_image_menu_item_set_always_show_image (image_menu_item, g_value_get_boolean (value)); break; case PROP_ACCEL_GROUP: + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; gtk_image_menu_item_set_accel_group (image_menu_item, g_value_get_object (value)); + G_GNUC_END_IGNORE_DEPRECATIONS; break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -280,7 +288,9 @@ gtk_image_menu_item_get_property (GObject *object, g_value_set_object (value, gtk_image_menu_item_get_image (image_menu_item)); break; case PROP_USE_STOCK: + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; g_value_set_boolean (value, gtk_image_menu_item_get_use_stock (image_menu_item)); + G_GNUC_END_IGNORE_DEPRECATIONS; break; case PROP_ALWAYS_SHOW_IMAGE: g_value_set_boolean (value, gtk_image_menu_item_get_always_show_image (image_menu_item)); @@ -387,6 +397,8 @@ gtk_image_menu_item_recalculate (GtkImageMenuItem *image_menu_item) if (priv->use_stock && priv->label) { + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + if (!priv->image) { image = gtk_image_new_from_stock (priv->label, GTK_ICON_SIZE_MENU); @@ -396,7 +408,9 @@ gtk_image_menu_item_recalculate (GtkImageMenuItem *image_menu_item) if (gtk_stock_lookup (priv->label, &stock_item)) resolved_label = stock_item.label; - gtk_menu_item_set_use_underline (GTK_MENU_ITEM (image_menu_item), TRUE); + gtk_menu_item_set_use_underline (GTK_MENU_ITEM (image_menu_item), TRUE); + + G_GNUC_END_IGNORE_DEPRECATIONS; } GTK_MENU_ITEM_CLASS @@ -661,7 +675,9 @@ activatable_update_stock_id (GtkImageMenuItem *image_menu_item, GtkAction *actio if (GTK_IS_IMAGE (image) && stock_id && gtk_icon_factory_lookup_default (stock_id)) { + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; gtk_image_set_from_stock (GTK_IMAGE (image), stock_id, GTK_ICON_SIZE_MENU); + G_GNUC_END_IGNORE_DEPRECATIONS; return TRUE; } @@ -836,6 +852,8 @@ gtk_image_menu_item_new_with_mnemonic (const gchar *label) * gtk_accel_map_add_entry() to register it. * * Returns: a new #GtkImageMenuItem. + * + * Deprecated: 3.10: Use gtk_image_menu_item_new() instead. */ GtkWidget* gtk_image_menu_item_new_from_stock (const gchar *stock_id, @@ -857,6 +875,8 @@ gtk_image_menu_item_new_from_stock (const gchar *stock_id, * stock id to select the stock item for the item. * * Since: 2.16 + * + * Deprecated: 3.10 */ void gtk_image_menu_item_set_use_stock (GtkImageMenuItem *image_menu_item, @@ -889,6 +909,8 @@ gtk_image_menu_item_set_use_stock (GtkImageMenuItem *image_menu_item, * stock id to select the stock item for the item * * Since: 2.16 + * + * Deprecated: 3.10 */ gboolean gtk_image_menu_item_get_use_stock (GtkImageMenuItem *image_menu_item) @@ -971,6 +993,8 @@ gtk_image_menu_item_get_always_show_image (GtkImageMenuItem *image_menu_item) * you shouldnt need this (see gtk_image_menu_item_new_from_stock()). * * Since: 2.16 + * + * Deprecated: 3.10 */ void gtk_image_menu_item_set_accel_group (GtkImageMenuItem *image_menu_item, diff --git a/gtk/gtkimagemenuitem.h b/gtk/gtkimagemenuitem.h index bba6651cb4..611cf304dd 100644 --- a/gtk/gtkimagemenuitem.h +++ b/gtk/gtkimagemenuitem.h @@ -75,7 +75,7 @@ GDK_AVAILABLE_IN_ALL GtkWidget* gtk_image_menu_item_new_with_label (const gchar *label); GDK_AVAILABLE_IN_ALL GtkWidget* gtk_image_menu_item_new_with_mnemonic (const gchar *label); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10_FOR(gtk_image_menu_item_new) GtkWidget* gtk_image_menu_item_new_from_stock (const gchar *stock_id, GtkAccelGroup *accel_group); GDK_AVAILABLE_IN_ALL @@ -88,12 +88,12 @@ void gtk_image_menu_item_set_image (GtkImageMenuItem *image_menu_i GtkWidget *image); GDK_AVAILABLE_IN_ALL GtkWidget* gtk_image_menu_item_get_image (GtkImageMenuItem *image_menu_item); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10 void gtk_image_menu_item_set_use_stock (GtkImageMenuItem *image_menu_item, gboolean use_stock); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10 gboolean gtk_image_menu_item_get_use_stock (GtkImageMenuItem *image_menu_item); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10 void gtk_image_menu_item_set_accel_group (GtkImageMenuItem *image_menu_item, GtkAccelGroup *accel_group); diff --git a/gtk/gtkinfobar.c b/gtk/gtkinfobar.c index 6c0d1d4fbb..b550c23035 100644 --- a/gtk/gtkinfobar.c +++ b/gtk/gtkinfobar.c @@ -45,6 +45,7 @@ #include "gtkprivate.h" #include "gtkorientable.h" #include "gtktypebuiltins.h" +#include "gtkstock.h" /** * SECTION:gtkinfobar @@ -677,14 +678,14 @@ gtk_info_bar_get_content_area (GtkInfoBar *info_bar) /** * gtk_info_bar_add_button: * @info_bar: a #GtkInfoBar - * @button_text: text of button, or stock ID + * @button_text: text of button * @response_id: response ID for the button * - * Adds a button with the given text (or a stock button, if button_text - * is a stock ID) and sets things up so that clicking the button will emit - * the "response" signal with the given response_id. The button is appended - * to the end of the info bars's action area. The button widget is - * returned, but usually you don't need it. + * Adds a button with the given text and sets things up so that + * clicking the button will emit the "response" signal with the given + * response_id. The button is appended to the end of the info bars's + * action area. The button widget is returned, but usually you don't + * need it. * * Returns: (transfer none): the #GtkButton widget that was added * @@ -700,7 +701,15 @@ gtk_info_bar_add_button (GtkInfoBar *info_bar, g_return_val_if_fail (GTK_IS_INFO_BAR (info_bar), NULL); g_return_val_if_fail (button_text != NULL, NULL); - button = gtk_button_new_from_stock (button_text); + button = gtk_button_new_with_label (button_text); + gtk_button_set_use_underline (GTK_BUTTON (button), TRUE); + + if (button_text) + { + GtkStockItem item; + if (gtk_stock_lookup (button_text, &item)) + g_object_set (button, "use-stock", TRUE, NULL); + } gtk_widget_set_can_default (button, TRUE); diff --git a/gtk/gtkmenutoolbutton.c b/gtk/gtkmenutoolbutton.c index c133f88a7b..6d9c1faf35 100644 --- a/gtk/gtkmenutoolbutton.c +++ b/gtk/gtkmenutoolbutton.c @@ -46,8 +46,7 @@ * button pops up a dropdown menu. * * Use gtk_menu_tool_button_new() to create a new - * #GtkMenuToolButton. Use gtk_menu_tool_button_new_from_stock() to - * create a new #GtkMenuToolButton containing a stock item. + * #GtkMenuToolButton. * * <refsect2 id="GtkMenuToolButton-BUILDER-UI"> * <title>GtkMenuToolButton as GtkBuildable</title> @@ -376,6 +375,8 @@ gtk_menu_tool_button_new (GtkWidget *icon_widget, * Return value: the new #GtkMenuToolButton * * Since: 2.6 + * + * Deprecated: 3.10: Use gtk_menu_tool_button_new() instead. **/ GtkToolItem * gtk_menu_tool_button_new_from_stock (const gchar *stock_id) diff --git a/gtk/gtkmenutoolbutton.h b/gtk/gtkmenutoolbutton.h index 01f2994191..110febcbdd 100644 --- a/gtk/gtkmenutoolbutton.h +++ b/gtk/gtkmenutoolbutton.h @@ -66,7 +66,7 @@ GType gtk_menu_tool_button_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL GtkToolItem *gtk_menu_tool_button_new (GtkWidget *icon_widget, const gchar *label); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10_FOR(gtk_menu_tool_button_new) GtkToolItem *gtk_menu_tool_button_new_from_stock (const gchar *stock_id); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkradiotoolbutton.c b/gtk/gtkradiotoolbutton.c index ab849edab2..40ef6241c5 100644 --- a/gtk/gtkradiotoolbutton.c +++ b/gtk/gtkradiotoolbutton.c @@ -38,10 +38,7 @@ * Use gtk_radio_tool_button_new() to create a new * #GtkRadioToolButton. Use gtk_radio_tool_button_new_from_widget() to * create a new #GtkRadioToolButton that is part of the same group as an - * existing #GtkRadioToolButton. Use - * gtk_radio_tool_button_new_from_stock() or - * gtk_radio_tool_button_new_with_stock_from_widget() create a new - * #GtkRadioToolButton containing a stock item. + * existing #GtkRadioToolButton. */ @@ -162,6 +159,8 @@ gtk_radio_tool_button_new (GSList *group) * Return value: The new #GtkRadioToolButton * * Since: 2.4 + * + * Deprecated: 3.10: Use gtk_radio_tool_button_new() instead. **/ GtkToolItem * gtk_radio_tool_button_new_from_stock (GSList *group, @@ -216,19 +215,26 @@ gtk_radio_tool_button_new_from_widget (GtkRadioToolButton *group) * Return value: (transfer none): A new #GtkRadioToolButton * * Since: 2.4 + * + * Deprecated: 3.10: gtk_radio_tool_button_new_from_widget **/ GtkToolItem * gtk_radio_tool_button_new_with_stock_from_widget (GtkRadioToolButton *group, const gchar *stock_id) { GSList *list = NULL; - + GtkToolItem *item; + g_return_val_if_fail (group == NULL || GTK_IS_RADIO_TOOL_BUTTON (group), NULL); if (group != NULL) list = gtk_radio_tool_button_get_group (group); - - return gtk_radio_tool_button_new_from_stock (list, stock_id); + + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + item = gtk_radio_tool_button_new_from_stock (list, stock_id); + G_GNUC_END_IGNORE_DEPRECATIONS; + + return item; } static GtkRadioButton * diff --git a/gtk/gtkradiotoolbutton.h b/gtk/gtkradiotoolbutton.h index c6e9ce7b84..1c76899336 100644 --- a/gtk/gtkradiotoolbutton.h +++ b/gtk/gtkradiotoolbutton.h @@ -60,12 +60,12 @@ GType gtk_radio_tool_button_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL GtkToolItem *gtk_radio_tool_button_new (GSList *group); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10_FOR(gtk_radio_tool_button_new) GtkToolItem *gtk_radio_tool_button_new_from_stock (GSList *group, const gchar *stock_id); GDK_AVAILABLE_IN_ALL GtkToolItem *gtk_radio_tool_button_new_from_widget (GtkRadioToolButton *group); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10_FOR(gtk_radio_tool_button_new_from_widget) GtkToolItem *gtk_radio_tool_button_new_with_stock_from_widget (GtkRadioToolButton *group, const gchar *stock_id); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkstatusicon.c b/gtk/gtkstatusicon.c index 679ca95d04..e32800f869 100644 --- a/gtk/gtkstatusicon.c +++ b/gtk/gtkstatusicon.c @@ -233,6 +233,11 @@ gtk_status_icon_class_init (GtkStatusIconClass *class) NULL, GTK_PARAM_WRITABLE)); + /** + * GtkStatusIcon:stock: + * + * Deprecated: 3.10: Use #GtkStatusIcon:icon-name instead. + */ g_object_class_install_property (gobject_class, PROP_STOCK, g_param_spec_string ("stock", @@ -1065,7 +1070,9 @@ gtk_status_icon_set_property (GObject *object, gtk_status_icon_set_from_file (status_icon, g_value_get_string (value)); break; case PROP_STOCK: + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; gtk_status_icon_set_from_stock (status_icon, g_value_get_string (value)); + G_GNUC_END_IGNORE_DEPRECATIONS; break; case PROP_ICON_NAME: gtk_status_icon_set_from_icon_name (status_icon, g_value_get_string (value)); @@ -1111,7 +1118,9 @@ gtk_status_icon_get_property (GObject *object, g_value_set_object (value, gtk_status_icon_get_pixbuf (status_icon)); break; case PROP_STOCK: + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; g_value_set_string (value, gtk_status_icon_get_stock (status_icon)); + G_GNUC_END_IGNORE_DEPRECATIONS; break; case PROP_ICON_NAME: g_value_set_string (value, gtk_status_icon_get_icon_name (status_icon)); @@ -1232,6 +1241,8 @@ gtk_status_icon_new_from_file (const gchar *filename) * Return value: a new #GtkStatusIcon * * Since: 2.10 + * + * Deprecated: 3.10: Use gtk_status_icon_new_from_icon_name() instead. **/ GtkStatusIcon * gtk_status_icon_new_from_stock (const gchar *stock_id) @@ -1785,7 +1796,9 @@ gtk_status_icon_set_from_file (GtkStatusIcon *status_icon, * Makes @status_icon display the stock icon with the id @stock_id. * See gtk_status_icon_new_from_stock() for details. * - * Since: 2.10 + * Since: 2.10 + * + * Deprecated: 3.10: Use gtk_status_icon_set_from_icon_name() instead. **/ void gtk_status_icon_set_from_stock (GtkStatusIcon *status_icon, @@ -1901,6 +1914,8 @@ gtk_status_icon_get_pixbuf (GtkStatusIcon *status_icon) * or %NULL if the image is empty. * * Since: 2.10 + * + * Deprecated: 3.10: Use gtk_status_icon_get_icon_name() instead. **/ const gchar * gtk_status_icon_get_stock (GtkStatusIcon *status_icon) diff --git a/gtk/gtkstatusicon.h b/gtk/gtkstatusicon.h index 76d5eff9c1..d3d7339f90 100644 --- a/gtk/gtkstatusicon.h +++ b/gtk/gtkstatusicon.h @@ -86,7 +86,7 @@ GDK_AVAILABLE_IN_ALL GtkStatusIcon *gtk_status_icon_new_from_pixbuf (GdkPixbuf *pixbuf); GDK_AVAILABLE_IN_ALL GtkStatusIcon *gtk_status_icon_new_from_file (const gchar *filename); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10_FOR(gtk_status_icon_new_from_icon_name) GtkStatusIcon *gtk_status_icon_new_from_stock (const gchar *stock_id); GDK_AVAILABLE_IN_ALL GtkStatusIcon *gtk_status_icon_new_from_icon_name (const gchar *icon_name); @@ -99,7 +99,7 @@ void gtk_status_icon_set_from_pixbuf (GtkStatusIcon *st GDK_AVAILABLE_IN_ALL void gtk_status_icon_set_from_file (GtkStatusIcon *status_icon, const gchar *filename); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10_FOR(gtk_status_icon_set_from_icon_name) void gtk_status_icon_set_from_stock (GtkStatusIcon *status_icon, const gchar *stock_id); GDK_AVAILABLE_IN_ALL @@ -114,7 +114,7 @@ GtkImageType gtk_status_icon_get_storage_type (GtkStatusIcon *st GDK_AVAILABLE_IN_ALL GdkPixbuf *gtk_status_icon_get_pixbuf (GtkStatusIcon *status_icon); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10_FOR(gtk_status_icon_get_icon_name) const gchar * gtk_status_icon_get_stock (GtkStatusIcon *status_icon); GDK_AVAILABLE_IN_ALL const gchar * gtk_status_icon_get_icon_name (GtkStatusIcon *status_icon); diff --git a/gtk/gtkstock.h b/gtk/gtkstock.h index c5630833c6..6cb4628443 100644 --- a/gtk/gtkstock.h +++ b/gtk/gtkstock.h @@ -94,6 +94,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="help-about.png" format="PNG"></inlinegraphic> * * Since: 2.6 + * + * Deprecated: 3.10: Use named icon "help-about" or the label "_About". */ #define GTK_STOCK_ABOUT "gtk-about" @@ -102,6 +104,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Add" item. * <inlinegraphic fileref="list-add.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "list-add" or the label "_Add". */ #define GTK_STOCK_ADD "gtk-add" @@ -110,6 +114,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Apply" item. * <inlinegraphic fileref="gtk-apply.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Do not use an icon. Use label "_Apply". */ #define GTK_STOCK_APPLY "gtk-apply" @@ -118,6 +124,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Bold" item. * <inlinegraphic fileref="format-text-bold.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "format-text-bold". */ #define GTK_STOCK_BOLD "gtk-bold" @@ -126,6 +134,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Cancel" item. * <inlinegraphic fileref="gtk-cancel.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Do not use an icon. Use label "_Cancel". */ #define GTK_STOCK_CANCEL "gtk-cancel" @@ -136,6 +146,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="gtk-caps-lock-warning.png" format="PNG"></inlinegraphic> * * Since: 2.16 + * + * Deprecated: 3.10: Use named icon "dialog-warning-symbolic". */ #define GTK_STOCK_CAPS_LOCK_WARNING "gtk-caps-lock-warning" @@ -144,6 +156,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "CD-Rom" item. * <inlinegraphic fileref="media-optical.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "media-optical". */ #define GTK_STOCK_CDROM "gtk-cdrom" @@ -152,6 +166,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Clear" item. * <inlinegraphic fileref="edit-clear.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "edit-clear". */ #define GTK_STOCK_CLEAR "gtk-clear" @@ -160,6 +176,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Close" item. * <inlinegraphic fileref="window-close.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "window-close" or the label "_Close". */ #define GTK_STOCK_CLOSE "gtk-close" @@ -170,6 +188,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="gtk-color-picker.png" format="PNG"></inlinegraphic> * * Since: 2.2 + * + * Deprecated: 3.10 */ #define GTK_STOCK_COLOR_PICKER "gtk-color-picker" @@ -180,6 +200,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="gtk-connect.png" format="PNG"></inlinegraphic> * * Since: 2.6 + * + * Deprecated: 3.10 */ #define GTK_STOCK_CONNECT "gtk-connect" @@ -188,6 +210,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Convert" item. * <inlinegraphic fileref="gtk-convert.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10 */ #define GTK_STOCK_CONVERT "gtk-convert" @@ -196,6 +220,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Copy" item. * <inlinegraphic fileref="edit-copy.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Do not use an icon. Use label "_Copy". */ #define GTK_STOCK_COPY "gtk-copy" @@ -204,6 +230,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Cut" item. * <inlinegraphic fileref="edit-cut.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Do not use an icon. Use label "Cu_t". */ #define GTK_STOCK_CUT "gtk-cut" @@ -212,6 +240,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Delete" item. * <inlinegraphic fileref="edit-delete.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Do not use an icon. Use label "_Delete". */ #define GTK_STOCK_DELETE "gtk-delete" @@ -222,6 +252,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="dialog-password.png" format="PNG"></inlinegraphic> * * Since: 2.4 + * + * Deprecated: 3.10: Use named icon "dialog-password". */ #define GTK_STOCK_DIALOG_AUTHENTICATION "gtk-dialog-authentication" @@ -230,6 +262,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Information" item. * <inlinegraphic fileref="dialog-information.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "dialog-information". */ #define GTK_STOCK_DIALOG_INFO "gtk-dialog-info" @@ -238,6 +272,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Warning" item. * <inlinegraphic fileref="dialog-warning.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "dialog-warning". */ #define GTK_STOCK_DIALOG_WARNING "gtk-dialog-warning" @@ -246,6 +282,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Error" item. * <inlinegraphic fileref="dialog-error.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "dialog-error". */ #define GTK_STOCK_DIALOG_ERROR "gtk-dialog-error" @@ -254,6 +292,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Question" item. * <inlinegraphic fileref="dialog-question.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "dialog-question". */ #define GTK_STOCK_DIALOG_QUESTION "gtk-dialog-question" @@ -264,6 +304,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="folder.png" format="PNG"></inlinegraphic> * * Since: 2.6 + * + * Deprecated: 3.10: Use named icon "folder". */ #define GTK_STOCK_DIRECTORY "gtk-directory" @@ -273,6 +315,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * The "Discard" item. * * Since: 2.12 + * + * Deprecated: 3.10 */ #define GTK_STOCK_DISCARD "gtk-discard" @@ -283,6 +327,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="gtk-disconnect.png" format="PNG"></inlinegraphic> * * Since: 2.6 + * + * Deprecated: 3.10 */ #define GTK_STOCK_DISCONNECT "gtk-disconnect" @@ -291,6 +337,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Drag-And-Drop" icon. * <inlinegraphic fileref="gtk-dnd.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10 */ #define GTK_STOCK_DND "gtk-dnd" @@ -299,6 +347,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Drag-And-Drop multiple" icon. * <inlinegraphic fileref="gtk-dnd-multiple.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10 */ #define GTK_STOCK_DND_MULTIPLE "gtk-dnd-multiple" @@ -309,6 +359,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="gtk-edit.png" format="PNG"></inlinegraphic> * * Since: 2.6 + * + * Deprecated: 3.10 */ #define GTK_STOCK_EDIT "gtk-edit" @@ -317,6 +369,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Execute" item. * <inlinegraphic fileref="system-run.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "system-run". */ #define GTK_STOCK_EXECUTE "gtk-execute" @@ -329,6 +383,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * Since 3.0, this item has a label, before it only had an icon. * * Since: 2.6 + * + * Deprecated: 3.10: Use named icon "text-x-generic". */ #define GTK_STOCK_FILE "gtk-file" @@ -337,6 +393,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Find" item. * <inlinegraphic fileref="edit-find.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "edit-find". */ #define GTK_STOCK_FIND "gtk-find" @@ -345,6 +403,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Find and Replace" item. * <inlinegraphic fileref="edit-find-replace.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "edit-find-replace". */ #define GTK_STOCK_FIND_AND_REPLACE "gtk-find-and-replace" @@ -353,6 +413,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Floppy" item. * <inlinegraphic fileref="media-floppy.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10 */ #define GTK_STOCK_FLOPPY "gtk-floppy" @@ -363,6 +425,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="view-fullscreen.png" format="PNG"></inlinegraphic> * * Since: 2.8 + * + * Deprecated: 3.10: Use named icon "view-fullscreen". */ #define GTK_STOCK_FULLSCREEN "gtk-fullscreen" @@ -371,6 +435,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Bottom" item. * <inlinegraphic fileref="go-bottom.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "go-bottom". */ #define GTK_STOCK_GOTO_BOTTOM "gtk-goto-bottom" @@ -381,6 +447,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="go-first-ltr.png" format="PNG"></inlinegraphic> * RTL variant * <inlinegraphic fileref="go-first-rtl.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "go-first". */ #define GTK_STOCK_GOTO_FIRST "gtk-goto-first" @@ -391,6 +459,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="go-last-ltr.png" format="PNG"></inlinegraphic> * RTL variant * <inlinegraphic fileref="go-last-rtl.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "go-last". */ #define GTK_STOCK_GOTO_LAST "gtk-goto-last" @@ -399,6 +469,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Top" item. * <inlinegraphic fileref="go-top.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "go-top". */ #define GTK_STOCK_GOTO_TOP "gtk-goto-top" @@ -409,7 +481,9 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="go-previous-ltr.png" format="PNG"></inlinegraphic> * RTL variant * <inlinegraphic fileref="go-previous-rtl.png" format="PNG"></inlinegraphic> - */ + * + * Deprecated: 3.10: Use named icon "go-previous". +*/ #define GTK_STOCK_GO_BACK "gtk-go-back" /** @@ -417,6 +491,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Down" item. * <inlinegraphic fileref="go-down.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "go-down". */ #define GTK_STOCK_GO_DOWN "gtk-go-down" @@ -427,6 +503,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="go-next-ltr.png" format="PNG"></inlinegraphic> * RTL variant * <inlinegraphic fileref="go-next-rtl.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "go-next". */ #define GTK_STOCK_GO_FORWARD "gtk-go-forward" @@ -435,6 +513,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Up" item. * <inlinegraphic fileref="go-up.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "go-up". */ #define GTK_STOCK_GO_UP "gtk-go-up" @@ -445,6 +525,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="drive-harddisk.png" format="PNG"></inlinegraphic> * * Since: 2.4 + * + * Deprecated: 3.10: Use named icon "drive-harddisk". */ #define GTK_STOCK_HARDDISK "gtk-harddisk" @@ -453,6 +535,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Help" item. * <inlinegraphic fileref="help-contents.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "help-browser". */ #define GTK_STOCK_HELP "gtk-help" @@ -461,6 +545,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Home" item. * <inlinegraphic fileref="go-home.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "go-home". */ #define GTK_STOCK_HOME "gtk-home" @@ -469,6 +555,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Index" item. * <inlinegraphic fileref="gtk-index.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10 */ #define GTK_STOCK_INDEX "gtk-index" @@ -481,6 +569,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="format-indent-more-rtl.png" format="PNG"></inlinegraphic> * * Since: 2.4 + * + * Deprecated: 3.10: Use named icon "format-indent-more". */ #define GTK_STOCK_INDENT "gtk-indent" @@ -491,6 +581,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="dialog-information.png" format="PNG"></inlinegraphic> * * Since: 2.8 + * + * Deprecated: 3.10: Use named icon "dialog-information". */ #define GTK_STOCK_INFO "gtk-info" @@ -499,6 +591,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Italic" item. * <inlinegraphic fileref="format-text-italic.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "format-text-italic". */ #define GTK_STOCK_ITALIC "gtk-italic" @@ -509,6 +603,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="go-jump-ltr.png" format="PNG"></inlinegraphic> * RTL-variant * <inlinegraphic fileref="go-jump-rtl.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "go-jump". */ #define GTK_STOCK_JUMP_TO "gtk-jump-to" @@ -517,6 +613,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Center" item. * <inlinegraphic fileref="format-justify-center.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "format-justify-center". */ #define GTK_STOCK_JUSTIFY_CENTER "gtk-justify-center" @@ -525,6 +623,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Fill" item. * <inlinegraphic fileref="format-justify-fill.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "format-justify-fill". */ #define GTK_STOCK_JUSTIFY_FILL "gtk-justify-fill" @@ -533,6 +633,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Left" item. * <inlinegraphic fileref="format-justify-left.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "format-justify-left". */ #define GTK_STOCK_JUSTIFY_LEFT "gtk-justify-left" @@ -541,6 +643,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Right" item. * <inlinegraphic fileref="format-justify-right.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "format-justify-right". */ #define GTK_STOCK_JUSTIFY_RIGHT "gtk-justify-right" @@ -551,6 +655,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="view-restore.png" format="PNG"></inlinegraphic> * * Since: 2.8 + * + * Deprecated: 3.10: Use named icon "view-restore". */ #define GTK_STOCK_LEAVE_FULLSCREEN "gtk-leave-fullscreen" @@ -559,6 +665,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Missing image" icon. * <inlinegraphic fileref="image-missing.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "image-missing". */ #define GTK_STOCK_MISSING_IMAGE "gtk-missing-image" @@ -571,6 +679,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="media-seek-forward-rtl.png" format="PNG"></inlinegraphic> * * Since: 2.6 + * + * Deprecated: 3.10: Use named icon "media-seek-forward" or the label "_Forward". */ #define GTK_STOCK_MEDIA_FORWARD "gtk-media-forward" @@ -583,6 +693,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="media-skip-forward-rtl.png" format="PNG"></inlinegraphic> * * Since: 2.6 + * + * Deprecated: 3.10: Use named icon "media-skip-forward" or the label "_Next". */ #define GTK_STOCK_MEDIA_NEXT "gtk-media-next" @@ -593,6 +705,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="media-playback-pause.png" format="PNG"></inlinegraphic> * * Since: 2.6 + * + * Deprecated: 3.10: Use named icon "media-playback-pause" or the label "P_ause". */ #define GTK_STOCK_MEDIA_PAUSE "gtk-media-pause" @@ -605,6 +719,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="media-playback-start-rtl.png" format="PNG"></inlinegraphic> * * Since: 2.6 + * + * Deprecated: 3.10: Use named icon "media-playback-start" or the label "_Play". */ #define GTK_STOCK_MEDIA_PLAY "gtk-media-play" @@ -617,6 +733,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="media-skip-backward-rtl.png" format="PNG"></inlinegraphic> * * Since: 2.6 + * + * Deprecated: 3.10: Use named icon "media-skip-backward" or the label "Pre_vious". */ #define GTK_STOCK_MEDIA_PREVIOUS "gtk-media-previous" @@ -627,6 +745,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="media-record.png" format="PNG"></inlinegraphic> * * Since: 2.6 + * + * Deprecated: 3.10: Use named icon "media-record" or the label "_Record". */ #define GTK_STOCK_MEDIA_RECORD "gtk-media-record" @@ -639,6 +759,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="media-seek-backward-rtl.png" format="PNG"></inlinegraphic> * * Since: 2.6 + * + * Deprecated: 3.10: Use named icon "media-seek-backward" or the label "R_ewind". */ #define GTK_STOCK_MEDIA_REWIND "gtk-media-rewind" @@ -649,6 +771,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="media-playback-stop.png" format="PNG"></inlinegraphic> * * Since: 2.6 + * + * Deprecated: 3.10: Use named icon "media-playback-stop" or the label "_Stop". */ #define GTK_STOCK_MEDIA_STOP "gtk-media-stop" @@ -659,6 +783,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="network-idle.png" format="PNG"></inlinegraphic> * * Since: 2.4 + * + * Deprecated: 3.10: Use named icon "network-workgroup". */ #define GTK_STOCK_NETWORK "gtk-network" @@ -667,6 +793,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "New" item. * <inlinegraphic fileref="document-new.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "document-new" or the label "_New". */ #define GTK_STOCK_NEW "gtk-new" @@ -675,6 +803,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "No" item. * <inlinegraphic fileref="gtk-no.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10 */ #define GTK_STOCK_NO "gtk-no" @@ -683,6 +813,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "OK" item. * <inlinegraphic fileref="gtk-ok.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Do not use an icon. Use label "_OK". */ #define GTK_STOCK_OK "gtk-ok" @@ -691,6 +823,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Open" item. * <inlinegraphic fileref="document-open.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "document-open" or the label "_Open". */ #define GTK_STOCK_OPEN "gtk-open" @@ -701,6 +835,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="gtk-orientation-portrait.png" format="PNG"></inlinegraphic> * * Since: 2.10 + * + * Deprecated: 3.10 */ #define GTK_STOCK_ORIENTATION_PORTRAIT "gtk-orientation-portrait" @@ -711,6 +847,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="gtk-orientation-landscape.png" format="PNG"></inlinegraphic> * * Since: 2.10 + * + * Deprecated: 3.10 */ #define GTK_STOCK_ORIENTATION_LANDSCAPE "gtk-orientation-landscape" @@ -721,6 +859,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="gtk-orientation-reverse-landscape.png" format="PNG"></inlinegraphic> * * Since: 2.10 + * + * Deprecated: 3.10 */ #define GTK_STOCK_ORIENTATION_REVERSE_LANDSCAPE "gtk-orientation-reverse-landscape" @@ -731,6 +871,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="gtk-orientation-reverse-portrait.png" format="PNG"></inlinegraphic> * * Since: 2.10 + * + * Deprecated: 3.10 */ #define GTK_STOCK_ORIENTATION_REVERSE_PORTRAIT "gtk-orientation-reverse-portrait" @@ -741,6 +883,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="gtk-page-setup.png" format="PNG"></inlinegraphic> * * Since: 2.14 + * + * Deprecated: 3.10: Use named icon "document-page-setup" or the label "Page Set_up". */ #define GTK_STOCK_PAGE_SETUP "gtk-page-setup" @@ -749,6 +893,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Paste" item. * <inlinegraphic fileref="edit-paste.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Do not use an icon. Use label "_Paste". */ #define GTK_STOCK_PASTE "gtk-paste" @@ -757,6 +903,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Preferences" item. * <inlinegraphic fileref="gtk-preferences.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "preferences-system" or the label "_Preferences". */ #define GTK_STOCK_PREFERENCES "gtk-preferences" @@ -765,6 +913,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Print" item. * <inlinegraphic fileref="document-print.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "document-print" or the label "_Print". */ #define GTK_STOCK_PRINT "gtk-print" @@ -775,6 +925,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="printer-error.png" format="PNG"></inlinegraphic> * * Since: 2.14 + * + * Deprecated: 3.10: Use named icon "printer-error". */ #define GTK_STOCK_PRINT_ERROR "gtk-print-error" @@ -785,6 +937,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="printer-paused.png" format="PNG"></inlinegraphic> * * Since: 2.14 + * + * Deprecated: 3.10 */ #define GTK_STOCK_PRINT_PAUSED "gtk-print-paused" @@ -793,6 +947,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Print Preview" item. * <inlinegraphic fileref="document-print-preview.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use label "Pre_view". */ #define GTK_STOCK_PRINT_PREVIEW "gtk-print-preview" @@ -803,6 +959,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="printer-info.png" format="PNG"></inlinegraphic> * * Since: 2.14 + * + * Deprecated: 3.10 */ #define GTK_STOCK_PRINT_REPORT "gtk-print-report" @@ -814,6 +972,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="printer-warning.png" format="PNG"></inlinegraphic> * * Since: 2.14 + * + * Deprecated: 3.10 */ #define GTK_STOCK_PRINT_WARNING "gtk-print-warning" @@ -822,6 +982,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Properties" item. * <inlinegraphic fileref="document-properties.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "document-properties" or the label "_Properties". */ #define GTK_STOCK_PROPERTIES "gtk-properties" @@ -830,6 +992,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Quit" item. * <inlinegraphic fileref="application-exit.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "application-exit" or the label "_Quit". */ #define GTK_STOCK_QUIT "gtk-quit" @@ -840,6 +1004,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="edit-redo-ltr.png" format="PNG"></inlinegraphic> * RTL variant * <inlinegraphic fileref="edit-redo-rtl.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "edit-redo" or the label "_Redo". */ #define GTK_STOCK_REDO "gtk-redo" @@ -848,6 +1014,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Refresh" item. * <inlinegraphic fileref="view-refresh.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "view-refresh" or the label "_Refresh". */ #define GTK_STOCK_REFRESH "gtk-refresh" @@ -856,6 +1024,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Remove" item. * <inlinegraphic fileref="list-remove.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "list-remove" or the label "_Remove". */ #define GTK_STOCK_REMOVE "gtk-remove" @@ -866,6 +1036,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="document-revert-ltr.png" format="PNG"></inlinegraphic> * RTL variant * <inlinegraphic fileref="document-revert-rtl.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "document-revert" or the label "_Revert". */ #define GTK_STOCK_REVERT_TO_SAVED "gtk-revert-to-saved" @@ -874,6 +1046,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Save" item. * <inlinegraphic fileref="document-save.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "document-save" or the label "_Save". */ #define GTK_STOCK_SAVE "gtk-save" @@ -882,6 +1056,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Save As" item. * <inlinegraphic fileref="document-save-as.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "document-save-as" or the label "Save _As". */ #define GTK_STOCK_SAVE_AS "gtk-save-as" @@ -892,6 +1068,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="edit-select-all.png" format="PNG"></inlinegraphic> * * Since: 2.10 + * + * Deprecated: 3.10: Use named icon "edit-select-all" or the label "Select _All". */ #define GTK_STOCK_SELECT_ALL "gtk-select-all" @@ -900,6 +1078,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Color" item. * <inlinegraphic fileref="gtk-select-color.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10 */ #define GTK_STOCK_SELECT_COLOR "gtk-select-color" @@ -908,6 +1088,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Font" item. * <inlinegraphic fileref="gtk-font.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10 */ #define GTK_STOCK_SELECT_FONT "gtk-select-font" @@ -916,6 +1098,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Ascending" item. * <inlinegraphic fileref="view-sort-ascending.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "view-sort-ascending". */ #define GTK_STOCK_SORT_ASCENDING "gtk-sort-ascending" @@ -924,6 +1108,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Descending" item. * <inlinegraphic fileref="view-sort-descending.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "view-sort-descending". */ #define GTK_STOCK_SORT_DESCENDING "gtk-sort-descending" @@ -932,6 +1118,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Spell Check" item. * <inlinegraphic fileref="tools-check-spelling.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "tools-check-spelling". */ #define GTK_STOCK_SPELL_CHECK "gtk-spell-check" @@ -940,6 +1128,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Stop" item. * <inlinegraphic fileref="process-stop.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "process-stop" or the label "_Stop". */ #define GTK_STOCK_STOP "gtk-stop" @@ -948,6 +1138,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Strikethrough" item. * <inlinegraphic fileref="format-text-strikethrough.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "format-text-strikethrough" or the label "_Strikethrough". */ #define GTK_STOCK_STRIKETHROUGH "gtk-strikethrough" @@ -958,6 +1150,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="gtk-undelete-ltr.png" format="PNG"></inlinegraphic> * RTL variant * <inlinegraphic fileref="gtk-undelete-rtl.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10 */ #define GTK_STOCK_UNDELETE "gtk-undelete" @@ -966,6 +1160,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Underline" item. * <inlinegraphic fileref="format-text-underline.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "format-text-underline" or the label "_Underline". */ #define GTK_STOCK_UNDERLINE "gtk-underline" @@ -976,6 +1172,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="edit-undo-ltr.png" format="PNG"></inlinegraphic> * RTL variant * <inlinegraphic fileref="edit-undo-rtl.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "edit-undo" or the label "_Undo". */ #define GTK_STOCK_UNDO "gtk-undo" @@ -988,6 +1186,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * <inlinegraphic fileref="format-indent-less-rtl.png" format="PNG"></inlinegraphic> * * Since: 2.4 + * + * Deprecated: 3.10: Use named icon "format-indent-less". */ #define GTK_STOCK_UNINDENT "gtk-unindent" @@ -996,6 +1196,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Yes" item. * <inlinegraphic fileref="gtk-yes.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10 */ #define GTK_STOCK_YES "gtk-yes" @@ -1004,6 +1206,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Zoom 100%" item. * <inlinegraphic fileref="zoom-original.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "zoom-original" or the label "_Normal Size". */ #define GTK_STOCK_ZOOM_100 "gtk-zoom-100" @@ -1012,6 +1216,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Zoom to Fit" item. * <inlinegraphic fileref="zoom-fit-best.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "zoom-fit-best" or the label "Best _Fit". */ #define GTK_STOCK_ZOOM_FIT "gtk-zoom-fit" @@ -1020,6 +1226,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Zoom In" item. * <inlinegraphic fileref="zoom-in.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "zoom-in" or the label "Zoom _In". */ #define GTK_STOCK_ZOOM_IN "gtk-zoom-in" @@ -1028,6 +1236,8 @@ void gtk_stock_set_translate_func (const gchar *domain, * * The "Zoom Out" item. * <inlinegraphic fileref="zoom-out.png" format="PNG"></inlinegraphic> + * + * Deprecated: 3.10: Use named icon "zoom-out" or the label "Zoom _Out". */ #define GTK_STOCK_ZOOM_OUT "gtk-zoom-out" diff --git a/gtk/gtktoggletoolbutton.c b/gtk/gtktoggletoolbutton.c index 0ed568cbe1..8b2f084867 100644 --- a/gtk/gtktoggletoolbutton.c +++ b/gtk/gtktoggletoolbutton.c @@ -40,8 +40,7 @@ * button. * * Use gtk_toggle_tool_button_new() to create a new - * #GtkToggleToolButton. Use gtk_toggle_tool_button_new_from_stock() to - * create a new #GtkToggleToolButton containing a stock item. + * #GtkToggleToolButton. */ @@ -223,7 +222,9 @@ gtk_toggle_tool_button_create_menu_proxy (GtkToolItem *item) label_widget = gtk_tool_button_get_label_widget (tool_button); label_text = gtk_tool_button_get_label (tool_button); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; stock_id = gtk_tool_button_get_stock_id (tool_button); + G_GNUC_END_IGNORE_DEPRECATIONS; if (GTK_IS_LABEL (label_widget)) { @@ -405,6 +406,8 @@ gtk_toggle_tool_button_new (void) * Return value: A new #GtkToggleToolButton * * Since: 2.4 + * + * Deprecated: 3.10: Use gtk_toggle_tool_button_new() instead. **/ GtkToolItem * gtk_toggle_tool_button_new_from_stock (const gchar *stock_id) diff --git a/gtk/gtktoggletoolbutton.h b/gtk/gtktoggletoolbutton.h index fb8ac859e2..975a4c19c3 100644 --- a/gtk/gtktoggletoolbutton.h +++ b/gtk/gtktoggletoolbutton.h @@ -66,7 +66,7 @@ GDK_AVAILABLE_IN_ALL GType gtk_toggle_tool_button_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL GtkToolItem *gtk_toggle_tool_button_new (void); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10_FOR(gtk_toggle_tool_button_new) GtkToolItem *gtk_toggle_tool_button_new_from_stock (const gchar *stock_id); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtktoolbutton.c b/gtk/gtktoolbutton.c index cf8a22dfa5..61ff7259f3 100644 --- a/gtk/gtktoolbutton.c +++ b/gtk/gtktoolbutton.c @@ -45,9 +45,7 @@ * * #GtkToolButton<!-- -->s are #GtkToolItems containing buttons. * - * Use gtk_tool_button_new() to create a new #GtkToolButton. Use - * gtk_tool_button_new_from_stock() to create a #GtkToolButton - * containing a stock item. + * Use gtk_tool_button_new() to create a new #GtkToolButton. * * The label of a #GtkToolButton is determined by the properties * #GtkToolButton:label-widget, #GtkToolButton:label, and @@ -254,6 +252,11 @@ gtk_tool_button_class_init (GtkToolButtonClass *klass) P_("Widget to use as the item label"), GTK_TYPE_WIDGET, GTK_PARAM_READWRITE)); + /** + * GtkToolButton:stock-id: + * + * Deprecated: 3.10: Use #GtkToolButton:icon-name instead. + */ g_object_class_install_property (object_class, PROP_STOCK_ID, g_param_spec_string ("stock-id", @@ -515,7 +518,9 @@ gtk_tool_button_construct_contents (GtkToolItem *tool_item) else if (button->priv->stock_id && gtk_icon_factory_lookup_default (button->priv->stock_id)) { + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; icon = gtk_image_new_from_stock (button->priv->stock_id, icon_size); + G_GNUC_END_IGNORE_DEPRECATIONS; gtk_widget_show (icon); } else if (button->priv->icon_name) @@ -615,7 +620,9 @@ gtk_tool_button_set_property (GObject *object, gtk_tool_button_set_label_widget (button, g_value_get_object (value)); break; case PROP_STOCK_ID: + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; gtk_tool_button_set_stock_id (button, g_value_get_string (value)); + G_GNUC_END_IGNORE_DEPRECATIONS; break; case PROP_ICON_NAME: gtk_tool_button_set_icon_name (button, g_value_get_string (value)); @@ -758,8 +765,12 @@ clone_image_menu_size (GtkImage *image, GtkSettings *settings) if (storage_type == GTK_IMAGE_STOCK) { gchar *stock_id; + GtkWidget *widget; + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; gtk_image_get_stock (image, &stock_id, NULL); - return gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_MENU); + widget = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_MENU); + G_GNUC_END_IGNORE_DEPRECATIONS; + return widget; } else if (storage_type == GTK_IMAGE_ICON_NAME) { @@ -848,7 +859,9 @@ gtk_tool_button_create_menu_proxy (GtkToolItem *item) } else if (button->priv->stock_id) { + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; menu_image = gtk_image_new_from_stock (button->priv->stock_id, GTK_ICON_SIZE_MENU); + G_GNUC_END_IGNORE_DEPRECATIONS; } if (menu_image) @@ -935,7 +948,11 @@ gtk_tool_button_update (GtkActivatable *activatable, if (strcmp (property_name, "short-label") == 0) gtk_tool_button_set_label (button, gtk_action_get_short_label (action)); else if (strcmp (property_name, "stock-id") == 0) - gtk_tool_button_set_stock_id (button, gtk_action_get_stock_id (action)); + { + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + gtk_tool_button_set_stock_id (button, gtk_action_get_stock_id (action)); + G_GNUC_END_IGNORE_DEPRECATIONS; + } else if (strcmp (property_name, "gicon") == 0) { const gchar *stock_id = gtk_action_get_stock_id (action); @@ -978,11 +995,15 @@ gtk_tool_button_sync_action_properties (GtkActivatable *activatable, return; button = GTK_TOOL_BUTTON (activatable); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; stock_id = gtk_action_get_stock_id (action); + G_GNUC_END_IGNORE_DEPRECATIONS; gtk_tool_button_set_label (button, gtk_action_get_short_label (action)); gtk_tool_button_set_use_underline (button, TRUE); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; gtk_tool_button_set_stock_id (button, stock_id); + G_GNUC_END_IGNORE_DEPRECATIONS; gtk_tool_button_set_icon_name (button, gtk_action_get_icon_name (action)); if (stock_id && gtk_icon_factory_lookup_default (stock_id)) @@ -1020,6 +1041,8 @@ gtk_tool_button_sync_action_properties (GtkActivatable *activatable, * Return value: A new #GtkToolButton * * Since: 2.4 + * + * Deprecated: 3.10: Use gtk_tool_button_new() instead. **/ GtkToolItem * gtk_tool_button_new_from_stock (const gchar *stock_id) @@ -1187,6 +1210,8 @@ gtk_tool_button_get_use_underline (GtkToolButton *button) * overridden by non-%NULL "label" and "icon_widget" properties. * * Since: 2.4 + * + * Deprecated: 3.10: Use gtk_tool_button_set_icon_name() instead. **/ void gtk_tool_button_set_stock_id (GtkToolButton *button, @@ -1216,6 +1241,8 @@ gtk_tool_button_set_stock_id (GtkToolButton *button, * Return value: the name of the stock item for @button. * * Since: 2.4 + * + * Deprecated: 3.10: Use gtk_tool_button_get_icon_name() instead. **/ const gchar * gtk_tool_button_get_stock_id (GtkToolButton *button) diff --git a/gtk/gtktoolbutton.h b/gtk/gtktoolbutton.h index ae0e45a192..47b4b0a1a0 100644 --- a/gtk/gtktoolbutton.h +++ b/gtk/gtktoolbutton.h @@ -69,7 +69,7 @@ GType gtk_tool_button_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL GtkToolItem *gtk_tool_button_new (GtkWidget *icon_widget, const gchar *label); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10_FOR(gtk_tool_button_new) GtkToolItem *gtk_tool_button_new_from_stock (const gchar *stock_id); GDK_AVAILABLE_IN_ALL @@ -82,10 +82,10 @@ void gtk_tool_button_set_use_underline (GtkToolButton *button, gboolean use_underline); GDK_AVAILABLE_IN_ALL gboolean gtk_tool_button_get_use_underline (GtkToolButton *button); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10_FOR(gtk_tool_button_set_icon_name) void gtk_tool_button_set_stock_id (GtkToolButton *button, const gchar *stock_id); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10_FOR(gtk_tool_button_get_icon_name) const gchar * gtk_tool_button_get_stock_id (GtkToolButton *button); GDK_AVAILABLE_IN_ALL void gtk_tool_button_set_icon_name (GtkToolButton *button, diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c index 0914641c5d..9e67511a37 100644 --- a/gtk/gtktooltip.c +++ b/gtk/gtktooltip.c @@ -67,7 +67,7 @@ * to the signal handler is a GtkTooltip object. This is the object that we * are about to display as a tooltip, and can be manipulated in your callback * using functions like gtk_tooltip_set_icon(). There are functions for setting - * the tooltip's markup, setting an image from a stock icon, or even putting in + * the tooltip's markup, setting an image from a named icon, or even putting in * a custom widget. * </para> * </listitem> @@ -382,6 +382,8 @@ gtk_tooltip_set_icon (GtkTooltip *tooltip, * by @size. If @stock_id is %NULL, the image will be hidden. * * Since: 2.12 + * + * Deprecated: 3.10: Use gtk_tooltip_set_icon_from_icon_name() instead. */ void gtk_tooltip_set_icon_from_stock (GtkTooltip *tooltip, @@ -390,7 +392,9 @@ gtk_tooltip_set_icon_from_stock (GtkTooltip *tooltip, { g_return_if_fail (GTK_IS_TOOLTIP (tooltip)); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; gtk_image_set_from_stock (GTK_IMAGE (tooltip->image), stock_id, size); + G_GNUC_END_IGNORE_DEPRECATIONS; if (stock_id) gtk_widget_show (tooltip->image); diff --git a/gtk/gtktooltip.h b/gtk/gtktooltip.h index 2a6e7f2d2a..7af3c42a45 100644 --- a/gtk/gtktooltip.h +++ b/gtk/gtktooltip.h @@ -44,7 +44,7 @@ void gtk_tooltip_set_text (GtkTooltip *tooltip, GDK_AVAILABLE_IN_ALL void gtk_tooltip_set_icon (GtkTooltip *tooltip, GdkPixbuf *pixbuf); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10_FOR(gtk_tooltip_set_icon_from_icon_name) void gtk_tooltip_set_icon_from_stock (GtkTooltip *tooltip, const gchar *stock_id, GtkIconSize size); diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 9626c800f3..c0cb5263f6 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -9708,6 +9708,8 @@ gtk_widget_create_pango_layout (GtkWidget *widget, * stock ID wasn't known * * Since: 3.0 + * + * Deprecated: 3.10: Use gtk_icon_theme_load_icon() instead. **/ GdkPixbuf* gtk_widget_render_icon_pixbuf (GtkWidget *widget, diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h index 49008cfba6..b17a15d895 100644 --- a/gtk/gtkwidget.h +++ b/gtk/gtkwidget.h @@ -1001,7 +1001,7 @@ GDK_AVAILABLE_IN_ALL PangoLayout *gtk_widget_create_pango_layout (GtkWidget *widget, const gchar *text); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_10_FOR(gtk_icon_theme_load_icon) GdkPixbuf *gtk_widget_render_icon_pixbuf (GtkWidget *widget, const gchar *stock_id, GtkIconSize size); |