[gnome-builder] editor: move _GbEditorTabPrivate into separate header.



commit 06f35d134051a0ee539a30a5b8d812612c244070
Author: Christian Hergert <christian hergert me>
Date:   Thu Sep 11 21:54:48 2014 -0700

    editor: move _GbEditorTabPrivate into separate header.

 src/editor/gb-editor-tab-private.h |  106 ++++++++++++++++++++++++++++++++++++
 src/editor/gb-editor-tab.c         |   78 +--------------------------
 src/gnome-builder.mk               |    1 +
 3 files changed, 108 insertions(+), 77 deletions(-)
---
diff --git a/src/editor/gb-editor-tab-private.h b/src/editor/gb-editor-tab-private.h
new file mode 100644
index 0000000..e0bd63c
--- /dev/null
+++ b/src/editor/gb-editor-tab-private.h
@@ -0,0 +1,106 @@
+/* gb-editor-tab-private.h
+ *
+ * Copyright (C) 2014 Christian Hergert <christian hergert me>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GB_EDITOR_TAB_PRIVATE_H
+#define GB_EDITOR_TAB_PRIVATE_H
+
+#include <gtk/gtk.h>
+#include <gtksourceview/gtksource.h>
+
+#include "gb-animation.h"
+#include "gb-box-theatric.h"
+#include "gb-markdown-preview.h"
+#include "gb-notebook.h"
+#include "gb-source-search-highlighter.h"
+#include "gb-source-snippet-completion-provider.h"
+#include "gb-source-view.h"
+#include "gd-tagged-entry.h"
+#include "nautilus-floating-bar.h"
+
+G_BEGIN_DECLS
+
+struct _GbEditorTabPrivate
+{
+  /*
+   * Our underlying document, the GtkTextBuffer.
+   */
+  GbEditorDocument *document;
+
+  /*
+   * Snippet related components.
+   */
+  GtkSourceCompletionProvider *snippets_provider;
+
+  /*
+   * Search releated components.
+   */
+  GbSourceSearchHighlighter *search_highlighter;
+  GtkSourceSearchSettings   *search_settings;
+  GtkSourceSearchContext    *search_context;
+
+  /*
+   * Tab related settings.
+   */
+  GbEditorSettings *settings;
+
+  /*
+   * Weak reference bindings for tracking settings.
+   */
+  GBinding *auto_indent_binding;
+  GBinding *font_desc_binding;
+  GBinding *highlight_current_line_binding;
+  GBinding *indent_on_tab_binding;
+  GBinding *indent_width_binding;
+  GBinding *insert_spaces_instead_of_tabs_binding;
+  GBinding *right_margin_position_binding;
+  GBinding *show_line_marks_binding;
+  GBinding *show_line_numbers_binding;
+  GBinding *show_right_margin_binding;
+  GBinding *smart_home_end_binding;
+  GBinding *style_scheme_binding;
+  GBinding *tab_width_binding;
+
+  /*
+   * Tab related widgets, filled in with GtkBuilder templates.
+   */
+  NautilusFloatingBar *floating_bar;
+  GtkButton           *go_down_button;
+  GtkButton           *go_up_button;
+  GtkOverlay          *overlay;
+  GtkBox              *preview_container;
+  GtkProgressBar      *progress_bar;
+  GtkRevealer         *revealer;
+  GtkScrolledWindow   *scroller;
+  GbSourceView        *source_view;
+  GdTaggedEntry       *search_entry;
+  GdTaggedEntryTag    *search_entry_tag;
+
+  /*
+   * Information about our target file and encoding.
+   */
+  GtkSourceFile *file;
+
+  /*
+   * Animation for save progress.
+   */
+  GbAnimation *save_animation;
+};
+
+G_END_DECLS
+
+#endif /* GB_EDITOR_TAB_PRIVATE_H */
diff --git a/src/editor/gb-editor-tab.c b/src/editor/gb-editor-tab.c
index ec78921..7c45d7c 100644
--- a/src/editor/gb-editor-tab.c
+++ b/src/editor/gb-editor-tab.c
@@ -19,96 +19,20 @@
 #define G_LOG_DOMAIN "editor"
 
 #include <glib/gi18n.h>
-#include <gtksourceview/gtksource.h>
 
-#include "gb-animation.h"
-#include "gb-box-theatric.h"
 #include "gb-editor-tab.h"
+#include "gb-editor-tab-private.h"
 #include "gb-log.h"
-#include "gb-markdown-preview.h"
-#include "gb-notebook.h"
 #include "gb-rgba.h"
 #include "gb-source-formatter.h"
-#include "gb-source-search-highlighter.h"
-#include "gb-source-snippet-completion-provider.h"
 #include "gb-source-snippet.h"
 #include "gb-source-snippets-manager.h"
 #include "gb-source-snippets.h"
-#include "gb-source-view.h"
 #include "gb-string.h"
 #include "gb-widget.h"
-#include "gd-tagged-entry.h"
-#include "nautilus-floating-bar.h"
 
 #define GB_EDITOR_TAB_UI_RESOURCE "/org/gnome/builder/ui/gb-editor-tab.ui"
 
-struct _GbEditorTabPrivate
-{
-  /*
-   * Our underlying document, the GtkTextBuffer.
-   */
-  GbEditorDocument *document;
-
-  /*
-   * Snippet related components.
-   */
-  GtkSourceCompletionProvider *snippets_provider;
-
-  /*
-   * Search releated components.
-   */
-  GbSourceSearchHighlighter *search_highlighter;
-  GtkSourceSearchSettings   *search_settings;
-  GtkSourceSearchContext    *search_context;
-
-  /*
-   * Tab related settings.
-   */
-  GbEditorSettings *settings;
-
-  /*
-   * Weak reference bindings for tracking settings.
-   */
-  GBinding *auto_indent_binding;
-  GBinding *font_desc_binding;
-  GBinding *highlight_current_line_binding;
-  GBinding *indent_on_tab_binding;
-  GBinding *indent_width_binding;
-  GBinding *insert_spaces_instead_of_tabs_binding;
-  GBinding *right_margin_position_binding;
-  GBinding *show_line_marks_binding;
-  GBinding *show_line_numbers_binding;
-  GBinding *show_right_margin_binding;
-  GBinding *smart_home_end_binding;
-  GBinding *style_scheme_binding;
-  GBinding *tab_width_binding;
-
-  /*
-   * Tab related widgets, filled in with GtkBuilder templates.
-   */
-  NautilusFloatingBar *floating_bar;
-  GtkButton           *go_down_button;
-  GtkButton           *go_up_button;
-  GtkOverlay          *overlay;
-  GtkBox              *preview_container;
-  GtkProgressBar      *progress_bar;
-  GtkRevealer         *revealer;
-  GtkScrolledWindow   *scroller;
-  GbSourceView        *source_view;
-  GdTaggedEntry       *search_entry;
-  GdTaggedEntryTag    *search_entry_tag;
-
-  /*
-   * Information about our target file and encoding.
-   */
-  GtkSourceFile *file;
-
-  /*
-   * Animation for save progress.
-   */
-  GbAnimation *save_animation;
-};
-
 enum {
   PROP_0,
   PROP_DOCUMENT,
diff --git a/src/gnome-builder.mk b/src/gnome-builder.mk
index 5df19fc..a693911 100644
--- a/src/gnome-builder.mk
+++ b/src/gnome-builder.mk
@@ -22,6 +22,7 @@ gnome_builder_SOURCES = \
        src/editor/gb-editor-settings.h \
        src/editor/gb-editor-tab.c \
        src/editor/gb-editor-tab.h \
+       src/editor/gb-editor-tab-private.h \
        src/editor/gb-editor-workspace.c \
        src/editor/gb-editor-workspace.h \
        src/editor/gb-source-formatter.c \


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