Skip to content

Commit bf3da8e

Browse files
sc0wraveit65
authored andcommitted
avoid deprecated GtkStock
1 parent d8579ea commit bf3da8e

26 files changed

+287
-268
lines changed

eel/eel-editable-label.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3105,11 +3105,11 @@ popup_targets_received (GtkClipboard *clipboard,
31053105

31063106
clipboard_contains_text = gtk_selection_data_targets_include_text (data);
31073107

3108-
append_action_signal (label, label->popup_menu, GTK_STOCK_CUT, "cut_clipboard",
3108+
append_action_signal (label, label->popup_menu, "gtk-cut", "cut_clipboard",
31093109
have_selection);
3110-
append_action_signal (label, label->popup_menu, GTK_STOCK_COPY, "copy_clipboard",
3110+
append_action_signal (label, label->popup_menu, "gtk-copy", "copy_clipboard",
31113111
have_selection);
3112-
append_action_signal (label, label->popup_menu, GTK_STOCK_PASTE, "paste_clipboard",
3112+
append_action_signal (label, label->popup_menu, "gtk-paste", "paste_clipboard",
31133113
clipboard_contains_text);
31143114

31153115
menuitem = gtk_menu_item_new_with_label (_("Select All"));

eel/eel-stock-dialogs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ timed_wait_callback (gpointer callback_data)
201201
wait = callback_data;
202202

203203
/* Put up the timed wait window. */
204-
button = wait->cancel_callback != NULL ? GTK_STOCK_CANCEL : GTK_STOCK_OK;
204+
button = wait->cancel_callback != NULL ? "gtk-cancel" : "gtk-ok";
205205
dialog = GTK_DIALOG (gtk_message_dialog_new (wait->parent_window,
206206
0,
207207
GTK_MESSAGE_INFO,

libcaja-private/caja-autorun.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,8 +1127,8 @@ do_autorun_for_content_type (GMount *mount, const char *x_content_type, CajaAuto
11271127
gtk_box_pack_start (GTK_BOX (vbox), always_check_button, TRUE, TRUE, 0);
11281128

11291129
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
1130-
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
1131-
GTK_STOCK_OK, GTK_RESPONSE_OK,
1130+
"gtk-cancel", GTK_RESPONSE_CANCEL,
1131+
"gtk-ok", GTK_RESPONSE_OK,
11321132
NULL);
11331133
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
11341134

libcaja-private/caja-clipboard.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -451,22 +451,22 @@ target_data_free (TargetCallbackData *target_data)
451451

452452
static const GtkActionEntry clipboard_entries[] =
453453
{
454-
/* name, stock id */ { "Cut", GTK_STOCK_CUT,
455-
/* label, accelerator */ NULL, NULL,
454+
/* name, icon name */ { "Cut", "edit-cut",
455+
/* label, accelerator */ N_("Cu_t"), NULL,
456456
/* tooltip */ N_("Cut the selected text to the clipboard"),
457457
G_CALLBACK (action_cut_callback)
458458
},
459-
/* name, stock id */ { "Copy", GTK_STOCK_COPY,
460-
/* label, accelerator */ NULL, NULL,
459+
/* name, icon name */ { "Copy", "edit-copy",
460+
/* label, accelerator */ N_("_Copy"), NULL,
461461
/* tooltip */ N_("Copy the selected text to the clipboard"),
462462
G_CALLBACK (action_copy_callback)
463463
},
464-
/* name, stock id */ { "Paste", GTK_STOCK_PASTE,
465-
/* label, accelerator */ NULL, NULL,
464+
/* name, icon name */ { "Paste", "edit-paste",
465+
/* label, accelerator */ N_("_Paste"), NULL,
466466
/* tooltip */ N_("Paste the text stored on the clipboard"),
467467
G_CALLBACK (action_paste_callback)
468468
},
469-
/* name, stock id */ { "Select All", NULL,
469+
/* name, icon name */ { "Select All", NULL,
470470
/* label, accelerator */ N_("Select _All"), "<control>A",
471471
/* tooltip */ N_("Select all the text in a text field"),
472472
G_CALLBACK (action_select_all_callback)

libcaja-private/caja-column-chooser.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,13 +354,13 @@ use_default_clicked_callback (GtkWidget *button, gpointer user_data)
354354
}
355355

356356
static GtkWidget *
357-
button_new_with_mnemonic (const gchar *stockid, const gchar *str)
357+
button_new_with_mnemonic (const gchar *icon_name, const gchar *str)
358358
{
359359
GtkWidget *image;
360360
GtkWidget *button;
361361

362362
button = gtk_button_new_with_mnemonic (str);
363-
image = gtk_image_new_from_stock (stockid, GTK_ICON_SIZE_BUTTON);
363+
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
364364

365365
gtk_button_set_image (GTK_BUTTON (button), image);
366366

@@ -376,7 +376,7 @@ add_buttons (CajaColumnChooser *chooser)
376376
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
377377
gtk_widget_show (box);
378378

379-
chooser->details->move_up_button = button_new_with_mnemonic (GTK_STOCK_GO_UP,
379+
chooser->details->move_up_button = button_new_with_mnemonic ("go-up",
380380
_("Move _Up"));
381381
g_signal_connect (chooser->details->move_up_button,
382382
"clicked", G_CALLBACK (move_up_clicked_callback),
@@ -386,7 +386,7 @@ add_buttons (CajaColumnChooser *chooser)
386386
gtk_box_pack_start (GTK_BOX (box), chooser->details->move_up_button,
387387
FALSE, FALSE, 0);
388388

389-
chooser->details->move_down_button = button_new_with_mnemonic (GTK_STOCK_GO_DOWN,
389+
chooser->details->move_down_button = button_new_with_mnemonic ("go-down",
390390
_("Move Dow_n"));
391391
g_signal_connect (chooser->details->move_down_button,
392392
"clicked", G_CALLBACK (move_down_clicked_callback),

libcaja-private/caja-file-conflict-dialog.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ caja_file_conflict_dialog_init (CajaFileConflictDialog *fcd)
622622

623623
widget = gtk_button_new_with_label (_("Reset"));
624624
gtk_button_set_image (GTK_BUTTON (widget),
625-
gtk_image_new_from_stock (GTK_STOCK_UNDO,
625+
gtk_image_new_from_icon_name ("edit-undo",
626626
GTK_ICON_SIZE_MENU));
627627
gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 6);
628628
g_signal_connect (widget, "clicked",
@@ -633,7 +633,7 @@ caja_file_conflict_dialog_init (CajaFileConflictDialog *fcd)
633633
/* Setup the diff button for text files */
634634
details->diff_button = gtk_button_new_with_label (_("Differences..."));
635635
gtk_button_set_image (GTK_BUTTON (details->diff_button),
636-
gtk_image_new_from_stock (GTK_STOCK_FIND,
636+
gtk_image_new_from_icon_name ("edit-find",
637637
GTK_ICON_SIZE_MENU));
638638
gtk_box_pack_start (GTK_BOX (vbox), details->diff_button, FALSE, FALSE, 6);
639639
g_signal_connect (details->diff_button, "clicked",
@@ -651,7 +651,7 @@ caja_file_conflict_dialog_init (CajaFileConflictDialog *fcd)
651651

652652
/* Add buttons */
653653
gtk_dialog_add_buttons (dialog,
654-
GTK_STOCK_CANCEL,
654+
"gtk-cancel",
655655
GTK_RESPONSE_CANCEL,
656656
_("_Skip"),
657657
CONFLICT_RESPONSE_SKIP,

0 commit comments

Comments
 (0)