Skip to content

Commit 58e7446

Browse files
sc0wraveit65
authored and
raveit65
committed
avoid deprecated GtkStock
1 parent 005d885 commit 58e7446

11 files changed

+102
-98
lines changed

Diff for: cut-n-paste/toolbar-editor/egg-editable-toolbar.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1464,9 +1464,9 @@ egg_editable_toolbar_set_ui_manager (EggEditableToolbar *etoolbar,
14641464
static const GtkActionEntry actions[] = {
14651465
{ "MoveToolItem", STOCK_DRAG_MODE, N_("_Move on Toolbar"), NULL,
14661466
N_("Move the selected item on the toolbar"), G_CALLBACK (move_item_cb) },
1467-
{ "RemoveToolItem", GTK_STOCK_REMOVE, N_("_Remove from Toolbar"), NULL,
1467+
{ "RemoveToolItem", "list-remove", N_("_Remove from Toolbar"), NULL,
14681468
N_("Remove the selected item from the toolbar"), G_CALLBACK (remove_item_cb) },
1469-
{ "RemoveToolbar", GTK_STOCK_DELETE, N_("_Delete Toolbar"), NULL,
1469+
{ "RemoveToolbar", "edit-delete", N_("_Delete Toolbar"), NULL,
14701470
N_("Remove the selected toolbar"), G_CALLBACK (remove_toolbar_cb) },
14711471
};
14721472

Diff for: cut-n-paste/toolbar-editor/egg-toolbar-editor.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,8 @@ editor_create_item_from_name (EggToolbarEditor *editor,
509509
icon = gtk_image_new_from_icon_name (icon_name,
510510
GTK_ICON_SIZE_LARGE_TOOLBAR);
511511
else
512-
icon = gtk_image_new_from_stock (stock_id ? stock_id : GTK_STOCK_DND,
513-
GTK_ICON_SIZE_LARGE_TOOLBAR);
512+
icon = gtk_image_new_from_icon_name (stock_id ? stock_id : "gtk-dnd",
513+
GTK_ICON_SIZE_LARGE_TOOLBAR);
514514

515515
item_name = g_strdup (name);
516516
collate_key = g_utf8_collate_key (short_label, -1);

Diff for: libview/ev-stock-icons.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ G_BEGIN_DECLS
4545
#define EV_STOCK_RESIZE_SE "resize-se"
4646
#define EV_STOCK_RESIZE_SW "resize-sw"
4747
#define EV_STOCK_CLOSE "close"
48-
#define EV_STOCK_INVERTED_COLORS "inverted"
48+
#define EV_STOCK_INVERTED_COLORS "stock_filters-invert"
4949
#define EV_STOCK_ATTACHMENT "mail-attachment"
5050
#define EV_STOCK_SEND_TO "document-send"
5151

Diff for: previewer/ev-previewer-window.c

+16-16
Original file line numberDiff line numberDiff line change
@@ -269,49 +269,49 @@ ev_previewer_window_print (GtkAction *action,
269269
#endif
270270

271271
static const GtkActionEntry action_entries[] = {
272-
{ "FileCloseWindow", GTK_STOCK_CLOSE, NULL, "<control>W",
272+
{ "FileCloseWindow", "window-close", N_("_Close"), "<control>W",
273273
NULL,
274274
G_CALLBACK (ev_previewer_window_close) },
275-
{ "GoPreviousPage", GTK_STOCK_GO_UP, N_("_Previous Page"), "<control>Page_Up",
275+
{ "GoPreviousPage", "go-up", N_("_Previous Page"), "<control>Page_Up",
276276
N_("Go to the previous page"),
277277
G_CALLBACK (ev_previewer_window_previous_page) },
278-
{ "GoNextPage", GTK_STOCK_GO_DOWN, N_("_Next Page"), "<control>Page_Down",
278+
{ "GoNextPage", "go-down", N_("_Next Page"), "<control>Page_Down",
279279
N_("Go to the next page"),
280280
G_CALLBACK (ev_previewer_window_next_page) },
281-
{ "ViewZoomIn", GTK_STOCK_ZOOM_IN, NULL, "<control>plus",
281+
{ "ViewZoomIn", "zoom-in", N_("Zoom _In"), "<control>plus",
282282
N_("Enlarge the document"),
283283
G_CALLBACK (ev_previewer_window_zoom_in) },
284-
{ "ViewZoomOut", GTK_STOCK_ZOOM_OUT, NULL, "<control>minus",
284+
{ "ViewZoomOut", "zoom-out", N_("Zoom _Out"), "<control>minus",
285285
N_("Shrink the document"),
286286
G_CALLBACK (ev_previewer_window_zoom_out) },
287287
#if GTKUNIXPRINT_ENABLED
288288
/* translators: Print document currently shown in the Print Preview window */
289-
{ "PreviewPrint", GTK_STOCK_PRINT, N_("Print"), NULL,
289+
{ "PreviewPrint", "document-print", N_("Print"), NULL,
290290
N_("Print this document"),
291291
G_CALLBACK (ev_previewer_window_print) }
292292
#endif
293293
};
294294

295295
static const GtkActionEntry accel_entries[] = {
296-
{ "p", GTK_STOCK_GO_UP, "", "p", NULL,
296+
{ "p", "go-up", "", "p", NULL,
297297
G_CALLBACK (ev_previewer_window_previous_page) },
298-
{ "n", GTK_STOCK_GO_DOWN, "", "n", NULL,
298+
{ "n", "go-down", "", "n", NULL,
299299
G_CALLBACK (ev_previewer_window_next_page) },
300-
{ "Plus", GTK_STOCK_ZOOM_IN, NULL, "plus", NULL,
300+
{ "Plus", "zoom-in", NULL, "plus", NULL,
301301
G_CALLBACK (ev_previewer_window_zoom_in) },
302-
{ "CtrlEqual", GTK_STOCK_ZOOM_IN, NULL, "<control>equal", NULL,
302+
{ "CtrlEqual", "zoom-in", NULL, "<control>equal", NULL,
303303
G_CALLBACK (ev_previewer_window_zoom_in) },
304-
{ "Equal", GTK_STOCK_ZOOM_IN, NULL, "equal", NULL,
304+
{ "Equal", "zoom-in", NULL, "equal", NULL,
305305
G_CALLBACK (ev_previewer_window_zoom_in) },
306-
{ "Minus", GTK_STOCK_ZOOM_OUT, NULL, "minus", NULL,
306+
{ "Minus", "zoom-out", NULL, "minus", NULL,
307307
G_CALLBACK (ev_previewer_window_zoom_out) },
308-
{ "KpPlus", GTK_STOCK_ZOOM_IN, NULL, "KP_Add", NULL,
308+
{ "KpPlus", "zoom-in", NULL, "KP_Add", NULL,
309309
G_CALLBACK (ev_previewer_window_zoom_in) },
310-
{ "KpMinus", GTK_STOCK_ZOOM_OUT, NULL, "KP_Subtract", NULL,
310+
{ "KpMinus", "zoom-out", NULL, "KP_Subtract", NULL,
311311
G_CALLBACK (ev_previewer_window_zoom_out) },
312-
{ "CtrlKpPlus", GTK_STOCK_ZOOM_IN, NULL, "<control>KP_Add", NULL,
312+
{ "CtrlKpPlus", "zoom-in", NULL, "<control>KP_Add", NULL,
313313
G_CALLBACK (ev_previewer_window_zoom_in) },
314-
{ "CtrlKpMinus", GTK_STOCK_ZOOM_OUT, NULL, "<control>KP_Subtract", NULL,
314+
{ "CtrlKpMinus", "zoom-out", NULL, "<control>KP_Subtract", NULL,
315315
G_CALLBACK (ev_previewer_window_zoom_out) },
316316
{ "FocusPageSelector", NULL, "", "<control>l", NULL,
317317
G_CALLBACK (ev_previewer_window_focus_page_selector) }

Diff for: shell/ev-annotation-properties-dialog.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ ev_annotation_properties_dialog_init (EvAnnotationPropertiesDialog *annot_dialog
137137
gtk_window_set_destroy_with_parent (GTK_WINDOW (annot_dialog), TRUE);
138138
gtk_container_set_border_width (GTK_CONTAINER (annot_dialog), 5);
139139
gtk_dialog_add_buttons (dialog,
140-
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
141-
GTK_STOCK_APPLY, GTK_RESPONSE_APPLY,
140+
"gtk-close", GTK_RESPONSE_CLOSE,
141+
"gtk-apply", GTK_RESPONSE_APPLY,
142142
NULL);
143143
gtk_dialog_set_default_response (dialog, GTK_RESPONSE_APPLY);
144144

Diff for: shell/ev-open-recent-action.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ ev_open_recent_action_create_tool_item (GtkAction *action)
6767
gtk_recent_filter_add_application (filter, g_get_application_name ());
6868
gtk_recent_chooser_set_filter (GTK_RECENT_CHOOSER (toolbar_recent_menu), filter);
6969

70-
tool_item = GTK_WIDGET (gtk_menu_tool_button_new_from_stock (GTK_STOCK_OPEN));
70+
tool_item = GTK_WIDGET (gtk_menu_tool_button_new_from_stock ("gtk-open"));
7171
gtk_menu_tool_button_set_arrow_tooltip_text (GTK_MENU_TOOL_BUTTON (tool_item),
7272
_("Open a recently used document"));
7373
gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (tool_item),

Diff for: shell/ev-password-view.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ ev_password_view_ask_password (EvPasswordView *password_view)
261261
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
262262

263263
gtk_dialog_add_buttons (dialog,
264-
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
264+
"gtk-cancel", GTK_RESPONSE_CANCEL,
265265
_("_Unlock Document"), GTK_RESPONSE_OK,
266266
NULL);
267267
gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK);

Diff for: shell/ev-properties-dialog.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ ev_properties_dialog_init (EvPropertiesDialog *properties)
6464
gtk_container_set_border_width (GTK_CONTAINER (properties), 5);
6565
gtk_box_set_spacing (content_area, 2);
6666

67-
gtk_dialog_add_button (GTK_DIALOG (properties), GTK_STOCK_CLOSE,
67+
gtk_dialog_add_button (GTK_DIALOG (properties), "gtk-close",
6868
GTK_RESPONSE_CANCEL);
6969
gtk_dialog_set_default_response (GTK_DIALOG (properties),
7070
GTK_RESPONSE_CANCEL);

Diff for: shell/ev-sidebar-bookmarks.c

+7-3
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ ev_bookmarks_popup_cmd_remove_bookmark (GtkAction *action,
151151
}
152152

153153
static const GtkActionEntry popup_entries[] = {
154-
{ "OpenBookmark", GTK_STOCK_OPEN, N_("_Open Bookmark"), NULL,
154+
{ "OpenBookmark", "document-open", N_("_Open Bookmark"), NULL,
155155
NULL, G_CALLBACK (ev_bookmarks_popup_cmd_open_bookmark) },
156156
{ "RenameBookmark", NULL, N_("_Rename Bookmark"), NULL,
157157
NULL, G_CALLBACK (ev_bookmarks_popup_cmd_rename_bookmark) },
@@ -473,15 +473,19 @@ ev_sidebar_bookmarks_init (EvSidebarBookmarks *sidebar_bookmarks)
473473

474474
hbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
475475

476-
priv->add_button = gtk_button_new_from_stock (GTK_STOCK_ADD);
476+
priv->add_button = gtk_button_new_with_mnemonic (_("_Add"));
477+
gtk_button_set_image (GTK_BUTTON (priv->add_button), gtk_image_new_from_icon_name ("list-add", GTK_ICON_SIZE_BUTTON));
478+
477479
g_signal_connect (priv->add_button, "clicked",
478480
G_CALLBACK (ev_sidebar_bookmarks_add_clicked),
479481
sidebar_bookmarks);
480482
gtk_widget_set_sensitive (priv->add_button, FALSE);
481483
gtk_box_pack_start (GTK_BOX (hbox), priv->add_button, TRUE, TRUE, 6);
482484
gtk_widget_show (priv->add_button);
483485

484-
priv->del_button = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
486+
priv->del_button = gtk_button_new_with_mnemonic (_("_Remove"));
487+
gtk_button_set_image (GTK_BUTTON (priv->del_button), gtk_image_new_from_icon_name ("list-remove", GTK_ICON_SIZE_BUTTON));
488+
485489
g_signal_connect (priv->del_button, "clicked",
486490
G_CALLBACK (ev_sidebar_bookmarks_del_clicked),
487491
sidebar_bookmarks);

Diff for: shell/ev-sidebar-links.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ build_popup_menu (EvSidebarLinks *sidebar)
332332
GtkWidget *item;
333333

334334
menu = gtk_menu_new ();
335-
item = gtk_image_menu_item_new_from_stock (GTK_STOCK_PRINT, NULL);
335+
item = gtk_image_menu_item_new_from_stock ("gtk-print", NULL);
336336
gtk_label_set_label (GTK_LABEL (gtk_bin_get_child (GTK_BIN (item))), _("Print…"));
337337
gtk_widget_show (item);
338338
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);

0 commit comments

Comments
 (0)