Skip to content

Commit

Permalink
Stop using deprecated gtk-stock items
Browse files Browse the repository at this point in the history
  • Loading branch information
mcrha committed Feb 12, 2014
1 parent 4bdbb71 commit b48e21d
Show file tree
Hide file tree
Showing 129 changed files with 828 additions and 1,188 deletions.
15 changes: 9 additions & 6 deletions addressbook/gui/contact-editor/contact-editor.ui
Expand Up @@ -2400,12 +2400,13 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button-help">
<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>
Expand All @@ -2415,12 +2416,13 @@
</child>
<child>
<object class="GtkButton" id="button-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">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>
Expand All @@ -2430,13 +2432,14 @@
</child>
<child>
<object class="GtkButton" id="button-ok">
<property name="label">gtk-save</property>
<property name="label" translatable="yes">_Save</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_stock">True</property>
<property name="use_stock">False</property>
<property name="use-underline">True</property>
<accelerator key="s" modifiers="GDK_CONTROL_MASK" signal="clicked"/>
</object>
<packing>
Expand Down
4 changes: 2 additions & 2 deletions addressbook/gui/contact-editor/e-contact-editor-fullname.c
Expand Up @@ -220,8 +220,8 @@ e_contact_editor_fullname_init (EContactEditorFullname *e_contact_editor_fullnam

gtk_dialog_add_buttons (
dialog,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
_("_Cancel"), GTK_RESPONSE_CANCEL,
_("_OK"), GTK_RESPONSE_OK, NULL);

gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);

Expand Down
15 changes: 7 additions & 8 deletions addressbook/gui/contact-editor/e-contact-editor.c
Expand Up @@ -265,14 +265,14 @@ static GtkActionEntry undo_entries[] = {
NULL }, /* just a fake undo menu, to get shortcuts working */

{ "undo",
GTK_STOCK_UNDO,
"edit-undo",
NULL,
"<Control>z",
N_("Undo"),
NULL }, /* Handled by EFocusTracker */

{ "redo",
GTK_STOCK_REDO,
"edit-redo",
NULL,
"<Control>y",
N_("Redo"),
Expand Down Expand Up @@ -3565,17 +3565,16 @@ image_clicked (GtkWidget *button,
EContactEditor *editor)
{
if (!editor->priv->file_selector) {
const gchar *title = _("Please select an image for this contact");
const gchar *no_image = _("_No image");
GtkImage *preview;
GtkFileFilter *filter;

editor->priv->file_selector = gtk_file_chooser_dialog_new (
title, GTK_WINDOW (editor->priv->app),
_("Please select an image for this contact"),
GTK_WINDOW (editor->priv->app),
GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
no_image, GTK_RESPONSE_NO,
_("_Cancel"), GTK_RESPONSE_CANCEL,
_("_Open"), GTK_RESPONSE_ACCEPT,
_("_No image"), GTK_RESPONSE_NO,
NULL);

filter = gtk_file_filter_new ();
Expand Down
4 changes: 2 additions & 2 deletions addressbook/gui/contact-editor/e-contact-quick-add.c
Expand Up @@ -452,8 +452,8 @@ build_quick_add_dialog (QuickAdd *qa)
e_shell_get_active_window (NULL),
0,
_("_Edit Full"), QUICK_ADD_RESPONSE_EDIT_FULL,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
_("_Cancel"), GTK_RESPONSE_CANCEL,
_("_OK"), GTK_RESPONSE_OK,
NULL);

gtk_widget_ensure_style (dialog);
Expand Down
10 changes: 6 additions & 4 deletions addressbook/gui/contact-editor/fullname.ui
Expand Up @@ -74,12 +74,13 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button1">
<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>
Expand All @@ -89,12 +90,13 @@
</child>
<child>
<object class="GtkButton" id="button2">
<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>
Expand Down
44 changes: 24 additions & 20 deletions addressbook/gui/contact-list-editor/contact-list-editor.ui
Expand Up @@ -209,8 +209,9 @@
<property name="can_default">True</property>
<property name="has_tooltip">True</property>
<property name="tooltip_text" translatable="yes">Add an email to the List</property>
<property name="label">gtk-add</property>
<property name="use_stock">True</property>
<property name="label" translatable="yes">_Add</property>
<property name="use_stock">False</property>
<property name="use-underline">True</property>
<property name="xalign">0</property>
<signal handler="contact_list_editor_add_button_clicked_cb" name="clicked"/>
</object>
Expand All @@ -227,8 +228,9 @@
<property name="can_default">True</property>
<property name="has_tooltip">True</property>
<property name="tooltip_text" translatable="yes">Remove an email address from the List</property>
<property name="label">gtk-remove</property>
<property name="use_stock">True</property>
<property name="label" translatable="yes">_Remove</property>
<property name="use_stock">False</property>
<property name="use-underline">True</property>
<property name="xalign">0</property>
<signal handler="contact_list_editor_remove_button_clicked_cb" name="clicked"/>
</object>
Expand Down Expand Up @@ -262,9 +264,9 @@
<property name="is_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="use_underline">True</property>
<property name="label">gtk-goto-top</property>
<property name="use-stock">True</property>
<property name="label" translatable="yes">_Top</property>
<property name="use-stock">False</property>
<property name="use-underline">True</property>
<property name="sensitive">False</property>
<signal name="clicked" handler="contact_list_editor_top_button_clicked_cb"/>
</object>
Expand All @@ -280,9 +282,9 @@
<property name="is_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="use_underline">True</property>
<property name="label">gtk-go-up</property>
<property name="use-stock">True</property>
<property name="label" translatable="yes">_Up</property>
<property name="use-stock">False</property>
<property name="use-underline">True</property>
<property name="sensitive">False</property>
<signal name="clicked" handler="contact_list_editor_up_button_clicked_cb"/>
</object>
Expand All @@ -297,9 +299,9 @@
<property name="visible">True</property>
<property name="is_focus">True</property>
<property name="has_focus">True</property>
<property name="use_underline">True</property>
<property name="label">gtk-go-down</property>
<property name="use-stock">True</property>
<property name="label" translatable="yes">_Down</property>
<property name="use-stock">False</property>
<property name="use-underline">True</property>
<property name="sensitive">False</property>
<signal name="clicked" handler="contact_list_editor_down_button_clicked_cb"/>
</object>
Expand All @@ -314,9 +316,9 @@
<property name="visible">True</property>
<property name="is_focus">True</property>
<property name="has_focus">True</property>
<property name="use_underline">True</property>
<property name="label">gtk-goto-bottom</property>
<property name="use-stock">True</property>
<property name="label" translatable="yes">_Bottom</property>
<property name="use-stock">False</property>
<property name="use-underline">True</property>
<property name="sensitive">False</property>
<signal name="clicked" handler="contact_list_editor_bottom_button_clicked_cb"/>
</object>
Expand Down Expand Up @@ -374,17 +376,19 @@
<property name="visible">True</property>
<property name="is_focus">True</property>
<property name="can_default">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>
<signal handler="contact_list_editor_cancel_button_clicked_cb" name="clicked"/>
</object>
</child>
<child>
<object class="GtkButton" id="ok-button">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="label">gtk-save</property>
<property name="use_stock">True</property>
<property name="label" translatable="yes">_Save</property>
<property name="use_stock">False</property>
<property name="use-underline">True</property>
<accelerator key="s" modifiers="GDK_CONTROL_MASK" signal="clicked"/>
<signal handler="contact_list_editor_ok_button_clicked_cb" name="clicked"/>
</object>
Expand Down
4 changes: 2 additions & 2 deletions addressbook/gui/widgets/e-addressbook-view.c
Expand Up @@ -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);
Expand Down
8 changes: 5 additions & 3 deletions addressbook/gui/widgets/e-contact-map-window.c
Expand Up @@ -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) \
Expand Down Expand Up @@ -405,15 +407,15 @@ 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);
priv->zoom_in_btn = button;
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);
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion addressbook/gui/widgets/eab-contact-display.c
Expand Up @@ -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"),
Expand Down
26 changes: 5 additions & 21 deletions addressbook/gui/widgets/eab-contact-merging.c
Expand Up @@ -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);

Expand Down Expand Up @@ -597,22 +597,6 @@ check_if_same (EContact *contact,
return res;
}

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,
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions addressbook/gui/widgets/eab-gui-util.c
Expand Up @@ -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);

Expand Down

0 comments on commit b48e21d

Please sign in to comment.