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
This commit is contained in:
Colomban Wendling 2011-03-27 16:02:34 +00:00
parent e5071473c1
commit 2fcb9c6790
2 changed files with 10 additions and 17 deletions

View File

@ -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 File

@ -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);
}