[evolution/gnome-3-28] Ensure transient parent for ETimezoneDialog



commit 9e4275f5f10f38d57ca01944b51a0e2b1fd797ae
Author: Milan Crha <mcrha redhat com>
Date:   Tue Apr 3 14:17:54 2018 +0200

    Ensure transient parent for ETimezoneDialog
    
    Except of the second timezone selection, which required API change,
    thus it's part of the development version only (3.29.1+).

 src/calendar/gui/e-timezone-entry.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/calendar/gui/e-timezone-entry.c b/src/calendar/gui/e-timezone-entry.c
index 3757528..6ef670f 100644
--- a/src/calendar/gui/e-timezone-entry.c
+++ b/src/calendar/gui/e-timezone-entry.c
@@ -158,6 +158,7 @@ static void
 timezone_entry_button_clicked_cb (ETimezoneEntry *timezone_entry)
 {
        ETimezoneDialog *timezone_dialog;
+       GtkWidget *toplevel;
        GtkWidget *dialog;
        icaltimezone *timezone;
 
@@ -168,6 +169,10 @@ timezone_entry_button_clicked_cb (ETimezoneEntry *timezone_entry)
 
        dialog = e_timezone_dialog_get_toplevel (timezone_dialog);
 
+       toplevel = gtk_widget_get_toplevel (GTK_WIDGET (timezone_entry));
+       if (GTK_IS_WINDOW (toplevel))
+               gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (toplevel));
+
        if (gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_ACCEPT)
                goto exit;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]