[totem/wip/hadess/remove-plugin-interface: 4/5] plugins: Remove unused totem_plugin_find_file()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/wip/hadess/remove-plugin-interface: 4/5] plugins: Remove unused totem_plugin_find_file()
- Date: Tue, 11 May 2021 12:42:17 +0000 (UTC)
commit 71457e051a236a652c4f16331d8371fa092bec2f
Author: Bastien Nocera <hadess hadess net>
Date: Tue May 11 14:36:35 2021 +0200
plugins: Remove unused totem_plugin_find_file()
docs/reference/totem-sections.txt | 1 -
src/plugins/totem-dirs.c | 63 ---------------------------------------
src/plugins/totem-dirs.h | 2 --
3 files changed, 66 deletions(-)
---
diff --git a/docs/reference/totem-sections.txt b/docs/reference/totem-sections.txt
index cb019eca5..77740caeb 100644
--- a/docs/reference/totem-sections.txt
+++ b/docs/reference/totem-sections.txt
@@ -112,7 +112,6 @@ totem_interface_load_with_full_path
<TITLE>TotemPlugin</TITLE>
TOTEM_PLUGIN_REGISTER
TOTEM_PLUGIN_REGISTER_CONFIGURABLE
-totem_plugin_find_file
totem_get_plugin_paths
</SECTION>
diff --git a/src/plugins/totem-dirs.c b/src/plugins/totem-dirs.c
index 8c87d4675..252f38a13 100644
--- a/src/plugins/totem-dirs.c
+++ b/src/plugins/totem-dirs.c
@@ -96,66 +96,3 @@ totem_get_plugin_paths (void)
return (char **) g_ptr_array_free (paths, FALSE);
}
-
-/**
- * totem_plugin_find_file:
- * @plugin_name: the plugin name
- * @file: the file to find
- *
- * Finds the specified @file by looking in the plugin paths
- * listed by totem_get_plugin_paths() and then in the system
- * Totem data directory.
- *
- * This should be used by plugins to find plugin-specific
- * resource files.
- *
- * Return value: a newly-allocated absolute path for the file, or %NULL
- **/
-char *
-totem_plugin_find_file (const char *plugin_name,
- const char *file)
-{
- TotemPluginsEngine *engine;
- PeasPluginInfo *info;
- const char *dir;
- char *tmp;
- char *ret = NULL;
-
- engine = totem_plugins_engine_get_default (NULL);
- info = peas_engine_get_plugin_info (PEAS_ENGINE (engine), plugin_name);
-
- dir = peas_plugin_info_get_module_dir (info);
- tmp = g_build_filename (dir, file, NULL);
- if (g_file_test (tmp, G_FILE_TEST_EXISTS))
- ret = tmp;
- else
- g_free (tmp);
-
- if (ret == NULL) {
- dir = peas_plugin_info_get_data_dir (info);
- tmp = g_build_filename (dir, file, NULL);
- if (g_file_test (tmp, G_FILE_TEST_EXISTS))
- ret = tmp;
- else
- g_free (tmp);
- }
-
- /* global data files */
- if (ret == NULL)
- ret = totem_interface_get_full_path (file);
-
- g_object_unref (engine);
-
- //FIXME
-#if 0
- /* ensure it's an absolute path, so doesn't confuse rb_glade_new et al */
- if (ret && ret[0] != '/') {
- char *pwd = g_get_current_dir ();
- char *path = g_strconcat (pwd, G_DIR_SEPARATOR_S, ret, NULL);
- g_free (ret);
- g_free (pwd);
- ret = path;
- }
-#endif
- return ret;
-}
diff --git a/src/plugins/totem-dirs.h b/src/plugins/totem-dirs.h
index 4cc4036a8..11de6756c 100644
--- a/src/plugins/totem-dirs.h
+++ b/src/plugins/totem-dirs.h
@@ -29,5 +29,3 @@
#include <gtk/gtk.h>
char ** totem_get_plugin_paths (void);
-char * totem_plugin_find_file (const char *plugin_name,
- const char *file);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]