Commit 02c793f2 authored by William Jon McCann's avatar William Jon McCann

Start migrating internals away from GtkStock

parent 2b571f41
......@@ -194,7 +194,7 @@ gtk_color_selection_dialog_init (GtkColorSelectionDialog *colorseldiag)
gtk_widget_show (priv->colorsel);
priv->cancel_button = gtk_dialog_add_button (dialog,
GTK_STOCK_CANCEL,
_("_Cancel"),
GTK_RESPONSE_CANCEL);
priv->ok_button = gtk_dialog_add_button (dialog,
......@@ -204,7 +204,7 @@ gtk_color_selection_dialog_init (GtkColorSelectionDialog *colorseldiag)
gtk_widget_grab_default (priv->ok_button);
priv->help_button = gtk_dialog_add_button (dialog,
GTK_STOCK_HELP,
_("_Help"),
GTK_RESPONSE_HELP);
gtk_widget_hide (priv->help_button);
......
......@@ -1697,16 +1697,16 @@ gtk_font_selection_dialog_init (GtkFontSelectionDialog *fontseldiag)
/* Create the action area */
priv->cancel_button = gtk_dialog_add_button (dialog,
GTK_STOCK_CANCEL,
_("_Cancel"),
GTK_RESPONSE_CANCEL);
priv->apply_button = gtk_dialog_add_button (dialog,
GTK_STOCK_APPLY,
_("_Apply"),
GTK_RESPONSE_APPLY);
gtk_widget_hide (priv->apply_button);
priv->ok_button = gtk_dialog_add_button (dialog,
GTK_STOCK_OK,
_("_OK"),
GTK_RESPONSE_OK);
gtk_widget_grab_default (priv->ok_button);
......
......@@ -43,7 +43,6 @@
#include "gtknotebook.h"
#include "gtkorientable.h"
#include "gtkscrolledwindow.h"
#include "gtkstock.h"
#include "gtktextview.h"
#include "gtkiconfactory.h"
#include "gtkshow.h"
......@@ -59,7 +58,6 @@
* SECTION:gtkaboutdialog
* @Short_description: Display information about an application
* @Title: GtkAboutDialog
* @See_also: #GTK_STOCK_ABOUT
*
* The GtkAboutDialog offers a simple way to display information about
* a program like its logo, name, copyright, website and license. It is
......
......@@ -4,7 +4,7 @@
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-about</property>
<property name="icon_name">help-about</property>
</object>
<template class="GtkAboutDialog" parent="GtkDialog">
<property name="can_focus">False</property>
......@@ -59,14 +59,13 @@
</child>
<child>
<object class="GtkButton" id="close_button">
<property name="label">gtk-close</property>
<property name="label" translatable="yes">_Close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="is_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
......@@ -93,7 +92,7 @@
<object class="GtkImage" id="logo_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-missing-image</property>
<property name="icon_name">image-missing</property>
</object>
<packing>
<property name="expand">False</property>
......
......@@ -16,12 +16,11 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
......@@ -110,7 +109,7 @@
<object class="GtkImage" id="show_more_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-add</property>
<property name="icon_name">list-add-symbolic</property>
</object>
<object class="GtkButton" id="show_more_button">
<property name="label" translatable="yes">Show Other Applications</property>
......
......@@ -69,7 +69,6 @@
#include "gtksettings.h"
#include "gtksizegroup.h"
#include "gtksizerequest.h"
#include "gtkstock.h"
#include "gtktypebuiltins.h"
#include "gtkintl.h"
#include "gtkprivate.h"
......
<?xml version="1.0" encoding="UTF-8"?>
<interface domain="gtk30">
<!-- interface-requires gtk+ 3.10 -->
<object class="GtkImage" id="back_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-go-back</property>
</object>
<object class="GtkImage" id="forward_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-go-forward</property>
</object>
<object class="GtkImage" id="last_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-goto-last</property>
</object>
<template class="GtkAssistant" parent="GtkWindow">
<property name="can_focus">False</property>
<child>
......@@ -94,12 +79,11 @@
<property name="spacing">6</property>
<child>
<object class="GtkButton" id="apply">
<property name="label">gtk-apply</property>
<property name="label" translatable="yes">_Apply</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="on_assistant_apply" swapped="no"/>
</object>
<packing>
......@@ -117,7 +101,6 @@
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="image">forward_image</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_assistant_forward" swapped="no"/>
</object>
......@@ -135,7 +118,6 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="image">back_image</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_assistant_back" swapped="no"/>
</object>
......@@ -152,7 +134,6 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="image">last_image</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_assistant_last" swapped="no"/>
</object>
......@@ -165,12 +146,11 @@
</child>
<child>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="on_assistant_cancel" swapped="no"/>
</object>
<packing>
......@@ -182,12 +162,11 @@
</child>
<child>
<object class="GtkButton" id="close">
<property name="label">gtk-close</property>
<property name="label" translatable="yes">_Close</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="on_assistant_close" swapped="no"/>
</object>
<packing>
......
......@@ -2061,7 +2061,7 @@ gtk_builder_value_from_string_type (GtkBuilder *builder,
/* fall back to a missing image */
theme = gtk_icon_theme_get_default ();
pixbuf = gtk_icon_theme_load_icon (theme,
GTK_STOCK_MISSING_IMAGE,
"image-missing",
16,
GTK_ICON_LOOKUP_USE_BUILTIN,
NULL);
......
......@@ -18,7 +18,6 @@
#include "config.h"
#include "gtkdialog.h"
#include "gtkstock.h"
#include "gtkbutton.h"
#include "gtkbox.h"
#include "gtkprivate.h"
......
......@@ -17,12 +17,11 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="cancel_button">
<property name="label">gtk-cancel</property>
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
......
......@@ -316,7 +316,7 @@ gtk_custom_paper_unix_dialog_init (GtkCustomPaperUnixDialog *dialog)
populate_dialog (dialog);
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
_("_Close"), GTK_RESPONSE_CLOSE,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE);
......
......@@ -106,7 +106,7 @@
* dialog = gtk_dialog_new_with_buttons ("Message",
* main_application_window,
* GTK_DIALOG_DESTROY_WITH_PARENT,
* GTK_STOCK_OK,
* _("_OK"),
* GTK_RESPONSE_NONE,
* NULL);
* content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
......@@ -590,9 +590,9 @@ gtk_dialog_new_empty (const gchar *title,
* GtkWidget *dialog = gtk_dialog_new_with_buttons ("My dialog",
* main_app_window,
* GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
* GTK_STOCK_OK,
* _("_OK"),
* GTK_RESPONSE_ACCEPT,
* GTK_STOCK_CANCEL,
* _("_Cancel"),
* GTK_RESPONSE_REJECT,
* NULL);
* ]|
......@@ -1241,17 +1241,17 @@ gtk_dialog_set_alternative_button_order_valist (GtkDialog *dialog,
* following example shows:
* |[
* cancel_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
* GTK_STOCK_CANCEL,
* _("_Cancel"),
* GTK_RESPONSE_CANCEL);
*
* ok_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
* GTK_STOCK_OK,
* _("_OK"),
* GTK_RESPONSE_OK);
*
* gtk_widget_grab_default (ok_button);
*
* help_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
* GTK_STOCK_HELP,
* _("_Help"),
* GTK_RESPONSE_HELP);
*
* gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
......
......@@ -1942,7 +1942,7 @@ gtk_drag_set_icon_default (GdkDragContext *context)
{
g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
gtk_drag_set_icon_stock (context, GTK_STOCK_DND, -2, -2);
gtk_drag_set_icon_name (context, "text-x-generic", -2, -2);
}
static void
......
......@@ -2435,7 +2435,7 @@ gtk_drag_source_site_get_icon_helper (GtkDragSourceSite *site)
helper = _gtk_icon_helper_new ();
if (_gtk_icon_helper_get_is_empty (helper))
_gtk_icon_helper_set_stock_id (helper, GTK_STOCK_DND, GTK_ICON_SIZE_DND);
_gtk_icon_helper_set_icon_name (helper, "text-x-generic", GTK_ICON_SIZE_DND);
return helper;
}
......@@ -3036,7 +3036,7 @@ gtk_drag_get_icon (GtkDragSourceInfo *info,
info->icon_window = NULL;
helper = _gtk_icon_helper_new ();
_gtk_icon_helper_set_stock_id (helper, GTK_STOCK_DND, GTK_ICON_SIZE_DND);
_gtk_icon_helper_set_icon_name (helper, "text-x-generic", GTK_ICON_SIZE_DND);
set_icon_helper (info->context, helper, -2, -2, TRUE);
info->fallback_icon = info->icon_window;
......@@ -3523,7 +3523,7 @@ gtk_drag_set_icon_default (GdkDragContext *context)
{
g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
gtk_drag_set_icon_stock (context, GTK_STOCK_DND, -2, -2);
gtk_drag_set_icon_name (context, "text-x-generic", -2, -2);
}
/*************************************************************
......
......@@ -9093,11 +9093,11 @@ gtk_entry_grab_notify (GtkWidget *widget,
static void
append_action_signal (GtkEntry *entry,
GtkWidget *menu,
const gchar *stock_id,
const gchar *label,
const gchar *signal,
gboolean sensitive)
{
GtkWidget *menuitem = gtk_image_menu_item_new_from_stock (stock_id, NULL);
GtkWidget *menuitem = gtk_menu_item_new_with_mnemonic (label);
g_object_set_data (G_OBJECT (menuitem), I_("gtk-signal"), (char *)signal);
g_signal_connect (menuitem, "activate",
......@@ -9202,18 +9202,18 @@ popup_targets_received (GtkClipboard *clipboard,
popup_menu_detach);
mode = gtk_entry_get_display_mode (entry);
append_action_signal (entry, info_entry_priv->popup_menu, GTK_STOCK_CUT, "cut-clipboard",
append_action_signal (entry, info_entry_priv->popup_menu, _("Cu_t"), "cut-clipboard",
info_entry_priv->editable && mode == DISPLAY_NORMAL &&
info_entry_priv->current_pos != info_entry_priv->selection_bound);
append_action_signal (entry, info_entry_priv->popup_menu, GTK_STOCK_COPY, "copy-clipboard",
append_action_signal (entry, info_entry_priv->popup_menu, _("_Copy"), "copy-clipboard",
mode == DISPLAY_NORMAL &&
info_entry_priv->current_pos != info_entry_priv->selection_bound);
append_action_signal (entry, info_entry_priv->popup_menu, GTK_STOCK_PASTE, "paste-clipboard",
append_action_signal (entry, info_entry_priv->popup_menu, _("_Paste"), "paste-clipboard",
info_entry_priv->editable && clipboard_contains_text);
menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_DELETE, NULL);
menuitem = gtk_menu_item_new_with_mnemonic (_("_Delete"));
gtk_widget_set_sensitive (menuitem, info_entry_priv->editable && info_entry_priv->current_pos != info_entry_priv->selection_bound);
g_signal_connect_swapped (menuitem, "activate",
G_CALLBACK (gtk_entry_delete_cb), entry);
......@@ -9224,7 +9224,7 @@ popup_targets_received (GtkClipboard *clipboard,
gtk_widget_show (menuitem);
gtk_menu_shell_append (GTK_MENU_SHELL (info_entry_priv->popup_menu), menuitem);
menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_SELECT_ALL, NULL);
menuitem = gtk_menu_item_new_with_mnemonic (_("Select _All"));
gtk_widget_set_sensitive (menuitem, gtk_entry_buffer_get_length (info_entry_priv->buffer) > 0);
g_signal_connect_swapped (menuitem, "activate",
G_CALLBACK (gtk_entry_select_all), entry);
......@@ -9300,11 +9300,11 @@ activate_bubble_cb (GtkWidget *item,
static void
append_bubble_action (GtkEntry *entry,
GtkWidget *toolbar,
const gchar *stock_id,
const gchar *label,
const gchar *signal,
gboolean sensitive)
{
GtkToolItem *item = gtk_tool_button_new_from_stock (stock_id);
GtkToolItem *item = gtk_tool_button_new (NULL, label);
g_object_set_data (G_OBJECT (item), I_("gtk-signal"), (char *)signal);
g_signal_connect (item, "clicked", G_CALLBACK (activate_bubble_cb), entry);
gtk_widget_set_sensitive (GTK_WIDGET (item), sensitive);
......@@ -9348,13 +9348,13 @@ bubble_targets_received (GtkClipboard *clipboard,
has_clipboard = gtk_selection_data_targets_include_text (data);
mode = gtk_entry_get_display_mode (entry);
append_bubble_action (entry, toolbar, GTK_STOCK_CUT, "cut-clipboard",
append_bubble_action (entry, toolbar, _("Cu_t"), "cut-clipboard",
priv->editable && has_selection && mode == DISPLAY_NORMAL);
append_bubble_action (entry, toolbar, GTK_STOCK_COPY, "copy-clipboard",
append_bubble_action (entry, toolbar, _("_Copy"), "copy-clipboard",
has_selection && mode == DISPLAY_NORMAL);
append_bubble_action (entry, toolbar, GTK_STOCK_PASTE, "paste-clipboard",
append_bubble_action (entry, toolbar, _("_Paste"), "paste-clipboard",
priv->editable && has_clipboard);
if (priv->populate_all)
......@@ -10279,7 +10279,7 @@ show_capslock_feedback (GtkEntry *entry,
if (gtk_entry_get_icon_storage_type (entry, GTK_ENTRY_ICON_SECONDARY) == GTK_IMAGE_EMPTY)
{
gtk_entry_set_icon_from_stock (entry, GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_CAPS_LOCK_WARNING);
gtk_entry_set_icon_from_icon_name (entry, GTK_ENTRY_ICON_SECONDARY, "dialog-warning-symbolic");
gtk_entry_set_icon_activatable (entry, GTK_ENTRY_ICON_SECONDARY, FALSE);
priv->caps_lock_warning_shown = TRUE;
}
......
......@@ -104,7 +104,6 @@
#define DEFAULT_TITLE N_("Select a File")
#define DESKTOP_DISPLAY_NAME N_("Desktop")
#define FALLBACK_DISPLAY_NAME N_("(None)") /* this string is used in gtk+/gtk/tests/filechooser.c - change it there if you change it here */
#define FALLBACK_ICON_NAME "stock_unknown"
#define FALLBACK_ICON_SIZE 16
......@@ -806,9 +805,9 @@ gtk_file_chooser_button_constructor (GType type,
{
priv->dialog = gtk_file_chooser_dialog_new (NULL, NULL,
GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_STOCK_CANCEL,
_("_Cancel"),
GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN,
_("_Open"),
GTK_RESPONSE_ACCEPT,
NULL);
......@@ -1403,7 +1402,7 @@ change_icon_theme (GtkFileChooserButton *button)
do
{
GdkPixbuf *pixbuf;
GdkPixbuf *pixbuf = NULL;
gchar type;
gpointer data;
......@@ -1451,9 +1450,6 @@ change_icon_theme (GtkFileChooserButton *button)
pixbuf = gtk_icon_theme_load_icon (theme, "folder-remote",
priv->icon_size, 0, NULL);
}
else
pixbuf = gtk_icon_theme_load_icon (theme, FALLBACK_ICON_NAME,
priv->icon_size, 0, NULL);
break;
case ROW_TYPE_VOLUME:
if (data)
......@@ -1461,9 +1457,6 @@ change_icon_theme (GtkFileChooserButton *button)
GTK_WIDGET (button),
priv->icon_size,
NULL);
else
pixbuf = gtk_icon_theme_load_icon (theme, FALLBACK_ICON_NAME,
priv->icon_size, 0, NULL);
break;
default:
continue;
......@@ -2469,11 +2462,6 @@ update_label_get_info_cb (GCancellable *cancellable,
pixbuf = _gtk_file_info_render_icon (info, GTK_WIDGET (priv->image), priv->icon_size);
if (!pixbuf)
pixbuf = gtk_icon_theme_load_icon (get_icon_theme (GTK_WIDGET (priv->image)),
FALLBACK_ICON_NAME,
priv->icon_size, 0, NULL);
gtk_image_set_from_pixbuf (GTK_IMAGE (priv->image), pixbuf);
if (pixbuf)
g_object_unref (pixbuf);
......
......@@ -66,7 +66,6 @@
#include "gtksettings.h"
#include "gtksizegroup.h"
#include "gtksizerequest.h"
#include "gtkstock.h"
#include "gtktoolbar.h"
#include "gtktoolbutton.h"
#include "gtktooltip.h"
......@@ -1671,17 +1670,14 @@ check_file_list_menu_sensitivity (GtkFileChooserDefault *impl)
}
static GtkWidget *
file_list_add_image_menu_item (GtkFileChooserDefault *impl,
const char *stock_name,
const char *mnemonic_label,
GCallback callback)
file_list_add_menu_item (GtkFileChooserDefault *impl,
const char *mnemonic_label,
GCallback callback)
{
GtkFileChooserDefaultPrivate *priv = impl->priv;
GtkWidget *item;
item = gtk_image_menu_item_new_with_mnemonic (mnemonic_label);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item),
gtk_image_new_from_stock (stock_name, GTK_ICON_SIZE_MENU));
item = gtk_menu_item_new_with_mnemonic (mnemonic_label);
g_signal_connect (item, "activate", callback, impl);
gtk_widget_show (item);
gtk_menu_shell_append (GTK_MENU_SHELL (priv->browse_files_popup_menu), item);
......@@ -1720,13 +1716,13 @@ file_list_build_popup_menu (GtkFileChooserDefault *impl)
priv->browse_files_tree_view,
popup_menu_detach_cb);
priv->browse_files_popup_menu_visit_file_item = file_list_add_image_menu_item (impl, GTK_STOCK_DIRECTORY, _("_Visit File"),
priv->browse_files_popup_menu_visit_file_item = file_list_add_menu_item (impl, _("_Visit File"),
G_CALLBACK (visit_file_cb));
priv->browse_files_popup_menu_copy_file_location_item = file_list_add_image_menu_item (impl, GTK_STOCK_COPY, _("_Copy Location"),
priv->browse_files_popup_menu_copy_file_location_item = file_list_add_menu_item (impl, _("_Copy Location"),
G_CALLBACK (copy_file_location_cb));
priv->browse_files_popup_menu_add_shortcut_item = file_list_add_image_menu_item (impl, GTK_STOCK_ADD, _("_Add to Bookmarks"),
priv->browse_files_popup_menu_add_shortcut_item = file_list_add_menu_item (impl, _("_Add to Bookmarks"),
G_CALLBACK (add_to_shortcuts_cb));
item = gtk_separator_menu_item_new ();
......@@ -2254,9 +2250,9 @@ info_bar_set (GtkFileChooserDefault *impl, PathBarMode mode)
}
gtk_info_bar_set_message_type (GTK_INFO_BAR (priv->browse_select_a_folder_info_bar), message_type);
gtk_image_set_from_stock (GTK_IMAGE (priv->browse_select_a_folder_icon),
(message_type == GTK_MESSAGE_WARNING) ? GTK_STOCK_DIALOG_WARNING : GTK_STOCK_DIRECTORY,
GTK_ICON_SIZE_MENU);
gtk_image_set_from_icon_name (GTK_IMAGE (priv->browse_select_a_folder_icon),
(message_type == GTK_MESSAGE_WARNING) ? "dialog-warning-symbolic" : "folder-symbolic",
GTK_ICON_SIZE_MENU);
gtk_label_set_markup (GTK_LABEL (priv->browse_select_a_folder_label), str);
if (free_str)
......@@ -2303,7 +2299,7 @@ path_bar_set_mode (GtkFileChooserDefault *impl, PathBarMode mode)
break;
case PATH_BAR_SEARCH:
gtk_image_set_from_stock (GTK_IMAGE (priv->browse_special_mode_icon), GTK_STOCK_FIND, GTK_ICON_SIZE_BUTTON);
gtk_image_set_from_icon_name (GTK_IMAGE (priv->browse_special_mode_icon), "edit-find-symbolic", GTK_ICON_SIZE_BUTTON);
tmp = g_strdup_printf ("<b>%s</b>", _("Search:"));
gtk_label_set_markup (GTK_LABEL (priv->browse_special_mode_label), tmp);
......@@ -5450,15 +5446,12 @@ get_display_name_from_file_list (GtkFileChooserDefault *impl)
static void
add_custom_button_to_dialog (GtkDialog *dialog,
const gchar *mnemonic_label,
const gchar *stock_id,
gint response_id)
{
GtkWidget *button;
button = gtk_button_new_with_mnemonic (mnemonic_label);
gtk_widget_set_can_default (button, TRUE);
gtk_button_set_image (GTK_BUTTON (button),
gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON));
gtk_widget_show (button);
gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, response_id);
......@@ -5489,9 +5482,8 @@ confirm_dialog_should_accept_filename (GtkFileChooserDefault *impl,
"overwrite its contents."),
folder_display_name);
gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
add_custom_button_to_dialog (GTK_DIALOG (dialog), _("_Replace"),
GTK_STOCK_SAVE_AS, GTK_RESPONSE_ACCEPT);
gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Cancel"), GTK_RESPONSE_CANCEL);
add_custom_button_to_dialog (GTK_DIALOG (dialog), _("_Replace"), GTK_RESPONSE_ACCEPT);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_ACCEPT,
GTK_RESPONSE_CANCEL,
......
......@@ -61,8 +61,8 @@
* dialog = gtk_file_chooser_dialog_new ("Open File",
* parent_window,
* GTK_FILE_CHOOSER_ACTION_OPEN,
* GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
* GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
* _("_Cancel"), GTK_RESPONSE_CANCEL,
* _("_Open"), GTK_RESPONSE_ACCEPT,
* NULL);
*
* if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
......@@ -85,8 +85,8 @@
* dialog = gtk_file_chooser_dialog_new ("Save File",
* parent_window,
* GTK_FILE_CHOOSER_ACTION_SAVE,
* GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
* GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
* _("_Cancel"), GTK_RESPONSE_CANCEL,
* _("_Save"), GTK_RESPONSE_ACCEPT,
* NULL);
* gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
*
......@@ -157,8 +157,8 @@
* dialog = gtk_file_chooser_dialog_new ("Open File",
* parent_window,
* GTK_FILE_CHOOSER_ACTION_OPEN,
* GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
* GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
* _("_Cancel"), GTK_RESPONSE_CANCEL,
* _("_Open"), GTK_RESPONSE_ACCEPT,
* NULL);
* </programlisting></informalexample>
* </para>
......
......@@ -17,11 +17,10 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="cancel_button">
<property name="label">gtk-cancel</property>
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
......
......@@ -161,11 +161,16 @@ ensure_stated_icon_from_info (GtkIconHelper *self,
if (destination == NULL)
{
GtkIconSet *icon_set;
icon_set = gtk_style_context_lookup_icon_set (context, GTK_STOCK_MISSING_IMAGE);
destination =
gtk_icon_set_render_icon_pixbuf (icon_set, context, self->priv->icon_size);
GtkIconTheme *icon_theme;
int width;
icon_theme = gtk_icon_theme_get_for_screen (gtk_style_context_get_screen (context));
gtk_icon_size_lookup (self->priv->icon_size, &width, NULL);
destination = gtk_icon_theme_load_icon (icon_theme,
"image-missing",
width,
GTK_ICON_LOOKUP_GENERIC_FALLBACK,
NULL);
}
else if (!symbolic)
{
......
......@@ -788,9 +788,9 @@ gtk_image_set_from_file (GtkImage *image,
if (anim == NULL)
{
gtk_image_set_from_stock (image,
GTK_STOCK_MISSING_IMAGE,
DEFAULT_ICON_SIZE);
gtk_image_set_from_icon_name (image,
"image-missing",
DEFAULT_ICON_SIZE);
g_object_thaw_notify (G_OBJECT (image));
return;
}
......@@ -845,9 +845,9 @@ gtk_image_set_from_resource (GtkImage *image,
if (animation == NULL)
{
gtk_image_set_from_stock (image,
GTK_STOCK_MISSING_IMAGE,
DEFAULT_ICON_SIZE);
gtk_image_set_from_icon_name (image,
"image-missing",
DEFAULT_ICON_SIZE);
g_object_thaw_notify (G_OBJECT (image));
return;
}
......
......@@ -43,7 +43,6 @@
#include "gtkdialog.h"
#include "gtkintl.h"
#include "gtkprivate.h"
#include "gtkstock.h"
#include "gtkorientable.h"
#include "gtktypebuiltins.h"
......@@ -82,7 +81,7 @@
* content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (info_bar));
* gtk_container_add (GTK_CONTAINER (content_area), message_label);
* gtk_info_bar_add_button (GTK_INFO_BAR (info_bar),
* GTK_STOCK_OK, GTK_RESPONSE_OK);
* _("_OK"), GTK_RESPONSE_OK);
* g_signal_connect (info_bar, "response",
* G_CALLBACK (gtk_widget_hide), NULL);
* gtk_grid_attach (GTK_GRID (grid),
......@@ -1110,27 +1109,26 @@ gtk_info_bar_set_message_type (GtkInfoBar *info_bar,
atk_obj = gtk_widget_get_accessible (GTK_WIDGET (info_bar));
if (GTK_IS_ACCESSIBLE (atk_obj))
{
GtkStockItem item;
const char *stock_id = NULL;
const char *name = NULL;
atk_object_set_role (atk_obj, ATK_ROLE_ALERT);
switch (message_type)
{
case GTK_MESSAGE_INFO:
stock_id = GTK_STOCK_DIALOG_INFO;
name = _("Information");
break;
case GTK_MESSAGE_QUESTION:
stock_id = GTK_STOCK_DIALOG_QUESTION;
name = _("Question");
break;
case GTK_MESSAGE_WARNING:
stock_id = GTK_STOCK_DIALOG_WARNING;
name = _("Warning");
break;
case GTK_MESSAGE_ERROR:
stock_id = GTK_STOCK_DIALOG_ERROR;
name = _("Error");
break;
case GTK_MESSAGE_OTHER:
......@@ -1141,10 +1139,9 @@ gtk_info_bar_set_message_type (GtkInfoBar *info_bar,
break;
}
if (stock_id)
if (name)
{
gtk_stock_lookup (stock_id, &item);
atk_object_set_name (atk_obj, item.label);
atk_object_set_name (atk_obj, name);
}
}
......
......@@ -42,7 +42,6 @@
#include "gtkmenuitem.h"
#include "gtkmenushellprivate.h"