[gedit] Move private GeditApp functions to gedit-app-private.h
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Move private GeditApp functions to gedit-app-private.h
- Date: Wed, 24 Jun 2015 16:22:48 +0000 (UTC)
commit 79eb428c121d07dd89fc9641b49287b13d5f76cc
Author: Sébastien Wilmet <swilmet gnome org>
Date: Wed Jun 24 18:16:06 2015 +0200
Move private GeditApp functions to gedit-app-private.h
It'll be useful to return a GeditSettings for _gedit_app_get_settings().
Since GeditSettings is private, it cannot appear in gedit-app.h.
gedit/Makefile.am | 1 +
gedit/gedit-app-activatable.c | 2 +-
gedit/gedit-app-osx.c | 1 +
gedit/gedit-app-private.h | 67 +++++++++++++++++++++++++++++++++++++
gedit/gedit-app.c | 1 +
gedit/gedit-app.h | 39 +--------------------
gedit/gedit-notebook-popup-menu.c | 1 +
gedit/gedit-preferences-dialog.c | 2 +
gedit/gedit-settings.c | 1 +
gedit/gedit-tab.c | 1 +
gedit/gedit-view.c | 1 +
gedit/gedit-window.c | 1 +
12 files changed, 80 insertions(+), 38 deletions(-)
---
diff --git a/gedit/Makefile.am b/gedit/Makefile.am
index 15adf68..7ff13d7 100644
--- a/gedit/Makefile.am
+++ b/gedit/Makefile.am
@@ -99,6 +99,7 @@ gedit_built_sources = \
gedit/gedit-marshal.h
gedit_NOINST_H_FILES = \
+ gedit/gedit-app-private.h \
gedit/gedit-close-confirmation-dialog.h \
gedit/gedit-commands-private.h \
gedit/gedit-dirs.h \
diff --git a/gedit/gedit-app-activatable.c b/gedit/gedit-app-activatable.c
index 5bd00d8..c2bb615 100644
--- a/gedit/gedit-app-activatable.c
+++ b/gedit/gedit-app-activatable.c
@@ -24,8 +24,8 @@
#endif
#include "gedit-app-activatable.h"
-
#include "gedit-app.h"
+#include "gedit-app-private.h"
/**
* SECTION:gedit-app-activatable
diff --git a/gedit/gedit-app-osx.c b/gedit/gedit-app-osx.c
index d7d4237..6d28e1f 100644
--- a/gedit/gedit-app-osx.c
+++ b/gedit/gedit-app-osx.c
@@ -26,6 +26,7 @@
#include <string.h>
#include <glib/gi18n.h>
+#include "gedit-app-private.h"
#include "gedit-dirs.h"
#include "gedit-debug.h"
#include "gedit-commands.h"
diff --git a/gedit/gedit-app-private.h b/gedit/gedit-app-private.h
new file mode 100644
index 0000000..b53b370
--- /dev/null
+++ b/gedit/gedit-app-private.h
@@ -0,0 +1,67 @@
+/*
+ * gedit-app-private.h
+ * This file is part of gedit
+ *
+ * Copyright (C) 2015 - Sébastien Wilmet <swilmet gnome org>
+ *
+ * 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_APP_PRIVATE_H__
+#define __GEDIT_APP_PRIVATE_H__
+
+#include "gedit-app.h"
+#include "gedit-menu-extension.h"
+
+G_BEGIN_DECLS
+
+void _gedit_app_set_lockdown (GeditApp *app,
+ GeditLockdownMask lockdown);
+
+void _gedit_app_set_lockdown_bit (GeditApp *app,
+ GeditLockdownMask bit,
+ gboolean value);
+
+/* This one is a gedit-window function, but we declare it here to avoid
+ * #include headaches since it needs the GeditLockdownMask declaration.
+ */
+void _gedit_window_set_lockdown (GeditWindow *window,
+ GeditLockdownMask lockdown);
+
+/* global print config */
+GtkPageSetup *_gedit_app_get_default_page_setup (GeditApp *app);
+void _gedit_app_set_default_page_setup (GeditApp *app,
+ GtkPageSetup *page_setup);
+GtkPrintSettings *_gedit_app_get_default_print_settings (GeditApp *app);
+void _gedit_app_set_default_print_settings (GeditApp *app,
+ GtkPrintSettings *settings);
+
+GObject *_gedit_app_get_settings (GeditApp *app);
+
+GMenuModel *_gedit_app_get_window_menu (GeditApp *app);
+
+GMenuModel *_gedit_app_get_notebook_menu (GeditApp *app);
+
+GMenuModel *_gedit_app_get_tab_width_menu (GeditApp *app);
+
+GMenuModel *_gedit_app_get_line_col_menu (GeditApp *app);
+
+GeditMenuExtension *_gedit_app_extend_menu (GeditApp *app,
+ const gchar *extension_point);
+
+G_END_DECLS
+
+#endif /* __GEDIT_APP_PRIVATE_H__ */
+
+/* ex:set ts=8 noet: */
diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index 91166e9..918490a 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -23,6 +23,7 @@
#endif
#include "gedit-app.h"
+#include "gedit-app-private.h"
#include <string.h>
#include <unistd.h>
diff --git a/gedit/gedit-app.h b/gedit/gedit-app.h
index 85c3b31..bc023fd 100644
--- a/gedit/gedit-app.h
+++ b/gedit/gedit-app.h
@@ -22,9 +22,7 @@
#define __GEDIT_APP_H__
#include <gtk/gtk.h>
-
#include <gedit/gedit-window.h>
-#include <gedit/gedit-menu-extension.h>
G_BEGIN_DECLS
@@ -91,41 +89,8 @@ gboolean gedit_app_process_window_event (GeditApp *app,
GeditWindow *window,
GdkEvent *event);
-/* Non exported functions */
-void _gedit_app_set_lockdown (GeditApp *app,
- GeditLockdownMask lockdown);
-void _gedit_app_set_lockdown_bit (GeditApp *app,
- GeditLockdownMask bit,
- gboolean value);
-/*
- * This one is a gedit-window function, but we declare it here to avoid
- * #include headaches since it needs the GeditLockdownMask declaration.
- */
-void _gedit_window_set_lockdown (GeditWindow *window,
- GeditLockdownMask lockdown);
-
-/* global print config */
-GtkPageSetup *_gedit_app_get_default_page_setup (GeditApp *app);
-void _gedit_app_set_default_page_setup (GeditApp *app,
- GtkPageSetup *page_setup);
-GtkPrintSettings *_gedit_app_get_default_print_settings (GeditApp *app);
-void _gedit_app_set_default_print_settings (GeditApp *app,
- GtkPrintSettings *settings);
-
-GObject *_gedit_app_get_settings (GeditApp *app);
-
-GMenuModel *_gedit_app_get_window_menu (GeditApp *app);
-
-GMenuModel *_gedit_app_get_notebook_menu (GeditApp *app);
-
-GMenuModel *_gedit_app_get_tab_width_menu (GeditApp *app);
-
-GMenuModel *_gedit_app_get_line_col_menu (GeditApp *app);
-
-GeditMenuExtension *_gedit_app_extend_menu (GeditApp *app,
- const gchar *extension_point);
-
G_END_DECLS
-#endif /* __GEDIT_APP_H__ */
+#endif /* __GEDIT_APP_H__ */
+
/* ex:set ts=8 noet: */
diff --git a/gedit/gedit-notebook-popup-menu.c b/gedit/gedit-notebook-popup-menu.c
index d36d7b1..bc3c3ac 100644
--- a/gedit/gedit-notebook-popup-menu.c
+++ b/gedit/gedit-notebook-popup-menu.c
@@ -23,6 +23,7 @@
#include <glib/gi18n.h>
#include "gedit-app.h"
+#include "gedit-app-private.h"
#include "gedit-commands-private.h"
#include "gedit-multi-notebook.h"
diff --git a/gedit/gedit-preferences-dialog.c b/gedit/gedit-preferences-dialog.c
index 3a84362..1f8b89d 100644
--- a/gedit/gedit-preferences-dialog.c
+++ b/gedit/gedit-preferences-dialog.c
@@ -41,6 +41,8 @@
#include "gedit-settings.h"
#include "gedit-utils.h"
#include "gedit-file-chooser-dialog.h"
+#include "gedit-app.h"
+#include "gedit-app-private.h"
/*
* gedit-preferences dialog is a singleton since we don't
diff --git a/gedit/gedit-settings.c b/gedit/gedit-settings.c
index baf8008..0224a43 100644
--- a/gedit/gedit-settings.c
+++ b/gedit/gedit-settings.c
@@ -31,6 +31,7 @@
#include <gtksourceview/gtksource.h>
#include "gedit-app.h"
+#include "gedit-app-private.h"
#include "gedit-view.h"
#include "gedit-window.h"
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index d2aa993..87c94f8 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -30,6 +30,7 @@
#include <glib/gi18n.h>
#include "gedit-app.h"
+#include "gedit-app-private.h"
#include "gedit-recent.h"
#include "gedit-utils.h"
#include "gedit-io-error-info-bar.h"
diff --git a/gedit/gedit-view.c b/gedit/gedit-view.c
index 7b7d650..3327084 100644
--- a/gedit/gedit-view.c
+++ b/gedit/gedit-view.c
@@ -39,6 +39,7 @@
#include "gedit-utils.h"
#include "gedit-settings.h"
#include "gedit-app.h"
+#include "gedit-app-private.h"
#include "gedit-notebook.h"
#define GEDIT_VIEW_SCROLL_MARGIN 0.02
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index ab579fa..a9bd648 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -33,6 +33,7 @@
#include "gedit-window-private.h"
#include "gedit-app.h"
+#include "gedit-app-private.h"
#include "gedit-recent.h"
#include "gedit-notebook.h"
#include "gedit-notebook-popup-menu.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]