diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2003-07-13 00:41:03 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2003-07-13 00:41:03 +0800 |
commit | f0ff92009d1deef7978e261530d2114d5c4b8ba7 (patch) | |
tree | c681fc4c21bc69b0a4d0bad02b7209e413e7c939 /src | |
parent | b1647953bb1eb41616a9bfabf2ed5b6c010cc9f0 (diff) | |
download | gsoc2013-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.
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-navigation-action.c | 15 |
1 files changed, 12 insertions, 3 deletions
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); |