[gnome-commander] Removes not needed code as of increase of GLIB version in commit d6bf27d, part 2



commit e26455b41c898ec9d614818cf64aa5439a4cb686
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Fri Apr 28 19:11:33 2017 +0200

    Removes not needed code as of increase of GLIB version in commit d6bf27d, part 2

 src/dialogs/gnome-cmd-advrename-regex-dialog.cc |    7 -------
 src/gnome-cmd-data.cc                           |    2 --
 src/intviewer/image-render.cc                   |    4 ----
 src/main.cc                                     |    4 ----
 src/owner.cc                                    |   14 --------------
 src/owner.h                                     |    2 --
 src/tags/gnome-cmd-tags-poppler.cc              |    5 -----
 7 files changed, 0 insertions(+), 38 deletions(-)
---
diff --git a/src/dialogs/gnome-cmd-advrename-regex-dialog.cc b/src/dialogs/gnome-cmd-advrename-regex-dialog.cc
index 82334f6..d5e8b5c 100644
--- a/src/dialogs/gnome-cmd-advrename-regex-dialog.cc
+++ b/src/dialogs/gnome-cmd-advrename-regex-dialog.cc
@@ -123,13 +123,6 @@ gboolean gnome_cmd_advrename_regex_dialog_new (const gchar *title, GtkWindow *pa
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), rx ? rx->match_case : FALSE);
     gtk_container_add (GTK_CONTAINER (align), check);
 
-#if !GLIB_CHECK_VERSION (2, 14, 0)
-    GtkWidget *box = gnome_cmd_hint_box_new (_("Some regular expressions functionality is disabled. "
-                                               "To enable it's necessary to build GNOME Commander with GLib 
≥ 2.14. "
-                                               "Please contact your package maintainer about that."));
-    gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), box);
-#endif
-
 #if GTK_CHECK_VERSION (2, 14, 0)
     gtk_widget_show_all (content_area);
 #else
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index 162f75d..5d4c630 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -3791,7 +3791,6 @@ void GnomeCmdData::load()
         load_rename_history();
 
         // add a few default templates here - for new users
-#if GLIB_CHECK_VERSION (2, 14, 0)
         {
             AdvrenameConfig::Profile p;
 
@@ -3810,7 +3809,6 @@ void GnomeCmdData::load()
 
             advrename_defaults.profiles.push_back(p);
         }
-#endif
 
     }
 
diff --git a/src/intviewer/image-render.cc b/src/intviewer/image-render.cc
index e3dff5b..4ba1b01 100644
--- a/src/intviewer/image-render.cc
+++ b/src/intviewer/image-render.cc
@@ -826,11 +826,7 @@ inline void image_render_start_background_pixbuf_loading (ImageRender *obj)
 
     // Start background loading
     g_object_ref (obj);
-#if GLIB_CHECK_VERSION(2, 32, 0)
     obj->priv->pixbuf_loading_thread = g_thread_new("pixbuf_load", (GThreadFunc) 
image_render_pixbuf_loading_thread, (gpointer) obj);
-#else
-    obj->priv->pixbuf_loading_thread = g_thread_create((GThreadFunc) image_render_pixbuf_loading_thread, 
(gpointer) obj, FALSE, NULL);
-#endif
 }
 
 
diff --git a/src/main.cc b/src/main.cc
index 0bd25d7..bbdd3a8 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -109,10 +109,6 @@ int main (int argc, char *argv[])
 
     main_win = NULL;
 
-#if !GLIB_CHECK_VERSION (2, 32, 0)
-    g_thread_init (NULL);
-#endif
-
     if (!g_thread_supported ())
     {
         g_printerr ("GNOME Commander needs thread support in glib to work, bailing out...\n");
diff --git a/src/owner.cc b/src/owner.cc
index 53b2003..7f2ce9b 100644
--- a/src/owner.cc
+++ b/src/owner.cc
@@ -41,20 +41,6 @@ static gint compare_names (const gchar *name1, const gchar *name2)
 }
 
 
-#if !GLIB_CHECK_VERSION (2, 14, 0)
-template <typename T, typename ID>
-GList *GnomeCmdOwner::HashTable<T,ID>::get_names()
-{
-    GList *retval = NULL;
-
-    for (GList *l=users; l; l=l->next)
-        retval = g_list_prepend (retval, static_cast<user_t *>(l->data)->name);
-
-    return g_list_sort (retval, (GCompareFunc) compare_users);
-}
-#endif
-
-
 GnomeCmdOwner::GnomeCmdOwner()
 {
     thread = NULL;
diff --git a/src/owner.h b/src/owner.h
index 9d07e0a..240b16f 100644
--- a/src/owner.h
+++ b/src/owner.h
@@ -173,13 +173,11 @@ inline ID GnomeCmdOwner::HashTable<T,ID>::operator [] (const gchar *name)
     return entry ? entry->id : -1;
 }
 
-#if GLIB_CHECK_VERSION (2, 14, 0)
 template <typename T, typename ID>
 inline GList *GnomeCmdOwner::HashTable<T,ID>::get_names()
 {
     return g_hash_table_get_keys (name_table);  //  FIXME:  sort ?
 }
-#endif
 
 inline GnomeCmdOwner::GnomeCmdUsers::Entry *GnomeCmdOwner::new_entry(const struct passwd *pw)
 {
diff --git a/src/tags/gnome-cmd-tags-poppler.cc b/src/tags/gnome-cmd-tags-poppler.cc
index d3656b7..14f7027 100644
--- a/src/tags/gnome-cmd-tags-poppler.cc
+++ b/src/tags/gnome-cmd-tags-poppler.cc
@@ -333,12 +333,7 @@ void gcmd_tags_poppler_load_metadata(GnomeCmdFile *f)
 
         f->metadata->addf(TAG_PDF_EMBEDDEDFILES, "%u", g_list_length(list));
 
-#if GLIB_CHECK_VERSION(2, 28, 0)
         g_list_free_full(list, g_object_unref);
-#else
-        g_list_foreach(list, (GFunc)g_object_unref, NULL);
-        g_list_free(list);
-#endif
     }
     else
     {


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