SF.net SVN: geany:[5636] trunk
colombanw at users.sourceforge.net
colombanw at xxxxx
Sun Mar 27 15:02:08 UTC 2011
Revision: 5636
http://geany.svn.sourceforge.net/geany/?rev=5636&view=rev
Author: colombanw
Date: 2011-03-27 15:02:07 +0000 (Sun, 27 Mar 2011)
Log Message:
-----------
Remove widget reparenting in Split Window plugin
Instead of reparenting the documents notebook full of
ScintillaObjects, just ref it, remove it from the old parent, add
it to the new parent, and then unref it. This fixes the display
issue on Windows and seems to have no issues on Linux.
Patch by Matthew Brush, thanks.
Closes #2725342.
Modified Paths:
--------------
trunk/ChangeLog
trunk/plugins/splitwindow.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-03-27 11:20:21 UTC (rev 5635)
+++ trunk/ChangeLog 2011-03-27 15:02:07 UTC (rev 5636)
@@ -1,3 +1,10 @@
+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 11:20:21 UTC (rev 5635)
+++ trunk/plugins/splitwindow.c 2011-03-27 15:02:07 UTC (rev 5636)
@@ -307,15 +307,15 @@
set_state(horizontal ? STATE_SPLIT_HORIZONTAL : STATE_SPLIT_VERTICAL);
- /* 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"));
+ gtk_widget_ref(notebook);
+ gtk_container_remove(GTK_CONTAINER(parent), notebook);
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,10 +358,8 @@
g_return_if_fail(edit_window.editor);
- /* 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"));
+ gtk_widget_ref(notebook);
+ gtk_container_remove(GTK_CONTAINER(pane), notebook);
if (edit_window.sci != NULL && edit_window.handler_id > 0)
{
@@ -372,7 +370,9 @@
gtk_widget_destroy(pane);
edit_window.editor = NULL;
edit_window.sci = NULL;
- gtk_widget_reparent(notebook, parent);
+
+ gtk_container_add(GTK_CONTAINER(parent), notebook);
+ gtk_widget_unref(notebook);
}
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