[gtk] Remove some unused code



commit 9ea80a7506ac8d9271509775b725c6748fcdf9a1
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Feb 18 21:54:43 2018 -0500

    Remove some unused code
    
    No more callers of _gtk_find_module.

 gtk/gtkmodules.c        | 74 -------------------------------------------------
 gtk/gtkmodulesprivate.h |  4 ---
 2 files changed, 78 deletions(-)
---
diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
index 2f10c8671b..88e74245e0 100644
--- a/gtk/gtkmodules.c
+++ b/gtk/gtkmodules.c
@@ -112,77 +112,3 @@ _gtk_get_module_path (const gchar *type)
 
   return result;
 }
-
-/* Like g_module_path, but use .la as the suffix
- */
-static gchar*
-module_build_la_path (const gchar *directory,
-                     const gchar *module_name)
-{
-  gchar *filename;
-  gchar *result;
-       
-  if (strncmp (module_name, "lib", 3) == 0)
-    filename = (gchar *)module_name;
-  else
-    filename =  g_strconcat ("lib", module_name, ".la", NULL);
-
-  if (directory && *directory)
-    result = g_build_filename (directory, filename, NULL);
-  else
-    result = g_strdup (filename);
-
-  if (filename != module_name)
-    g_free (filename);
-
-  return result;
-}
-
-/**
- * _gtk_find_module:
- * @name: the name of the module
- * @type: the type of the module, for instance 'modules', 'engines', immodules'
- * 
- * Looks for a dynamically module named @name of type @type in the standard GTK+
- *  module search path.
- * 
- * Returns: the pathname to the found module, or %NULL if it wasn’t found.
- *  Free with g_free().
- **/
-gchar *
-_gtk_find_module (const gchar *name,
-                 const gchar *type)
-{
-  gchar **paths;
-  gchar **path;
-  gchar *module_name = NULL;
-
-  if (g_path_is_absolute (name))
-    return g_strdup (name);
-
-  paths = _gtk_get_module_path (type);
-  for (path = paths; *path; path++)
-    {
-      gchar *tmp_name;
-
-      tmp_name = g_module_build_path (*path, name);
-      if (g_file_test (tmp_name, G_FILE_TEST_EXISTS))
-       {
-         module_name = tmp_name;
-         goto found;
-       }
-      g_free(tmp_name);
-
-      tmp_name = module_build_la_path (*path, name);
-      if (g_file_test (tmp_name, G_FILE_TEST_EXISTS))
-       {
-         module_name = tmp_name;
-         goto found;
-       }
-      g_free(tmp_name);
-    }
-
- found:
-  g_strfreev (paths);
-  return module_name;
-}
diff --git a/gtk/gtkmodulesprivate.h b/gtk/gtkmodulesprivate.h
index b7d5793127..b02455d765 100644
--- a/gtk/gtkmodulesprivate.h
+++ b/gtk/gtkmodulesprivate.h
@@ -27,10 +27,6 @@
 
 G_BEGIN_DECLS
 
-#include "gtksettings.h"
-
-gchar  * _gtk_find_module              (const gchar  *name,
-                                        const gchar  *type);
 gchar ** _gtk_get_module_path          (const gchar  *type);
 
 G_END_DECLS


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