Skip to content
Browse files

Revert r5636 "Remove widget reparenting in Split Window plugin"

It breaks the X PRIMARY selection on the normal Geany editor.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5640 ea778897-0a13-0410-b9d1-a72fbfd435f5
  • Loading branch information...
1 parent e507147 commit 2fcb9c67901a5421169c5f79292d67755dcc3a0c @b4n b4n committed Mar 27, 2011
Showing with 10 additions and 17 deletions.
  1. +0 −7 ChangeLog
  2. +10 −10 plugins/splitwindow.c
View
7 ChangeLog
@@ -6,13 +6,6 @@
plugins need it.
-2011-03-27 Colomban Wendling <colomban(at)geany(dot)org>
-
- * plugins/splitwindow.c:
- Remove widget reparenting in Split Window plugin. This fixes plugin
- issues on Windows (patch by Matthew Brush, thanks - closes #2725342).
-
-
2011-03-26 Colomban Wendling <colomban(at)geany(dot)org>
* src/sidebar.c:
View
20 plugins/splitwindow.c
@@ -307,14 +307,14 @@ static void split_view(gboolean horizontal)
set_state(horizontal ? STATE_SPLIT_HORIZONTAL : STATE_SPLIT_VERTICAL);
- gtk_widget_ref(notebook);
- gtk_container_remove(GTK_CONTAINER(parent), notebook);
+ /* 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"));
pane = horizontal ? gtk_hpaned_new() : gtk_vpaned_new();
gtk_container_add(GTK_CONTAINER(parent), pane);
-
- gtk_container_add(GTK_CONTAINER(pane), notebook);
- gtk_widget_unref(notebook);
+ gtk_widget_reparent(notebook, pane);
box = gtk_vbox_new(FALSE, 0);
toolbar = create_toolbar();
@@ -358,8 +358,10 @@ static void on_unsplit(GtkMenuItem *menuitem, gpointer user_data)
g_return_if_fail(edit_window.editor);
- gtk_widget_ref(notebook);
- gtk_container_remove(GTK_CONTAINER(pane), notebook);
+ /* 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"));
if (edit_window.sci != NULL && edit_window.handler_id > 0)
{
@@ -370,9 +372,7 @@ static void on_unsplit(GtkMenuItem *menuitem, gpointer user_data)
gtk_widget_destroy(pane);
edit_window.editor = NULL;
edit_window.sci = NULL;
-
- gtk_container_add(GTK_CONTAINER(parent), notebook);
- gtk_widget_unref(notebook);
+ gtk_widget_reparent(notebook, parent);
}

0 comments on commit 2fcb9c6

Please sign in to comment.
Something went wrong with that request. Please try again.