[devhelp] app: remove 'focus-search' action
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] app: remove 'focus-search' action
- Date: Fri, 1 Feb 2013 12:51:54 +0000 (UTC)
commit 42cd7070a1480a7803a75e9daa350d49cd3f9ed6
Author: Aleksander Morgado <aleksander lanedo com>
Date: Thu Jan 31 18:54:33 2013 +0100
app: remove 'focus-search' action
In the process of merging the search and contents tab, we won't need an
explicit option to open Devhelp directly in the search tab.
src/dh-app.c | 20 --------------------
src/dh-app.h | 1 -
src/dh-main.c | 8 --------
src/dh-window.c | 13 -------------
src/dh-window.h | 1 -
5 files changed, 0 insertions(+), 43 deletions(-)
---
diff --git a/src/dh-app.c b/src/dh-app.c
index 780ea6c..579ec6f 100644
--- a/src/dh-app.c
+++ b/src/dh-app.c
@@ -110,12 +110,6 @@ dh_app_search_assistant (DhApp *self,
}
void
-dh_app_focus_search (DhApp *self)
-{
- g_action_group_activate_action (G_ACTION_GROUP (self), "focus-search", NULL);
-}
-
-void
dh_app_raise (DhApp *self)
{
g_action_group_activate_action (G_ACTION_GROUP (self), "raise", NULL);
@@ -243,19 +237,6 @@ search_assistant_cb (GSimpleAction *action,
}
static void
-focus_search_cb (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
-{
- DhApp *self = DH_APP (user_data);
- GtkWindow *window;
-
- window = dh_app_peek_first_window (self);
- dh_window_focus_search (DH_WINDOW (window));
- gtk_window_present (window);
-}
-
-static void
raise_cb (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
@@ -277,7 +258,6 @@ static GActionEntry app_entries[] = {
/* additional commandline-specific actions */
{ "search", search_cb, "s", NULL, NULL },
{ "search-assistant", search_assistant_cb, "s", NULL, NULL },
- { "focus-search", focus_search_cb, NULL, NULL, NULL },
{ "raise", raise_cb, NULL, NULL, NULL },
};
diff --git a/src/dh-app.h b/src/dh-app.h
index 646cb82..2d7b7bb 100644
--- a/src/dh-app.h
+++ b/src/dh-app.h
@@ -61,7 +61,6 @@ void dh_app_search (DhApp *self,
const gchar *keyword);
void dh_app_search_assistant (DhApp *self,
const gchar *keyword);
-void dh_app_focus_search (DhApp *self);
void dh_app_raise (DhApp *self);
G_END_DECLS
diff --git a/src/dh-main.c b/src/dh-main.c
index fd739bd..c2a108d 100644
--- a/src/dh-main.c
+++ b/src/dh-main.c
@@ -39,7 +39,6 @@ static gboolean option_new_window;
static gchar *option_search;
static gchar *option_search_assistant;
static gboolean option_quit;
-static gboolean option_focus_search;
static gboolean option_version;
static GOptionEntry options[] = {
@@ -48,11 +47,6 @@ static GOptionEntry options[] = {
N_("Opens a new Devhelp window"),
NULL
},
- { "focus-search", 'f',
- 0, G_OPTION_ARG_NONE, &option_focus_search,
- N_("Focus the Devhelp window with the search field active"),
- NULL
- },
{ "search", 's',
0, G_OPTION_ARG_STRING, &option_search,
N_("Search for a keyword"),
@@ -89,8 +83,6 @@ run_action (DhApp *application,
dh_app_search (application, option_search);
} else if (option_search_assistant) {
dh_app_search_assistant (application, option_search_assistant);
- } else if (option_focus_search) {
- dh_app_focus_search (application);
} else {
if (is_remote)
dh_app_raise (application);
diff --git a/src/dh-window.c b/src/dh-window.c
index 1442ee5..3137c40 100644
--- a/src/dh-window.c
+++ b/src/dh-window.c
@@ -1708,19 +1708,6 @@ dh_window_search (DhWindow *window,
dh_search_set_search_string (DH_SEARCH (priv->search), str, NULL);
}
-void
-dh_window_focus_search (DhWindow *window)
-{
- DhWindowPriv *priv;
-
- g_return_if_fail (DH_IS_WINDOW (window));
-
- priv = window->priv;
-
- gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->control_notebook), 1);
- gtk_widget_grab_focus (priv->search);
-}
-
/* Only call this with a URI that is known to be in the docs. */
void
_dh_window_display_uri (DhWindow *window,
diff --git a/src/dh-window.h b/src/dh-window.h
index 954d73e..92c7d80 100644
--- a/src/dh-window.h
+++ b/src/dh-window.h
@@ -63,7 +63,6 @@ GType dh_window_get_type (void) G_GNUC_CONST;
GtkWidget *dh_window_new (DhApp *application);
void dh_window_search (DhWindow *window,
const gchar *str);
-void dh_window_focus_search (DhWindow *window);
void _dh_window_display_uri (DhWindow *window,
const gchar *uri);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]