Revision: 5774 http://geany.svn.sourceforge.net/geany/?rev=5774&view=rev Author: colombanw Date: 2011-05-09 13:21:45 +0000 (Mon, 09 May 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.
Re-apply this patch now the X PRIMARY selection bug is fixed in Scintilla's side (see r5692).
Modified Paths: -------------- trunk/ChangeLog trunk/plugins/splitwindow.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-05-08 17:11:23 UTC (rev 5773) +++ trunk/ChangeLog 2011-05-09 13:21:45 UTC (rev 5774) @@ -1,3 +1,10 @@ +2011-05-09 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-05-06 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/callbacks.c:
Modified: trunk/plugins/splitwindow.c =================================================================== --- trunk/plugins/splitwindow.c 2011-05-08 17:11:23 UTC (rev 5773) +++ trunk/plugins/splitwindow.c 2011-05-09 13:21:45 UTC (rev 5774) @@ -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.