Updating branch refs/heads/stephan/gtk3 to ec23568d18ef0c1d0b9c4cc6458a887f29708162 (commit) from 11a64363e2b8525426e7dd707b88359c7129dc35 (commit)
commit ec23568d18ef0c1d0b9c4cc6458a887f29708162 Author: Nick Schermer <n...@xfce.org> Date: Sat May 5 11:21:55 2012 +0200 Fix problem in XfceTitledDialog. You can't unset the window of a dialog. Also keep the content_area around. libxfce4ui/xfce-titled-dialog.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libxfce4ui/xfce-titled-dialog.c b/libxfce4ui/xfce-titled-dialog.c index 4a865fa..096e3bd 100644 --- a/libxfce4ui/xfce-titled-dialog.c +++ b/libxfce4ui/xfce-titled-dialog.c @@ -117,15 +117,15 @@ xfce_titled_dialog_init (XfceTitledDialog *titled_dialog) { GtkWidget *line; GtkWidget *vbox; - - gtk_widget_set_has_window (GTK_WIDGET (titled_dialog), FALSE); + GtkWidget *content_area; /* connect the private data */ titled_dialog->priv = XFCE_TITLED_DIALOG_GET_PRIVATE (titled_dialog); /* remove the main dialog box from the window */ - g_object_ref (G_OBJECT (gtk_dialog_get_content_area(GTK_DIALOG (titled_dialog)))); - gtk_container_remove (GTK_CONTAINER (titled_dialog), gtk_dialog_get_content_area (GTK_DIALOG (titled_dialog))); + content_area = gtk_dialog_get_content_area (GTK_DIALOG (titled_dialog)); + g_object_ref (G_OBJECT (content_area)); + gtk_container_remove (GTK_CONTAINER (titled_dialog), content_area); /* add a new vbox w/o border to the main window */ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); @@ -143,8 +143,8 @@ xfce_titled_dialog_init (XfceTitledDialog *titled_dialog) gtk_widget_show (line); /* add the main dialog box to the new vbox */ - gtk_box_pack_start (GTK_BOX (vbox), gtk_dialog_get_content_area(GTK_DIALOG (titled_dialog)), TRUE, TRUE, 0); - g_object_unref (G_OBJECT(gtk_dialog_get_content_area(GTK_DIALOG (titled_dialog)))); + gtk_box_pack_start (GTK_BOX (vbox), content_area, TRUE, TRUE, 0); + g_object_unref (G_OBJECT(content_area)); /* make sure to update the heading whenever one of the relevant window properties changes */ g_signal_connect (G_OBJECT (titled_dialog), "notify::icon", G_CALLBACK (xfce_titled_dialog_update_heading), NULL); @@ -218,7 +218,7 @@ xfce_titled_dialog_close (GtkDialog *dialog) GdkEvent *event; /* verify that the dialog is realized */ - if (G_LIKELY (gtk_widget_get_realized(GTK_WIDGET (dialog)))) + if (G_LIKELY (gtk_widget_get_realized (GTK_WIDGET (dialog)))) { /* send a delete event to the dialog */ event = gdk_event_new (GDK_DELETE); _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits