[balsa/gtk3] Use --with-gnome more carefully



commit 3a4d1ebe8965441ae726b88963366b3d107edb97
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Thu Mar 7 20:42:29 2013 -0500

    Use --with-gnome more carefully
    
        * configure.ac: set HAVE_GNOME when configuring --with-gnome.
        * libinit_balsa/assistant_init.c (balsa_initdruid):
        default-client makes sense on non-GNOME builds.
        * libinit_balsa/assistant_page_defclient.c
        (balsa_druid_page_defclient_toggle): ditto.
        * libinit_balsa/assistant_page_defclient.h: ditto.
        * src/main.c (config_init), (mailboxes_init): ditto.
        * src/save-restore.c (config_defclient_save): ditto.
        * src/main-window.c: gnome-triggers code is totally dead.

 ChangeLog                                |   14 ++++++++++++++
 configure.ac                             |    2 +-
 libinit_balsa/assistant_init.c           |    2 --
 libinit_balsa/assistant_page_defclient.c |    6 ------
 libinit_balsa/assistant_page_defclient.h |    6 ------
 src/main-window.c                        |    8 --------
 src/main.c                               |    4 ----
 src/save-restore.c                       |    4 ----
 8 files changed, 15 insertions(+), 31 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 552aa99..a190935 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2013-03-07  Peter Bloomfield
+
+       Use --with-gnome more carefully
+
+       * configure.ac: set HAVE_GNOME when configuring --with-gnome.
+       * libinit_balsa/assistant_init.c (balsa_initdruid):
+       default-client makes sense on non-GNOME builds.
+       * libinit_balsa/assistant_page_defclient.c
+       (balsa_druid_page_defclient_toggle): ditto.
+       * libinit_balsa/assistant_page_defclient.h: ditto.
+       * src/main.c (config_init), (mailboxes_init): ditto.
+       * src/save-restore.c (config_defclient_save): ditto.
+       * src/main-window.c: gnome-triggers code is totally dead.
+
 2013-03-06  Peter Bloomfield
 
        * src/main.c (scan_mailboxes_idle_cb): do not pass unowned
diff --git a/configure.ac b/configure.ac
index 78631af..dcdce5d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -309,8 +309,8 @@ if test x$with_gnome != xno; then
         with_gnome_keyring=no
      fi
      AC_MSG_RESULT($with_gnome_keyring)
-     AC_DEFINE(HAVE_GNOME,1,[Defined when gnome libs are available.])
    fi
+   AC_DEFINE(HAVE_GNOME,1,[Defined when building for GNOME.])
 else
    gnome_extras=""
 fi
diff --git a/libinit_balsa/assistant_init.c b/libinit_balsa/assistant_init.c
index c5558a7..240e365 100644
--- a/libinit_balsa/assistant_init.c
+++ b/libinit_balsa/assistant_init.c
@@ -121,10 +121,8 @@ balsa_initdruid(GtkAssistant * assistant)
     balsa_druid_page_user(assistant);
 #if !defined(ENABLE_TOUCH_UI)
     balsa_druid_page_directory(assistant);
-#if HAVE_GNOME
     balsa_druid_page_defclient(assistant);
 #endif
-#endif
     balsa_druid_page_finish(assistant);
 }
 
diff --git a/libinit_balsa/assistant_page_defclient.c b/libinit_balsa/assistant_page_defclient.c
index 5946029..220fc9a 100644
--- a/libinit_balsa/assistant_page_defclient.c
+++ b/libinit_balsa/assistant_page_defclient.c
@@ -24,10 +24,6 @@
 #endif                          /* HAVE_CONFIG_H */
 #include "assistant_page_defclient.h"
 
-#if HAVE_GNOME
-/* setting the default Gnome mail client doesn't make sense if we don't build
- for Gnome */
-
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -111,5 +107,3 @@ balsa_druid_page_defclient_toggle(GtkWidget * page,
     defclient->default_client = ! (defclient->default_client);
     balsa_app.default_client = defclient->default_client;
 }
-
-#endif /* HAVE_GNOME */
diff --git a/libinit_balsa/assistant_page_defclient.h b/libinit_balsa/assistant_page_defclient.h
index 1cbf484..55d7ca9 100644
--- a/libinit_balsa/assistant_page_defclient.h
+++ b/libinit_balsa/assistant_page_defclient.h
@@ -32,10 +32,6 @@
 extern "C" {
 #endif                          /* __cplusplus */
 
-#if HAVE_GNOME
-/* setting the default Gnome mail client doesn't make sense if we don't build
- for Gnome */
-
 #include "assistant_helper.h"
 #include "assistant_init.h"
 
@@ -57,8 +53,6 @@ extern "C" {
     void balsa_druid_page_defclient(GtkAssistant * druid);
     void balsa_druid_page_defclient_save(BalsaDruidPageDefclient * defclient);
 
-#endif /* HAVE_GNOME */
-
 #ifdef __cplusplus
 }
 #endif                          /* __cplusplus */
diff --git a/src/main-window.c b/src/main-window.c
index 9784b2b..7477e58 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -3458,14 +3458,6 @@ bw_display_new_mail_notification(int num_new, int has_new)
     if (num_new <= 0 && has_new <= 0)
         return;
 
-#if 0
-#if HAVE_GNOME
-    if (balsa_app.notify_new_mail_sound)
-        gnome_triggers_do("New mail has arrived", "email",
-                          "balsa", "newmail", NULL);
-#endif
-#endif
-
     if (!gtk_window_is_active(window))
         gtk_window_set_urgency_hint(window, TRUE);
 
diff --git a/src/main.c b/src/main.c
index 6843d65..74bc3a7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -232,9 +232,7 @@ config_init(gboolean check_only)
 {
     while(!config_load() && !check_only) {
        balsa_init_begin();
-#if HAVE_GNOME
         config_defclient_save();
-#endif /* HAVE_GNOME */
     }
 }
 
@@ -245,9 +243,7 @@ mailboxes_init(gboolean check_only)
     if (!balsa_app.inbox && !check_only) {
        g_warning("*** error loading mailboxes\n");
        balsa_init_begin();
-#if HAVE_GNOME
         config_defclient_save();
-#endif /* HAVE_GNOME */
        return;
     }
 }
diff --git a/src/save-restore.c b/src/save-restore.c
index 02864ab..312c75b 100644
--- a/src/save-restore.c
+++ b/src/save-restore.c
@@ -26,10 +26,8 @@
 
 #include <stdlib.h>
 #include <string.h>
-#if HAVE_GNOME
 #include <gio/gio.h>
 #include <gio/gdesktopappinfo.h>
-#endif
 #include <glib/gi18n.h>
 #include "balsa-app.h"
 #include "server.h"
@@ -2124,7 +2122,6 @@ save_mru(GList * mru, const gchar * group)
     libbalsa_conf_pop_group();
 }
 
-#if HAVE_GNOME
 void
 config_defclient_save(void)
 {
@@ -2150,4 +2147,3 @@ config_defclient_save(void)
     }
     g_object_unref(info);
 }
-#endif /* HAVE_GNOME */


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