aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-07-13 00:41:03 +0800
committerChristian Persch <chpe@src.gnome.org>2003-07-13 00:41:03 +0800
commitf0ff92009d1deef7978e261530d2114d5c4b8ba7 (patch)
treec681fc4c21bc69b0a4d0bad02b7209e413e7c939
parentb1647953bb1eb41616a9bfabf2ed5b6c010cc9f0 (diff)
downloadgsoc2013-epiphany-f0ff92009d1deef7978e261530d2114d5c4b8ba7.tar
gsoc2013-epiphany-f0ff92009d1deef7978e261530d2114d5c4b8ba7.tar.gz
gsoc2013-epiphany-f0ff92009d1deef7978e261530d2114d5c4b8ba7.tar.bz2
gsoc2013-epiphany-f0ff92009d1deef7978e261530d2114d5c4b8ba7.tar.lz
gsoc2013-epiphany-f0ff92009d1deef7978e261530d2114d5c4b8ba7.tar.xz
gsoc2013-epiphany-f0ff92009d1deef7978e261530d2114d5c4b8ba7.tar.zst
gsoc2013-epiphany-f0ff92009d1deef7978e261530d2114d5c4b8ba7.zip
Shorten strings.
2003-07-12 Christian Persch <chpe@cvs.gnome.org> * src/ephy-navigation-action.c: (new_history_menu_item): Shorten strings.
-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);