Skip to content
Permalink
Browse files

avoid deprecated GtkStock

  • Loading branch information...
sc0w authored and raveit65 committed Feb 15, 2018
1 parent 005d885 commit 58e7446290d78e0744a5193e22bfa300e6737829
@@ -1464,9 +1464,9 @@ egg_editable_toolbar_set_ui_manager (EggEditableToolbar *etoolbar,
static const GtkActionEntry actions[] = {
{ "MoveToolItem", STOCK_DRAG_MODE, N_("_Move on Toolbar"), NULL,
N_("Move the selected item on the toolbar"), G_CALLBACK (move_item_cb) },
{ "RemoveToolItem", GTK_STOCK_REMOVE, N_("_Remove from Toolbar"), NULL,
{ "RemoveToolItem", "list-remove", N_("_Remove from Toolbar"), NULL,
N_("Remove the selected item from the toolbar"), G_CALLBACK (remove_item_cb) },
{ "RemoveToolbar", GTK_STOCK_DELETE, N_("_Delete Toolbar"), NULL,
{ "RemoveToolbar", "edit-delete", N_("_Delete Toolbar"), NULL,
N_("Remove the selected toolbar"), G_CALLBACK (remove_toolbar_cb) },
};

@@ -509,8 +509,8 @@ editor_create_item_from_name (EggToolbarEditor *editor,
icon = gtk_image_new_from_icon_name (icon_name,
GTK_ICON_SIZE_LARGE_TOOLBAR);
else
icon = gtk_image_new_from_stock (stock_id ? stock_id : GTK_STOCK_DND,
GTK_ICON_SIZE_LARGE_TOOLBAR);
icon = gtk_image_new_from_icon_name (stock_id ? stock_id : "gtk-dnd",
GTK_ICON_SIZE_LARGE_TOOLBAR);

item_name = g_strdup (name);
collate_key = g_utf8_collate_key (short_label, -1);
@@ -45,7 +45,7 @@ G_BEGIN_DECLS
#define EV_STOCK_RESIZE_SE "resize-se"
#define EV_STOCK_RESIZE_SW "resize-sw"
#define EV_STOCK_CLOSE "close"
#define EV_STOCK_INVERTED_COLORS "inverted"
#define EV_STOCK_INVERTED_COLORS "stock_filters-invert"
#define EV_STOCK_ATTACHMENT "mail-attachment"
#define EV_STOCK_SEND_TO "document-send"

@@ -269,49 +269,49 @@ ev_previewer_window_print (GtkAction *action,
#endif

static const GtkActionEntry action_entries[] = {
{ "FileCloseWindow", GTK_STOCK_CLOSE, NULL, "<control>W",
{ "FileCloseWindow", "window-close", N_("_Close"), "<control>W",
NULL,
G_CALLBACK (ev_previewer_window_close) },
{ "GoPreviousPage", GTK_STOCK_GO_UP, N_("_Previous Page"), "<control>Page_Up",
{ "GoPreviousPage", "go-up", N_("_Previous Page"), "<control>Page_Up",
N_("Go to the previous page"),
G_CALLBACK (ev_previewer_window_previous_page) },
{ "GoNextPage", GTK_STOCK_GO_DOWN, N_("_Next Page"), "<control>Page_Down",
{ "GoNextPage", "go-down", N_("_Next Page"), "<control>Page_Down",
N_("Go to the next page"),
G_CALLBACK (ev_previewer_window_next_page) },
{ "ViewZoomIn", GTK_STOCK_ZOOM_IN, NULL, "<control>plus",
{ "ViewZoomIn", "zoom-in", N_("Zoom _In"), "<control>plus",
N_("Enlarge the document"),
G_CALLBACK (ev_previewer_window_zoom_in) },
{ "ViewZoomOut", GTK_STOCK_ZOOM_OUT, NULL, "<control>minus",
{ "ViewZoomOut", "zoom-out", N_("Zoom _Out"), "<control>minus",
N_("Shrink the document"),
G_CALLBACK (ev_previewer_window_zoom_out) },
#if GTKUNIXPRINT_ENABLED
/* translators: Print document currently shown in the Print Preview window */
{ "PreviewPrint", GTK_STOCK_PRINT, N_("Print"), NULL,
{ "PreviewPrint", "document-print", N_("Print"), NULL,
N_("Print this document"),
G_CALLBACK (ev_previewer_window_print) }
#endif
};

static const GtkActionEntry accel_entries[] = {
{ "p", GTK_STOCK_GO_UP, "", "p", NULL,
{ "p", "go-up", "", "p", NULL,
G_CALLBACK (ev_previewer_window_previous_page) },
{ "n", GTK_STOCK_GO_DOWN, "", "n", NULL,
{ "n", "go-down", "", "n", NULL,
G_CALLBACK (ev_previewer_window_next_page) },
{ "Plus", GTK_STOCK_ZOOM_IN, NULL, "plus", NULL,
{ "Plus", "zoom-in", NULL, "plus", NULL,
G_CALLBACK (ev_previewer_window_zoom_in) },
{ "CtrlEqual", GTK_STOCK_ZOOM_IN, NULL, "<control>equal", NULL,
{ "CtrlEqual", "zoom-in", NULL, "<control>equal", NULL,
G_CALLBACK (ev_previewer_window_zoom_in) },
{ "Equal", GTK_STOCK_ZOOM_IN, NULL, "equal", NULL,
{ "Equal", "zoom-in", NULL, "equal", NULL,
G_CALLBACK (ev_previewer_window_zoom_in) },
{ "Minus", GTK_STOCK_ZOOM_OUT, NULL, "minus", NULL,
{ "Minus", "zoom-out", NULL, "minus", NULL,
G_CALLBACK (ev_previewer_window_zoom_out) },
{ "KpPlus", GTK_STOCK_ZOOM_IN, NULL, "KP_Add", NULL,
{ "KpPlus", "zoom-in", NULL, "KP_Add", NULL,
G_CALLBACK (ev_previewer_window_zoom_in) },
{ "KpMinus", GTK_STOCK_ZOOM_OUT, NULL, "KP_Subtract", NULL,
{ "KpMinus", "zoom-out", NULL, "KP_Subtract", NULL,
G_CALLBACK (ev_previewer_window_zoom_out) },
{ "CtrlKpPlus", GTK_STOCK_ZOOM_IN, NULL, "<control>KP_Add", NULL,
{ "CtrlKpPlus", "zoom-in", NULL, "<control>KP_Add", NULL,
G_CALLBACK (ev_previewer_window_zoom_in) },
{ "CtrlKpMinus", GTK_STOCK_ZOOM_OUT, NULL, "<control>KP_Subtract", NULL,
{ "CtrlKpMinus", "zoom-out", NULL, "<control>KP_Subtract", NULL,
G_CALLBACK (ev_previewer_window_zoom_out) },
{ "FocusPageSelector", NULL, "", "<control>l", NULL,
G_CALLBACK (ev_previewer_window_focus_page_selector) }
@@ -137,8 +137,8 @@ ev_annotation_properties_dialog_init (EvAnnotationPropertiesDialog *annot_dialog
gtk_window_set_destroy_with_parent (GTK_WINDOW (annot_dialog), TRUE);
gtk_container_set_border_width (GTK_CONTAINER (annot_dialog), 5);
gtk_dialog_add_buttons (dialog,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
GTK_STOCK_APPLY, GTK_RESPONSE_APPLY,
"gtk-close", GTK_RESPONSE_CLOSE,
"gtk-apply", GTK_RESPONSE_APPLY,
NULL);
gtk_dialog_set_default_response (dialog, GTK_RESPONSE_APPLY);

@@ -67,7 +67,7 @@ ev_open_recent_action_create_tool_item (GtkAction *action)
gtk_recent_filter_add_application (filter, g_get_application_name ());
gtk_recent_chooser_set_filter (GTK_RECENT_CHOOSER (toolbar_recent_menu), filter);

tool_item = GTK_WIDGET (gtk_menu_tool_button_new_from_stock (GTK_STOCK_OPEN));
tool_item = GTK_WIDGET (gtk_menu_tool_button_new_from_stock ("gtk-open"));
gtk_menu_tool_button_set_arrow_tooltip_text (GTK_MENU_TOOL_BUTTON (tool_item),
_("Open a recently used document"));
gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (tool_item),
@@ -261,7 +261,7 @@ ev_password_view_ask_password (EvPasswordView *password_view)
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);

gtk_dialog_add_buttons (dialog,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
"gtk-cancel", GTK_RESPONSE_CANCEL,
_("_Unlock Document"), GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK);
@@ -64,7 +64,7 @@ ev_properties_dialog_init (EvPropertiesDialog *properties)
gtk_container_set_border_width (GTK_CONTAINER (properties), 5);
gtk_box_set_spacing (content_area, 2);

gtk_dialog_add_button (GTK_DIALOG (properties), GTK_STOCK_CLOSE,
gtk_dialog_add_button (GTK_DIALOG (properties), "gtk-close",
GTK_RESPONSE_CANCEL);
gtk_dialog_set_default_response (GTK_DIALOG (properties),
GTK_RESPONSE_CANCEL);
@@ -151,7 +151,7 @@ ev_bookmarks_popup_cmd_remove_bookmark (GtkAction *action,
}

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

hbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);

priv->add_button = gtk_button_new_from_stock (GTK_STOCK_ADD);
priv->add_button = gtk_button_new_with_mnemonic (_("_Add"));
gtk_button_set_image (GTK_BUTTON (priv->add_button), gtk_image_new_from_icon_name ("list-add", GTK_ICON_SIZE_BUTTON));

g_signal_connect (priv->add_button, "clicked",
G_CALLBACK (ev_sidebar_bookmarks_add_clicked),
sidebar_bookmarks);
gtk_widget_set_sensitive (priv->add_button, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), priv->add_button, TRUE, TRUE, 6);
gtk_widget_show (priv->add_button);

priv->del_button = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
priv->del_button = gtk_button_new_with_mnemonic (_("_Remove"));
gtk_button_set_image (GTK_BUTTON (priv->del_button), gtk_image_new_from_icon_name ("list-remove", GTK_ICON_SIZE_BUTTON));

g_signal_connect (priv->del_button, "clicked",
G_CALLBACK (ev_sidebar_bookmarks_del_clicked),
sidebar_bookmarks);
@@ -332,7 +332,7 @@ build_popup_menu (EvSidebarLinks *sidebar)
GtkWidget *item;

menu = gtk_menu_new ();
item = gtk_image_menu_item_new_from_stock (GTK_STOCK_PRINT, NULL);
item = gtk_image_menu_item_new_from_stock ("gtk-print", NULL);
gtk_label_set_label (GTK_LABEL (gtk_bin_get_child (GTK_BIN (item))), _("Print…"));
gtk_widget_show (item);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
Oops, something went wrong.

0 comments on commit 58e7446

Please sign in to comment.
You can’t perform that action at this time.