summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-02-09 12:06:02 +0100
committerStefano Karapetsas <[email protected]>2014-02-09 12:06:02 +0100
commitd282ff3e6a5d6fb3d3e73a7ccf8c2dfc600720ad (patch)
tree4bd83ac222c92bd1601039370549845095cc688b /shell
parent9ba2765d71e217254d2a3429b043430dbc9ff5d1 (diff)
parentd771130748b90fdeb3c05d12c8652c7ab3f7f081 (diff)
downloadatril-d282ff3e6a5d6fb3d3e73a7ccf8c2dfc600720ad.tar.bz2
atril-d282ff3e6a5d6fb3d3e73a7ccf8c2dfc600720ad.tar.xz
Merge pull request #63 from bl0ckeduser/master
Fix for #47 (Ctrl-A in search field)
Diffstat (limited to 'shell')
-rw-r--r--shell/eggfindbar.c4
-rw-r--r--shell/eggfindbar.h2
-rw-r--r--shell/ev-window.c11
3 files changed, 14 insertions, 3 deletions
diff --git a/shell/eggfindbar.c b/shell/eggfindbar.c
index f4932160..fff123c7 100644
--- a/shell/eggfindbar.c
+++ b/shell/eggfindbar.c
@@ -65,7 +65,7 @@ static void egg_find_bar_set_property (GObject *object,
GParamSpec *pspec);
static void egg_find_bar_show (GtkWidget *widget);
static void egg_find_bar_hide (GtkWidget *widget);
-static void egg_find_bar_grab_focus (GtkWidget *widget);
+void egg_find_bar_grab_focus (GtkWidget *widget);
G_DEFINE_TYPE (EggFindBar, egg_find_bar, GTK_TYPE_TOOLBAR);
@@ -495,7 +495,7 @@ egg_find_bar_hide (GtkWidget *widget)
GTK_WIDGET_CLASS (egg_find_bar_parent_class)->hide (widget);
}
-static void
+void
egg_find_bar_grab_focus (GtkWidget *widget)
{
EggFindBar *find_bar = EGG_FIND_BAR (widget);
diff --git a/shell/eggfindbar.h b/shell/eggfindbar.h
index 7a7487e3..975f9790 100644
--- a/shell/eggfindbar.h
+++ b/shell/eggfindbar.h
@@ -75,6 +75,8 @@ void egg_find_bar_get_current_match_color (EggFindBar *find_bar,
void egg_find_bar_set_status_text (EggFindBar *find_bar,
const char *text);
+void egg_find_bar_grab_focus (GtkWidget *widget);
+
G_END_DECLS
#endif /* __EGG_FIND_BAR_H__ */
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 1f989f85..45e733a5 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -3651,7 +3651,16 @@ ev_window_cmd_edit_select_all (GtkAction *action, EvWindow *ev_window)
{
g_return_if_fail (EV_IS_WINDOW (ev_window));
- ev_view_select_all (EV_VIEW (ev_window->priv->view));
+ /*
+ * If the find bar is open, select all applies to
+ * the find field contents. Otherwise it applies
+ * to the viewing window's contents.
+ */
+ if (ev_window->priv->chrome & EV_CHROME_FINDBAR) {
+ egg_find_bar_grab_focus(ev_window->priv->find_bar);
+ } else {
+ ev_view_select_all (EV_VIEW (ev_window->priv->view));
+ }
}
static void