Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/libmisc
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2009-12-12 15:22:10 (GMT)
committer Carlos Garcia Campos <carlosgc@gnome.org>2009-12-12 15:22:10 (GMT)
commit33d769c7d07e419cac3ab7b7febe98f2c12e2ecf (patch)
treee531f83303a47bdc2d2e790aa6d77976528a125a /libmisc
parentd68a91467efab8ef8a8f98589dd4c21b993b6e14 (diff)
Update page action when entry text changes but not current page
That happens when user types and invalid page or current page. Fixes bgo#603714.
Diffstat (limited to 'libmisc')
-rw-r--r--libmisc/ev-page-action-widget.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/libmisc/ev-page-action-widget.c b/libmisc/ev-page-action-widget.c
index 2b29e78..a355187 100644
--- a/libmisc/ev-page-action-widget.c
+++ b/libmisc/ev-page-action-widget.c
@@ -132,6 +132,10 @@ activate_cb (EvPageActionWidget *action_widget)
EvLinkAction *link_action;
EvLink *link;
gchar *link_text;
+ gint current_page;
+
+ model = action_widget->doc_model;
+ current_page = ev_document_model_get_page (model);
text = gtk_entry_get_text (GTK_ENTRY (action_widget->entry));
@@ -145,14 +149,8 @@ activate_cb (EvPageActionWidget *action_widget)
g_object_unref (link);
g_free (link_text);
- /* rest the entry to the current page if we were unable to
- * change it */
- model = action_widget->doc_model;
- page_label = ev_document_get_page_label (action_widget->document,
- ev_document_model_get_page (model));
- gtk_entry_set_text (GTK_ENTRY (action_widget->entry), page_label);
- gtk_editable_set_position (GTK_EDITABLE (action_widget->entry), -1);
- g_free (page_label);
+ if (current_page == ev_document_model_get_page (model))
+ ev_page_action_widget_set_current_page (action_widget, current_page);
}
static void