[balsa] HAVE_GNOME is redundant



commit c8f829d1fae08e6a1994fce6b66b44881ee3fa69
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Tue Sep 19 17:47:39 2017 -0400

    HAVE_GNOME is redundant
    
        * configure.ac: do not define it.
        * libbalsa/filter-file.c (libbalsa_condition_new_2_0): do not
        refer to it.
        * src/toolbar-factory.c (balsa_toolbar_model_finalize),
        (tm_gsettings_change_cb), (balsa_toolbar_model_new),
        (tm_default_style): use GSettings without checking it.

 ChangeLog              |   11 +++++++++++
 configure.ac           |    1 -
 libbalsa/filter-file.c |    2 --
 src/toolbar-factory.c  |   10 ----------
 4 files changed, 11 insertions(+), 13 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 009375c..aa5edfd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2017-09-19  Peter Bloomfield  <pbloomfield bellsouth net>
+
+       HAVE_GNOME is redundant
+
+       * configure.ac: do not define it.
+       * libbalsa/filter-file.c (libbalsa_condition_new_2_0): do not
+       refer to it.
+       * src/toolbar-factory.c (balsa_toolbar_model_finalize),
+       (tm_gsettings_change_cb), (balsa_toolbar_model_new),
+       (tm_default_style): use GSettings without checking it.
+
 2017-09-14  Peter Bloomfield  <pbloomfield bellsouth net>
 
        Allow installing the help files
diff --git a/configure.ac b/configure.ac
index acf96b2..44ce414 100644
--- a/configure.ac
+++ b/configure.ac
@@ -250,7 +250,6 @@ if test x$with_gnome != xno; then
      fi
      AC_MSG_RESULT($with_gnome_keyring)
    fi
-   AC_DEFINE(HAVE_GNOME,1,[Defined when building for GNOME.])
 else
    TOOLKIT_CATEGORIES="GTK;"
    gnome_extras=""
diff --git a/libbalsa/filter-file.c b/libbalsa/filter-file.c
index c0cb359..07951c3 100644
--- a/libbalsa/filter-file.c
+++ b/libbalsa/filter-file.c
@@ -201,7 +201,6 @@ libbalsa_mailbox_filters_save_config(LibBalsaMailbox * mbox)
     g_free(filters_names);
 }
 
-/* FIXME: #ifdef HAVE_GNOME ?? */
 /* Temporary code for transition from 2.0.x */
 static LibBalsaCondition *
 libbalsa_condition_new_from_config()
@@ -387,4 +386,3 @@ libbalsa_condition_new_2_0(const gchar * filter_section_name,
     /* else we leak the list and structures?? */
     return cond_2_0;
 }
-/* #endif *//* HAVE_GNOME */
diff --git a/src/toolbar-factory.c b/src/toolbar-factory.c
index 8a824d4..f044d4a 100644
--- a/src/toolbar-factory.c
+++ b/src/toolbar-factory.c
@@ -50,9 +50,7 @@ struct BalsaToolbarModel_ {
     GArray          *current;
     BalsaToolbarType type;
     GtkToolbarStyle  style;
-#if HAVE_GNOME
     GSettings       *settings;
-#endif /* HAVE_GNOME */
 };
 
 enum {
@@ -72,12 +70,10 @@ balsa_toolbar_model_finalize(GObject * object)
         g_hash_table_destroy(model->legal);
         model->legal = NULL;
     }
-#if HAVE_GNOME
     if (model->settings) {
         g_object_unref(model->settings);
         model->settings = NULL;
     }
-#endif /* HAVE_GNOME */
     G_OBJECT_CLASS(parent_class)->finalize(object);
 }
 
@@ -280,7 +276,6 @@ tm_save_model(BalsaToolbarModel * model)
     libbalsa_conf_pop_group();
 }
 
-#if HAVE_GNOME
 /* GSettings change_cb
  */
 static void
@@ -294,7 +289,6 @@ tm_gsettings_change_cb(GSettings   * settings,
         model->style == (GtkToolbarStyle) (-1))
         balsa_toolbar_model_changed(model);
 }
-#endif /* HAVE_GNOME */
 
 /* Create a BalsaToolbarModel structure.
  */
@@ -322,11 +316,9 @@ balsa_toolbar_model_new(BalsaToolbarType          type,
     balsa_toolbar_model_add_entries(model, entries, n_entries);
     tm_load_model(model);
 
-#if HAVE_GNOME
     model->settings = g_settings_new("org.gnome.desktop.interface");
     g_signal_connect(model->settings, "changed",
                      G_CALLBACK(tm_gsettings_change_cb), model);
-#endif /* HAVE_GNOME */
 
     return model;
 }
@@ -504,7 +496,6 @@ static GtkToolbarStyle
 tm_default_style(void)
 {
     GtkToolbarStyle default_style = GTK_TOOLBAR_BOTH;
-#if HAVE_GNOME
     GSettings *settings;
     gchar *str;
 
@@ -522,7 +513,6 @@ tm_default_style(void)
         g_free(str);
     }
     g_object_unref(settings);
-#endif /* HAVE_GNOME */
 
     return default_style;
 }


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