diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2013-08-10 19:57:09 +0200 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2013-08-13 12:34:51 +0200 |
commit | 4edfee8c403204eb8c8987f62b9e2480d0bbcd20 (patch) | |
tree | 15851750f7e3faf142492ff01678465b7850e93b /eel | |
parent | 973421d9143881eb830af1a9fcb19959339921f3 (diff) | |
download | nautilus-4edfee8c403204eb8c8987f62b9e2480d0bbcd20.tar.gz |
eel: don't use deprecated GtkStock and GtkImageMenuItem
Diffstat (limited to 'eel')
-rw-r--r-- | eel/eel-editable-label.c | 13 | ||||
-rw-r--r-- | eel/eel-stock-dialogs.c | 2 |
2 files changed, 7 insertions, 8 deletions
diff --git a/eel/eel-editable-label.c b/eel/eel-editable-label.c index 7513784e5..0da68fde1 100644 --- a/eel/eel-editable-label.c +++ b/eel/eel-editable-label.c @@ -2978,11 +2978,11 @@ activate_cb (GtkWidget *menuitem, static void append_action_signal (EelEditableLabel *label, GtkWidget *menu, - const gchar *stock_id, + const gchar *mnemonic_label, const gchar *signal, gboolean sensitive) { - GtkWidget *menuitem = gtk_image_menu_item_new_from_stock (stock_id, NULL); + GtkWidget *menuitem = gtk_menu_item_new_with_mnemonic (mnemonic_label); g_object_set_data (G_OBJECT (menuitem), "gtk-signal", (char *)signal); g_signal_connect (menuitem, "activate", @@ -3023,8 +3023,7 @@ popup_position_func (GtkMenu *menu, gdk_window_get_origin (label->text_area, x, y); - /*gtk_widget_size_request (label->popup_menu, &req);*/ - gtk_widget_get_requisition (widget, &req); + gtk_widget_get_preferred_size (widget, &req, NULL); gtk_widget_get_allocation (widget, &allocation); *x += allocation.width / 2; @@ -3078,11 +3077,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, _("Cu_t"), "cut-clipboard", have_selection); - append_action_signal (label, label->popup_menu, GTK_STOCK_COPY, "copy-clipboard", + append_action_signal (label, label->popup_menu, _("_Copy"), "copy-clipboard", have_selection); - append_action_signal (label, label->popup_menu, GTK_STOCK_PASTE, "paste-clipboard", + append_action_signal (label, label->popup_menu, _("_Paste"), "paste-clipboard", clipboard_contains_text); menuitem = gtk_menu_item_new_with_label (_("Select All")); diff --git a/eel/eel-stock-dialogs.c b/eel/eel-stock-dialogs.c index 79209b1cb..d95ef6ef0 100644 --- a/eel/eel-stock-dialogs.c +++ b/eel/eel-stock-dialogs.c @@ -193,7 +193,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 ? _("_Cancel") : ("_OK"); dialog = GTK_DIALOG (gtk_message_dialog_new (wait->parent_window, 0, GTK_MESSAGE_INFO, |