[totem] grilo: Move grilo config to be builtin
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] grilo: Move grilo config to be builtin
- Date: Mon, 27 Jan 2014 09:10:48 +0000 (UTC)
commit 62b08a58faca3028c8a6f29eb08de8a72ff3a923
Author: Bastien Nocera <hadess hadess net>
Date: Thu Jan 16 19:27:22 2014 +0100
grilo: Move grilo config to be builtin
https://bugzilla.gnome.org/show_bug.cgi?id=722826
src/plugins/grilo/Makefile.am | 8 ++------
src/plugins/grilo/grilo.gresource.xml | 1 +
src/plugins/grilo/totem-grilo.c | 22 +---------------------
3 files changed, 4 insertions(+), 27 deletions(-)
---
diff --git a/src/plugins/grilo/Makefile.am b/src/plugins/grilo/Makefile.am
index 775c38d..6f5187b 100644
--- a/src/plugins/grilo/Makefile.am
+++ b/src/plugins/grilo/Makefile.am
@@ -5,16 +5,12 @@ plugin_LTLIBRARIES = libgrilo.la
plugin_in_files = grilo.plugin.in
-confdir = $(plugindir)
-conf_DATA = totem-grilo.conf
-EXTRA_DIST += $(conf_DATA)
-
-EXTRA_DIST += grilo.gresource.xml totemmaintoolbar.ui totemselectiontoolbar.ui grilo.ui
+EXTRA_DIST = grilo.gresource.xml totemmaintoolbar.ui totemselectiontoolbar.ui grilo.ui totem-grilo.conf
griloresources.h: grilo.gresource.xml
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/grilo.gresource.xml \
--target=$@ --sourcedir=$(srcdir) --c-name _totem --generate-header
-griloresources.c: grilo.gresource.xml totemmaintoolbar.ui grilo.ui totemselectiontoolbar.ui griloresources.h
+griloresources.c: $(EXTRA_DIST) griloresources.h
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/grilo.gresource.xml \
--target=$@ --sourcedir=$(srcdir) --c-name _totem --generate-source
diff --git a/src/plugins/grilo/grilo.gresource.xml b/src/plugins/grilo/grilo.gresource.xml
index c3891cf..6ff4b33 100644
--- a/src/plugins/grilo/grilo.gresource.xml
+++ b/src/plugins/grilo/grilo.gresource.xml
@@ -4,5 +4,6 @@
<file compressed="true">totemmaintoolbar.ui</file>
<file compressed="true">totemselectiontoolbar.ui</file>
<file compressed="true">grilo.ui</file>
+ <file compressed="true">totem-grilo.conf</file>
</gresource>
</gresources>
diff --git a/src/plugins/grilo/totem-grilo.c b/src/plugins/grilo/totem-grilo.c
index dc42318..2aca104 100644
--- a/src/plugins/grilo/totem-grilo.c
+++ b/src/plugins/grilo/totem-grilo.c
@@ -72,8 +72,6 @@
#define PAGE_SIZE 50
#define SCROLL_GET_MORE_LIMIT 0.8
-#define TOTEM_GRILO_CONFIG_FILE "totem-grilo.conf"
-
typedef struct {
Totem *totem;
GtkWindow *main_window;
@@ -2073,26 +2071,8 @@ setup_ui (TotemGriloPlugin *self,
static void
setup_config (TotemGriloPlugin *self)
{
- gchar *config_file;
GrlRegistry *registry = grl_registry_get_default ();
-
- /* Setup system-wide plugins configuration */
- config_file = totem_plugin_find_file ("grilo", TOTEM_GRILO_CONFIG_FILE);
-
- if (g_file_test (config_file, G_FILE_TEST_EXISTS))
- grl_registry_add_config_from_file (registry, config_file, NULL);
- g_free (config_file);
-
- /* Setup user-defined plugins configuration */
- config_file = g_build_path (G_DIR_SEPARATOR_S,
- g_get_user_config_dir (),
- g_get_prgname (),
- TOTEM_GRILO_CONFIG_FILE,
- NULL);
-
- if (g_file_test (config_file, G_FILE_TEST_EXISTS))
- grl_registry_add_config_from_file (registry, config_file, NULL);
- g_free (config_file);
+ grl_registry_add_config_from_resource (registry, "/org/totem/grilo/totem-grilo.conf", NULL);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]