[gedit] Added _gedit_window_get_multi_notebook



commit 3ba40744b631df3620da0c5d6fc1487000c4f0c6
Author: Garrett Regier <alias301 gmail com>
Date:   Wed Jun 9 15:01:42 2010 -0700

    Added _gedit_window_get_multi_notebook

 gedit/gedit-commands-documents.c |    7 +++----
 gedit/gedit-window.c             |    8 ++++++++
 gedit/gedit-window.h             |    1 +
 3 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/gedit/gedit-commands-documents.c b/gedit/gedit-commands-documents.c
index 8a2bce4..354fc9f 100644
--- a/gedit/gedit-commands-documents.c
+++ b/gedit/gedit-commands-documents.c
@@ -38,7 +38,6 @@
 
 #include "gedit-commands.h"
 #include "gedit-window.h"
-#include "gedit-window-private.h"
 #include "gedit-notebook.h"
 #include "gedit-multi-notebook.h"
 #include "gedit-debug.h"
@@ -93,21 +92,21 @@ void
 _gedit_cmd_documents_new_tab_group (GtkAction   *action,
 				    GeditWindow *window)
 {
-	gedit_multi_notebook_add_new_notebook (window->priv->multi_notebook);
+	gedit_multi_notebook_add_new_notebook (GEDIT_MULTI_NOTEBOOK (_gedit_window_get_multi_notebook (window)));
 }
 
 void
 _gedit_cmd_documents_previous_tab_group (GtkAction   *action,
 					 GeditWindow *window)
 {
-	gedit_multi_notebook_previous_notebook (window->priv->multi_notebook);
+	gedit_multi_notebook_previous_notebook (GEDIT_MULTI_NOTEBOOK (_gedit_window_get_multi_notebook (window)));
 }
 
 void
 _gedit_cmd_documents_next_tab_group (GtkAction   *action,
 				     GeditWindow *window)
 {
-	gedit_multi_notebook_next_notebook (window->priv->multi_notebook);
+	gedit_multi_notebook_next_notebook (GEDIT_MULTI_NOTEBOOK (_gedit_window_get_multi_notebook (window)));
 }
 
 /* ex:ts=8:noet: */
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index 15b912c..7d69a3e 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -4322,6 +4322,14 @@ gedit_window_get_active_document (GeditWindow *window)
 }
 
 GtkWidget *
+_gedit_window_get_multi_notebook (GeditWindow *window)
+{
+	g_return_val_if_fail (GEDIT_IS_WINDOW (window), NULL);
+
+	return GTK_WIDGET (window->priv->multi_notebook);
+}
+
+GtkWidget *
 _gedit_window_get_notebook (GeditWindow *window)
 {
 	g_return_val_if_fail (GEDIT_IS_WINDOW (window), NULL);
diff --git a/gedit/gedit-window.h b/gedit/gedit-window.h
index 277c404..04c54af 100644
--- a/gedit/gedit-window.h
+++ b/gedit/gedit-window.h
@@ -168,6 +168,7 @@ GeditMessageBus	*gedit_window_get_message_bus		(GeditWindow         *window);
 /*
  * Non exported functions
  */
+GtkWidget	*_gedit_window_get_multi_notebook	(GeditWindow         *window);
 GtkWidget	*_gedit_window_get_notebook		(GeditWindow         *window);
 
 GeditWindow	*_gedit_window_move_tab_to_new_window	(GeditWindow         *window,



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