aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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