[gnome-builder] editor: rename set_show_find() to focus_search().
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] editor: rename set_show_find() to focus_search().
- Date: Tue, 9 Sep 2014 01:22:47 +0000 (UTC)
commit be4c0a552651ff08183aa1e0d5fd94ab10f14e8a
Author: Christian Hergert <christian hergert me>
Date: Mon Sep 8 18:22:42 2014 -0700
editor: rename set_show_find() to focus_search().
src/editor/gb-editor-tab.c | 11 ++++-------
src/editor/gb-editor-tab.h | 3 +--
src/editor/gb-editor-workspace.c | 3 ++-
3 files changed, 7 insertions(+), 10 deletions(-)
---
diff --git a/src/editor/gb-editor-tab.c b/src/editor/gb-editor-tab.c
index a7520ab..985143a 100644
--- a/src/editor/gb-editor-tab.c
+++ b/src/editor/gb-editor-tab.c
@@ -362,8 +362,7 @@ cleanup:
}
void
-gb_editor_tab_set_show_find (GbEditorTab *tab,
- gboolean show_find)
+gb_editor_tab_focus_search (GbEditorTab *tab)
{
GbEditorTabPrivate *priv;
@@ -373,11 +372,9 @@ gb_editor_tab_set_show_find (GbEditorTab *tab,
priv = tab->priv;
- gtk_revealer_set_reveal_child (priv->revealer, show_find);
- gtk_source_search_context_set_highlight (priv->search_context, show_find);
-
- if (show_find)
- gtk_widget_grab_focus (GTK_WIDGET (priv->search_entry));
+ gtk_revealer_set_reveal_child (priv->revealer, TRUE);
+ gtk_source_search_context_set_highlight (priv->search_context, TRUE);
+ gtk_widget_grab_focus (GTK_WIDGET (priv->search_entry));
EXIT;
}
diff --git a/src/editor/gb-editor-tab.h b/src/editor/gb-editor-tab.h
index fa98d5b..2993bb0 100644
--- a/src/editor/gb-editor-tab.h
+++ b/src/editor/gb-editor-tab.h
@@ -59,8 +59,7 @@ void gb_editor_tab_set_settings (GbEditorTab *tab,
GbEditorSettings *settings);
void gb_editor_tab_set_font_desc (GbEditorTab *tab,
const PangoFontDescription *font_desc);
-void gb_editor_tab_set_show_find (GbEditorTab *tab,
- gboolean show_find);
+void gb_editor_tab_focus_search (GbEditorTab *tab);
gboolean gb_editor_tab_get_is_default (GbEditorTab *tab);
void gb_editor_tab_reformat (GbEditorTab *tab);
void gb_editor_tab_go_to_end (GbEditorTab *tab);
diff --git a/src/editor/gb-editor-workspace.c b/src/editor/gb-editor-workspace.c
index 8d75496..9adef9b 100644
--- a/src/editor/gb-editor-workspace.c
+++ b/src/editor/gb-editor-workspace.c
@@ -79,9 +79,10 @@ gb_editor_workspace_find (GbWorkspace *workspace)
priv = GB_EDITOR_WORKSPACE (workspace)->priv;
tab = gb_multi_notebook_get_active_tab (priv->multi_notebook);
+ g_assert (GB_IS_EDITOR_TAB (tab));
if (tab)
- gb_editor_tab_set_show_find (GB_EDITOR_TAB (tab), TRUE);
+ gb_editor_tab_focus_search (GB_EDITOR_TAB (tab));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]