diff options
Diffstat (limited to 'e-util')
46 files changed, 272 insertions, 224 deletions
diff --git a/e-util/e-activity-bar.c b/e-util/e-activity-bar.c index 4d7c272f1d..3638435cf9 100644 --- a/e-util/e-activity-bar.c +++ b/e-util/e-activity-bar.c @@ -19,8 +19,11 @@ #include <config.h> +#include <glib/gi18n-lib.h> #include <libedataserver/libedataserver.h> +#include "e-dialog-widgets.h" + #define E_ACTIVITY_BAR_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ ((obj), E_TYPE_ACTIVITY_BAR, EActivityBarPrivate)) @@ -120,9 +123,9 @@ activity_bar_update (EActivityBar *bar) icon_name = COMPLETED_ICON_NAME; if (state == E_ACTIVITY_CANCELLED) { - gtk_image_set_from_stock ( + gtk_image_set_from_icon_name ( GTK_IMAGE (bar->priv->image), - GTK_STOCK_CANCEL, GTK_ICON_SIZE_BUTTON); + "process-stop", GTK_ICON_SIZE_BUTTON); gtk_widget_show (bar->priv->image); } else if (icon_name != NULL) { gtk_image_set_from_icon_name ( @@ -293,7 +296,7 @@ e_activity_bar_init (EActivityBar *bar) gtk_widget_show (widget); /* This is only shown if the EActivity has a GCancellable. */ - widget = gtk_button_new_from_stock (GTK_STOCK_CANCEL); + widget = e_dialog_button_new_with_icon ("process-stop", _("_Cancel")); gtk_info_bar_add_action_widget ( GTK_INFO_BAR (bar), widget, GTK_RESPONSE_CANCEL); bar->priv->cancel = widget; diff --git a/e-util/e-activity-proxy.c b/e-util/e-activity-proxy.c index 9f65958b43..bf8ab6778b 100644 --- a/e-util/e-activity-proxy.c +++ b/e-util/e-activity-proxy.c @@ -25,6 +25,8 @@ #include <libedataserver/libedataserver.h> +#include "e-dialog-widgets.h" + #define E_ACTIVITY_PROXY_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ ((obj), E_TYPE_ACTIVITY_PROXY, EActivityProxyPrivate)) @@ -125,9 +127,9 @@ activity_proxy_update (EActivityProxy *proxy) icon_name = COMPLETED_ICON_NAME; if (state == E_ACTIVITY_CANCELLED) { - gtk_image_set_from_stock ( + gtk_image_set_from_icon_name ( GTK_IMAGE (proxy->priv->image), - GTK_STOCK_CANCEL, GTK_ICON_SIZE_BUTTON); + "process-stop", GTK_ICON_SIZE_BUTTON); gtk_widget_show (proxy->priv->image); } else if (icon_name != NULL) { gtk_image_set_from_icon_name ( @@ -300,10 +302,7 @@ e_activity_proxy_init (EActivityProxy *proxy) gtk_widget_show (widget); /* This is only shown if the EActivity has a GCancellable. */ - widget = gtk_button_new (); - gtk_button_set_image ( - GTK_BUTTON (widget), gtk_image_new_from_stock ( - GTK_STOCK_CANCEL, GTK_ICON_SIZE_MENU)); + widget = e_dialog_button_new_with_icon ("process-stop", NULL); gtk_button_set_relief (GTK_BUTTON (widget), GTK_RELIEF_NONE); gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0); gtk_widget_set_tooltip_text (widget, _("Cancel")); diff --git a/e-util/e-alert-bar.c b/e-util/e-alert-bar.c index 2ed7dfe45a..233de93245 100644 --- a/e-util/e-alert-bar.c +++ b/e-util/e-alert-bar.c @@ -20,6 +20,8 @@ #include <config.h> #include <glib/gi18n-lib.h> +#include "e-dialog-widgets.h" + #define E_ALERT_BAR_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ ((obj), E_TYPE_ALERT_BAR, EAlertBarPrivate)) @@ -65,7 +67,7 @@ alert_bar_show_alert (EAlertBar *alert_bar) GtkMessageType message_type; const gchar *primary_text; const gchar *secondary_text; - const gchar *stock_id; + const gchar *icon_name; gboolean have_primary_text; gboolean have_secondary_text; gboolean visible; @@ -108,11 +110,7 @@ alert_bar_show_alert (EAlertBar *alert_bar) } /* Add a dismiss button. */ - widget = gtk_button_new (); - gtk_button_set_image ( - GTK_BUTTON (widget), - gtk_image_new_from_stock ( - GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU)); + widget = e_dialog_button_new_with_icon ("window-close", NULL); gtk_button_set_relief ( GTK_BUTTON (widget), GTK_RELIEF_NONE); gtk_widget_set_tooltip_text ( @@ -166,9 +164,9 @@ alert_bar_show_alert (EAlertBar *alert_bar) gtk_widget_set_visible (widget, have_secondary_text); g_free (markup); - stock_id = e_alert_get_stock_id (alert); + icon_name = e_alert_get_icon_name (alert); image = GTK_IMAGE (alert_bar->priv->image); - gtk_image_set_from_stock (image, stock_id, ICON_SIZE); + gtk_image_set_from_icon_name (image, icon_name, ICON_SIZE); /* Avoid showing an image for one-line alerts, * which are usually questions or informational. */ diff --git a/e-util/e-alert.c b/e-util/e-alert.c index 213a3e4fb1..e98895ba4c 100644 --- a/e-util/e-alert.c +++ b/e-util/e-alert.c @@ -74,7 +74,7 @@ static GHashTable *alert_table; /* ********************************************************************** */ static EAlertButton default_ok_button = { - NULL, GTK_STOCK_OK, NULL, GTK_RESPONSE_OK + NULL, NULL, NULL, GTK_RESPONSE_OK }; static struct _e_alert default_alerts[] = { @@ -870,32 +870,32 @@ e_alert_set_secondary_text (EAlert *alert, } const gchar * -e_alert_get_stock_id (EAlert *alert) +e_alert_get_icon_name (EAlert *alert) { - const gchar *stock_id; + const gchar *icon_name; g_return_val_if_fail (E_IS_ALERT (alert), NULL); switch (e_alert_get_message_type (alert)) { case GTK_MESSAGE_INFO: - stock_id = GTK_STOCK_DIALOG_INFO; + icon_name = "dialog-information"; break; case GTK_MESSAGE_WARNING: - stock_id = GTK_STOCK_DIALOG_WARNING; + icon_name = "dialog-warning"; break; case GTK_MESSAGE_QUESTION: - stock_id = GTK_STOCK_DIALOG_QUESTION; + icon_name = "dialog-question"; break; case GTK_MESSAGE_ERROR: - stock_id = GTK_STOCK_DIALOG_ERROR; + icon_name = "dialog-error"; break; default: - stock_id = GTK_STOCK_MISSING_IMAGE; + icon_name = "image-missing"; g_warn_if_reached (); break; } - return stock_id; + return icon_name; } void @@ -929,13 +929,13 @@ GtkWidget * e_alert_create_image (EAlert *alert, GtkIconSize size) { - const gchar *stock_id; + const gchar *icon_name; g_return_val_if_fail (E_IS_ALERT (alert), NULL); - stock_id = e_alert_get_stock_id (alert); + icon_name = e_alert_get_icon_name (alert); - return gtk_image_new_from_stock (stock_id, size); + return gtk_image_new_from_icon_name (icon_name, size); } void diff --git a/e-util/e-alert.h b/e-util/e-alert.h index 97fe45e0e7..9d7cd3e03e 100644 --- a/e-util/e-alert.h +++ b/e-util/e-alert.h @@ -98,7 +98,7 @@ void e_alert_set_primary_text (EAlert *alert, const gchar * e_alert_get_secondary_text (EAlert *alert); void e_alert_set_secondary_text (EAlert *alert, const gchar *secondary_text); -const gchar * e_alert_get_stock_id (EAlert *alert); +const gchar * e_alert_get_icon_name (EAlert *alert); void e_alert_add_action (EAlert *alert, GtkAction *action, gint response_id); diff --git a/e-util/e-attachment-button.c b/e-util/e-attachment-button.c index 74d6dc4af8..a04b85db38 100644 --- a/e-util/e-attachment-button.c +++ b/e-util/e-attachment-button.c @@ -211,25 +211,28 @@ exit: static void attachment_button_update_pixbufs (EAttachmentButton *button) { + GtkIconTheme *icon_theme; GtkCellLayout *cell_layout; GtkCellRenderer *renderer; GdkPixbuf *pixbuf_expander_open; GdkPixbuf *pixbuf_expander_closed; GList *list; + icon_theme = gtk_icon_theme_get_default (); + /* Grab the first cell renderer. */ cell_layout = GTK_CELL_LAYOUT (button->priv->cell_view); list = gtk_cell_layout_get_cells (cell_layout); renderer = GTK_CELL_RENDERER (list->data); g_list_free (list); - pixbuf_expander_open = gtk_widget_render_icon ( - GTK_WIDGET (button), GTK_STOCK_GO_DOWN, - GTK_ICON_SIZE_BUTTON, NULL); + pixbuf_expander_open = gtk_icon_theme_load_icon ( + icon_theme, "go-down", + GTK_ICON_SIZE_BUTTON, 0, NULL); - pixbuf_expander_closed = gtk_widget_render_icon ( - GTK_WIDGET (button), GTK_STOCK_GO_FORWARD, - GTK_ICON_SIZE_BUTTON, NULL); + pixbuf_expander_closed = gtk_icon_theme_load_icon ( + icon_theme, "go-next", + GTK_ICON_SIZE_BUTTON, 0, NULL); g_object_set ( renderer, diff --git a/e-util/e-attachment-dialog.c b/e-util/e-attachment-dialog.c index 8eb8503f83..0f71bc9390 100644 --- a/e-util/e-attachment-dialog.c +++ b/e-util/e-attachment-dialog.c @@ -308,9 +308,9 @@ e_attachment_dialog_init (EAttachmentDialog *dialog) dialog->priv = E_ATTACHMENT_DIALOG_GET_PRIVATE (dialog); gtk_dialog_add_button ( - GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); + GTK_DIALOG (dialog), _("_Cancel"), GTK_RESPONSE_CANCEL); gtk_dialog_add_button ( - GTK_DIALOG (dialog), GTK_STOCK_OK, GTK_RESPONSE_OK); + GTK_DIALOG (dialog), _("_OK"), GTK_RESPONSE_OK); gtk_window_set_icon_name ( GTK_WINDOW (dialog), "mail-attachment"); gtk_window_set_title ( diff --git a/e-util/e-attachment-store.c b/e-util/e-attachment-store.c index 58ccadec00..e867327e47 100644 --- a/e-util/e-attachment-store.c +++ b/e-util/e-attachment-store.c @@ -461,7 +461,7 @@ e_attachment_store_run_load_dialog (EAttachmentStore *store, dialog = gtk_file_chooser_dialog_new ( _("Add Attachment"), parent, GTK_FILE_CHOOSER_ACTION_OPEN, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + _("_Cancel"), GTK_RESPONSE_CANCEL, _("A_ttach"), GTK_RESPONSE_OK, NULL); file_chooser = GTK_FILE_CHOOSER (dialog); @@ -542,8 +542,8 @@ e_attachment_store_run_save_dialog (EAttachmentStore *store, dialog = gtk_file_chooser_dialog_new ( title, parent, action, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_SAVE, GTK_RESPONSE_OK, NULL); + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_Save"), GTK_RESPONSE_OK, NULL); file_chooser = GTK_FILE_CHOOSER (dialog); gtk_file_chooser_set_local_only (file_chooser, FALSE); diff --git a/e-util/e-attachment-view.c b/e-util/e-attachment-view.c index d548c286fb..dbfe804110 100644 --- a/e-util/e-attachment-view.c +++ b/e-util/e-attachment-view.c @@ -366,8 +366,8 @@ action_show_all_cb (GtkAction *action, static GtkActionEntry standard_entries[] = { { "cancel", - GTK_STOCK_CANCEL, - NULL, + "process-stop", + N_("_Cancel"), NULL, NULL, /* XXX Add a tooltip! */ G_CALLBACK (action_cancel_cb) }, @@ -380,15 +380,15 @@ static GtkActionEntry standard_entries[] = { G_CALLBACK (action_open_with_cb) }, { "save-all", - GTK_STOCK_SAVE_AS, + "document-save-as", N_("S_ave All"), NULL, NULL, /* XXX Add a tooltip! */ G_CALLBACK (action_save_all_cb) }, { "save-as", - GTK_STOCK_SAVE_AS, - NULL, + "document-save-as", + N_("Sa_ve As"), NULL, NULL, /* XXX Add a tooltip! */ G_CALLBACK (action_save_as_cb) }, @@ -396,8 +396,8 @@ static GtkActionEntry standard_entries[] = { /* Alternate "save-all" label, for when * the attachment store has one row. */ { "save-one", - GTK_STOCK_SAVE_AS, - NULL, + "document-save-as", + N_("Save _As"), NULL, NULL, /* XXX Add a tooltip! */ G_CALLBACK (action_save_all_cb) }, @@ -406,22 +406,22 @@ static GtkActionEntry standard_entries[] = { static GtkActionEntry editable_entries[] = { { "add", - GTK_STOCK_ADD, + "list-add", N_("A_dd Attachment..."), NULL, N_("Attach a file"), G_CALLBACK (action_add_cb) }, { "properties", - GTK_STOCK_PROPERTIES, - NULL, + "document-properties", + N_("_Properties"), NULL, NULL, /* XXX Add a tooltip! */ G_CALLBACK (action_properties_cb) }, { "remove", - GTK_STOCK_REMOVE, - NULL, + "list-remove", + N_("_Remove"), NULL, NULL, /* XXX Add a tooltip! */ G_CALLBACK (action_remove_cb) } @@ -1559,11 +1559,7 @@ e_attachment_view_drag_begin (EAttachmentView *view, priv->selected = e_attachment_view_get_selected_attachments (view); n_selected = g_list_length (priv->selected); - if (n_selected > 1) - gtk_drag_set_icon_stock ( - context, GTK_STOCK_DND_MULTIPLE, 0, 0); - - else if (n_selected == 1) { + if (n_selected == 1) { EAttachment *attachment; GtkIconTheme *icon_theme; GtkIconInfo *icon_info; diff --git a/e-util/e-attachment.c b/e-util/e-attachment.c index 8230eab17a..b7c59779e1 100644 --- a/e-util/e-attachment.c +++ b/e-util/e-attachment.c @@ -42,7 +42,7 @@ #define DEFAULT_ICON_NAME "mail-attachment" /* Emblems */ -#define EMBLEM_CANCELLED "gtk-cancel" +#define EMBLEM_CANCELLED "process-stop" #define EMBLEM_LOADING "emblem-downloads" #define EMBLEM_SAVING "document-save" #define EMBLEM_ENCRYPT_WEAK "security-low" diff --git a/e-util/e-categories-dialog.c b/e-util/e-categories-dialog.c index ea1387b1c0..dcd2d583a1 100644 --- a/e-util/e-categories-dialog.c +++ b/e-util/e-categories-dialog.c @@ -79,8 +79,8 @@ e_categories_dialog_init (ECategoriesDialog *dialog) gtk_dialog_add_buttons ( GTK_DIALOG (dialog), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_OK"), GTK_RESPONSE_OK, NULL); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); gtk_dialog_set_response_sensitive ( GTK_DIALOG (dialog), GTK_RESPONSE_OK, FALSE); diff --git a/e-util/e-categories-editor.c b/e-util/e-categories-editor.c index 5c38331aa5..f53c1f1a66 100644 --- a/e-util/e-categories-editor.c +++ b/e-util/e-categories-editor.c @@ -27,6 +27,7 @@ #include "e-categories-selector.h" #include "e-category-completion.h" #include "e-category-editor.h" +#include "e-dialog-widgets.h" #define E_CATEGORIES_EDITOR_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ @@ -270,15 +271,15 @@ e_categories_editor_init (ECategoriesEditor *editor) gtk_grid_attach (grid, hbuttonbox1, 0, 4, 1, 1); gtk_box_set_spacing (GTK_BOX (hbuttonbox1), 6); - button_new = gtk_button_new_from_stock (GTK_STOCK_NEW); + button_new = e_dialog_button_new_with_icon ("document-new", _("_New")); gtk_container_add (GTK_CONTAINER (hbuttonbox1), button_new); gtk_widget_set_can_default (button_new, TRUE); - button_edit = gtk_button_new_from_stock (GTK_STOCK_EDIT); + button_edit = gtk_button_new_with_mnemonic (_("_Edit")); gtk_container_add (GTK_CONTAINER (hbuttonbox1), button_edit); gtk_widget_set_can_default (button_edit, TRUE); - button_delete = gtk_button_new_from_stock (GTK_STOCK_DELETE); + button_delete = e_dialog_button_new_with_icon ("edit-delete", _("_Delete")); gtk_container_add (GTK_CONTAINER (hbuttonbox1), button_delete); gtk_widget_set_can_default (button_delete, TRUE); diff --git a/e-util/e-category-editor.c b/e-util/e-category-editor.c index 828e0b7635..7d4223d3e8 100644 --- a/e-util/e-category-editor.c +++ b/e-util/e-category-editor.c @@ -25,6 +25,7 @@ #include <libedataserver/libedataserver.h> #include "e-category-editor.h" +#include "e-dialog-widgets.h" #define E_CATEGORY_EDITOR_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ @@ -134,19 +135,15 @@ e_category_editor_init (ECategoryEditor *editor) chooser_dialog = gtk_file_chooser_dialog_new ( _("Category Icon"), NULL, GTK_FILE_CHOOSER_ACTION_OPEN, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); + _("_Cancel"), GTK_RESPONSE_CANCEL, NULL); - no_image_button = gtk_button_new_with_mnemonic (_("_No Image")); - gtk_button_set_image ( - GTK_BUTTON (no_image_button), - gtk_image_new_from_stock ( - GTK_STOCK_CLOSE, GTK_ICON_SIZE_BUTTON)); + no_image_button = e_dialog_button_new_with_icon ("window-close", _("_No Image")); gtk_dialog_add_action_widget ( GTK_DIALOG (chooser_dialog), no_image_button, GTK_RESPONSE_NO); gtk_dialog_add_button ( GTK_DIALOG (chooser_dialog), - GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT); + _("_Open"), GTK_RESPONSE_ACCEPT); gtk_file_chooser_set_local_only ( GTK_FILE_CHOOSER (chooser_dialog), TRUE); gtk_widget_show (no_image_button); @@ -208,8 +205,8 @@ e_category_editor_init (ECategoryEditor *editor) gtk_dialog_add_buttons ( GTK_DIALOG (editor), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_OK"), GTK_RESPONSE_OK, NULL); gtk_dialog_set_default_response (GTK_DIALOG (editor), GTK_RESPONSE_OK); gtk_window_set_title (GTK_WINDOW (editor), _("Category Properties")); gtk_window_set_type_hint ( diff --git a/e-util/e-charset-combo-box.c b/e-util/e-charset-combo-box.c index c97cbe5b03..ececac3c1a 100644 --- a/e-util/e-charset-combo-box.c +++ b/e-util/e-charset-combo-box.c @@ -98,8 +98,8 @@ charset_combo_box_run_dialog (ECharsetComboBox *combo_box) widget = gtk_dialog_new_with_buttons ( _("Character Encoding"), parent, GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_OK"), GTK_RESPONSE_OK, NULL); /* Load the broken border width defaults so we can override them. */ gtk_widget_ensure_style (widget); diff --git a/e-util/e-dialog-widgets.c b/e-util/e-dialog-widgets.c index 5657c21aa2..1a64b4b1b9 100644 --- a/e-util/e-dialog-widgets.c +++ b/e-util/e-dialog-widgets.c @@ -132,3 +132,38 @@ e_dialog_combo_box_get (GtkWidget *widget, return i; } + +/** + * e_dialog_button_new_with_icon: + * @icon_name: Icon's name to use; can be %NULL + * @label: Button label to set, with mnemonics + * + * Creates a new #GtkButton with preset @label and image set + * to @icon_name. + * + * Returns: (transfer-full): A new #GtkButton + * + * Since: 3.12 + **/ +GtkWidget * +e_dialog_button_new_with_icon (const gchar *icon_name, + const gchar *label) +{ + GtkIconSize icon_size = GTK_ICON_SIZE_BUTTON; + GtkWidget *button; + + if (label && *label) { + button = gtk_button_new_with_mnemonic (label); + } else { + button = gtk_button_new (); + icon_size = GTK_ICON_SIZE_MENU; + } + + if (icon_name) + gtk_button_set_image (GTK_BUTTON (button), + gtk_image_new_from_icon_name (icon_name, icon_size)); + + gtk_widget_show (button); + + return button; +} diff --git a/e-util/e-dialog-widgets.h b/e-util/e-dialog-widgets.h index 6899d43f72..f2f9ef3926 100644 --- a/e-util/e-dialog-widgets.h +++ b/e-util/e-dialog-widgets.h @@ -33,4 +33,7 @@ void e_dialog_combo_box_set (GtkWidget *widget, gint value, const gint *value_map); gint e_dialog_combo_box_get (GtkWidget *widget, const gint *value_map); +GtkWidget * e_dialog_button_new_with_icon (const gchar *icon_name, + const gchar *label); + #endif diff --git a/e-util/e-filter-datespec.c b/e-util/e-filter-datespec.c index cde0c38a1f..71a3972843 100644 --- a/e-util/e-filter-datespec.c +++ b/e-util/e-filter-datespec.c @@ -288,8 +288,8 @@ button_clicked (GtkButton *button, _("Select a time to compare against")); gtk_dialog_add_buttons ( dialog, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_OK"), GTK_RESPONSE_OK, NULL); p->notebook_type = e_builder_get_widget (builder, "notebook_type"); diff --git a/e-util/e-filter-rule.c b/e-util/e-filter-rule.c index d339efde03..721ed748a7 100644 --- a/e-util/e-filter-rule.c +++ b/e-util/e-filter-rule.c @@ -30,6 +30,7 @@ #include <glib/gi18n.h> #include "e-alert-dialog.h" +#include "e-dialog-widgets.h" #include "e-filter-rule.h" #include "e-rule-context.h" @@ -220,7 +221,7 @@ attach_rule (GtkWidget *rule, GTK_TABLE (data->parts), rule, 0, 1, row, row + 1, GTK_EXPAND | GTK_FILL, 0, 0, 0); - remove = gtk_button_new_from_stock (GTK_STOCK_REMOVE); + remove = e_dialog_button_new_with_icon ("list-remove", _("_Remove")); g_object_set_data ((GObject *) remove, "rule", rule); g_signal_connect ( remove, "clicked", @@ -925,10 +926,7 @@ filter_rule_get_widget (EFilterRule *rule, hgrid = GTK_GRID (gtk_grid_new ()); gtk_grid_set_column_spacing (hgrid, 3); - add = gtk_button_new_with_mnemonic (_("A_dd Condition")); - gtk_button_set_image ( - GTK_BUTTON (add), gtk_image_new_from_stock ( - GTK_STOCK_ADD, GTK_ICON_SIZE_BUTTON)); + add = e_dialog_button_new_with_icon ("list-add", _("A_dd Condition")); g_signal_connect ( add, "clicked", G_CALLBACK (more_parts), data); diff --git a/e-util/e-focus-tracker.c b/e-util/e-focus-tracker.c index 36d2421711..0bc6f62392 100644 --- a/e-util/e-focus-tracker.c +++ b/e-util/e-focus-tracker.c @@ -725,27 +725,27 @@ e_focus_tracker_init (EFocusTracker *focus_tracker) action = gtk_action_new ( "cut-clipboard", NULL, - _("Cut the selection"), GTK_STOCK_CUT); + _("Cut the selection"), "edit-cut"); focus_tracker->priv->cut_clipboard = action; action = gtk_action_new ( "copy-clipboard", NULL, - _("Copy the selection"), GTK_STOCK_COPY); + _("Copy the selection"), "edit-copy"); focus_tracker->priv->copy_clipboard = action; action = gtk_action_new ( "paste-clipboard", NULL, - _("Paste the clipboard"), GTK_STOCK_PASTE); + _("Paste the clipboard"), "edit-paste"); focus_tracker->priv->paste_clipboard = action; action = gtk_action_new ( "delete-selection", NULL, - _("Delete the selection"), GTK_STOCK_DELETE); + _("Delete the selection"), "edit-delete"); focus_tracker->priv->delete_selection = action; action = gtk_action_new ( "select-all", NULL, - _("Select all text"), GTK_STOCK_SELECT_ALL); + _("Select all text"), "edit-select-all"); focus_tracker->priv->select_all = action; } diff --git a/e-util/e-icon-factory.c b/e-util/e-icon-factory.c index dda9437a2e..43c1239b03 100644 --- a/e-util/e-icon-factory.c +++ b/e-util/e-icon-factory.c @@ -112,7 +112,7 @@ e_icon_factory_get_icon (const gchar *icon_name, /* Fallback to missing image */ pixbuf = gtk_icon_theme_load_icon ( - icon_theme, GTK_STOCK_MISSING_IMAGE, + icon_theme, "image-missing", height, 0, &error); if (error != NULL) { diff --git a/e-util/e-import-assistant.c b/e-util/e-import-assistant.c index d2b91e2139..afba502895 100644 --- a/e-util/e-import-assistant.c +++ b/e-util/e-import-assistant.c @@ -33,6 +33,7 @@ #include <gdk/gdkkeysyms.h> #include <libebackend/libebackend.h> +#include "e-dialog-widgets.h" #include "e-import.h" #include "e-util-private.h" @@ -771,11 +772,7 @@ prepare_progress_page (GtkAssistant *assistant, gtk_assistant_commit (assistant); /* Install a custom "Cancel Import" button. */ - cancel_button = gtk_button_new_with_mnemonic (_("_Cancel Import")); - gtk_button_set_image ( - GTK_BUTTON (cancel_button), - gtk_image_new_from_stock ( - GTK_STOCK_CANCEL, GTK_ICON_SIZE_BUTTON)); + cancel_button = e_dialog_button_new_with_icon ("process-stop", _("_Cancel Import")); g_signal_connect_swapped ( cancel_button, "clicked", G_CALLBACK (import_cancelled), assistant); diff --git a/e-util/e-mail-signature-editor.c b/e-util/e-mail-signature-editor.c index 697ba10bf3..bb3e1dee36 100644 --- a/e-util/e-mail-signature-editor.c +++ b/e-util/e-mail-signature-editor.c @@ -303,14 +303,14 @@ action_save_and_close_cb (GtkAction *action, static GtkActionEntry entries[] = { { "close", - GTK_STOCK_CLOSE, + "window-close", N_("_Close"), "<Control>w", N_("Close"), G_CALLBACK (action_close_cb) }, { "save-and-close", - GTK_STOCK_SAVE, + "document-save", N_("_Save and Close"), "<Control>Return", N_("Save and Close"), diff --git a/e-util/e-mail-signature-manager.c b/e-util/e-mail-signature-manager.c index f3a9549596..7f75cb7540 100644 --- a/e-util/e-mail-signature-manager.c +++ b/e-util/e-mail-signature-manager.c @@ -23,6 +23,7 @@ #include <libedataserver/libedataserver.h> +#include "e-dialog-widgets.h" #include "e-mail-signature-preview.h" #include "e-mail-signature-tree-view.h" #include "e-mail-signature-script-dialog.h" @@ -323,7 +324,7 @@ mail_signature_manager_constructed (GObject *object) container = widget; - widget = gtk_button_new_from_stock (GTK_STOCK_ADD); + widget = e_dialog_button_new_with_icon ("list-add", _("_Add")); gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0); manager->priv->add_button = widget; /* not referenced */ gtk_widget_show (widget); @@ -333,10 +334,7 @@ mail_signature_manager_constructed (GObject *object) G_CALLBACK (e_mail_signature_manager_add_signature), manager); - widget = gtk_button_new_with_mnemonic (_("Add _Script")); - gtk_button_set_image ( - GTK_BUTTON (widget), gtk_image_new_from_stock ( - GTK_STOCK_EXECUTE, GTK_ICON_SIZE_BUTTON)); + widget = e_dialog_button_new_with_icon ("system-run", _("Add _Script")); gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0); manager->priv->add_script_button = widget; /* not referenced */ gtk_widget_show (widget); @@ -356,7 +354,7 @@ mail_signature_manager_constructed (GObject *object) G_CALLBACK (e_mail_signature_manager_add_signature_script), manager); - widget = gtk_button_new_from_stock (GTK_STOCK_EDIT); + widget = gtk_button_new_with_mnemonic (_("_Edit")); gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0); manager->priv->edit_button = widget; /* not referenced */ gtk_widget_show (widget); @@ -366,7 +364,7 @@ mail_signature_manager_constructed (GObject *object) G_CALLBACK (e_mail_signature_manager_edit_signature), manager); - widget = gtk_button_new_from_stock (GTK_STOCK_REMOVE); + widget = e_dialog_button_new_with_icon ("list-remove", _("_Remove")); gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0); manager->priv->remove_button = widget; /* not referenced */ gtk_widget_show (widget); diff --git a/e-util/e-mail-signature-script-dialog.c b/e-util/e-mail-signature-script-dialog.c index 2f419d6613..0d239e0dca 100644 --- a/e-util/e-mail-signature-script-dialog.c +++ b/e-util/e-mail-signature-script-dialog.c @@ -363,11 +363,11 @@ mail_signature_script_dialog_constructed (GObject *object) gtk_dialog_add_button ( GTK_DIALOG (dialog), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); + _("_Cancel"), GTK_RESPONSE_CANCEL); gtk_dialog_add_button ( GTK_DIALOG (dialog), - GTK_STOCK_SAVE, GTK_RESPONSE_OK); + _("_Save"), GTK_RESPONSE_OK); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); @@ -383,8 +383,8 @@ mail_signature_script_dialog_constructed (GObject *object) container = widget; - widget = gtk_image_new_from_stock ( - GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG); + widget = gtk_image_new_from_icon_name ( + "dialog-information", GTK_ICON_SIZE_DIALOG); gtk_table_attach ( GTK_TABLE (container), widget, 0, 1, 0, 1, 0, 0, 0, 0); @@ -466,8 +466,8 @@ mail_signature_script_dialog_constructed (GObject *object) container = widget; - widget = gtk_image_new_from_stock ( - GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_MENU); + widget = gtk_image_new_from_icon_name ( + "dialog-warning", GTK_ICON_SIZE_MENU); gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0); gtk_widget_show (widget); diff --git a/e-util/e-name-selector-dialog.c b/e-util/e-name-selector-dialog.c index 9211e19709..e045a067e1 100644 --- a/e-util/e-name-selector-dialog.c +++ b/e-util/e-name-selector-dialog.c @@ -548,7 +548,7 @@ name_selector_dialog_constructed (GObject *object) gtk_dialog_add_buttons ( GTK_DIALOG (object), - GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, + _("_Close"), GTK_RESPONSE_CLOSE, NULL); /* Try to figure out a sane default size for the dialog. We used to hard @@ -900,7 +900,7 @@ setup_section_button (ENameSelectorDialog *name_selector_dialog, label = gtk_label_new_with_mnemonic (label_text); gtk_widget_show (label); - image = gtk_image_new_from_stock (icon_name, GTK_ICON_SIZE_BUTTON); + image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON); gtk_widget_show (image); if (icon_before_label) { @@ -992,11 +992,11 @@ add_section (ENameSelectorDialog *name_selector_dialog, /* "Add" button */ gtk_container_add (GTK_CONTAINER (vgrid), GTK_WIDGET (section.transfer_button)); - setup_section_button (name_selector_dialog, section.transfer_button, 0.7, _("_Add"), "gtk-go-forward", FALSE); + setup_section_button (name_selector_dialog, section.transfer_button, 0.7, _("_Add"), "go-next", FALSE); /* "Remove" button */ gtk_container_add (GTK_CONTAINER (vgrid), GTK_WIDGET (section.remove_button)); - setup_section_button (name_selector_dialog, section.remove_button, 0.5, _("_Remove"), "gtk-go-back", TRUE); + setup_section_button (name_selector_dialog, section.remove_button, 0.5, _("_Remove"), "go-previous", TRUE); gtk_widget_set_sensitive (GTK_WIDGET (section.remove_button), FALSE); /* hgrid for label and scrolled window. This is a separate hgrid, instead diff --git a/e-util/e-passwords.c b/e-util/e-passwords.c index c53914e5a0..3ad39d8686 100644 --- a/e-util/e-passwords.c +++ b/e-util/e-passwords.c @@ -465,8 +465,8 @@ ep_ask_password (EPassMsg *msg) widget = gtk_dialog_new_with_buttons ( msg->title, msg->parent, 0, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_OK"), GTK_RESPONSE_OK, NULL); gtk_dialog_set_default_response ( GTK_DIALOG (widget), GTK_RESPONSE_OK); diff --git a/e-util/e-preferences-window.c b/e-util/e-preferences-window.c index f626be9884..d15b208374 100644 --- a/e-util/e-preferences-window.c +++ b/e-util/e-preferences-window.c @@ -27,6 +27,7 @@ #include <glib/gi18n.h> #include <gdk/gdkkeysyms.h> +#include "e-dialog-widgets.h" #include "e-misc-utils.h" #define SWITCH_PAGE_INTERVAL 250 @@ -375,7 +376,7 @@ e_preferences_window_init (EPreferencesWindow *window) container = widget; - widget = gtk_button_new_from_stock (GTK_STOCK_HELP); + widget = e_dialog_button_new_with_icon ("help-browser", _("_Help")); g_signal_connect_swapped ( widget, "clicked", G_CALLBACK (preferences_window_help_clicked_cb), window); @@ -384,7 +385,7 @@ e_preferences_window_init (EPreferencesWindow *window) GTK_BUTTON_BOX (container), widget, TRUE); gtk_widget_show (widget); - widget = gtk_button_new_from_stock (GTK_STOCK_CLOSE); + widget = e_dialog_button_new_with_icon ("window-close", _("_Close")); g_signal_connect_swapped ( widget, "clicked", G_CALLBACK (gtk_widget_hide), window); diff --git a/e-util/e-rule-context.c b/e-util/e-rule-context.c index ac999ee4f5..668bea2875 100644 --- a/e-util/e-rule-context.c +++ b/e-util/e-rule-context.c @@ -812,8 +812,8 @@ e_rule_context_add_rule_gui (ERuleContext *context, dialog =(GtkDialog *) gtk_dialog_new (); gtk_dialog_add_buttons ( dialog, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_OK"), GTK_RESPONSE_OK, NULL); gtk_window_set_title ((GtkWindow *) dialog, title); diff --git a/e-util/e-rule-editor.c b/e-util/e-rule-editor.c index dca7b1d3ab..c99efa1f56 100644 --- a/e-util/e-rule-editor.c +++ b/e-util/e-rule-editor.c @@ -177,8 +177,8 @@ rule_add (GtkWidget *widget, editor->dialog = gtk_dialog_new (); gtk_dialog_add_buttons ( GTK_DIALOG (editor->dialog), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_OK"), GTK_RESPONSE_OK, NULL); gtk_window_set_title ((GtkWindow *) editor->dialog, _("Add Rule")); @@ -279,8 +279,8 @@ rule_edit (GtkWidget *widget, editor->dialog = gtk_dialog_new (); gtk_dialog_add_buttons ( (GtkDialog *) editor->dialog, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_OK"), GTK_RESPONSE_OK, NULL); gtk_window_set_title ((GtkWindow *) editor->dialog, _("Edit Rule")); @@ -773,7 +773,7 @@ e_rule_editor_construct (ERuleEditor *editor, gtk_dialog_add_buttons ( GTK_DIALOG (editor), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_OK"), GTK_RESPONSE_OK, NULL); } diff --git a/e-util/e-search-bar.c b/e-util/e-search-bar.c index 1dd7506173..13b4ee6f87 100644 --- a/e-util/e-search-bar.c +++ b/e-util/e-search-bar.c @@ -27,6 +27,8 @@ #include <glib/gi18n.h> #include <gdk/gdkkeysyms.h> +#include "e-dialog-widgets.h" + #define E_SEARCH_BAR_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ ((obj), E_TYPE_SEARCH_BAR, ESearchBarPrivate)) @@ -558,8 +560,8 @@ e_search_bar_init (ESearchBar *search_bar) widget = gtk_button_new (); gtk_button_set_image ( - GTK_BUTTON (widget), gtk_image_new_from_stock ( - GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU)); + GTK_BUTTON (widget), gtk_image_new_from_icon_name ( + "window-close", GTK_ICON_SIZE_MENU)); gtk_button_set_relief (GTK_BUTTON (widget), GTK_RELIEF_NONE); gtk_widget_set_tooltip_text (widget, _("Close the find bar")); gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0); @@ -576,9 +578,9 @@ e_search_bar_init (ESearchBar *search_bar) label = widget; widget = gtk_entry_new (); - gtk_entry_set_icon_from_stock ( + gtk_entry_set_icon_from_icon_name ( GTK_ENTRY (widget), GTK_ENTRY_ICON_SECONDARY, - GTK_STOCK_CLEAR); + "edit-clear"); gtk_entry_set_icon_tooltip_text ( GTK_ENTRY (widget), GTK_ENTRY_ICON_SECONDARY, _("Clear the search")); @@ -605,10 +607,7 @@ e_search_bar_init (ESearchBar *search_bar) widget, "icon-release", G_CALLBACK (search_bar_icon_release_cb), search_bar); - widget = gtk_button_new_with_mnemonic (_("_Previous")); - gtk_button_set_image ( - GTK_BUTTON (widget), gtk_image_new_from_stock ( - GTK_STOCK_GO_BACK, GTK_ICON_SIZE_MENU)); + widget = e_dialog_button_new_with_icon ("go-previous", _("_Previous")); gtk_button_set_relief (GTK_BUTTON (widget), GTK_RELIEF_NONE); gtk_widget_set_tooltip_text ( widget, _("Find the previous occurrence of the phrase")); @@ -620,10 +619,7 @@ e_search_bar_init (ESearchBar *search_bar) widget, "clicked", G_CALLBACK (search_bar_find_previous_cb), search_bar); - widget = gtk_button_new_with_mnemonic (_("_Next")); - gtk_button_set_image ( - GTK_BUTTON (widget), gtk_image_new_from_stock ( - GTK_STOCK_GO_FORWARD, GTK_ICON_SIZE_MENU)); + widget = e_dialog_button_new_with_icon ("go-next", _("_Next")); gtk_button_set_relief (GTK_BUTTON (widget), GTK_RELIEF_NONE); gtk_widget_set_tooltip_text ( widget, _("Find the next occurrence of the phrase")); diff --git a/e-util/e-send-options.ui b/e-util/e-send-options.ui index 681e6e0693..13459e2801 100644 --- a/e-util/e-send-options.ui +++ b/e-util/e-send-options.ui @@ -888,12 +888,13 @@ <property name="layout_style">end</property> <child> <object class="GtkButton" id="helpbutton1"> - <property name="label">gtk-help</property> + <property name="label" translatable="yes">_Help</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="can_default">True</property> <property name="receives_default">False</property> - <property name="use_stock">True</property> + <property name="use_stock">False</property> + <property name="use_underline">True</property> </object> <packing> <property name="expand">False</property> @@ -903,12 +904,13 @@ </child> <child> <object class="GtkButton" id="cancelbutton1"> - <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">False</property> - <property name="use_stock">True</property> + <property name="use_stock">False</property> + <property name="use_underline">True</property> </object> <packing> <property name="expand">False</property> @@ -918,12 +920,13 @@ </child> <child> <object class="GtkButton" id="okbutton1"> - <property name="label">gtk-ok</property> + <property name="label" translatable="yes">_OK</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="can_default">True</property> <property name="receives_default">False</property> - <property name="use_stock">True</property> + <property name="use_stock">False</property> + <property name="use_underline">True</property> </object> <packing> <property name="expand">False</property> diff --git a/e-util/e-source-config-dialog.c b/e-util/e-source-config-dialog.c index 55dd1a1ef9..5c84bda2de 100644 --- a/e-util/e-source-config-dialog.c +++ b/e-util/e-source-config-dialog.c @@ -15,6 +15,12 @@ * */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <glib/gi18n-lib.h> + #include "e-source-config-dialog.h" #include "e-alert-bar.h" @@ -366,8 +372,8 @@ e_source_config_dialog_init (ESourceConfigDialog *dialog) gtk_dialog_add_buttons ( GTK_DIALOG (dialog), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_OK"), GTK_RESPONSE_OK, NULL); gtk_dialog_set_default_response ( diff --git a/e-util/e-source-selector-dialog.c b/e-util/e-source-selector-dialog.c index 8136fcfd68..12160a26de 100644 --- a/e-util/e-source-selector-dialog.c +++ b/e-util/e-source-selector-dialog.c @@ -345,8 +345,8 @@ e_source_selector_dialog_init (ESourceSelectorDialog *dialog) gtk_dialog_add_buttons ( GTK_DIALOG (dialog), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_OK"), GTK_RESPONSE_OK, NULL); gtk_dialog_set_default_response ( GTK_DIALOG (dialog), GTK_RESPONSE_OK); gtk_dialog_set_response_sensitive ( diff --git a/e-util/e-spell-entry.c b/e-util/e-spell-entry.c index f426ead482..cea403948b 100644 --- a/e-util/e-spell-entry.c +++ b/e-util/e-spell-entry.c @@ -481,7 +481,7 @@ build_spelling_menu (ESpellEntry *entry, gtk_image_menu_item_set_image ( GTK_IMAGE_MENU_ITEM (mi), - gtk_image_new_from_stock (GTK_STOCK_ADD, GTK_ICON_SIZE_MENU)); + gtk_image_new_from_icon_name ("list-add", GTK_ICON_SIZE_MENU)); if (entry->priv->checkers->next == NULL) { checker = entry->priv->checkers->data; @@ -529,7 +529,7 @@ build_spelling_menu (ESpellEntry *entry, mi = gtk_image_menu_item_new_with_label (_("Ignore All")); gtk_image_menu_item_set_image ( GTK_IMAGE_MENU_ITEM (mi), - gtk_image_new_from_stock (GTK_STOCK_REMOVE, GTK_ICON_SIZE_MENU)); + gtk_image_new_from_icon_name ("list-remove", GTK_ICON_SIZE_MENU)); g_signal_connect (mi, "activate", G_CALLBACK (ignore_all), entry); gtk_widget_show_all (mi); gtk_menu_shell_append (GTK_MENU_SHELL (topmenu), mi); @@ -553,7 +553,7 @@ spell_entry_add_suggestions_menu (ESpellEntry *entry, gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), mi); /* Above the separator, show the suggestions menu */ - icon = gtk_image_new_from_stock (GTK_STOCK_SPELL_CHECK, GTK_ICON_SIZE_MENU); + icon = gtk_image_new_from_icon_name ("tools-check-spelling", GTK_ICON_SIZE_MENU); mi = gtk_image_menu_item_new_with_label (_("Spelling Suggestions")); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi), icon); diff --git a/e-util/e-table-config.c b/e-util/e-table-config.c index f8d79f86f0..4d6be20531 100644 --- a/e-util/e-table-config.c +++ b/e-util/e-table-config.c @@ -545,10 +545,8 @@ do_fields_config_dialog (ETableConfig *config) _("Show Fields"), GTK_WINDOW (config->dialog_toplevel), 0, /* no flags */ - GTK_STOCK_CANCEL, - GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, - GTK_RESPONSE_OK, + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_OK"), GTK_RESPONSE_OK, NULL); gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); diff --git a/e-util/e-table-config.ui b/e-util/e-table-config.ui index 79c3a300d9..6323a6043d 100644 --- a/e-util/e-table-config.ui +++ b/e-util/e-table-config.ui @@ -20,14 +20,14 @@ <property name="layout_style">end</property> <child> <object class="GtkButton" id="cancelbutton2"> - <property name="label">gtk-cancel</property> - <property name="use_action_appearance">False</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">False</property> <property name="use_action_appearance">False</property> - <property name="use_stock">True</property> + <property name="use_stock">False</property> + <property name="use_underline">True</property> </object> <packing> <property name="expand">False</property> @@ -37,14 +37,14 @@ </child> <child> <object class="GtkButton" id="applybutton2"> - <property name="label">gtk-apply</property> - <property name="use_action_appearance">False</property> + <property name="label" translatable="yes">_Apply</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="can_default">True</property> <property name="receives_default">False</property> <property name="use_action_appearance">False</property> - <property name="use_stock">True</property> + <property name="use_stock">False</property> + <property name="use_underline">True</property> </object> <packing> <property name="expand">False</property> @@ -54,14 +54,14 @@ </child> <child> <object class="GtkButton" id="okbutton2"> - <property name="label">gtk-ok</property> - <property name="use_action_appearance">False</property> + <property name="label" translatable="yes">_OK</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="can_default">True</property> <property name="receives_default">False</property> <property name="use_action_appearance">False</property> - <property name="use_stock">True</property> + <property name="use_stock">False</property> + <property name="use_underline">True</property> </object> <packing> <property name="expand">False</property> @@ -296,14 +296,14 @@ </child> <child> <object class="GtkButton" id="button42"> - <property name="label">gtk-cancel</property> - <property name="use_action_appearance">False</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">False</property> <property name="use_action_appearance">False</property> - <property name="use_stock">True</property> + <property name="use_stock">False</property> + <property name="use_underline">True</property> </object> <packing> <property name="expand">False</property> @@ -313,14 +313,14 @@ </child> <child> <object class="GtkButton" id="button41"> - <property name="label">gtk-ok</property> - <property name="use_action_appearance">False</property> + <property name="label" translatable="yes">_OK</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="can_default">True</property> <property name="receives_default">False</property> <property name="use_action_appearance">False</property> - <property name="use_stock">True</property> + <property name="use_stock">False</property> + <property name="use_underline">True</property> </object> <packing> <property name="expand">False</property> @@ -994,14 +994,14 @@ </child> <child> <object class="GtkButton" id="button45"> - <property name="label">gtk-cancel</property> - <property name="use_action_appearance">False</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">False</property> <property name="use_action_appearance">False</property> - <property name="use_stock">True</property> + <property name="use_stock">False</property> + <property name="use_underline">True</property> </object> <packing> <property name="expand">False</property> @@ -1011,15 +1011,15 @@ </child> <child> <object class="GtkButton" id="button44"> - <property name="label">gtk-ok</property> - <property name="use_action_appearance">False</property> + <property name="label" translatable="yes">_OK</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="can_default">True</property> <property name="has_default">True</property> <property name="receives_default">False</property> <property name="use_action_appearance">False</property> - <property name="use_stock">True</property> + <property name="use_stock">False</property> + <property name="use_underline">True</property> </object> <packing> <property name="expand">False</property> diff --git a/e-util/e-table-field-chooser-dialog.c b/e-util/e-table-field-chooser-dialog.c index b53fadd917..88b3962d25 100644 --- a/e-util/e-table-field-chooser-dialog.c +++ b/e-util/e-table-field-chooser-dialog.c @@ -204,7 +204,7 @@ e_table_field_chooser_dialog_init (ETableFieldChooserDialog *e_table_field_choos e_table_field_chooser_dialog->full_header = NULL; e_table_field_chooser_dialog->header = NULL; - gtk_dialog_add_button (dialog, GTK_STOCK_CLOSE, GTK_RESPONSE_OK); + gtk_dialog_add_button (dialog, _("_Close"), GTK_RESPONSE_OK); gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE); diff --git a/e-util/e-text.c b/e-util/e-text.c index 398d553be1..b1c1af6c42 100644 --- a/e-util/e-text.c +++ b/e-util/e-text.c @@ -2068,7 +2068,9 @@ popup_targets_received (GtkClipboard *clipboard, popup_menu_detach); /* cut menu item */ - menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_CUT, NULL); + menuitem = gtk_image_menu_item_new_with_mnemonic (_("Cu_t")); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), + gtk_image_new_from_icon_name ("edit-cut", GTK_ICON_SIZE_MENU)); gtk_widget_show (menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), menuitem); g_signal_connect_swapped ( @@ -2079,7 +2081,9 @@ popup_targets_received (GtkClipboard *clipboard, (text->selection_start != text->selection_end)); /* copy menu item */ - menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_COPY, NULL); + menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Copy")); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), + gtk_image_new_from_icon_name ("edit-copy", GTK_ICON_SIZE_MENU)); gtk_widget_show (menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), menuitem); g_signal_connect_swapped ( @@ -2088,7 +2092,9 @@ popup_targets_received (GtkClipboard *clipboard, gtk_widget_set_sensitive (menuitem, text->selection_start != text->selection_end); /* paste menu item */ - menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_PASTE, NULL); + menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Paste")); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), + gtk_image_new_from_icon_name ("edit-paste", GTK_ICON_SIZE_MENU)); gtk_widget_show (menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), menuitem); g_signal_connect_swapped ( diff --git a/e-util/e-timezone-dialog.ui b/e-util/e-timezone-dialog.ui index 5a23ec180e..9c2508a6df 100644 --- a/e-util/e-timezone-dialog.ui +++ b/e-util/e-timezone-dialog.ui @@ -30,8 +30,9 @@ <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">True</property> + <property name="label" translatable="yes">_Cancel</property> + <property name="use_stock">False</property> + <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> </object> @@ -42,8 +43,9 @@ <property name="can_default">True</property> <property name="has_default">True</property> <property name="can_focus">True</property> - <property name="label">gtk-ok</property> - <property name="use_stock">True</property> + <property name="label" translatable="yes">_OK</property> + <property name="use_stock">False</property> + <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> </object> @@ -72,7 +74,7 @@ <child> <object class="GtkImage" id="image1"> <property name="visible">True</property> - <property name="stock">gtk-dialog-info</property> + <property name="icon-name">dialog-information</property> <property name="icon_size">6</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> diff --git a/e-util/e-url-entry.c b/e-util/e-url-entry.c index 4d75069464..1d5ada5907 100644 --- a/e-util/e-url-entry.c +++ b/e-util/e-url-entry.c @@ -101,8 +101,8 @@ e_url_entry_init (EUrlEntry *url_entry) entry = GTK_ENTRY (url_entry); - gtk_entry_set_icon_from_stock ( - entry, ICON_POSITION, GTK_STOCK_JUMP_TO); + gtk_entry_set_icon_from_icon_name ( + entry, ICON_POSITION, "go-jump"); gtk_entry_set_icon_tooltip_text ( entry, ICON_POSITION, _("Click here to open the URL")); diff --git a/e-util/e-web-view-gtkhtml.c b/e-util/e-web-view-gtkhtml.c index e371d0b592..5cc95a377c 100644 --- a/e-util/e-web-view-gtkhtml.c +++ b/e-util/e-web-view-gtkhtml.c @@ -401,7 +401,7 @@ action_image_copy_cb (GtkAction *action, static GtkActionEntry uri_entries[] = { { "uri-copy", - GTK_STOCK_COPY, + "edit-copy", N_("_Copy Link Location"), NULL, N_("Copy the link to the clipboard"), @@ -421,7 +421,7 @@ static GtkActionEntry http_entries[] = { static GtkActionEntry mailto_entries[] = { { "mailto-copy", - GTK_STOCK_COPY, + "edit-copy", N_("_Copy Email Address"), NULL, N_("Copy the email address to the clipboard"), @@ -438,7 +438,7 @@ static GtkActionEntry mailto_entries[] = { static GtkActionEntry image_entries[] = { { "image-copy", - GTK_STOCK_COPY, + "edit-copy", N_("_Copy Image"), NULL, N_("Copy the image to the clipboard"), @@ -448,7 +448,7 @@ static GtkActionEntry image_entries[] = { static GtkActionEntry selection_entries[] = { { "copy-clipboard", - GTK_STOCK_COPY, + "edit-copy", NULL, NULL, N_("Copy the selection"), @@ -458,8 +458,8 @@ static GtkActionEntry selection_entries[] = { static GtkActionEntry standard_entries[] = { { "select-all", - GTK_STOCK_SELECT_ALL, - NULL, + "edit-select-all", + N_("Select _All"), NULL, N_("Select all text and images"), G_CALLBACK (action_select_all_cb) } diff --git a/e-util/e-web-view.c b/e-util/e-web-view.c index faf57a5f31..739e1cc987 100644 --- a/e-util/e-web-view.c +++ b/e-util/e-web-view.c @@ -278,7 +278,7 @@ action_image_save_cb (GtkAction *action, static GtkActionEntry uri_entries[] = { { "uri-copy", - GTK_STOCK_COPY, + "edit-copy", N_("_Copy Link Location"), NULL, N_("Copy the link to the clipboard"), @@ -298,7 +298,7 @@ static GtkActionEntry http_entries[] = { static GtkActionEntry mailto_entries[] = { { "mailto-copy", - GTK_STOCK_COPY, + "edit-copy", N_("_Copy Email Address"), NULL, N_("Copy the email address to the clipboard"), @@ -315,14 +315,14 @@ static GtkActionEntry mailto_entries[] = { static GtkActionEntry image_entries[] = { { "image-copy", - GTK_STOCK_COPY, + "edit-copy", N_("_Copy Image"), NULL, N_("Copy the image to the clipboard"), G_CALLBACK (action_image_copy_cb) }, { "image-save", - GTK_STOCK_SAVE, + "document-save", N_("Save _Image..."), NULL, N_("Save the image to a file"), @@ -332,7 +332,7 @@ static GtkActionEntry image_entries[] = { static GtkActionEntry selection_entries[] = { { "copy-clipboard", - GTK_STOCK_COPY, + "edit-copy", NULL, NULL, N_("Copy the selection"), @@ -342,8 +342,8 @@ static GtkActionEntry selection_entries[] = { static GtkActionEntry standard_entries[] = { { "select-all", - GTK_STOCK_SELECT_ALL, - NULL, + "edit-select-all", + N_("Select _All"), NULL, N_("Select all text and images"), G_CALLBACK (action_select_all_cb) } @@ -1201,15 +1201,15 @@ web_view_submit_alert (EAlertSink *alert_sink, switch (e_alert_get_message_type (alert)) { case GTK_MESSAGE_INFO: - icon_name = GTK_STOCK_DIALOG_INFO; + icon_name = "dialog-information"; break; case GTK_MESSAGE_WARNING: - icon_name = GTK_STOCK_DIALOG_WARNING; + icon_name = "dialog-warning"; break; case GTK_MESSAGE_ERROR: - icon_name = GTK_STOCK_DIALOG_ERROR; + icon_name = "dialog-error"; break; default: @@ -3078,8 +3078,8 @@ e_web_view_cursor_image_save (EWebView *web_view) dialog = gtk_file_chooser_dialog_new ( _("Save Image"), toplevel, GTK_FILE_CHOOSER_ACTION_SAVE, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_Save"), GTK_RESPONSE_ACCEPT, NULL); gtk_dialog_set_default_response ( GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT); diff --git a/e-util/evolution-source-viewer.c b/e-util/evolution-source-viewer.c index 0b188d7664..8d6db0a615 100644 --- a/e-util/evolution-source-viewer.c +++ b/e-util/evolution-source-viewer.c @@ -21,6 +21,8 @@ #include <libedataserver/libedataserver.h> +#include "e-dialog-widgets.h" + /* XXX Even though this is all one file, I'm still being pedantic about data * encapsulation (except for a private struct, even I'm not that anal!). * I expect this program will eventually be too complex for one file @@ -676,7 +678,7 @@ source_viewer_constructed (GObject *object) renderer = gtk_cell_renderer_pixbuf_new (); g_object_set ( renderer, - "stock-id", GTK_STOCK_EDIT, + "icon-name", "media-record", "stock-size", GTK_ICON_SIZE_MENU, NULL); gtk_tree_view_column_pack_start (column, renderer, FALSE); @@ -686,7 +688,7 @@ source_viewer_constructed (GObject *object) renderer = gtk_cell_renderer_pixbuf_new (); g_object_set ( renderer, - "stock-id", GTK_STOCK_DELETE, + "icon-name", "list-remove", "stock-size", GTK_ICON_SIZE_MENU, NULL); gtk_tree_view_column_pack_start (column, renderer, FALSE); @@ -798,7 +800,7 @@ source_viewer_constructed (GObject *object) viewer->viewing_label = widget; /* do not reference */ gtk_widget_show (widget); - widget = gtk_button_new_from_stock (GTK_STOCK_DELETE); + widget = e_dialog_button_new_with_icon ("edit-delete", _("_Delete")); gtk_box_pack_end (GTK_BOX (container), widget, FALSE, FALSE, 0); viewer->delete_button = widget; /* do not reference */ gtk_widget_hide (widget); @@ -827,7 +829,7 @@ source_viewer_constructed (GObject *object) viewer->deleting_label = widget; /* do not reference */ gtk_widget_show (widget); - widget = gtk_button_new_from_stock (GTK_STOCK_CANCEL); + widget = e_dialog_button_new_with_icon ("process-stop", _("_Cancel")); gtk_box_pack_end (GTK_BOX (container), widget, FALSE, FALSE, 0); viewer->deleting_cancel = widget; /* do not reference */ gtk_widget_show (widget); diff --git a/e-util/filter.ui b/e-util/filter.ui index d91292736d..80dc5acc56 100644 --- a/e-util/filter.ui +++ b/e-util/filter.ui @@ -216,12 +216,13 @@ <property name="spacing">6</property> <child> <object class="GtkButton" id="rule_add"> - <property name="label">gtk-add</property> + <property name="label" translatable="yes">_Add</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="can_default">True</property> <property name="receives_default">False</property> - <property name="use_stock">True</property> + <property name="use_stock">False</property> + <property name="use-underline">True</property> </object> <packing> <property name="expand">False</property> @@ -246,12 +247,13 @@ </child> <child> <object class="GtkButton" id="rule_delete"> - <property name="label">gtk-remove</property> + <property name="label" translatable="yes">_Remove</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="can_default">True</property> <property name="receives_default">False</property> - <property name="use_stock">True</property> + <property name="use_stock">False</property> + <property name="use-underline">True</property> </object> <packing> <property name="expand">False</property> @@ -261,12 +263,13 @@ </child> <child> <object class="GtkButton" id="rule_top"> - <property name="label">gtk-goto-top</property> + <property name="label" translatable="yes">_Top</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="can_default">True</property> <property name="receives_default">False</property> - <property name="use_stock">True</property> + <property name="use_stock">False</property> + <property name="use-underline">True</property> </object> <packing> <property name="expand">False</property> @@ -276,12 +279,13 @@ </child> <child> <object class="GtkButton" id="rule_up"> - <property name="label">gtk-go-up</property> + <property name="label" translatable="yes">_Up</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="can_default">True</property> <property name="receives_default">False</property> - <property name="use_stock">True</property> + <property name="use_stock">False</property> + <property name="use-underline">True</property> </object> <packing> <property name="expand">False</property> @@ -291,12 +295,13 @@ </child> <child> <object class="GtkButton" id="rule_down"> - <property name="label">gtk-go-down</property> + <property name="label" translatable="yes">_Down</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="can_default">True</property> <property name="receives_default">False</property> - <property name="use_stock">True</property> + <property name="use_stock">False</property> + <property name="use-underline">True</property> </object> <packing> <property name="expand">False</property> @@ -306,12 +311,13 @@ </child> <child> <object class="GtkButton" id="rule_bottom"> - <property name="label">gtk-goto-bottom</property> + <property name="label" translatable="yes">_Bottom</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="can_default">True</property> <property name="receives_default">False</property> - <property name="use_stock">True</property> + <property name="use_stock">False</property> + <property name="use-underline">True</property> </object> <packing> <property name="expand">False</property> diff --git a/e-util/gal-view-instance-save-as-dialog.c b/e-util/gal-view-instance-save-as-dialog.c index dee403088f..d5febb4acc 100644 --- a/e-util/gal-view-instance-save-as-dialog.c +++ b/e-util/gal-view-instance-save-as-dialog.c @@ -266,8 +266,8 @@ gal_view_instance_save_as_dialog_init (GalViewInstanceSaveAsDialog *dialog) gtk_dialog_add_buttons ( GTK_DIALOG (dialog), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_SAVE, GTK_RESPONSE_OK, + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_Save"), GTK_RESPONSE_OK, NULL); dialog->scrolledwindow = e_builder_get_widget (dialog->builder, "scrolledwindow2"); diff --git a/e-util/test-preferences-window.c b/e-util/test-preferences-window.c index acf395bbc5..b6d3b0f6b4 100644 --- a/e-util/test-preferences-window.c +++ b/e-util/test-preferences-window.c @@ -59,15 +59,15 @@ add_pages (EPreferencesWindow *preferences_window) { e_preferences_window_add_page ( preferences_window, "page-0", - "gtk-properties", "title 0", NULL, + "document-properties", "title 0", NULL, create_page_zero, 0); e_preferences_window_add_page ( preferences_window, "page-1", - "gtk-properties", "title 1", NULL, + "document-properties", "title 1", NULL, create_page_one, 1); e_preferences_window_add_page ( preferences_window, "page-2", - "gtk-properties", "title 2", NULL, + "document-properties", "title 2", NULL, create_page_two, 2); } |