aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--src/ephy-navigation-action.c15
2 files changed, 18 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 831eb3fe5..00e737820 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
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>
+
* src/ephy-history-window.c: (provide_favicon):
* src/bookmarks/ephy-bookmarks-editor.c: (provide_favicon):
diff --git a/src/ephy-navigation-action.c b/src/ephy-navigation-action.c
index 61c2f3cdb..bdc2fddee 100644
--- a/src/ephy-navigation-action.c
+++ b/src/ephy-navigation-action.c
@@ -19,6 +19,7 @@
#include "ephy-navigation-action.h"
#include "ephy-arrow-toolbutton.h"
#include "ephy-window.h"
+#include "ephy-string.h"
#include "ephy-debug.h"
static void ephy_navigation_action_init (EphyNavigationAction *action);
@@ -66,13 +67,21 @@ ephy_navigation_action_get_type (void)
return type;
}
+#define MAX_LENGTH 60
+
static GtkWidget *
new_history_menu_item (gchar *origtext,
const GdkPixbuf *ico)
{
- GtkWidget *item = gtk_image_menu_item_new ();
- GtkWidget *hb = gtk_hbox_new (FALSE, 0);
- GtkWidget *label = gtk_label_new (origtext);
+ GtkWidget *item, *hb, *label;
+ 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);
+ g_free (short_text);
gtk_box_pack_start (GTK_BOX (hb), label, FALSE, FALSE, 0);
gtk_container_add (GTK_CONTAINER (item), hb);