SF.net SVN: geany:[5640] trunk

colombanw at users.sourceforge.net colombanw at xxxxx
Sun Mar 27 16:02:35 UTC 2011


Revision: 5640
          http://geany.svn.sourceforge.net/geany/?rev=5640&view=rev
Author:   colombanw
Date:     2011-03-27 16:02:34 +0000 (Sun, 27 Mar 2011)

Log Message:
-----------
Revert r5636 "Remove widget reparenting in Split Window plugin"

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

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/plugins/splitwindow.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2011-03-27 16:02:21 UTC (rev 5639)
+++ trunk/ChangeLog	2011-03-27 16:02:34 UTC (rev 5640)
@@ -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:

Modified: trunk/plugins/splitwindow.c
===================================================================
--- trunk/plugins/splitwindow.c	2011-03-27 16:02:21 UTC (rev 5639)
+++ trunk/plugins/splitwindow.c	2011-03-27 16:02:34 UTC (rev 5640)
@@ -307,15 +307,15 @@
 
 	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_widget_reparent(notebook, pane);
 
-	gtk_container_add(GTK_CONTAINER(pane), notebook);
-	gtk_widget_unref(notebook);
-
 	box = gtk_vbox_new(FALSE, 0);
 	toolbar = create_toolbar();
 	gtk_box_pack_start(GTK_BOX(box), toolbar, FALSE, FALSE, 0);
@@ -358,8 +358,10 @@
 
 	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 @@
 	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);
 }
 
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list