[gnome-calendar] window: don't block mainloop when showing dialogs
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] window: don't block mainloop when showing dialogs
- Date: Thu, 18 Feb 2016 17:28:33 +0000 (UTC)
commit d5cd6c7fc9fc0dc6e7d22927af983dfc908fe50b
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Feb 18 15:26:56 2016 -0200
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 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/gcal-window.c b/src/gcal-window.c
index ba5f8c1..83ba1a0 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]