[nautilus] eel: don't use deprecated GtkStock and GtkImageMenuItem
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] eel: don't use deprecated GtkStock and GtkImageMenuItem
- Date: Tue, 13 Aug 2013 12:29:29 +0000 (UTC)
commit 4edfee8c403204eb8c8987f62b9e2480d0bbcd20
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sat Aug 10 19:57:09 2013 +0200
eel: don't use deprecated GtkStock and GtkImageMenuItem
eel/eel-editable-label.c | 13 ++++++-------
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 7513784..0da68fd 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 79209b1..d95ef6e 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]