Created
March 27, 2011 20:53
-
-
Save codebrainz/889597 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/plugins/splitwindow.c b/plugins/splitwindow.c | |
index ff67508..f5a2d8c 100644 | |
--- a/plugins/splitwindow.c | |
+++ b/plugins/splitwindow.c | |
@@ -307,14 +307,25 @@ static void split_view(gboolean horizontal) | |
set_state(horizontal ? STATE_SPLIT_HORIZONTAL : STATE_SPLIT_VERTICAL); | |
+#ifndef G_OS_WIN32 | |
/* temporarily put document notebook in main vbox (scintilla widgets must stay | |
* in a visible parent window, otherwise there are X selection and scrollbar issues) */ | |
gtk_widget_reparent(notebook, | |
ui_lookup_widget(geany->main_widgets->window, "vbox1")); | |
+#else | |
+ gtk_widget_ref(notebook); | |
+ gtk_container_remove(GTK_CONTAINER(parent), notebook); | |
+#endif | |
pane = horizontal ? gtk_hpaned_new() : gtk_vpaned_new(); | |
gtk_container_add(GTK_CONTAINER(parent), pane); | |
+ | |
+#ifndef G_OS_WIN32 | |
gtk_widget_reparent(notebook, pane); | |
+#else | |
+ gtk_container_add(GTK_CONTAINER(pane), notebook); | |
+ gtk_widget_unref(notebook); | |
+#endif | |
box = gtk_vbox_new(FALSE, 0); | |
toolbar = create_toolbar(); | |
@@ -358,10 +369,15 @@ static void on_unsplit(GtkMenuItem *menuitem, gpointer user_data) | |
g_return_if_fail(edit_window.editor); | |
+#ifndef G_OS_WIN32 | |
/* temporarily put document notebook in main vbox (scintilla widgets must stay | |
* in a visible parent window, otherwise there are X selection and scrollbar issues) */ | |
gtk_widget_reparent(notebook, | |
ui_lookup_widget(geany->main_widgets->window, "vbox1")); | |
+#else | |
+ gtk_widget_ref(notebook); | |
+ gtk_container_remove(GTK_CONTAINER(pane), notebook); | |
+#endif | |
if (edit_window.sci != NULL && edit_window.handler_id > 0) | |
{ | |
@@ -372,7 +388,13 @@ static void on_unsplit(GtkMenuItem *menuitem, gpointer user_data) | |
gtk_widget_destroy(pane); | |
edit_window.editor = NULL; | |
edit_window.sci = NULL; | |
+ | |
+#ifndef G_OS_WIN32 | |
gtk_widget_reparent(notebook, parent); | |
+#else | |
+ gtk_container_add(GTK_CONTAINER(parent), notebook); | |
+ gtk_widget_unref(notebook); | |
+#endif | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment