Skip to content

Commit 98d6a43

Browse files
sc0wraveit65
authored andcommitted
avoid deprecated GtkStock
1 parent ead9eac commit 98d6a43

File tree

5 files changed

+44
-40
lines changed

5 files changed

+44
-40
lines changed

cut-n-paste/toolbar-editor/egg-editable-toolbar.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,9 +1389,9 @@ egg_editable_toolbar_set_ui_manager (EggEditableToolbar *etoolbar,
13891389
static const GtkActionEntry actions[] = {
13901390
{ "MoveToolItem", STOCK_DRAG_MODE, N_("_Move on Toolbar"), NULL,
13911391
N_("Move the selected item on the toolbar"), G_CALLBACK (move_item_cb) },
1392-
{ "RemoveToolItem", GTK_STOCK_REMOVE, N_("_Remove from Toolbar"), NULL,
1392+
{ "RemoveToolItem", "list-remove", N_("_Remove from Toolbar"), NULL,
13931393
N_("Remove the selected item from the toolbar"), G_CALLBACK (remove_item_cb) },
1394-
{ "RemoveToolbar", GTK_STOCK_DELETE, N_("_Delete Toolbar"), NULL,
1394+
{ "RemoveToolbar", "edit-delete", N_("_Delete Toolbar"), NULL,
13951395
N_("Remove the selected toolbar"), G_CALLBACK (remove_toolbar_cb) },
13961396
};
13971397

cut-n-paste/toolbar-editor/egg-toolbar-editor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,8 +508,8 @@ editor_create_item_from_name (EggToolbarEditor *editor,
508508
icon = gtk_image_new_from_icon_name (icon_name,
509509
GTK_ICON_SIZE_LARGE_TOOLBAR);
510510
else
511-
icon = gtk_image_new_from_stock (stock_id ? stock_id : GTK_STOCK_DND,
512-
GTK_ICON_SIZE_LARGE_TOOLBAR);
511+
icon = gtk_image_new_from_icon_name (stock_id ? stock_id : "gtk-dnd",
512+
GTK_ICON_SIZE_LARGE_TOOLBAR);
513513

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

src/eom-close-confirmation-dialog.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,10 @@ add_buttons (EomCloseConfirmationDialog *dlg)
160160
GTK_RESPONSE_NO);
161161

162162
gtk_dialog_add_button (GTK_DIALOG (dlg),
163-
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
163+
"gtk-cancel", GTK_RESPONSE_CANCEL);
164164

165165
gtk_dialog_add_button (GTK_DIALOG (dlg),
166-
GTK_STOCK_SAVE,
166+
"gtk-save",
167167
GTK_RESPONSE_YES);
168168

169169
gtk_dialog_set_default_response (GTK_DIALOG (dlg),

src/eom-file-chooser.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -451,24 +451,24 @@ eom_file_chooser_new (GtkFileChooserAction action)
451451
switch (action) {
452452
case GTK_FILE_CHOOSER_ACTION_OPEN:
453453
gtk_dialog_add_buttons (GTK_DIALOG (chooser),
454-
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
455-
GTK_STOCK_OPEN, GTK_RESPONSE_OK,
454+
"gtk-cancel", GTK_RESPONSE_CANCEL,
455+
"gtk-open", GTK_RESPONSE_OK,
456456
NULL);
457457
title = _("Open Image");
458458
break;
459459

460460
case GTK_FILE_CHOOSER_ACTION_SAVE:
461461
gtk_dialog_add_buttons (GTK_DIALOG (chooser),
462-
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
463-
GTK_STOCK_SAVE, GTK_RESPONSE_OK,
462+
"gtk-cancel", GTK_RESPONSE_CANCEL,
463+
"gtk-save", GTK_RESPONSE_OK,
464464
NULL);
465465
title = _("Save Image");
466466
break;
467467

468468
case GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER:
469469
gtk_dialog_add_buttons (GTK_DIALOG (chooser),
470-
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
471-
GTK_STOCK_OPEN, GTK_RESPONSE_OK,
470+
"gtk-cancel", GTK_RESPONSE_CANCEL,
471+
"gtk-open", GTK_RESPONSE_OK,
472472
NULL);
473473
title = _("Open Folder");
474474
break;

src/eom-window.c

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1852,7 +1852,11 @@ eom_window_get_exit_fullscreen_button (EomWindow *window)
18521852
{
18531853
GtkWidget *button;
18541854

1855-
button = gtk_button_new_from_stock (GTK_STOCK_LEAVE_FULLSCREEN);
1855+
button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
1856+
"label", "gtk-leave-fullscreen",
1857+
"use-stock", TRUE,
1858+
"use-underline", TRUE,
1859+
NULL));
18561860

18571861
g_signal_connect (button, "clicked",
18581862
G_CALLBACK (exit_fullscreen_button_clicked_cb),
@@ -2438,9 +2442,9 @@ eom_window_cmd_edit_toolbar (GtkAction *action, gpointer *user_data)
24382442
GTK_DIALOG_DESTROY_WITH_PARENT,
24392443
_("_Reset to Default"),
24402444
EOM_TB_EDITOR_DLG_RESET_RESPONSE,
2441-
GTK_STOCK_CLOSE,
2445+
"gtk-close",
24422446
GTK_RESPONSE_CLOSE,
2443-
GTK_STOCK_HELP,
2447+
"gtk-help",
24442448
GTK_RESPONSE_HELP,
24452449
NULL);
24462450

@@ -3187,7 +3191,7 @@ show_move_to_trash_confirm_dialog (EomWindow *window, GList *images, gboolean ca
31873191
prompt);
31883192
g_free (prompt);
31893193

3190-
gtk_dialog_add_button (GTK_DIALOG (dlg), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
3194+
gtk_dialog_add_button (GTK_DIALOG (dlg), "gtk-cancel", GTK_RESPONSE_CANCEL);
31913195

31923196
if (can_trash) {
31933197
gtk_dialog_add_button (GTK_DIALOG (dlg), _("Move to _Trash"), GTK_RESPONSE_OK);
@@ -3198,9 +3202,9 @@ show_move_to_trash_confirm_dialog (EomWindow *window, GList *images, gboolean ca
31983202
gtk_box_pack_end (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))), dontask_cbutton, TRUE, TRUE, 0);
31993203
} else {
32003204
if (n_images == 1) {
3201-
gtk_dialog_add_button (GTK_DIALOG (dlg), GTK_STOCK_DELETE, GTK_RESPONSE_OK);
3205+
gtk_dialog_add_button (GTK_DIALOG (dlg), "gtk-delete", GTK_RESPONSE_OK);
32023206
} else {
3203-
gtk_dialog_add_button (GTK_DIALOG (dlg), GTK_STOCK_YES, GTK_RESPONSE_OK);
3207+
gtk_dialog_add_button (GTK_DIALOG (dlg), "gtk-yes", GTK_RESPONSE_OK);
32043208
}
32053209
}
32063210

@@ -3605,22 +3609,22 @@ static const GtkActionEntry action_entries_window[] = {
36053609
{ "Tools", NULL, N_("_Tools") },
36063610
{ "Help", NULL, N_("_Help") },
36073611

3608-
{ "ImageOpen", GTK_STOCK_OPEN, N_("_Open…"), "<control>O",
3612+
{ "ImageOpen", "document-open", N_("_Open…"), "<control>O",
36093613
N_("Open a file"),
36103614
G_CALLBACK (eom_window_cmd_file_open) },
3611-
{ "ImageClose", GTK_STOCK_CLOSE, N_("_Close"), "<control>W",
3615+
{ "ImageClose", "window-close", N_("_Close"), "<control>W",
36123616
N_("Close window"),
36133617
G_CALLBACK (eom_window_cmd_close_window) },
36143618
{ "EditToolbar", NULL, N_("T_oolbar"), NULL,
36153619
N_("Edit the application toolbar"),
36163620
G_CALLBACK (eom_window_cmd_edit_toolbar) },
3617-
{ "EditPreferences", GTK_STOCK_PREFERENCES, N_("Prefere_nces"), NULL,
3621+
{ "EditPreferences", "preferences-desktop", N_("Prefere_nces"), NULL,
36183622
N_("Preferences for Eye of MATE"),
36193623
G_CALLBACK (eom_window_cmd_preferences) },
3620-
{ "HelpManual", GTK_STOCK_HELP, N_("_Contents"), "F1",
3624+
{ "HelpManual", "help-browser", N_("_Contents"), "F1",
36213625
N_("Help on this application"),
36223626
G_CALLBACK (eom_window_cmd_help) },
3623-
{ "HelpAbout", GTK_STOCK_ABOUT, N_("_About"), NULL,
3627+
{ "HelpAbout", "help-about", N_("_About"), NULL,
36243628
N_("About this application"),
36253629
G_CALLBACK (eom_window_cmd_about) }
36263630
};
@@ -3641,22 +3645,22 @@ static const GtkToggleActionEntry toggle_entries_window[] = {
36413645
};
36423646

36433647
static const GtkActionEntry action_entries_image[] = {
3644-
{ "ImageSave", GTK_STOCK_SAVE, N_("_Save"), "<control>s",
3648+
{ "ImageSave", "document-save", N_("_Save"), "<control>s",
36453649
N_("Save changes in currently selected images"),
36463650
G_CALLBACK (eom_window_cmd_save) },
36473651
{ "ImageOpenWith", NULL, N_("Open _with"), NULL,
36483652
N_("Open the selected image with a different application"),
36493653
NULL},
3650-
{ "ImageSaveAs", GTK_STOCK_SAVE_AS, N_("Save _As…"), "<control><shift>s",
3654+
{ "ImageSaveAs", "document-save-as", N_("Save _As…"), "<control><shift>s",
36513655
N_("Save the selected images with a different name"),
36523656
G_CALLBACK (eom_window_cmd_save_as) },
3653-
{ "ImagePrint", GTK_STOCK_PRINT, N_("_Print…"), "<control>p",
3657+
{ "ImagePrint", "document-print", N_("_Print…"), "<control>p",
36543658
N_("Print the selected image"),
36553659
G_CALLBACK (eom_window_cmd_print) },
3656-
{ "ImageProperties", GTK_STOCK_PROPERTIES, N_("Prope_rties"), "<alt>Return",
3660+
{ "ImageProperties", "document-properties", N_("Prope_rties"), "<alt>Return",
36573661
N_("Show the properties and metadata of the selected image"),
36583662
G_CALLBACK (eom_window_cmd_properties) },
3659-
{ "EditUndo", GTK_STOCK_UNDO, N_("_Undo"), "<control>z",
3663+
{ "EditUndo", "edit-undo", N_("_Undo"), "<control>z",
36603664
N_("Undo the last change in the image"),
36613665
G_CALLBACK (eom_window_cmd_undo) },
36623666
{ "EditFlipHorizontal", "object-flip-horizontal", N_("Flip _Horizontal"), NULL,
@@ -3680,25 +3684,25 @@ static const GtkActionEntry action_entries_image[] = {
36803684
{ "EditCopyImage", "edit-copy", N_("_Copy"), "<control>C",
36813685
N_("Copy the selected image to the clipboard"),
36823686
G_CALLBACK (eom_window_cmd_copy_image) },
3683-
{ "ViewZoomIn", GTK_STOCK_ZOOM_IN, N_("_Zoom In"), "<control>plus",
3687+
{ "ViewZoomIn", "zoom-in", N_("_Zoom In"), "<control>plus",
36843688
N_("Enlarge the image"),
36853689
G_CALLBACK (eom_window_cmd_zoom_in) },
3686-
{ "ViewZoomOut", GTK_STOCK_ZOOM_OUT, N_("Zoom _Out"), "<control>minus",
3690+
{ "ViewZoomOut", "zoom-out", N_("Zoom _Out"), "<control>minus",
36873691
N_("Shrink the image"),
36883692
G_CALLBACK (eom_window_cmd_zoom_out) },
3689-
{ "ViewZoomNormal", GTK_STOCK_ZOOM_100, N_("_Normal Size"), "<control>0",
3693+
{ "ViewZoomNormal", "zoom-original", N_("_Normal Size"), "<control>0",
36903694
N_("Show the image at its normal size"),
36913695
G_CALLBACK (eom_window_cmd_zoom_normal) },
3692-
{ "ViewZoomFit", GTK_STOCK_ZOOM_FIT, N_("_Best Fit"), "F",
3696+
{ "ViewZoomFit", "zoom-fit-best", N_("_Best Fit"), "F",
36933697
N_("Fit the image to the window"),
36943698
G_CALLBACK (eom_window_cmd_zoom_fit) },
3695-
{ "ControlEqual", GTK_STOCK_ZOOM_IN, N_("_Zoom In"), "<control>equal",
3699+
{ "ControlEqual", "zoom-in", N_("_Zoom In"), "<control>equal",
36963700
N_("Enlarge the image"),
36973701
G_CALLBACK (eom_window_cmd_zoom_in) },
3698-
{ "ControlKpAdd", GTK_STOCK_ZOOM_IN, N_("_Zoom In"), "<control>KP_Add",
3702+
{ "ControlKpAdd", "zoom-in", N_("_Zoom In"), "<control>KP_Add",
36993703
N_("Shrink the image"),
37003704
G_CALLBACK (eom_window_cmd_zoom_in) },
3701-
{ "ControlKpSub", GTK_STOCK_ZOOM_OUT, N_("Zoom _Out"), "<control>KP_Subtract",
3705+
{ "ControlKpSub", "zoom-out", N_("Zoom _Out"), "<control>KP_Subtract",
37023706
N_("Shrink the image"),
37033707
G_CALLBACK (eom_window_cmd_zoom_out) },
37043708
{ "Delete", NULL, N_("Move to _Trash"), "Delete",
@@ -3707,7 +3711,7 @@ static const GtkActionEntry action_entries_image[] = {
37073711
};
37083712

37093713
static const GtkToggleActionEntry toggle_entries_image[] = {
3710-
{ "ViewFullscreen", GTK_STOCK_FULLSCREEN, N_("_Fullscreen"), "F11",
3714+
{ "ViewFullscreen", "view-fullscreen", N_("_Fullscreen"), "F11",
37113715
N_("Show the current image in fullscreen mode"),
37123716
G_CALLBACK (eom_window_cmd_fullscreen), FALSE },
37133717
{ "PauseSlideshow", "media-playback-pause", N_("Pause Slideshow"),
@@ -3716,16 +3720,16 @@ static const GtkToggleActionEntry toggle_entries_image[] = {
37163720
};
37173721

37183722
static const GtkActionEntry action_entries_collection[] = {
3719-
{ "GoPrevious", GTK_STOCK_GO_BACK, N_("_Previous Image"), "<Alt>Left",
3723+
{ "GoPrevious", "go-previous", N_("_Previous Image"), "<Alt>Left",
37203724
N_("Go to the previous image of the collection"),
37213725
G_CALLBACK (eom_window_cmd_go_prev) },
3722-
{ "GoNext", GTK_STOCK_GO_FORWARD, N_("_Next Image"), "<Alt>Right",
3726+
{ "GoNext", "go-next", N_("_Next Image"), "<Alt>Right",
37233727
N_("Go to the next image of the collection"),
37243728
G_CALLBACK (eom_window_cmd_go_next) },
3725-
{ "GoFirst", GTK_STOCK_GOTO_FIRST, N_("_First Image"), "<Alt>Home",
3729+
{ "GoFirst", "go-first", N_("_First Image"), "<Alt>Home",
37263730
N_("Go to the first image of the collection"),
37273731
G_CALLBACK (eom_window_cmd_go_first) },
3728-
{ "GoLast", GTK_STOCK_GOTO_LAST, N_("_Last Image"), "<Alt>End",
3732+
{ "GoLast", "go-last", N_("_Last Image"), "<Alt>End",
37293733
N_("Go to the last image of the collection"),
37303734
G_CALLBACK (eom_window_cmd_go_last) },
37313735
{ "GoRandom", NULL, N_("_Random Image"), "<control>M",

0 commit comments

Comments
 (0)