diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-09-05 05:07:15 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-09-05 05:07:15 +0800 |
commit | 983fce5e535e4e203815767cf6899f6dc8c5242a (patch) | |
tree | d6ca3538c046798597275132c66be6da18733d7f /calendar/gui/e-calendar-view.c | |
parent | c95a226217a68703c48397c23ea8accc491d44e4 (diff) | |
download | gsoc2013-evolution-983fce5e535e4e203815767cf6899f6dc8c5242a.tar.gz gsoc2013-evolution-983fce5e535e4e203815767cf6899f6dc8c5242a.tar.zst gsoc2013-evolution-983fce5e535e4e203815767cf6899f6dc8c5242a.zip |
Kill the default parent window hack in e-error.c.
Fix as many cases that relied on it as I could find, but there may be
more cases out there. They should be fixed too. Passing a NULL parent
window to e_error_new() is illegal and will emit a runtime warning.
Diffstat (limited to 'calendar/gui/e-calendar-view.c')
-rw-r--r-- | calendar/gui/e-calendar-view.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index 7450cd1221..805ec939f8 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -1242,11 +1242,15 @@ e_calendar_view_new_appointment_for (ECalendarView *cal_view, icalcomponent *icalcomp; ECalComponentTransparency transparency; ECal *default_client = NULL; + gpointer parent; guint32 flags = 0; gboolean readonly = FALSE; g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view)); + parent = gtk_widget_get_toplevel (GTK_WIDGET (cal_view)); + parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; + priv = cal_view->priv; default_client = e_cal_model_get_default_client (priv->model); @@ -1259,7 +1263,7 @@ e_calendar_view_new_appointment_for (ECalendarView *cal_view, if (e_cal_is_read_only (default_client, &readonly, NULL) && readonly) { GtkWidget *widget; - widget = e_error_new (NULL, "calendar:prompt-read-only-cal", e_source_peek_name (e_cal_get_source (default_client)), NULL); + widget = e_error_new (parent, "calendar:prompt-read-only-cal", e_source_peek_name (e_cal_get_source (default_client)), NULL); g_signal_connect ((GtkDialog *)widget, "response", G_CALLBACK (gtk_widget_destroy), widget); |