tags 627711 + patch
thanks

On Sat, Jul 30, 2011 at 12:26 AM, Theppitak Karoonboonyanan
<t...@linux.thai.net> wrote:

> I've been trying to fix this for myself, the derived ConnectDialog class
> appears to partially use the glade UI file, not the whole. Only the
> GtkScrolledWindow and GtkTreeView are referenced, not even the action
> buttons at the bottom. Instead, the buttons are explicitly created
> by the init function itself. This is broken somehow, and the bug still
> happens even in upstream git master. Looks like it's under unfinished
> development.
>
> My workaround is not to use the glade file at all. Just call GTK+
> functions directy to construct the widgets, as in the attached patch.
> (Note that this has yet to be done to other Glade-based UIs in the
> program as well.)

I think I've found a more correct patch: the "toplevel" scrolled box
should be re-parented from the Glade design to the actual dialog's
vbox.

With this, I also fix the dcc-dialog (file transfer) in the same manner.

Regards,
-- 
Theppitak Karoonboonyanan
http://linux.thai.net/~thep/
Index: xchat-gnome-0.30.0~git20100421.29cc76/src/fe-gnome/connect-dialog.c
===================================================================
--- xchat-gnome-0.30.0~git20100421.29cc76.orig/src/fe-gnome/connect-dialog.c	2011-07-30 04:19:50.211908297 +0700
+++ xchat-gnome-0.30.0~git20100421.29cc76/src/fe-gnome/connect-dialog.c	2011-07-30 04:21:29.099913628 +0700
@@ -154,6 +154,8 @@
 	GtkTreeViewColumn *column = gtk_tree_view_column_new_with_attributes ("name", renderer, "text", 0, NULL);
 	gtk_tree_view_append_column (GTK_TREE_VIEW (dialog->server_list), column);
 
+	gtk_widget_reparent (dialog->toplevel, GTK_DIALOG(dialog)->vbox);
+
 	GtkWidget *button = gtk_button_new_with_mnemonic (_("C_onnect"));
 	gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
 	gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK);
Index: xchat-gnome-0.30.0~git20100421.29cc76/src/fe-gnome/dcc-window.c
===================================================================
--- xchat-gnome-0.30.0~git20100421.29cc76.orig/src/fe-gnome/dcc-window.c	2011-07-30 04:22:04.623915540 +0700
+++ xchat-gnome-0.30.0~git20100421.29cc76/src/fe-gnome/dcc-window.c	2011-07-30 04:25:13.783925734 +0700
@@ -109,6 +109,8 @@
 
 	gtk_tree_view_set_model (GTK_TREE_VIEW (window->transfer_list), GTK_TREE_MODEL (window->transfer_store));
 
+	gtk_widget_reparent (window->toplevel, window);
+
 	gtk_container_set_border_width (GTK_CONTAINER (window), 12);
 
 	gtk_window_set_default_size (GTK_WINDOW (window), 300, 400);

Reply via email to