[gtk+/wip/baedert/box: 52/65] Remove GtkStock
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/box: 52/65] Remove GtkStock
- Date: Mon, 17 Oct 2016 15:00:31 +0000 (UTC)
commit 59d394322391fb5a5306d39acbd2b012461867af
Author: Timm Bäder <mail baedert org>
Date: Sun Oct 16 13:12:16 2016 +0200
Remove GtkStock
docs/reference/gtk/gtk4-sections.txt | 219 -------
gtk/deprecated/Makefile.inc | 2 -
gtk/deprecated/gtkaction.c | 10 -
gtk/deprecated/gtkactiongroup.c | 18 -
gtk/deprecated/gtkactiongroup.h | 2 -
gtk/deprecated/gtkstock.c | 575 -----------------
gtk/deprecated/gtkstock.h | 1136 ----------------------------------
gtk/gtk.h | 1 -
gtk/gtkbuilder.c | 2 -
gtk/gtkdialog.c | 1 -
gtk/gtkfontchooserdialog.c | 1 -
gtk/gtkinfobar.c | 8 +-
gtk/gtktoolbutton.c | 45 +-
tests/testactions.c | 10 +-
tests/testgtk.c | 6 +-
tests/testmerge.c | 20 +-
16 files changed, 37 insertions(+), 2019 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index fdb5077..63c764a 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -643,7 +643,6 @@ gtk_button_new
gtk_button_new_with_label
gtk_button_new_with_mnemonic
gtk_button_new_from_icon_name
-gtk_button_new_from_stock
gtk_button_pressed
gtk_button_released
gtk_button_clicked
@@ -653,8 +652,6 @@ gtk_button_set_relief
gtk_button_get_relief
gtk_button_get_label
gtk_button_set_label
-gtk_button_get_use_stock
-gtk_button_set_use_stock
gtk_button_get_use_underline
gtk_button_set_use_underline
gtk_button_set_focus_on_click
@@ -1118,12 +1115,10 @@ gtk_entry_get_tabs
gtk_entry_set_tabs
GtkEntryIconPosition
gtk_entry_set_icon_from_pixbuf
-gtk_entry_set_icon_from_stock
gtk_entry_set_icon_from_icon_name
gtk_entry_set_icon_from_gicon
gtk_entry_get_icon_storage_type
gtk_entry_get_icon_pixbuf
-gtk_entry_get_icon_stock
gtk_entry_get_icon_name
gtk_entry_get_icon_gicon
gtk_entry_set_icon_activatable
@@ -1713,14 +1708,12 @@ GtkIconViewPrivate
GtkImage
GtkImageType
gtk_image_get_pixbuf
-gtk_image_get_stock
gtk_image_get_animation
gtk_image_get_icon_name
gtk_image_get_gicon
gtk_image_get_storage_type
gtk_image_new_from_file
gtk_image_new_from_pixbuf
-gtk_image_new_from_stock
gtk_image_new_from_animation
gtk_image_new_from_icon_name
gtk_image_new_from_gicon
@@ -1728,7 +1721,6 @@ gtk_image_new_from_resource
gtk_image_new_from_surface
gtk_image_set_from_file
gtk_image_set_from_pixbuf
-gtk_image_set_from_stock
gtk_image_set_from_animation
gtk_image_set_from_icon_name
gtk_image_set_from_gicon
@@ -1750,41 +1742,12 @@ GtkImagePrivate
gtk_image_get_type
GtkImageIconSetData
GtkImagePixbufData
-GtkImageStockData
GtkImageAnimationData
GtkImageIconNameData
GtkImageGIconData
</SECTION>
<SECTION>
-<FILE>gtkimagemenuitem</FILE>
-<TITLE>GtkImageMenuItem</TITLE>
-GtkImageMenuItem
-GtkImageMenuItemClass
-gtk_image_menu_item_set_image
-gtk_image_menu_item_get_image
-gtk_image_menu_item_new
-gtk_image_menu_item_new_from_stock
-gtk_image_menu_item_new_with_label
-gtk_image_menu_item_new_with_mnemonic
-gtk_image_menu_item_get_use_stock
-gtk_image_menu_item_set_use_stock
-gtk_image_menu_item_get_always_show_image
-gtk_image_menu_item_set_always_show_image
-gtk_image_menu_item_set_accel_group
-<SUBSECTION Standard>
-GTK_IMAGE_MENU_ITEM
-GTK_IMAGE_MENU_ITEM_CLASS
-GTK_IMAGE_MENU_ITEM_GET_CLASS
-GTK_IS_IMAGE_MENU_ITEM
-GTK_IS_IMAGE_MENU_ITEM_CLASS
-GTK_TYPE_IMAGE_MENU_ITEM
-<SUBSECTION Private>
-GtkImageMenuItemPrivate
-gtk_image_menu_item_get_type
-</SECTION>
-
-<SECTION>
<FILE>gtkimcontext</FILE>
<TITLE>GtkIMContext</TITLE>
GtkIMContext
@@ -3145,57 +3108,6 @@ gtk_statusbar_get_type
</SECTION>
<SECTION>
-<FILE>gtkstatusicon</FILE>
-<TITLE>GtkStatusIcon</TITLE>
-GtkStatusIcon
-gtk_status_icon_new
-gtk_status_icon_new_from_pixbuf
-gtk_status_icon_new_from_file
-gtk_status_icon_new_from_stock
-gtk_status_icon_new_from_icon_name
-gtk_status_icon_new_from_gicon
-gtk_status_icon_set_from_pixbuf
-gtk_status_icon_set_from_file
-gtk_status_icon_set_from_stock
-gtk_status_icon_set_from_icon_name
-gtk_status_icon_set_from_gicon
-gtk_status_icon_get_storage_type
-gtk_status_icon_get_pixbuf
-gtk_status_icon_get_stock
-gtk_status_icon_get_icon_name
-gtk_status_icon_get_gicon
-gtk_status_icon_get_size
-gtk_status_icon_set_screen
-gtk_status_icon_get_screen
-gtk_status_icon_set_tooltip_text
-gtk_status_icon_get_tooltip_text
-gtk_status_icon_set_tooltip_markup
-gtk_status_icon_get_tooltip_markup
-gtk_status_icon_set_has_tooltip
-gtk_status_icon_get_has_tooltip
-gtk_status_icon_set_title
-gtk_status_icon_get_title
-gtk_status_icon_set_name
-gtk_status_icon_set_visible
-gtk_status_icon_get_visible
-gtk_status_icon_is_embedded
-gtk_status_icon_position_menu
-gtk_status_icon_get_geometry
-gtk_status_icon_get_x11_window_id
-
-<SUBSECTION Standard>
-GTK_TYPE_STATUS_ICON
-GTK_STATUS_ICON
-GTK_STATUS_ICON_CLASS
-GTK_IS_STATUS_ICON
-GTK_IS_STATUS_ICON_CLASS
-GTK_STATUS_ICON_GET_CLASS
-<SUBSECTION Private>
-GtkStatusIconPrivate
-gtk_status_icon_get_type
-</SECTION>
-
-<SECTION>
<FILE>gtklevelbar</FILE>
<TITLE>GtkLevelBar</TITLE>
GTK_LEVEL_BAR_OFFSET_LOW
@@ -3815,13 +3727,10 @@ GtkSeparatorToolItemPrivate
GtkToolButton
GtkToolButtonClass
gtk_tool_button_new
-gtk_tool_button_new_from_stock
gtk_tool_button_set_label
gtk_tool_button_get_label
gtk_tool_button_set_use_underline
gtk_tool_button_get_use_underline
-gtk_tool_button_set_stock_id
-gtk_tool_button_get_stock_id
gtk_tool_button_set_icon_name
gtk_tool_button_get_icon_name
gtk_tool_button_set_icon_widget
@@ -3848,7 +3757,6 @@ GtkToolButtonPrivate
GtkMenuToolButton
GtkMenuToolButtonClass
gtk_menu_tool_button_new
-gtk_menu_tool_button_new_from_stock
gtk_menu_tool_button_set_menu
gtk_menu_tool_button_get_menu
gtk_menu_tool_button_set_arrow_tooltip_text
@@ -3872,9 +3780,7 @@ GtkMenuToolButtonPrivate
<TITLE>GtkRadioToolButton</TITLE>
GtkRadioToolButton
gtk_radio_tool_button_new
-gtk_radio_tool_button_new_from_stock
gtk_radio_tool_button_new_from_widget
-gtk_radio_tool_button_new_with_stock_from_widget
gtk_radio_tool_button_get_group
gtk_radio_tool_button_set_group
@@ -3896,7 +3802,6 @@ gtk_radio_tool_button_get_type
GtkToggleToolButton
GtkToggleToolButtonClass
gtk_toggle_tool_button_new
-gtk_toggle_tool_button_new_from_stock
gtk_toggle_tool_button_set_active
gtk_toggle_tool_button_get_active
@@ -3997,7 +3902,6 @@ GtkTooltip
gtk_tooltip_set_markup
gtk_tooltip_set_text
gtk_tooltip_set_icon
-gtk_tooltip_set_icon_from_stock
gtk_tooltip_set_icon_from_icon_name
gtk_tooltip_set_icon_from_gicon
gtk_tooltip_set_custom
@@ -5949,7 +5853,6 @@ gtk_drag_begin_with_coordinates
gtk_drag_cancel
gtk_drag_set_icon_widget
gtk_drag_set_icon_pixbuf
-gtk_drag_set_icon_stock
gtk_drag_set_icon_surface
gtk_drag_set_icon_name
gtk_drag_set_icon_gicon
@@ -5957,7 +5860,6 @@ gtk_drag_set_icon_default
gtk_drag_check_threshold
gtk_drag_source_set
gtk_drag_source_set_icon_pixbuf
-gtk_drag_source_set_icon_stock
gtk_drag_source_set_icon_name
gtk_drag_source_set_icon_gicon
gtk_drag_source_unset
@@ -6012,127 +5914,6 @@ GtkSortType
</SECTION>
<SECTION>
-<FILE>gtkstock</FILE>
-<TITLE>Stock Items</TITLE>
-GtkStockItem
-gtk_stock_add
-gtk_stock_add_static
-gtk_stock_item_copy
-gtk_stock_item_free
-gtk_stock_list_ids
-gtk_stock_lookup
-gtk_stock_set_translate_func
-<SUBSECTION Stock IDs>
-GTK_STOCK_ABOUT
-GTK_STOCK_ADD
-GTK_STOCK_APPLY
-GTK_STOCK_BOLD
-GTK_STOCK_CANCEL
-GTK_STOCK_CAPS_LOCK_WARNING
-GTK_STOCK_CDROM
-GTK_STOCK_CLEAR
-GTK_STOCK_CLOSE
-GTK_STOCK_COLOR_PICKER
-GTK_STOCK_CONVERT
-GTK_STOCK_CONNECT
-GTK_STOCK_COPY
-GTK_STOCK_CUT
-GTK_STOCK_DELETE
-GTK_STOCK_DIALOG_AUTHENTICATION
-GTK_STOCK_DIALOG_ERROR
-GTK_STOCK_DIALOG_INFO
-GTK_STOCK_DIALOG_QUESTION
-GTK_STOCK_DIALOG_WARNING
-GTK_STOCK_DIRECTORY
-GTK_STOCK_DISCARD
-GTK_STOCK_DISCONNECT
-GTK_STOCK_DND
-GTK_STOCK_DND_MULTIPLE
-GTK_STOCK_EDIT
-GTK_STOCK_EXECUTE
-GTK_STOCK_FILE
-GTK_STOCK_FIND
-GTK_STOCK_FIND_AND_REPLACE
-GTK_STOCK_FLOPPY
-GTK_STOCK_FULLSCREEN
-GTK_STOCK_GOTO_BOTTOM
-GTK_STOCK_GOTO_FIRST
-GTK_STOCK_GOTO_LAST
-GTK_STOCK_GOTO_TOP
-GTK_STOCK_GO_BACK
-GTK_STOCK_GO_DOWN
-GTK_STOCK_GO_FORWARD
-GTK_STOCK_GO_UP
-GTK_STOCK_HARDDISK
-GTK_STOCK_HELP
-GTK_STOCK_HOME
-GTK_STOCK_INDENT
-GTK_STOCK_INDEX
-GTK_STOCK_INFO
-GTK_STOCK_ITALIC
-GTK_STOCK_JUMP_TO
-GTK_STOCK_JUSTIFY_CENTER
-GTK_STOCK_JUSTIFY_FILL
-GTK_STOCK_JUSTIFY_LEFT
-GTK_STOCK_JUSTIFY_RIGHT
-GTK_STOCK_LEAVE_FULLSCREEN
-GTK_STOCK_MEDIA_FORWARD
-GTK_STOCK_MEDIA_NEXT
-GTK_STOCK_MEDIA_PAUSE
-GTK_STOCK_MEDIA_PLAY
-GTK_STOCK_MEDIA_PREVIOUS
-GTK_STOCK_MEDIA_RECORD
-GTK_STOCK_MEDIA_REWIND
-GTK_STOCK_MEDIA_STOP
-GTK_STOCK_MISSING_IMAGE
-GTK_STOCK_NETWORK
-GTK_STOCK_NEW
-GTK_STOCK_NO
-GTK_STOCK_OK
-GTK_STOCK_OPEN
-GTK_STOCK_ORIENTATION_LANDSCAPE
-GTK_STOCK_ORIENTATION_PORTRAIT
-GTK_STOCK_ORIENTATION_REVERSE_LANDSCAPE
-GTK_STOCK_ORIENTATION_REVERSE_PORTRAIT
-GTK_STOCK_PAGE_SETUP
-GTK_STOCK_PASTE
-GTK_STOCK_PREFERENCES
-GTK_STOCK_PRINT
-GTK_STOCK_PRINT_ERROR
-GTK_STOCK_PRINT_PAUSED
-GTK_STOCK_PRINT_PREVIEW
-GTK_STOCK_PRINT_REPORT
-GTK_STOCK_PRINT_WARNING
-GTK_STOCK_PROPERTIES
-GTK_STOCK_QUIT
-GTK_STOCK_REDO
-GTK_STOCK_REFRESH
-GTK_STOCK_REMOVE
-GTK_STOCK_REVERT_TO_SAVED
-GTK_STOCK_SAVE
-GTK_STOCK_SAVE_AS
-GTK_STOCK_SELECT_ALL
-GTK_STOCK_SELECT_COLOR
-GTK_STOCK_SELECT_FONT
-GTK_STOCK_SORT_ASCENDING
-GTK_STOCK_SORT_DESCENDING
-GTK_STOCK_SPELL_CHECK
-GTK_STOCK_STOP
-GTK_STOCK_STRIKETHROUGH
-GTK_STOCK_UNDELETE
-GTK_STOCK_UNDERLINE
-GTK_STOCK_UNDO
-GTK_STOCK_UNINDENT
-GTK_STOCK_YES
-GTK_STOCK_ZOOM_100
-GTK_STOCK_ZOOM_FIT
-GTK_STOCK_ZOOM_IN
-GTK_STOCK_ZOOM_OUT
-<SUBSECTION Private>
-GtkStock
-</SECTION>
-
-<SECTION>
<FILE>gtkicontheme</FILE>
<TITLE>GtkIconTheme</TITLE>
GtkIconInfo
diff --git a/gtk/deprecated/Makefile.inc b/gtk/deprecated/Makefile.inc
index fdc44f0..c61a564 100644
--- a/gtk/deprecated/Makefile.inc
+++ b/gtk/deprecated/Makefile.inc
@@ -5,7 +5,6 @@ deprecated_h_sources = \
deprecated/gtkgradient.h \
deprecated/gtkradioaction.h \
deprecated/gtkrecentaction.h \
- deprecated/gtkstock.h \
deprecated/gtksymboliccolor.h \
deprecated/gtktoggleaction.h \
deprecated/gtkuimanager.h
@@ -21,7 +20,6 @@ deprecated_c_sources = \
deprecated/gtkgradient.c \
deprecated/gtkradioaction.c \
deprecated/gtkrecentaction.c \
- deprecated/gtkstock.c \
deprecated/gtksymboliccolor.c \
deprecated/gtktoggleaction.c \
deprecated/gtkuimanager.c
diff --git a/gtk/deprecated/gtkaction.c b/gtk/deprecated/gtkaction.c
index 810c448..036b786 100644
--- a/gtk/deprecated/gtkaction.c
+++ b/gtk/deprecated/gtkaction.c
@@ -94,7 +94,6 @@
#include "gtklabel.h"
#include "gtkmarshalers.h"
#include "gtkmenuitem.h"
-#include "gtkstock.h"
#include "gtktoolbutton.h"
#include "gtktoolbar.h"
#include "gtkprivate.h"
@@ -1426,13 +1425,9 @@ gtk_action_set_label (GtkAction *action,
/* if label is unset, then use the label from the stock item */
if (!action->private_data->label_set && action->private_data->stock_id)
{
- GtkStockItem stock_item;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- if (gtk_stock_lookup (action->private_data->stock_id, &stock_item))
- action->private_data->label = g_strdup (stock_item.label);
-
G_GNUC_END_IGNORE_DEPRECATIONS;
}
@@ -1701,14 +1696,9 @@ gtk_action_set_stock_id (GtkAction *action,
/* update label and short_label if appropriate */
if (!action->private_data->label_set)
{
- GtkStockItem stock_item;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- if (action->private_data->stock_id &&
- gtk_stock_lookup (action->private_data->stock_id, &stock_item))
- gtk_action_set_label (action, stock_item.label);
- else
gtk_action_set_label (action, NULL);
G_GNUC_END_IGNORE_DEPRECATIONS;
diff --git a/gtk/deprecated/gtkactiongroup.c b/gtk/deprecated/gtkactiongroup.c
index 66b85f5..b34e5b4 100644
--- a/gtk/deprecated/gtkactiongroup.c
+++ b/gtk/deprecated/gtkactiongroup.c
@@ -91,7 +91,6 @@
#include "gtkactiongroup.h"
#include "gtkbuildable.h"
#include "gtkicontheme.h"
-#include "gtkstock.h"
#include "gtktoggleaction.h"
#include "gtkradioaction.h"
#include "gtkaccelmap.h"
@@ -109,7 +108,6 @@ struct _GtkActionGroupPrivate
GHashTable *actions;
GtkAccelGroup *accel_group;
- GtkTranslateFunc translate_func;
gpointer translate_data;
GDestroyNotify translate_notify;
};
@@ -361,7 +359,6 @@ gtk_action_group_init (GtkActionGroup *action_group)
action_group->priv->actions = g_hash_table_new_full (g_str_hash, g_str_equal,
NULL,
(GDestroyNotify) remove_action);
- action_group->priv->translate_func = NULL;
action_group->priv->translate_data = NULL;
action_group->priv->translate_notify = NULL;
}
@@ -1001,18 +998,11 @@ gtk_action_group_add_action_with_accel (GtkActionGroup *action_group,
else
{
gchar *stock_id;
- GtkStockItem stock_item;
g_object_get (action, "stock-id", &stock_id, NULL);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- if (stock_id && gtk_stock_lookup (stock_id, &stock_item))
- {
- accel_key = stock_item.keyval;
- accel_mods = stock_item.modifier;
- }
-
G_GNUC_END_IGNORE_DEPRECATIONS;
g_free (stock_id);
@@ -1472,7 +1462,6 @@ gtk_action_group_add_radio_actions_full (GtkActionGroup *action_group
**/
void
gtk_action_group_set_translate_func (GtkActionGroup *action_group,
- GtkTranslateFunc func,
gpointer data,
GDestroyNotify notify)
{
@@ -1485,7 +1474,6 @@ gtk_action_group_set_translate_func (GtkActionGroup *action_group,
if (private->translate_notify)
private->translate_notify (private->translate_data);
- private->translate_func = func;
private->translate_data = data;
private->translate_notify = notify;
}
@@ -1525,7 +1513,6 @@ gtk_action_group_set_translation_domain (GtkActionGroup *action_group,
g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
gtk_action_group_set_translate_func (action_group,
- (GtkTranslateFunc)dgettext_swapped,
g_strdup (domain),
g_free);
}
@@ -1551,7 +1538,6 @@ gtk_action_group_translate_string (GtkActionGroup *action_group,
const gchar *string)
{
GtkActionGroupPrivate *private;
- GtkTranslateFunc translate_func;
gpointer translate_data;
g_return_val_if_fail (GTK_IS_ACTION_GROUP (action_group), string);
@@ -1561,12 +1547,8 @@ gtk_action_group_translate_string (GtkActionGroup *action_group,
private = action_group->priv;
- translate_func = private->translate_func;
translate_data = private->translate_data;
- if (translate_func)
- return translate_func (string, translate_data);
- else
return string;
}
diff --git a/gtk/deprecated/gtkactiongroup.h b/gtk/deprecated/gtkactiongroup.h
index 3ce8f27..ad890f8 100644
--- a/gtk/deprecated/gtkactiongroup.h
+++ b/gtk/deprecated/gtkactiongroup.h
@@ -34,7 +34,6 @@
#endif
#include <gtk/deprecated/gtkaction.h>
-#include <gtk/deprecated/gtkstock.h>
G_BEGIN_DECLS
@@ -245,7 +244,6 @@ void gtk_action_group_add_radio_actions_full (GtkActionGroup
GDestroyNotify destroy);
GDK_DEPRECATED_IN_3_10
void gtk_action_group_set_translate_func (GtkActionGroup *action_group,
- GtkTranslateFunc func,
gpointer data,
GDestroyNotify notify);
GDK_DEPRECATED_IN_3_10
diff --git a/gtk/gtk.h b/gtk/gtk.h
index 5d58d62..ac265ce 100644
--- a/gtk/gtk.h
+++ b/gtk/gtk.h
@@ -250,7 +250,6 @@
#include <gtk/deprecated/gtkgradient.h>
#include <gtk/deprecated/gtkradioaction.h>
#include <gtk/deprecated/gtkrecentaction.h>
-#include <gtk/deprecated/gtkstock.h>
#include <gtk/deprecated/gtksymboliccolor.h>
#include <gtk/deprecated/gtktoggleaction.h>
#include <gtk/deprecated/gtkuimanager.h>
diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c
index 3755dc5..a550e92 100644
--- a/gtk/gtkbuilder.c
+++ b/gtk/gtkbuilder.c
@@ -179,7 +179,6 @@
* <child>
* <object class="GtkButton" id="ok_button">
* <property name="label">gtk-ok</property>
- * <property name="use-stock">TRUE</property>
* <signal name="clicked" handler="ok_button_clicked"/>
* </object>
* </child>
@@ -221,7 +220,6 @@
#include "gtkwindow.h"
#include "gtkicontheme.h"
#include "gtktestutils.h"
-#include "deprecated/gtkstock.h"
static void gtk_builder_finalize (GObject *object);
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c
index 01ab7e4..18da8e6 100644
--- a/gtk/gtkdialog.c
+++ b/gtk/gtkdialog.c
@@ -45,7 +45,6 @@
#include "gtkbuilderprivate.h"
#include "gtksettings.h"
#include "gtktypebuiltins.h"
-#include "deprecated/gtkstock.h"
#include "gtksizegroup.h"
/**
diff --git a/gtk/gtkfontchooserdialog.c b/gtk/gtkfontchooserdialog.c
index 109f841..c981505 100644
--- a/gtk/gtkfontchooserdialog.c
+++ b/gtk/gtkfontchooserdialog.c
@@ -28,7 +28,6 @@
#include "gtkfontchooserwidget.h"
#include "gtkfontchooserutils.h"
#include "gtkbox.h"
-#include "deprecated/gtkstock.h"
#include "gtkintl.h"
#include "gtkaccessible.h"
#include "gtkbuildable.h"
diff --git a/gtk/gtkinfobar.c b/gtk/gtkinfobar.c
index 9974f72..54abb2e 100644
--- a/gtk/gtkinfobar.c
+++ b/gtk/gtkinfobar.c
@@ -49,7 +49,6 @@
#include "gtkrender.h"
#include "gtktypebuiltins.h"
#include "gtkwidgetprivate.h"
-#include "deprecated/gtkstock.h"
/**
* SECTION:gtkinfobar
@@ -655,7 +654,7 @@ add_buttons_valist (GtkInfoBar *info_bar,
/**
* gtk_info_bar_add_buttons:
* @info_bar: a #GtkInfoBar
- * @first_button_text: button text or stock ID
+ * @first_button_text: button text
* @...: response ID for first button, then more text-response_id pairs,
* ending with %NULL
*
@@ -695,14 +694,13 @@ gtk_info_bar_new (void)
/**
* gtk_info_bar_new_with_buttons:
- * @first_button_text: (allow-none): stock ID or text to go in first button, or %NULL
+ * @first_button_text: (allow-none): ext to go in first button, or %NULL
* @...: response ID for first button, then additional buttons, ending
* with %NULL
*
* Creates a new #GtkInfoBar with buttons. 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 any positive number,
+ * 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, GtkInfoBar will emit
* the “response” signal with the corresponding response ID.
diff --git a/gtk/gtktoolbutton.c b/gtk/gtktoolbutton.c
index 6fc5775..594d6af 100644
--- a/gtk/gtktoolbutton.c
+++ b/gtk/gtktoolbutton.c
@@ -23,7 +23,6 @@
#include "gtkbutton.h"
#include "gtkimage.h"
#include "gtklabel.h"
-#include "deprecated/gtkstock.h"
#include "gtkbox.h"
#include "gtkintl.h"
#include "gtktoolbarprivate.h"
@@ -46,19 +45,15 @@
* 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
- * #GtkToolButton:stock-id. If #GtkToolButton:label-widget is
+ * #GtkToolButton:label-widget and #GtkToolButton:label.
+ * If #GtkToolButton:label-widget is
* non-%NULL, then that widget is used as the label. Otherwise, if
* #GtkToolButton:label is non-%NULL, that string is used as the label.
- * Otherwise, if #GtkToolButton:stock-id is non-%NULL, the label is
- * determined by the stock item. Otherwise, the button does not have a label.
*
- * The icon of a #GtkToolButton is determined by the properties
- * #GtkToolButton:icon-widget and #GtkToolButton:stock-id. If
+ * The icon of a #GtkToolButton is determined by the
+ * #GtkToolButton:icon-widget property. If
* #GtkToolButton:icon-widget is non-%NULL, then
- * that widget is used as the icon. Otherwise, if #GtkToolButton:stock-id is
- * non-%NULL, the icon is determined by the stock item. Otherwise,
- * the button does not have a icon.
+ * that widget is used as the icon. Otherwise it does not have an icon.
*
* # CSS nodes
*
@@ -867,9 +862,7 @@ gtk_tool_button_new (GtkWidget *icon_widget,
* Sets @label as the label used for the tool button. The #GtkToolButton:label
* property only has an effect if not overridden by a non-%NULL
* #GtkToolButton:label-widget property. If both the #GtkToolButton:label-widget
- * and #GtkToolButton:label properties are %NULL, the label is determined by the
- * #GtkToolButton:stock-id property. If the #GtkToolButton:stock-id property is
- * also %NULL, @button will not have a label.
+ * and #GtkToolButton:label properties are %NULL, @button will not have a label.
*
* Since: 2.4
**/
@@ -904,13 +897,13 @@ gtk_tool_button_set_label (GtkToolButton *button,
/**
* gtk_tool_button_get_label:
* @button: a #GtkToolButton
- *
+ *
* Returns the label used by the tool button, or %NULL if the tool button
- * doesn’t have a label. or uses a the label from a stock item. The returned
+ * doesn’t have a label. The returned
* string is owned by GTK+, and must not be modified or freed.
- *
- * Returns: (nullable): The label, or %NULL
- *
+ *
+ * Returns: (nullable) (transfer none): The label, or %NULL
+ *
* Since: 2.4
**/
const gchar *
@@ -982,8 +975,8 @@ gtk_tool_button_get_use_underline (GtkToolButton *button)
* Sets the icon for the tool button from a named themed icon.
* See the docs for #GtkIconTheme for more details.
* The #GtkToolButton:icon-name property only has an effect if not
- * overridden by non-%NULL #GtkToolButton:label-widget,
- * #GtkToolButton:icon-widget and #GtkToolButton:stock-id properties.
+ * overridden by non-%NULL #GtkToolButton:label-widget or
+ * #GtkToolButton:icon-widget properties.
*
* Since: 2.8
**/
@@ -1030,10 +1023,8 @@ gtk_tool_button_get_icon_name (GtkToolButton *button)
* @button: a #GtkToolButton
* @icon_widget: (allow-none): the widget used as icon, or %NULL
*
- * Sets @icon as the widget used as icon on @button. If @icon_widget is
- * %NULL the icon is determined by the #GtkToolButton:stock-id property. If the
- * #GtkToolButton:stock-id property is also %NULL, @button will not have an icon.
- *
+ * Sets @icon as the widget used as icon on @button.
+ *
* Since: 2.4
**/
void
@@ -1074,10 +1065,8 @@ gtk_tool_button_set_icon_widget (GtkToolButton *button,
*
* Sets @label_widget as the widget that will be used as the label
* for @button. If @label_widget is %NULL the #GtkToolButton:label property is used
- * as label. If #GtkToolButton:label is also %NULL, the label in the stock item
- * determined by the #GtkToolButton:stock-id property is used as label. If
- * #GtkToolButton:stock-id is also %NULL, @button does not have a label.
- *
+ * as label. If #GtkToolButton:label is also %NULL, @button does not have a label.
+ *
* Since: 2.4
**/
void
diff --git a/tests/testactions.c b/tests/testactions.c
index 115b308..97598f9 100644
--- a/tests/testactions.c
+++ b/tests/testactions.c
@@ -130,13 +130,13 @@ static GtkActionEntry entries[] = {
{ "attach", "mail-attachment", "_Attachment...", "<Control>m",
"Attach a file", G_CALLBACK (activate_action) },
- { "cut", GTK_STOCK_CUT, "C_ut", "<control>X",
+ { "cut", NULL, "C_ut", "<control>X",
"Cut the selected text to the clipboard", G_CALLBACK (activate_action) },
- { "copy", GTK_STOCK_COPY, "_Copy", "<control>C",
+ { "copy", NULL, "_Copy", "<control>C",
"Copy the selected text to the clipboard", G_CALLBACK (activate_action) },
- { "paste", GTK_STOCK_PASTE, "_Paste", "<control>V",
+ { "paste", NULL, "_Paste", "<control>V",
"Paste the text from the clipboard", G_CALLBACK (activate_action) },
- { "quit", GTK_STOCK_QUIT, NULL, "<control>Q",
+ { "quit", NULL, NULL, "<control>Q",
"Quit the application", G_CALLBACK (gtk_main_quit) },
{ "customise-accels", NULL, "Customise _Accels", NULL,
"Customise keyboard shortcuts", G_CALLBACK (show_accel_dialog) },
@@ -148,7 +148,7 @@ static GtkActionEntry entries[] = {
static guint n_entries = G_N_ELEMENTS (entries);
static GtkToggleActionEntry toggle_entries[] = {
- { "bold", GTK_STOCK_BOLD, "_Bold", "<control>B",
+ { "bold", NULL, "_Bold", "<control>B",
"Change to bold face",
G_CALLBACK (toggle_action), FALSE },
{ "toggle-cnp", NULL, "Enable Cut/Copy/Paste", NULL,
diff --git a/tests/testgtk.c b/tests/testgtk.c
index f3810ed..67159e7 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -857,11 +857,10 @@ set_toolbar_both_horiz (GtkWidget *widget,
gtk_toolbar_set_style (GTK_TOOLBAR (data), GTK_TOOLBAR_BOTH_HORIZ);
}
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
static GtkActionEntry create_toolbar_items[] = {
- { NULL, GTK_STOCK_NEW, NULL, NULL, "Stock icon: New",
+ { NULL, NULL, NULL, NULL, "Stock icon: New",
G_CALLBACK (set_toolbar_small_stock) },
- { NULL, GTK_STOCK_OPEN, NULL, NULL, "Stock icon: Open",
+ { NULL, NULL, NULL, NULL, "Stock icon: Open",
G_CALLBACK (set_toolbar_large_stock) },
{ NULL, NULL, "Horizontal", NULL, "Horizontal toolbar layout",
G_CALLBACK (set_toolbar_horizontal) },
@@ -891,7 +890,6 @@ static GtkActionEntry create_toolbar_items[] = {
{ NULL, NULL, "Bar", NULL, "Bar tooltip",
NULL },
};
-G_GNUC_END_IGNORE_DEPRECATIONS;
static void
create_toolbar (GtkWidget *widget)
diff --git a/tests/testmerge.c b/tests/testmerge.c
index 59d1856..2a1fa55 100644
--- a/tests/testmerge.c
+++ b/tests/testmerge.c
@@ -89,13 +89,13 @@ delayed_toggle_dynamic (GtkUIManager *merge)
dyn = g_object_new (GTK_TYPE_ACTION,
"name", "dyn1",
"label", "Dynamic action 1",
- "stock_id", GTK_STOCK_COPY,
+ "stock_id", NULL,
NULL);
gtk_action_group_add_action (dynamic, dyn);
dyn = g_object_new (GTK_TYPE_ACTION,
"name", "dyn2",
"label", "Dynamic action 2",
- "stock_id", GTK_STOCK_EXECUTE,
+ "stock_id", NULL,
NULL);
gtk_action_group_add_action (dynamic, dyn);
}
@@ -172,19 +172,19 @@ static GtkActionEntry entries[] = {
{ "EmptyMenu2Action", NULL, "Empty 2" },
{ "Test", NULL, "Test" },
- { "QuitAction", GTK_STOCK_QUIT, NULL, "<control>q", "Quit", G_CALLBACK (gtk_main_quit) },
- { "NewAction", GTK_STOCK_NEW, NULL, "<control>n", "Create something", G_CALLBACK (activate_action)
},
- { "New2Action", GTK_STOCK_NEW, NULL, "<control>m", "Create something else", G_CALLBACK
(activate_action) },
- { "OpenAction", GTK_STOCK_OPEN, NULL, NULL, "Open it", G_CALLBACK (activate_action) },
- { "CutAction", GTK_STOCK_CUT, NULL, "<control>x", "Knive", G_CALLBACK (activate_action) },
- { "CopyAction", GTK_STOCK_COPY, NULL, "<control>c", "Copy", G_CALLBACK (activate_action) },
- { "PasteAction", GTK_STOCK_PASTE, NULL, "<control>v", "Paste", G_CALLBACK (activate_action) },
+ { "QuitAction", NULL, NULL, "<control>q", "Quit", G_CALLBACK (gtk_main_quit) },
+ { "NewAction", NULL, NULL, "<control>n", "Create something", G_CALLBACK (activate_action) },
+ { "New2Action", NULL, NULL, "<control>m", "Create something else", G_CALLBACK (activate_action) },
+ { "OpenAction", NULL, NULL, NULL, "Open it", G_CALLBACK (activate_action) },
+ { "CutAction", NULL, NULL, "<control>x", "Knive", G_CALLBACK (activate_action) },
+ { "CopyAction", NULL, NULL, "<control>c", "Copy", G_CALLBACK (activate_action) },
+ { "PasteAction", NULL, NULL, "<control>v", "Paste", G_CALLBACK (activate_action) },
{ "AboutAction", NULL, "_About", NULL, "About", G_CALLBACK (activate_action) },
};
static guint n_entries = G_N_ELEMENTS (entries);
static GtkToggleActionEntry toggle_entries[] = {
- { "BoldAction", GTK_STOCK_BOLD, "_Bold", "<control>b", "Make it bold", G_CALLBACK (toggle_action),
+ { "BoldAction", NULL, "_Bold", "<control>b", "Make it bold", G_CALLBACK (toggle_action),
TRUE },
};
static guint n_toggle_entries = G_N_ELEMENTS (toggle_entries);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]