[balsa] Deprecation cleanup: gtk_window_present()



commit 05e7c7ea758a2427eeaf37f6032d34489b65d92d
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Sat Feb 23 19:33:18 2019 -0500

    Deprecation cleanup: gtk_window_present()
    
    gtk_window_present() will be deprecated in later versions of
    Gtk-3.24, in favor of gtk_window_present_with_time().
    
    We never have a time-stamp readily available, so just pass
    gtk_get_current_event_time().
    
    * libbalsa/identity.c (libbalsa_identity_select_dialog),
    (libbalsa_identity_config_dialog):
    * libbalsa/smtp-server.c (libbalsa_smtp_server_dialog):
    * src/address-book-config.c (balsa_address_book_config_new):
    * src/balsa-index.c (balsa_index_pipe):
    * src/filter-edit-dialog.c (filters_edit_dialog):
    * src/filter-export-dialog.c (filters_export_dialog):
    * src/filter-run-dialog.c (filters_run_dialog):
    * src/folder-conf.c (folder_conf_imap_node),
    (folder_conf_imap_sub_node):
    * src/mailbox-conf.c (mailbox_conf_new), (mailbox_conf_edit):
    * src/main-window.c (check_new_messages_real):
    * src/main.c (balsa_activate_cb), (handle_remote):
    * src/message-window.c (mw_set_selected), (message_window_new):
    * src/pref-manager.c (open_preferences_manager):
    * src/sendmsg-window.c (address_book_cb),
    (sw_spell_check_activated), (sendmsg_window_continue):
    * src/store-address.c (balsa_store_address_from_messages):
    * src/toolbar-prefs.c (customize_dialog_cb):

 ChangeLog                  | 28 ++++++++++++++++++++++++++++
 libbalsa/identity.c        |  6 ++++--
 libbalsa/smtp-server.c     |  3 ++-
 src/address-book-config.c  |  3 ++-
 src/balsa-index.c          |  3 ++-
 src/filter-edit-dialog.c   |  3 ++-
 src/filter-export-dialog.c |  3 ++-
 src/filter-run-dialog.c    |  3 ++-
 src/folder-conf.c          |  6 ++++--
 src/mailbox-conf.c         |  6 ++++--
 src/main-window.c          |  3 ++-
 src/main.c                 |  6 ++++--
 src/message-window.c       |  6 ++++--
 src/pref-manager.c         |  3 ++-
 src/sendmsg-window.c       |  9 ++++++---
 src/store-address.c        |  3 ++-
 src/toolbar-prefs.c        |  3 ++-
 17 files changed, 74 insertions(+), 23 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ca826ea08..572d6ecc0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+2019-02-23  Peter Bloomfield  <pbloomfield bellsouth net>
+
+       gtk_window_present() will be deprecated in later versions of
+       Gtk-2.24, in favor of gtk_window_present_with_time().
+
+       We never have a time-stamp readily available, so just pass
+       gtk_get_current_event_time().
+
+       * libbalsa/identity.c (libbalsa_identity_select_dialog),
+       (libbalsa_identity_config_dialog):
+       * libbalsa/smtp-server.c (libbalsa_smtp_server_dialog):
+       * src/address-book-config.c (balsa_address_book_config_new):
+       * src/balsa-index.c (balsa_index_pipe):
+       * src/filter-edit-dialog.c (filters_edit_dialog):
+       * src/filter-export-dialog.c (filters_export_dialog):
+       * src/filter-run-dialog.c (filters_run_dialog):
+       * src/folder-conf.c (folder_conf_imap_node),
+       (folder_conf_imap_sub_node):
+       * src/mailbox-conf.c (mailbox_conf_new), (mailbox_conf_edit):
+       * src/main-window.c (check_new_messages_real):
+       * src/main.c (balsa_activate_cb), (handle_remote):
+       * src/message-window.c (mw_set_selected), (message_window_new):
+       * src/pref-manager.c (open_preferences_manager):
+       * src/sendmsg-window.c (address_book_cb),
+       (sw_spell_check_activated), (sendmsg_window_continue):
+       * src/store-address.c (balsa_store_address_from_messages):
+       * src/toolbar-prefs.c (customize_dialog_cb):
+
 2019-02-23  Peter Bloomfield  <pbloomfield bellsouth net>
 
        * libbalsa/html.c: simpler regular expression for non-cid schemes.
diff --git a/libbalsa/identity.c b/libbalsa/identity.c
index 289e7a40b..ac4c1770e 100644
--- a/libbalsa/identity.c
+++ b/libbalsa/identity.c
@@ -458,7 +458,8 @@ libbalsa_identity_select_dialog(GtkWindow * parent,
     sdi = g_object_get_data(G_OBJECT(parent),
                             LIBBALSA_IDENTITY_SELECT_DIALOG_KEY);
     if (sdi) {
-        gtk_window_present(GTK_WINDOW(sdi->dialog));
+        gtk_window_present_with_time(GTK_WINDOW(sdi->dialog),
+                                     gtk_get_current_event_time());
         return;
     }
 
@@ -1780,7 +1781,8 @@ libbalsa_identity_config_dialog(GtkWindow *parent, GList **identities,
 
     /* Show only one dialog at a time. */
     if (dialog) {
-        gtk_window_present(GTK_WINDOW(dialog));
+        gtk_window_present_with_time(GTK_WINDOW(dialog),
+                                     gtk_get_current_event_time());
         return;
     }
 
diff --git a/libbalsa/smtp-server.c b/libbalsa/smtp-server.c
index 1ecccc0de..592caa8de 100644
--- a/libbalsa/smtp-server.c
+++ b/libbalsa/smtp-server.c
@@ -354,7 +354,8 @@ libbalsa_smtp_server_dialog(LibBalsaSmtpServer * smtp_server,
     sdi = g_object_get_data(G_OBJECT(smtp_server),
                             LIBBALSA_SMTP_SERVER_DIALOG_KEY);
     if (sdi != NULL) {
-        gtk_window_present(GTK_WINDOW(sdi->dialog));
+        gtk_window_present_with_time(GTK_WINDOW(sdi->dialog),
+                                     gtk_get_current_event_time());
         return;
     }
 
diff --git a/src/address-book-config.c b/src/address-book-config.c
index 2fdbd2545..87a7f4632 100644
--- a/src/address-book-config.c
+++ b/src/address-book-config.c
@@ -111,7 +111,8 @@ balsa_address_book_config_new(LibBalsaAddressBook * address_book,
     abc = g_object_get_data(G_OBJECT(address_book), "balsa-abc");
     if (abc) {
         /* Only one dialog per address book. */
-        gtk_window_present(GTK_WINDOW(abc->window));
+        gtk_window_present_with_time(GTK_WINDOW(abc->window),
+                                     gtk_get_current_event_time());
         return;
     }
 
diff --git a/src/balsa-index.c b/src/balsa-index.c
index 195397609..ee52f5dae 100644
--- a/src/balsa-index.c
+++ b/src/balsa-index.c
@@ -2659,7 +2659,8 @@ balsa_index_pipe(BalsaIndex * index)
         g_object_get_data(G_OBJECT(index->mailbox_node->mailbox),
                           BALSA_INDEX_PIPE_INFO);
     if (info) {
-        gtk_window_present(GTK_WINDOW(info->dialog));
+        gtk_window_present_with_time(GTK_WINDOW(info->dialog),
+                                     gtk_get_current_event_time());
         return;
     }
 
diff --git a/src/filter-edit-dialog.c b/src/filter-edit-dialog.c
index e37f80036..022d8ddda 100644
--- a/src/filter-edit-dialog.c
+++ b/src/filter-edit-dialog.c
@@ -558,7 +558,8 @@ filters_edit_dialog(GtkWindow * parent)
        return;
     }
     if (fe_already_open) {
-       gtk_window_present(GTK_WINDOW(fe_window));
+       gtk_window_present_with_time(GTK_WINDOW(fe_window),
+                                     gtk_get_current_event_time());
        return;
     }
     
diff --git a/src/filter-export-dialog.c b/src/filter-export-dialog.c
index 807b309a6..34f5d5ff5 100644
--- a/src/filter-export-dialog.c
+++ b/src/filter-export-dialog.c
@@ -65,7 +65,8 @@ filters_export_dialog(GtkWindow * parent)
        return;
     }
     if (fex_already_open) {
-       gtk_window_present(GTK_WINDOW(fex_window));
+       gtk_window_present_with_time(GTK_WINDOW(fex_window),
+                                     gtk_get_current_event_time());
        return;
     }
 
diff --git a/src/filter-run-dialog.c b/src/filter-run-dialog.c
index 6958b250c..4ebf21760 100644
--- a/src/filter-run-dialog.c
+++ b/src/filter-run-dialog.c
@@ -498,7 +498,8 @@ filters_run_dialog(LibBalsaMailbox * mbox,
     }
     if (lst) {
        /* If there was yet a dialog box for this mailbox, we raise it */
-       gtk_window_present(GTK_WINDOW(lst->data));
+       gtk_window_present_with_time(GTK_WINDOW(lst->data),
+                                     gtk_get_current_event_time());
        return;
     }
 
diff --git a/src/folder-conf.c b/src/folder-conf.c
index 95748a428..7937edb2c 100644
--- a/src/folder-conf.c
+++ b/src/folder-conf.c
@@ -228,7 +228,8 @@ folder_conf_imap_node(BalsaMailboxNode *mn)
     fcw = mn ? g_object_get_data(G_OBJECT(mn), BALSA_FOLDER_CONF_IMAP_KEY)
              : fcw_new;
     if (fcw) {
-        gtk_window_present(GTK_WINDOW(fcw->dialog));
+        gtk_window_present_with_time(GTK_WINDOW(fcw->dialog),
+                                     gtk_get_current_event_time());
         return;
     }
 
@@ -641,7 +642,8 @@ folder_conf_imap_sub_node(BalsaMailboxNode * mn)
     /* Allow only one dialog per mailbox node */
     sdd = g_object_get_data(G_OBJECT(mn), BALSA_FOLDER_CONF_IMAP_KEY);
     if (sdd) {
-        gtk_window_present(GTK_WINDOW(sdd->dialog));
+        gtk_window_present_with_time(GTK_WINDOW(sdd->dialog),
+                                     gtk_get_current_event_time());
         return;
     }
 
diff --git a/src/mailbox-conf.c b/src/mailbox-conf.c
index 9fe62f627..e491833ec 100644
--- a/src/mailbox-conf.c
+++ b/src/mailbox-conf.c
@@ -394,7 +394,8 @@ mailbox_conf_new(GType mailbox_type)
     static GtkWidget *dialog;
 
     if (dialog) {
-        gtk_window_present(GTK_WINDOW(dialog));
+        gtk_window_present_with_time(GTK_WINDOW(dialog),
+                                     gtk_get_current_event_time());
         return;
     }
 
@@ -415,7 +416,8 @@ mailbox_conf_edit(BalsaMailboxNode * mbnode)
     dialog = g_object_get_data(G_OBJECT(mbnode->mailbox),
                                BALSA_MAILBOX_CONF_DIALOG);
     if (dialog) {
-        gtk_window_present(GTK_WINDOW(dialog));
+        gtk_window_present_with_time(GTK_WINDOW(dialog),
+                                     gtk_get_current_event_time());
         return;
     }
 
diff --git a/src/main-window.c b/src/main-window.c
index 53d063289..5a7707de4 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -3297,7 +3297,8 @@ check_new_messages_real(BalsaWindow * window, gboolean background_check)
         g_debug("Already Checking Mail!");
         g_mutex_lock(&progress_dialog.mutex);
         if (progress_dialog.dialog != NULL) {
-               gtk_window_present(GTK_WINDOW(progress_dialog.dialog));
+               gtk_window_present_with_time(GTK_WINDOW(progress_dialog.dialog),
+                                             gtk_get_current_event_time());
         }
         g_mutex_unlock(&progress_dialog.mutex);
         return;
diff --git a/src/main.c b/src/main.c
index 3d686c39b..1b5e570ae 100644
--- a/src/main.c
+++ b/src/main.c
@@ -595,7 +595,8 @@ balsa_activate_cb(GApplication *application,
     const geometry_t *main_size;
 
     if (balsa_app.main_window != NULL) {
-        gtk_window_present(GTK_WINDOW(balsa_app.main_window));
+        gtk_window_present_with_time(GTK_WINDOW(balsa_app.main_window),
+                                     gtk_get_current_event_time());
         return;
     }
 
@@ -765,7 +766,8 @@ handle_remote(int argc, char **argv,
 
         if (!balsa_check_open_compose_window()) {
             /* Move the main window to the request's screen */
-            gtk_window_present(GTK_WINDOW(balsa_app.main_window));
+            gtk_window_present_with_time(GTK_WINDOW(balsa_app.main_window),
+                                         gtk_get_current_event_time());
         }
     }
 }
diff --git a/src/message-window.c b/src/message-window.c
index 0c841cbed..b9ee2e118 100644
--- a/src/message-window.c
+++ b/src/message-window.c
@@ -558,7 +558,8 @@ mw_set_selected(MessageWindow * mw, void (*select_func) (BalsaIndex *))
     if ((tmp = g_object_get_data(G_OBJECT(message),
                                  BALSA_MESSAGE_WINDOW_KEY))) {
         if (tmp == mw) {
-            gtk_window_present(GTK_WINDOW(tmp->window));
+            gtk_window_present_with_time(GTK_WINDOW(tmp->window),
+                                         gtk_get_current_event_time());
             g_object_unref(message);
             return;
         }
@@ -799,7 +800,8 @@ message_window_new(LibBalsaMailbox * mailbox, guint msgno)
     if (message 
         && (mw = g_object_get_data(G_OBJECT(message), 
                                    BALSA_MESSAGE_WINDOW_KEY))) {
-        gtk_window_present(GTK_WINDOW(mw->window));
+        gtk_window_present_with_time(GTK_WINDOW(mw->window),
+                                     gtk_get_current_event_time());
         g_object_unref(message);
         return;
     }
diff --git a/src/pref-manager.c b/src/pref-manager.c
index fcdca06b8..13e0b63b3 100644
--- a/src/pref-manager.c
+++ b/src/pref-manager.c
@@ -3274,7 +3274,8 @@ open_preferences_manager(GtkWidget * widget, gpointer data)
 
     /* only one preferences manager window */
     if (already_open) {
-        gtk_window_present(GTK_WINDOW(property_box));
+        gtk_window_present_with_time(GTK_WINDOW(property_box),
+                                     gtk_get_current_event_time());
         return;
     }
 
diff --git a/src/sendmsg-window.c b/src/sendmsg-window.c
index d66b29e9f..b757e2cfe 100644
--- a/src/sendmsg-window.c
+++ b/src/sendmsg-window.c
@@ -444,7 +444,8 @@ address_book_cb(LibBalsaAddressView * address_view,
     ab = g_object_get_data(G_OBJECT(bsmsg->window),
                            BALSA_SENDMSG_ADDRESS_BOOK_KEY);
     if (ab) {
-        gtk_window_present(GTK_WINDOW(ab));
+        gtk_window_present_with_time(GTK_WINDOW(ab),
+                                     gtk_get_current_event_time());
         return;
     }
 
@@ -6296,7 +6297,8 @@ sw_spell_check_activated(GSimpleAction * action,
 
     if (bsmsg->spell_checker) {
         if (gtk_widget_get_window(bsmsg->spell_checker)) {
-            gtk_window_present(GTK_WINDOW(bsmsg->spell_checker));
+            gtk_window_present_with_time(GTK_WINDOW(bsmsg->spell_checker),
+                                         gtk_get_current_event_time());
             return;
         } else
             /* A spell checker was created, but not shown because of
@@ -7043,7 +7045,8 @@ sendmsg_window_continue(LibBalsaMailbox * mailbox, guint msgno)
 
     if ((bsmsg = g_object_get_data(G_OBJECT(message),
                                    BALSA_SENDMSG_WINDOW_KEY))) {
-        gtk_window_present(GTK_WINDOW(bsmsg->window));
+        gtk_window_present_with_time(GTK_WINDOW(bsmsg->window),
+                                     gtk_get_current_event_time());
         return NULL;
     }
 
diff --git a/src/store-address.c b/src/store-address.c
index 0130e5233..288a3a24e 100644
--- a/src/store-address.c
+++ b/src/store-address.c
@@ -89,7 +89,8 @@ balsa_store_address_from_messages(GList * messages)
     if (!message_list) {
         /* All messages are already showing. */
         if (info)
-            gtk_window_present(GTK_WINDOW(info->dialog));
+            gtk_window_present_with_time(GTK_WINDOW(info->dialog),
+                                         gtk_get_current_event_time());
         return;
     }
 
diff --git a/src/toolbar-prefs.c b/src/toolbar-prefs.c
index f7d53670f..5164cf1a1 100644
--- a/src/toolbar-prefs.c
+++ b/src/toolbar-prefs.c
@@ -128,7 +128,8 @@ customize_dialog_cb(GtkWidget * widget, gpointer data)
 
     /* There can only be one */
     if (customize_widget) {
-        gtk_window_present(GTK_WINDOW(customize_widget));
+        gtk_window_present_with_time(GTK_WINDOW(customize_widget),
+                                     gtk_get_current_event_time());
         return;
     }
 


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