Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-page-action.c
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>2005-05-31 14:36:02 (GMT)
committer Nickolay V. Shmyrev <nshmyrev@src.gnome.org>2005-05-31 14:36:02 (GMT)
commitb69134d4ad94bcf59ce305d62088487dbb7e727e (patch)
treef461a13f9dd0685ef99b955f94a394331c3922cd /shell/ev-page-action.c
parentb9830e9bb5c3ebfc0da148d4249b66dce0f1dff7 (diff)
Set page action entry width depending on labels width. Fix for 305202
Diffstat (limited to 'shell/ev-page-action.c')
-rw-r--r--shell/ev-page-action.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/shell/ev-page-action.c b/shell/ev-page-action.c
index 864e5e3..b1c61e6 100644
--- a/shell/ev-page-action.c
+++ b/shell/ev-page-action.c
@@ -180,10 +180,16 @@ page_changed_cb (EvPageCache *page_cache,
g_assert (proxy);
if (page_cache != NULL && page >= 0) {
+
+ gtk_entry_set_width_chars (GTK_ENTRY (proxy->entry),
+ CLAMP (ev_page_cache_get_max_label_chars (page_cache),
+ 4, 12));
+
gchar *page_label = ev_page_cache_get_page_label (page_cache, page);
gtk_entry_set_text (GTK_ENTRY (proxy->entry), page_label);
gtk_editable_set_position (GTK_EDITABLE (proxy->entry), -1);
g_free (page_label);
+
} else {
gtk_entry_set_text (GTK_ENTRY (proxy->entry), "");
}