[balsa/application-notification] main: Present the main-window, if it exists



commit 5569d8e88ac41ff5dd5b23dbdfbc16675610aa3c
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Sun Jun 24 18:03:05 2018 -0400

    main: Present the main-window, if it exists
    
            * src/main.c (balsa_activate_cb): Present the main-window, if we
            already have one.

 ChangeLog  | 5 +++++
 src/main.c | 5 +++++
 2 files changed, 10 insertions(+)
---
diff --git a/ChangeLog b/ChangeLog
index 4ad207f6c..ae0c63cd3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-06-24  Peter Bloomfield  <pbloomfield bellsouth net>
+
+       * src/main.c (balsa_activate_cb): Present the main-window, if we
+       already have one.
+
 2018-06-23  Peter Bloomfield  <pbloomfield bellsouth net>
 
        Migrate from libnotify to GNotification
diff --git a/src/main.c b/src/main.c
index a6a34aa4e..afbcee3f3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -581,6 +581,11 @@ balsa_activate_cb(GApplication *application,
 {
     GtkWidget *window;
 
+    if (balsa_app.main_window != NULL) {
+        gtk_window_present(GTK_WINDOW(balsa_app.main_window));
+        return;
+    }
+
     window = balsa_window_new(GTK_APPLICATION(application));
     balsa_app.main_window = BALSA_WINDOW(window);
     g_object_add_weak_pointer(G_OBJECT(window),


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