[gedit/gnome-3-14] Split a commands-private header



commit db6f9bef04db5001fd7a8a57eb6246f3dc3885a9
Author: Paolo Borelli <pborelli gnome org>
Date:   Sat Feb 21 14:21:12 2015 +0100

    Split a commands-private header
    
    This is needed so that we do not pull in gedit-notebook.h in a
    public header.

 gedit/Makefile.am                 |    1 +
 gedit/gedit-app-osx.c             |    1 +
 gedit/gedit-app.c                 |    2 +-
 gedit/gedit-commands-documents.c  |    1 +
 gedit/gedit-commands-edit.c       |    1 +
 gedit/gedit-commands-file-print.c |    1 +
 gedit/gedit-commands-file.c       |    1 +
 gedit/gedit-commands-help.c       |    1 +
 gedit/gedit-commands-private.h    |  173 +++++++++++++++++++++++++++++++++++++
 gedit/gedit-commands-search.c     |    1 +
 gedit/gedit-commands-view.c       |    1 +
 gedit/gedit-commands.h            |  142 ------------------------------
 gedit/gedit-documents-panel.c     |    1 +
 gedit/gedit-notebook-popup-menu.c |    1 +
 gedit/gedit-window.c              |    1 +
 15 files changed, 186 insertions(+), 143 deletions(-)
---
diff --git a/gedit/Makefile.am b/gedit/Makefile.am
index a2c8e81..8d4243c 100644
--- a/gedit/Makefile.am
+++ b/gedit/Makefile.am
@@ -101,6 +101,7 @@ gedit_built_sources =                       \
 gedit_NOINST_H_FILES =                         \
        gedit/gedit-close-confirmation-dialog.h \
        gedit/gedit-dirs.h                      \
+       gedit/gedit-commands-private.h          \
        gedit/gedit-documents-panel.h           \
        gedit/gedit-encodings-dialog.h          \
        gedit/gedit-encoding-items.h            \
diff --git a/gedit/gedit-app-osx.c b/gedit/gedit-app-osx.c
index c8f1ea4..cd26805 100644
--- a/gedit/gedit-app-osx.c
+++ b/gedit/gedit-app-osx.c
@@ -29,6 +29,7 @@
 #include "gedit-dirs.h"
 #include "gedit-debug.h"
 #include "gedit-commands.h"
+#include "gedit-commands-private.h"
 #include "gedit-recent.h"
 
 static GeditWindow *
diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index dc5d803..fb13961 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -37,7 +37,7 @@
 #include <girepository.h>
 #endif
 
-#include "gedit-commands.h"
+#include "gedit-commands-private.h"
 #include "gedit-notebook.h"
 #include "gedit-debug.h"
 #include "gedit-utils.h"
diff --git a/gedit/gedit-commands-documents.c b/gedit/gedit-commands-documents.c
index 721cd39..2e982bb 100644
--- a/gedit/gedit-commands-documents.c
+++ b/gedit/gedit-commands-documents.c
@@ -25,6 +25,7 @@
 #endif
 
 #include "gedit-commands.h"
+#include "gedit-commands-private.h"
 
 #include <gtk/gtk.h>
 
diff --git a/gedit/gedit-commands-edit.c b/gedit/gedit-commands-edit.c
index 948ccd5..335c7be 100644
--- a/gedit/gedit-commands-edit.c
+++ b/gedit/gedit-commands-edit.c
@@ -25,6 +25,7 @@
 #endif
 
 #include "gedit-commands.h"
+#include "gedit-commands-private.h"
 
 #include <gtk/gtk.h>
 
diff --git a/gedit/gedit-commands-file-print.c b/gedit/gedit-commands-file-print.c
index 03c20c1..b03213c 100644
--- a/gedit/gedit-commands-file-print.c
+++ b/gedit/gedit-commands-file-print.c
@@ -25,6 +25,7 @@
 #endif
 
 #include "gedit-commands.h"
+#include "gedit-commands-private.h"
 
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
diff --git a/gedit/gedit-commands-file.c b/gedit/gedit-commands-file.c
index ca42727..86dd424 100644
--- a/gedit/gedit-commands-file.c
+++ b/gedit/gedit-commands-file.c
@@ -26,6 +26,7 @@
 #endif
 
 #include "gedit-commands.h"
+#include "gedit-commands-private.h"
 
 #include <glib/gi18n.h>
 #include <gio/gio.h>
diff --git a/gedit/gedit-commands-help.c b/gedit/gedit-commands-help.c
index 5fd8030..1436a30 100644
--- a/gedit/gedit-commands-help.c
+++ b/gedit/gedit-commands-help.c
@@ -25,6 +25,7 @@
 #endif
 
 #include "gedit-commands.h"
+#include "gedit-commands-private.h"
 
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
diff --git a/gedit/gedit-commands-private.h b/gedit/gedit-commands-private.h
new file mode 100644
index 0000000..4675cb4
--- /dev/null
+++ b/gedit/gedit-commands-private.h
@@ -0,0 +1,173 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * gedit-commands.h
+ * This file is part of gedit
+ *
+ * Copyright (C) 1998, 1999 Alex Roberts, Evan Lawrence
+ * Copyright (C) 2000, 2001 Chema Celorio, Paolo Maggi
+ * Copyright (C) 2002-2005 Paolo Maggi
+ *
+ * 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 2 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 __GEDIT_COMMANDS_PRIVATE_H__
+#define __GEDIT_COMMANDS_PRIVATE_H__
+
+#include <gtksourceview/gtksource.h>
+#include <gedit/gedit-window.h>
+#include <gedit/gedit-notebook.h>
+
+G_BEGIN_DECLS
+
+/* Create titled documens for non-existing URIs */
+GSList         *_gedit_cmd_load_files_from_prompt      (GeditWindow             *window,
+                                                        GSList                  *files,
+                                                        const GtkSourceEncoding *encoding,
+                                                        gint                     line_pos,
+                                                        gint                     column_pos) 
G_GNUC_WARN_UNUSED_RESULT;
+
+void           _gedit_cmd_file_new                     (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_file_open                    (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_file_reopen_closed_tab       (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_file_save                    (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_file_save_as                 (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_file_save_all                (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_file_revert                  (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_file_print                   (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_file_close                   (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_file_close_all               (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_file_quit                    (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+
+void           _gedit_cmd_edit_undo                    (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_edit_redo                    (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_edit_cut                     (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_edit_copy                    (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_edit_paste                   (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_edit_delete                  (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_edit_select_all              (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_edit_preferences             (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_edit_overwrite_mode          (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+
+void           _gedit_cmd_view_focus_active            (GSimpleAction *action,
+                                                        GVariant      *state,
+                                                        gpointer       user_data);
+void           _gedit_cmd_view_toggle_side_panel       (GSimpleAction *action,
+                                                        GVariant      *state,
+                                                        gpointer       user_data);
+void           _gedit_cmd_view_toggle_bottom_panel     (GSimpleAction *action,
+                                                        GVariant      *state,
+                                                        gpointer       user_data);
+void           _gedit_cmd_view_toggle_fullscreen_mode  (GSimpleAction *action,
+                                                        GVariant      *state,
+                                                        gpointer       user_data);
+void           _gedit_cmd_view_leave_fullscreen_mode   (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void            _gedit_cmd_view_highlight_mode          (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+
+void           _gedit_cmd_search_find                  (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_search_find_next             (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_search_find_prev             (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_search_replace               (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_search_clear_highlight       (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_search_goto_line             (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+
+void           _gedit_cmd_documents_previous_document  (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_documents_next_document      (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_documents_move_to_new_window (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_documents_new_tab_group      (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_documents_previous_tab_group (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+void           _gedit_cmd_documents_next_tab_group     (GSimpleAction *action,
+                                                        GVariant      *parameter,
+                                                        gpointer       user_data);
+
+void           _gedit_cmd_help_contents                (GtkAction   *action,
+                                                        GeditWindow *window);
+void           _gedit_cmd_help_about                   (GtkAction   *action,
+                                                        GeditWindow *window);
+
+void           _gedit_cmd_file_close_tab               (GeditTab    *tab,
+                                                        GeditWindow *window);
+
+void           _gedit_cmd_file_close_notebook          (GeditWindow   *window,
+                                                        GeditNotebook *notebook);
+
+G_END_DECLS
+
+#endif /* __GEDIT_COMMANDS_PRIVATE_H__ */
+/* ex:set ts=8 noet: */
diff --git a/gedit/gedit-commands-search.c b/gedit/gedit-commands-search.c
index 8a5a6cc..99766f4 100644
--- a/gedit/gedit-commands-search.c
+++ b/gedit/gedit-commands-search.c
@@ -26,6 +26,7 @@
 #endif
 
 #include "gedit-commands.h"
+#include "gedit-commands-private.h"
 
 #include <string.h>
 #include <glib/gi18n.h>
diff --git a/gedit/gedit-commands-view.c b/gedit/gedit-commands-view.c
index 02d3012..2c88639 100644
--- a/gedit/gedit-commands-view.c
+++ b/gedit/gedit-commands-view.c
@@ -25,6 +25,7 @@
 #endif
 
 #include "gedit-commands.h"
+#include "gedit-commands-private.h"
 
 #include <gtk/gtk.h>
 
diff --git a/gedit/gedit-commands.h b/gedit/gedit-commands.h
index 040db40..ab70eff 100644
--- a/gedit/gedit-commands.h
+++ b/gedit/gedit-commands.h
@@ -26,7 +26,6 @@
 
 #include <gtksourceview/gtksource.h>
 #include <gedit/gedit-window.h>
-#include <gedit/gedit-notebook.h>
 
 G_BEGIN_DECLS
 
@@ -58,147 +57,6 @@ gboolean     gedit_commands_save_document_finish    (GeditDocument       *document,
 
 void            gedit_commands_save_all_documents      (GeditWindow         *window);
 
-/*
- * Non-exported functions
- */
-
-/* Create titled documens for non-existing URIs */
-GSList         *_gedit_cmd_load_files_from_prompt      (GeditWindow             *window,
-                                                        GSList                  *files,
-                                                        const GtkSourceEncoding *encoding,
-                                                        gint                     line_pos,
-                                                        gint                     column_pos) 
G_GNUC_WARN_UNUSED_RESULT;
-
-void           _gedit_cmd_file_new                     (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_file_open                    (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_file_reopen_closed_tab       (GSimpleAction *action,
-                                                        GVariant      *parameter,
-                                                        gpointer       user_data);
-void           _gedit_cmd_file_save                    (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_file_save_as                 (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_file_save_all                (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_file_revert                  (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_file_print                   (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_file_close                   (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_file_close_all               (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_file_quit                    (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-
-void           _gedit_cmd_edit_undo                    (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_edit_redo                    (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_edit_cut                     (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_edit_copy                    (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_edit_paste                   (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_edit_delete                  (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_edit_select_all              (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_edit_preferences             (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_edit_overwrite_mode          (GSimpleAction *action,
-                                                        GVariant      *parameter,
-                                                        gpointer       user_data);
-
-void           _gedit_cmd_view_focus_active            (GSimpleAction *action,
-                                                         GVariant      *state,
-                                                         gpointer       user_data);
-void           _gedit_cmd_view_toggle_side_panel       (GSimpleAction *action,
-                                                         GVariant      *state,
-                                                         gpointer       user_data);
-void           _gedit_cmd_view_toggle_bottom_panel     (GSimpleAction *action,
-                                                         GVariant      *state,
-                                                         gpointer       user_data);
-void           _gedit_cmd_view_toggle_fullscreen_mode  (GSimpleAction *action,
-                                                         GVariant      *state,
-                                                         gpointer       user_data);
-void           _gedit_cmd_view_leave_fullscreen_mode   (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void            _gedit_cmd_view_highlight_mode          (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-
-void           _gedit_cmd_search_find                  (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_search_find_next             (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_search_find_prev             (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_search_replace               (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_search_clear_highlight       (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_search_goto_line             (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-
-void           _gedit_cmd_documents_previous_document  (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_documents_next_document      (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_documents_move_to_new_window (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_documents_new_tab_group      (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_documents_previous_tab_group (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-void           _gedit_cmd_documents_next_tab_group     (GSimpleAction *action,
-                                                         GVariant      *parameter,
-                                                         gpointer       user_data);
-
-void           _gedit_cmd_help_contents                (GtkAction   *action,
-                                                        GeditWindow *window);
-void           _gedit_cmd_help_about                   (GtkAction   *action,
-                                                        GeditWindow *window);
-
-void           _gedit_cmd_file_close_tab               (GeditTab    *tab,
-                                                        GeditWindow *window);
-
-void           _gedit_cmd_file_close_notebook          (GeditWindow   *window,
-                                                        GeditNotebook *notebook);
-
 G_END_DECLS
 
 #endif /* __GEDIT_COMMANDS_H__ */
diff --git a/gedit/gedit-documents-panel.c b/gedit/gedit-documents-panel.c
index 5cd580a..834bfbd 100644
--- a/gedit/gedit-documents-panel.c
+++ b/gedit/gedit-documents-panel.c
@@ -34,6 +34,7 @@
 #include "gedit-small-button.h"
 #include "gedit-utils.h"
 #include "gedit-commands.h"
+#include "gedit-commands-private.h"
 
 typedef struct _GeditDocumentsGenericRow GeditDocumentsGenericRow;
 typedef struct _GeditDocumentsGenericRow GeditDocumentsGroupRow;
diff --git a/gedit/gedit-notebook-popup-menu.c b/gedit/gedit-notebook-popup-menu.c
index 58cf78e..6b5468e 100644
--- a/gedit/gedit-notebook-popup-menu.c
+++ b/gedit/gedit-notebook-popup-menu.c
@@ -24,6 +24,7 @@
 
 #include "gedit-app.h"
 #include "gedit-commands.h"
+#include "gedit-commands-private.h"
 #include "gedit-multi-notebook.h"
 
 struct _GeditNotebookPopupMenuPrivate
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index fd6f128..d9c53a1 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -40,6 +40,7 @@
 #include "gedit-statusbar.h"
 #include "gedit-utils.h"
 #include "gedit-commands.h"
+#include "gedit-commands-private.h"
 #include "gedit-debug.h"
 #include "gedit-documents-panel.h"
 #include "gedit-plugins-engine.h"


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