[gnome-text-editor] searchbar: move struct definition to private header



commit 50623f2b2c81c09932d52a2717eadf34e70b72a6
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jan 6 15:40:57 2022 -0800

    searchbar: move struct definition to private header

 src/editor-search-bar-private.h | 29 +++++++++++++++++++++++++++++
 src/editor-search-bar.c         | 29 -----------------------------
 src/editor-source-view.c        |  4 +++-
 src/editor-types-private.h      |  1 +
 4 files changed, 33 insertions(+), 30 deletions(-)
---
diff --git a/src/editor-search-bar-private.h b/src/editor-search-bar-private.h
index 701e708..80b4778 100644
--- a/src/editor-search-bar-private.h
+++ b/src/editor-search-bar-private.h
@@ -34,6 +34,35 @@ typedef enum
 
 G_DECLARE_FINAL_TYPE (EditorSearchBar, editor_search_bar, EDITOR, SEARCH_BAR, GtkWidget)
 
+struct _EditorSearchBar
+{
+  GtkWidget                parent_instance;
+
+  GtkSourceSearchContext  *context;
+  GtkSourceSearchSettings *settings;
+
+  GtkGrid                 *grid;
+  EditorSearchEntry       *search_entry;
+  GtkEntry                *replace_entry;
+  GtkButton               *replace_button;
+  GtkButton               *replace_all_button;
+  GtkCheckButton          *case_button;
+  GtkCheckButton          *regex_button;
+  GtkCheckButton          *word_button;
+  GtkToggleButton         *options_button;
+  GtkToggleButton         *replace_mode_button;
+  GtkBox                  *options_box;
+
+  guint                    offset_when_shown;
+
+  guint                    can_move : 1;
+  guint                    can_replace : 1;
+  guint                    can_replace_all : 1;
+  guint                    hide_after_move : 1;
+  guint                    scroll_to_first_match : 1;
+  guint                    jump_back_on_hide : 1;
+};
+
 void     _editor_search_bar_attach              (EditorSearchBar     *self,
                                                  EditorDocument      *document);
 void     _editor_search_bar_detach              (EditorSearchBar     *self);
diff --git a/src/editor-search-bar.c b/src/editor-search-bar.c
index dfdb34b..1bc03fa 100644
--- a/src/editor-search-bar.c
+++ b/src/editor-search-bar.c
@@ -28,35 +28,6 @@
 #include "editor-search-entry-private.h"
 #include "editor-utils-private.h"
 
-struct _EditorSearchBar
-{
-  GtkWidget                parent_instance;
-
-  GtkSourceSearchContext  *context;
-  GtkSourceSearchSettings *settings;
-
-  GtkGrid                 *grid;
-  EditorSearchEntry       *search_entry;
-  GtkEntry                *replace_entry;
-  GtkButton               *replace_button;
-  GtkButton               *replace_all_button;
-  GtkCheckButton          *case_button;
-  GtkCheckButton          *regex_button;
-  GtkCheckButton          *word_button;
-  GtkToggleButton         *options_button;
-  GtkToggleButton         *replace_mode_button;
-  GtkBox                  *options_box;
-
-  guint                    offset_when_shown;
-
-  guint                    can_move : 1;
-  guint                    can_replace : 1;
-  guint                    can_replace_all : 1;
-  guint                    hide_after_move : 1;
-  guint                    scroll_to_first_match : 1;
-  guint                    jump_back_on_hide : 1;
-};
-
 G_DEFINE_TYPE (EditorSearchBar, editor_search_bar, GTK_TYPE_WIDGET)
 
 enum {
diff --git a/src/editor-source-view.c b/src/editor-source-view.c
index 2db180d..4ed5f4c 100644
--- a/src/editor-source-view.c
+++ b/src/editor-source-view.c
@@ -22,8 +22,10 @@
 
 #include "editor-application-private.h"
 #include "editor-document-private.h"
-#include "editor-source-view.h"
 #include "editor-joined-menu-private.h"
+#include "editor-page-private.h"
+#include "editor-search-bar-private.h"
+#include "editor-source-view.h"
 #include "editor-spell-menu.h"
 #include "editor-utils-private.h"
 
diff --git a/src/editor-types-private.h b/src/editor-types-private.h
index 99f4c38..a75380c 100644
--- a/src/editor-types-private.h
+++ b/src/editor-types-private.h
@@ -29,5 +29,6 @@ typedef struct _EditorSidebarRow   EditorSidebarRow;
 typedef struct _EditorSidebarItem  EditorSidebarItem;
 typedef struct _EditorSidebarModel EditorSidebarModel;
 typedef struct _EditorSearchBar    EditorSearchBar;
+typedef struct _EditorSearchEntry  EditorSearchEntry;
 
 G_END_DECLS


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]