[gnome-text-editor] page: only show goto-line or search-bar, never both
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-text-editor] page: only show goto-line or search-bar, never both
- Date: Thu, 7 Oct 2021 22:04:39 +0000 (UTC)
commit 1f9c597421d95de2e23d1e871cd8ad8fbc4f3a68
Author: Christian Hergert <chergert redhat com>
Date: Thu Oct 7 15:04:30 2021 -0700
page: only show goto-line or search-bar, never both
Related #168
src/editor-page-actions.c | 2 ++
src/editor-page.c | 1 +
2 files changed, 3 insertions(+)
---
diff --git a/src/editor-page-actions.c b/src/editor-page-actions.c
index 5428f53..160aca0 100644
--- a/src/editor-page-actions.c
+++ b/src/editor-page-actions.c
@@ -122,6 +122,8 @@ editor_page_actions_show_goto_line (GtkWidget *widget,
g_assert (EDITOR_IS_PAGE (self));
+ _editor_page_hide_search (self);
+
editor_page_get_visual_position (self, &line, &column);
g_snprintf (str, sizeof str, "%u", line + 1);
gtk_editable_set_text (GTK_EDITABLE (self->goto_line_entry), str);
diff --git a/src/editor-page.c b/src/editor-page.c
index e3fe1c1..585de10 100644
--- a/src/editor-page.c
+++ b/src/editor-page.c
@@ -1096,6 +1096,7 @@ _editor_page_set_search_visible (EditorPage *self,
_editor_search_bar_detach (self->search_bar);
}
+ gtk_revealer_set_reveal_child (self->goto_line_revealer, FALSE);
gtk_revealer_set_reveal_child (self->search_revealer, search_visible);
if (search_visible)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]