aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-navigation-action.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-12-14 01:57:12 +0800
committerChristian Persch <chpe@src.gnome.org>2004-12-14 01:57:12 +0800
commit43955b584199f99428660d47bc2a7297ffdf763f (patch)
tree8fe84b888fa2e1cdef16d27fbf3049d164f09ae4 /src/ephy-navigation-action.c
parentf58beaee60ebf176074bcad300c5e7ac0e253694 (diff)
downloadgsoc2013-epiphany-43955b584199f99428660d47bc2a7297ffdf763f.tar
gsoc2013-epiphany-43955b584199f99428660d47bc2a7297ffdf763f.tar.gz
gsoc2013-epiphany-43955b584199f99428660d47bc2a7297ffdf763f.tar.bz2
gsoc2013-epiphany-43955b584199f99428660d47bc2a7297ffdf763f.tar.lz
gsoc2013-epiphany-43955b584199f99428660d47bc2a7297ffdf763f.tar.xz
gsoc2013-epiphany-43955b584199f99428660d47bc2a7297ffdf763f.tar.zst
gsoc2013-epiphany-43955b584199f99428660d47bc2a7297ffdf763f.zip
Make distcheck fix.
2004-12-13 Christian Persch <chpe@cvs.gnome.org> * Makefile.am: Make distcheck fix. * lib/ephy-string.c: * lib/ephy-string.h: Finally remove ephy_string_shorten(). * src/bookmarks/ephy-bookmark-action.c: (create_tool_item), (ephy_bookmark_action_sync_label): * src/bookmarks/ephy-bookmarks-menu.c: (connect_proxy_cb): * src/bookmarks/ephy-favorites-menu.c: (connect_proxy_cb): * src/bookmarks/ephy-topic-action.c: (create_tool_item), (ephy_topic_action_sync_label), (append_bookmarks_menu), (build_topics_menu): * src/ephy-navigation-action.c: (new_history_menu_item): Use gtk_label_set_max_width_chars() and ellipsise the labels.
Diffstat (limited to 'src/ephy-navigation-action.c')
-rw-r--r--src/ephy-navigation-action.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/ephy-navigation-action.c b/src/ephy-navigation-action.c
index 5f826d9bc..0e166f506 100644
--- a/src/ephy-navigation-action.c
+++ b/src/ephy-navigation-action.c
@@ -22,12 +22,12 @@
#include "ephy-navigation-action.h"
#include "ephy-window.h"
-#include "ephy-string.h"
#include "ephy-favicon-cache.h"
#include "ephy-history.h"
#include "ephy-embed-shell.h"
#include "ephy-debug.h"
+#include <gtk/gtklabel.h>
#include <gtk/gtkimage.h>
#include <gtk/gtkmenuitem.h>
#include <gtk/gtkimagemenuitem.h>
@@ -89,7 +89,7 @@ ephy_navigation_action_get_type (void)
return type;
}
-#define MAX_LENGTH 60
+#define MAX_LABEL_LENGTH 48
static GtkWidget *
new_history_menu_item (const char *origtext,
@@ -99,15 +99,16 @@ new_history_menu_item (const char *origtext,
EphyHistory *history;
GtkWidget *item, *image;
GdkPixbuf *icon = NULL;
+ GtkLabel *label;
const char *icon_address;
- char *short_text;
- g_return_val_if_fail (address != NULL, NULL);
+ g_return_val_if_fail (address != NULL && origtext != NULL, NULL);
- /* FIXME: use ellipsisation in the menu item instead */
- short_text = ephy_string_shorten (origtext, MAX_LENGTH);
- item = gtk_image_menu_item_new_with_label (short_text);
- g_free (short_text);
+ item = gtk_image_menu_item_new_with_label (origtext);
+
+ label = GTK_LABEL (GTK_BIN (item)->child);
+ gtk_label_set_ellipsize (label, PANGO_ELLIPSIZE_END);
+ gtk_label_set_max_width_chars (label, MAX_LABEL_LENGTH);
history = EPHY_HISTORY
(ephy_embed_shell_get_global_history (embed_shell));