diff options
author | Milan Crha <mcrha@redhat.com> | 2014-02-13 03:45:53 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2014-02-13 03:47:07 +0800 |
commit | b48e21d9aa7eb16e559739b71b9d08f90dfa92be (patch) | |
tree | 22244f22b235b1dfc80bbc50c7e2ab8eecb91cdf /addressbook/gui/widgets | |
parent | 4bdbb71da69076287ffbb781109aa5687026349c (diff) | |
download | gsoc2013-evolution-b48e21d9aa7eb16e559739b71b9d08f90dfa92be.tar gsoc2013-evolution-b48e21d9aa7eb16e559739b71b9d08f90dfa92be.tar.gz gsoc2013-evolution-b48e21d9aa7eb16e559739b71b9d08f90dfa92be.tar.bz2 gsoc2013-evolution-b48e21d9aa7eb16e559739b71b9d08f90dfa92be.tar.lz gsoc2013-evolution-b48e21d9aa7eb16e559739b71b9d08f90dfa92be.tar.xz gsoc2013-evolution-b48e21d9aa7eb16e559739b71b9d08f90dfa92be.tar.zst gsoc2013-evolution-b48e21d9aa7eb16e559739b71b9d08f90dfa92be.zip |
Stop using deprecated gtk-stock items
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 4 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-contact-map-window.c | 8 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-contact-display.c | 2 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-contact-merging.c | 26 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-gui-util.c | 4 |
5 files changed, 15 insertions, 29 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 4aaa7ee598..58178747ba 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -1327,8 +1327,8 @@ addressbook_view_confirm_delete (GtkWindow *parent, GTK_BUTTONS_NONE, "%s", message); gtk_dialog_add_buttons ( GTK_DIALOG (dialog), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_DELETE, GTK_RESPONSE_ACCEPT, + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_Delete"), GTK_RESPONSE_ACCEPT, NULL); response = gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); diff --git a/addressbook/gui/widgets/e-contact-map-window.c b/addressbook/gui/widgets/e-contact-map-window.c index 85a85fa7bd..736bad808f 100644 --- a/addressbook/gui/widgets/e-contact-map-window.c +++ b/addressbook/gui/widgets/e-contact-map-window.c @@ -29,6 +29,8 @@ #include <champlain/champlain.h> +#include <e-util/e-util.h> + #include "e-contact-map.h" #define E_CONTACT_MAP_WINDOW_GET_PRIVATE(obj) \ @@ -405,7 +407,7 @@ e_contact_map_window_init (EContactMapWindow *window) priv->spinner = button; /* Zoom-in button */ - button = gtk_button_new_from_stock (GTK_STOCK_ZOOM_IN); + button = e_dialog_button_new_with_icon ("zoom-in", _("Zoom _In")); g_signal_connect ( button, "clicked", G_CALLBACK (contact_map_window_zoom_in_cb), window); @@ -413,7 +415,7 @@ e_contact_map_window_init (EContactMapWindow *window) gtk_container_add (GTK_CONTAINER (hbox), button); /* Zoom-out button */ - button = gtk_button_new_from_stock (GTK_STOCK_ZOOM_OUT); + button = e_dialog_button_new_with_icon ("zoom-out", _("Zoom _Out")); g_signal_connect ( button, "clicked", G_CALLBACK (contact_map_window_zoom_out_cb), window); @@ -443,7 +445,7 @@ e_contact_map_window_init (EContactMapWindow *window) gtk_container_add (GTK_CONTAINER (hbox), entry); /* Search button */ - button = gtk_button_new_from_stock (GTK_STOCK_FIND); + button = e_dialog_button_new_with_icon ("edit-find", _("_Find")); g_signal_connect ( button, "clicked", G_CALLBACK (contact_map_window_find_contact_cb), window); diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c index 35d9457ece..529bb0b25c 100644 --- a/addressbook/gui/widgets/eab-contact-display.c +++ b/addressbook/gui/widgets/eab-contact-display.c @@ -145,7 +145,7 @@ action_contact_send_message_cb (GtkAction *action, static GtkActionEntry internal_mailto_entries[] = { { "contact-mailto-copy", - GTK_STOCK_COPY, + "edit-copy", N_("Copy _Email Address"), NULL, N_("Copy the email address to the clipboard"), diff --git a/addressbook/gui/widgets/eab-contact-merging.c b/addressbook/gui/widgets/eab-contact-merging.c index 05bc69665f..f516eb33dd 100644 --- a/addressbook/gui/widgets/eab-contact-merging.c +++ b/addressbook/gui/widgets/eab-contact-merging.c @@ -359,7 +359,7 @@ mergeit (EContactMergingLookup *lookup) gtk_dialog_add_buttons ( GTK_DIALOG (dialog), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + _("_Cancel"), GTK_RESPONSE_CANCEL, _("_Merge"), GTK_RESPONSE_OK, NULL); @@ -598,22 +598,6 @@ check_if_same (EContact *contact, } static GtkWidget * -create_iconic_button (const gchar *label, - const gchar *icon_name) -{ - GtkWidget *button, *image; - - button = gtk_button_new_with_mnemonic (label); - - if (icon_name) { - image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON); - gtk_button_set_image (GTK_BUTTON (button), image); - } - - return button; -} - -static GtkWidget * create_duplicate_contact_detected_dialog (EContact *old_contact, EContact *new_contact, gboolean disable_merge, @@ -633,13 +617,13 @@ create_duplicate_contact_detected_dialog (EContact *old_contact, "default-height", 400, NULL); - gtk_dialog_add_action_widget (dialog, create_iconic_button (_("_Cancel"), GTK_STOCK_CANCEL), GTK_RESPONSE_CANCEL); + gtk_dialog_add_action_widget (dialog, e_dialog_button_new_with_icon ("process-stop", _("_Cancel")), GTK_RESPONSE_CANCEL); if (is_for_commit) { - gtk_dialog_add_action_widget (dialog, create_iconic_button (_("_Save"), "document-save"), GTK_RESPONSE_OK); + gtk_dialog_add_action_widget (dialog, e_dialog_button_new_with_icon ("document-save", _("_Save")), GTK_RESPONSE_OK); } else { - gtk_dialog_add_action_widget (dialog, create_iconic_button (_("_Add"), "list-add"), GTK_RESPONSE_OK); - gtk_dialog_add_action_widget (dialog, create_iconic_button (_("_Merge"), NULL), GTK_RESPONSE_APPLY); + gtk_dialog_add_action_widget (dialog, e_dialog_button_new_with_icon ("list-add", _("_Add")), GTK_RESPONSE_OK); + gtk_dialog_add_action_widget (dialog, e_dialog_button_new_with_icon (NULL, _("_Merge")), GTK_RESPONSE_APPLY); } if (disable_merge) diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index ba8f5d076a..78b26fb11e 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -315,8 +315,8 @@ eab_select_source (ESourceRegistry *registry, dialog = gtk_dialog_new_with_buttons ( _("Select Address Book"), parent, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_OK"), GTK_RESPONSE_ACCEPT, NULL); gtk_window_set_default_size (GTK_WINDOW (dialog), 350, 300); |