Skip to content
Permalink
Browse files

avoid deprecated GtkStock

  • Loading branch information...
sc0w authored and raveit65 committed Jan 27, 2018
1 parent d8579ea commit bf3da8eea7dad06618c84375adbb4952c74f6987
@@ -3105,11 +3105,11 @@ popup_targets_received (GtkClipboard *clipboard,

clipboard_contains_text = gtk_selection_data_targets_include_text (data);

append_action_signal (label, label->popup_menu, GTK_STOCK_CUT, "cut_clipboard",
append_action_signal (label, label->popup_menu, "gtk-cut", "cut_clipboard",
have_selection);
append_action_signal (label, label->popup_menu, GTK_STOCK_COPY, "copy_clipboard",
append_action_signal (label, label->popup_menu, "gtk-copy", "copy_clipboard",
have_selection);
append_action_signal (label, label->popup_menu, GTK_STOCK_PASTE, "paste_clipboard",
append_action_signal (label, label->popup_menu, "gtk-paste", "paste_clipboard",
clipboard_contains_text);

menuitem = gtk_menu_item_new_with_label (_("Select All"));
@@ -201,7 +201,7 @@ timed_wait_callback (gpointer callback_data)
wait = callback_data;

/* Put up the timed wait window. */
button = wait->cancel_callback != NULL ? GTK_STOCK_CANCEL : GTK_STOCK_OK;
button = wait->cancel_callback != NULL ? "gtk-cancel" : "gtk-ok";
dialog = GTK_DIALOG (gtk_message_dialog_new (wait->parent_window,
0,
GTK_MESSAGE_INFO,
@@ -1127,8 +1127,8 @@ do_autorun_for_content_type (GMount *mount, const char *x_content_type, CajaAuto
gtk_box_pack_start (GTK_BOX (vbox), always_check_button, TRUE, TRUE, 0);

gtk_dialog_add_buttons (GTK_DIALOG (dialog),
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
"gtk-cancel", GTK_RESPONSE_CANCEL,
"gtk-ok", GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);

@@ -451,22 +451,22 @@ target_data_free (TargetCallbackData *target_data)

static const GtkActionEntry clipboard_entries[] =
{
/* name, stock id */ { "Cut", GTK_STOCK_CUT,
/* label, accelerator */ NULL, NULL,
/* name, icon name */ { "Cut", "edit-cut",
/* label, accelerator */ N_("Cu_t"), NULL,
/* tooltip */ N_("Cut the selected text to the clipboard"),
G_CALLBACK (action_cut_callback)
},
/* name, stock id */ { "Copy", GTK_STOCK_COPY,
/* label, accelerator */ NULL, NULL,
/* name, icon name */ { "Copy", "edit-copy",
/* label, accelerator */ N_("_Copy"), NULL,
/* tooltip */ N_("Copy the selected text to the clipboard"),
G_CALLBACK (action_copy_callback)
},
/* name, stock id */ { "Paste", GTK_STOCK_PASTE,
/* label, accelerator */ NULL, NULL,
/* name, icon name */ { "Paste", "edit-paste",
/* label, accelerator */ N_("_Paste"), NULL,
/* tooltip */ N_("Paste the text stored on the clipboard"),
G_CALLBACK (action_paste_callback)
},
/* name, stock id */ { "Select All", NULL,
/* name, icon name */ { "Select All", NULL,
/* label, accelerator */ N_("Select _All"), "<control>A",
/* tooltip */ N_("Select all the text in a text field"),
G_CALLBACK (action_select_all_callback)
@@ -354,13 +354,13 @@ use_default_clicked_callback (GtkWidget *button, gpointer user_data)
}

static GtkWidget *
button_new_with_mnemonic (const gchar *stockid, const gchar *str)
button_new_with_mnemonic (const gchar *icon_name, const gchar *str)
{
GtkWidget *image;
GtkWidget *button;

button = gtk_button_new_with_mnemonic (str);
image = gtk_image_new_from_stock (stockid, GTK_ICON_SIZE_BUTTON);
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);

gtk_button_set_image (GTK_BUTTON (button), image);

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

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

chooser->details->move_down_button = button_new_with_mnemonic (GTK_STOCK_GO_DOWN,
chooser->details->move_down_button = button_new_with_mnemonic ("go-down",
_("Move Dow_n"));
g_signal_connect (chooser->details->move_down_button,
"clicked", G_CALLBACK (move_down_clicked_callback),
@@ -622,7 +622,7 @@ caja_file_conflict_dialog_init (CajaFileConflictDialog *fcd)

widget = gtk_button_new_with_label (_("Reset"));
gtk_button_set_image (GTK_BUTTON (widget),
gtk_image_new_from_stock (GTK_STOCK_UNDO,
gtk_image_new_from_icon_name ("edit-undo",
GTK_ICON_SIZE_MENU));
gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 6);
g_signal_connect (widget, "clicked",
@@ -633,7 +633,7 @@ caja_file_conflict_dialog_init (CajaFileConflictDialog *fcd)
/* Setup the diff button for text files */
details->diff_button = gtk_button_new_with_label (_("Differences..."));
gtk_button_set_image (GTK_BUTTON (details->diff_button),
gtk_image_new_from_stock (GTK_STOCK_FIND,
gtk_image_new_from_icon_name ("edit-find",
GTK_ICON_SIZE_MENU));
gtk_box_pack_start (GTK_BOX (vbox), details->diff_button, FALSE, FALSE, 6);
g_signal_connect (details->diff_button, "clicked",
@@ -651,7 +651,7 @@ caja_file_conflict_dialog_init (CajaFileConflictDialog *fcd)

/* Add buttons */
gtk_dialog_add_buttons (dialog,
GTK_STOCK_CANCEL,
"gtk-cancel",
GTK_RESPONSE_CANCEL,
_("_Skip"),
CONFLICT_RESPONSE_SKIP,
Oops, something went wrong.

0 comments on commit bf3da8e

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