[virt-tools-list] [PATCH virt-viewer 05/19] Destroy dialog immediately after run
Christophe Fergeau
cfergeau at redhat.com
Tue Jul 17 08:42:37 UTC 2012
Makes sense, ACK
On Mon, Jul 16, 2012 at 06:57:40PM +0200, Marc-André Lureau wrote:
> If the parent is already destroyed, it looks like the dialog is
> destroyed too. This avoids a crash when calling app_quit().
> ---
> src/virt-viewer-app.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
> index 40d1ff7..1447ce7 100644
> --- a/src/virt-viewer-app.c
> +++ b/src/virt-viewer-app.c
> @@ -283,6 +283,7 @@ virt_viewer_app_window_set_visible(VirtViewerApp *self,
> GTK_BUTTONS_OK_CANCEL,
> _("This is the last visible display. Do you want to quit?"));
> gint result = gtk_dialog_run (GTK_DIALOG (dialog));
> + gtk_widget_destroy(dialog);
> switch (result) {
> case GTK_RESPONSE_OK:
> virt_viewer_app_quit(self);
> @@ -290,7 +291,6 @@ virt_viewer_app_window_set_visible(VirtViewerApp *self,
> default:
> break;
> }
> - gtk_widget_destroy(dialog);
> return FALSE;
> } else {
> virt_viewer_app_quit(self);
> --
> 1.7.10.4
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20120717/9e8154f9/attachment.sig>
More information about the virt-tools-list
mailing list