summaryrefslogtreecommitdiff
path: root/eel
diff options
context:
space:
mode:
Diffstat (limited to 'eel')
-rw-r--r--eel/eel-editable-label.c32
-rw-r--r--eel/eel-gtk-extensions.c24
-rw-r--r--eel/eel-gtk-extensions.h11
3 files changed, 36 insertions, 31 deletions
diff --git a/eel/eel-editable-label.c b/eel/eel-editable-label.c
index 5ecbab84..8fcda95f 100644
--- a/eel/eel-editable-label.c
+++ b/eel/eel-editable-label.c
@@ -30,6 +30,8 @@
#include "eel-editable-label.h"
#include "eel-marshal.h"
#include "eel-accessibility.h"
+#include "eel-gtk-extensions.h"
+
#include <libgail-util/gailmisc.h>
#include <glib/gi18n-lib.h>
@@ -3003,30 +3005,6 @@ activate_cb (GtkWidget *menuitem,
g_signal_emit_by_name (label, signal);
}
-static GtkWidget
-*mate_image_menu_item_new_from_icon (const gchar *icon_name,
- const gchar *label_name)
-{
- GtkWidget *icon;
- GtkWidget *box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
-
- if (icon_name)
- icon = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
- else
- icon = gtk_image_new ();
-
- GtkWidget *label_menu = gtk_label_new_with_mnemonic (g_strconcat (label_name, " ", NULL));
- GtkWidget *menuitem = gtk_menu_item_new ();
-
- gtk_container_add (GTK_CONTAINER (box), icon);
- gtk_container_add (GTK_CONTAINER (box), label_menu);
-
- gtk_container_add (GTK_CONTAINER (menuitem), box);
- gtk_widget_show_all (menuitem);
-
- return menuitem;
-}
-
static void
append_action_signal (EelEditableLabel *label,
GtkWidget *menu,
@@ -3035,7 +3013,7 @@ append_action_signal (EelEditableLabel *label,
const gchar *signal,
gboolean sensitive)
{
- GtkWidget *menuitem = mate_image_menu_item_new_from_icon (icon_name, label_name);
+ GtkWidget *menuitem = eel_image_menu_item_new_from_icon (icon_name, label_name);
g_object_set_data (G_OBJECT (menuitem), "gtk-signal", (char *)signal);
g_signal_connect (menuitem, "activate",
@@ -3139,7 +3117,7 @@ popup_targets_received (GtkClipboard *clipboard,
append_action_signal (label, label->popup_menu, "edit-paste", _("_Paste"), "paste_clipboard",
clipboard_contains_text);
- menuitem = mate_image_menu_item_new_from_icon ("edit-select-all", _("Select All"));
+ menuitem = eel_image_menu_item_new_from_icon ("edit-select-all", _("Select All"));
g_signal_connect_object (menuitem, "activate",
G_CALLBACK (eel_editable_label_select_all), label,
G_CONNECT_SWAPPED);
@@ -3150,7 +3128,7 @@ popup_targets_received (GtkClipboard *clipboard,
gtk_widget_show (menuitem);
gtk_menu_shell_append (GTK_MENU_SHELL (label->popup_menu), menuitem);
- menuitem = mate_image_menu_item_new_from_icon (NULL, _("Input Methods"));
+ menuitem = eel_image_menu_item_new_from_icon (NULL, _("Input Methods"));
gtk_widget_show (menuitem);
submenu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), submenu);
diff --git a/eel/eel-gtk-extensions.c b/eel/eel-gtk-extensions.c
index c3cff2f5..21366fb4 100644
--- a/eel/eel-gtk-extensions.c
+++ b/eel/eel-gtk-extensions.c
@@ -456,3 +456,27 @@ eel_gtk_message_dialog_set_details_label (GtkMessageDialog *dialog,
gtk_widget_show (label);
gtk_widget_show (expander);
}
+
+GtkWidget *
+eel_image_menu_item_new_from_icon (const gchar *icon_name,
+ const gchar *label_name)
+{
+ GtkWidget *icon;
+ GtkWidget *box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+
+ if (icon_name)
+ icon = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
+ else
+ icon = gtk_image_new ();
+
+ GtkWidget *label_menu = gtk_label_new_with_mnemonic (g_strconcat (label_name, " ", NULL));
+ GtkWidget *menuitem = gtk_menu_item_new ();
+
+ gtk_container_add (GTK_CONTAINER (box), icon);
+ gtk_container_add (GTK_CONTAINER (box), label_menu);
+
+ gtk_container_add (GTK_CONTAINER (menuitem), box);
+ gtk_widget_show_all (menuitem);
+
+ return menuitem;
+}
diff --git a/eel/eel-gtk-extensions.h b/eel/eel-gtk-extensions.h
index aec680f3..8c39a4c7 100644
--- a/eel/eel-gtk-extensions.h
+++ b/eel/eel-gtk-extensions.h
@@ -65,11 +65,14 @@ GtkWidget * eel_gtk_menu_tool_button_get_button (GtkMenuTo
void eel_gtk_label_make_bold (GtkLabel *label);
/* GtkTreeView */
-void eel_gtk_tree_view_set_activate_on_single_click (GtkTreeView *tree_view,
- gboolean should_activate);
+void eel_gtk_tree_view_set_activate_on_single_click (GtkTreeView *tree_view,
+ gboolean should_activate);
/* GtkMessageDialog */
-void eel_gtk_message_dialog_set_details_label (GtkMessageDialog *dialog,
- const gchar *details_text);
+void eel_gtk_message_dialog_set_details_label (GtkMessageDialog *dialog,
+ const gchar *details_text);
+
+GtkWidget * eel_image_menu_item_new_from_icon (const gchar *icon_name,
+ const gchar *label_name);
#endif /* EEL_GTK_EXTENSIONS_H */