aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-07-13 01:21:29 +0800
committerChristian Persch <chpe@src.gnome.org>2003-07-13 01:21:29 +0800
commitabd9a2e47e90cecdab2a811f31766753269d74fa (patch)
tree5736f679342f428a9efa0a9a0d5a05c5177b57b1
parent6b0203cbb6e74481c898fd83aa732c20d8a10c30 (diff)
downloadgsoc2013-epiphany-abd9a2e47e90cecdab2a811f31766753269d74fa.tar.gz
gsoc2013-epiphany-abd9a2e47e90cecdab2a811f31766753269d74fa.tar.zst
gsoc2013-epiphany-abd9a2e47e90cecdab2a811f31766753269d74fa.zip
Cleanup.
2003-07-12 Christian Persch <chpe@cvs.gnome.org> * src/ephy-navigation-action.c: (new_history_menu_item): Cleanup.
-rw-r--r--ChangeLog6
-rw-r--r--src/ephy-navigation-action.c23
2 files changed, 14 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 00e737820..ad4a13afd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,12 @@
* src/ephy-navigation-action.c: (new_history_menu_item):
+ Cleanup.
+
+2003-07-12 Christian Persch <chpe@cvs.gnome.org>
+
+ * src/ephy-navigation-action.c: (new_history_menu_item):
+
Shorten strings.
2003-07-12 Christian Persch <chpe@cvs.gnome.org>
diff --git a/src/ephy-navigation-action.c b/src/ephy-navigation-action.c
index bdc2fddee..6538d1bba 100644
--- a/src/ephy-navigation-action.c
+++ b/src/ephy-navigation-action.c
@@ -70,28 +70,21 @@ ephy_navigation_action_get_type (void)
#define MAX_LENGTH 60
static GtkWidget *
-new_history_menu_item (gchar *origtext,
- const GdkPixbuf *ico)
+new_history_menu_item (char *origtext,
+ GdkPixbuf *icon)
{
- GtkWidget *item, *hb, *label;
+ GtkWidget *item, *image;
char *short_text;
- item = gtk_image_menu_item_new ();
- hb = gtk_hbox_new (FALSE, 0);
-
short_text = ephy_string_shorten (origtext, MAX_LENGTH);
- label = gtk_label_new (short_text);
+ item = gtk_image_menu_item_new_with_label (short_text);
g_free (short_text);
- gtk_box_pack_start (GTK_BOX (hb), label, FALSE, FALSE, 0);
- gtk_container_add (GTK_CONTAINER (item), hb);
-
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item),
- gtk_image_new_from_pixbuf ((GdkPixbuf *) ico));
-
- gtk_widget_show_all (item);
+ image = gtk_image_new_from_pixbuf (icon);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
+ gtk_widget_show (item);
- return item;
+ return item;
}
static void