From d5cd6c7fc9fc0dc6e7d22927af983dfc908fe50b Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Thu, 18 Feb 2016 15:26:56 -0200 Subject: [PATCH] window: don't block mainloop when showing dialogs By using gtk_dialog_run(), we enter in a recursive mainloop which blocks the parent's one. Because of that, we see weird things like the quick add popover not still floating around. --- src/gcal-window.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gcal-window.c b/src/gcal-window.c index ba5f8c16..83ba1a09 100644 --- a/src/gcal-window.c +++ b/src/gcal-window.c @@ -858,7 +858,7 @@ show_source_dialog (GtkButton *button, gtk_widget_hide (window->calendar_popover); - gtk_dialog_run (GTK_DIALOG (window->source_dialog)); + gtk_widget_show (window->source_dialog); } static void @@ -880,7 +880,7 @@ source_row_activated (GtkListBox *listbox, gtk_widget_hide (window->calendar_popover); - gtk_dialog_run (GTK_DIALOG (window->source_dialog)); + gtk_widget_show (window->source_dialog); } static void @@ -985,7 +985,7 @@ edit_event (GcalQuickAddPopover *popover, gcal_edit_dialog_set_event_is_new (GCAL_EDIT_DIALOG (window->edit_dialog), TRUE); gcal_edit_dialog_set_event (GCAL_EDIT_DIALOG (window->edit_dialog), event); - gtk_dialog_run (GTK_DIALOG (window->edit_dialog)); + gtk_widget_show (window->edit_dialog); } static void @@ -1004,7 +1004,7 @@ create_event_detailed_cb (GcalView *view, gcal_edit_dialog_set_event_is_new (GCAL_EDIT_DIALOG (window->edit_dialog), TRUE); gcal_edit_dialog_set_event (GCAL_EDIT_DIALOG (window->edit_dialog), event); - gtk_dialog_run (GTK_DIALOG (window->edit_dialog)); + gtk_widget_show (window->edit_dialog); g_clear_object (&comp); } @@ -1021,7 +1021,7 @@ event_activated (GcalView *view, gcal_edit_dialog_set_event_is_new (GCAL_EDIT_DIALOG (window->edit_dialog), FALSE); gcal_edit_dialog_set_event (GCAL_EDIT_DIALOG (window->edit_dialog), event); - gtk_dialog_run (GTK_DIALOG (window->edit_dialog)); + gtk_widget_show (window->edit_dialog); } static void