[gthumb/gthumb-2-12] correctly activate the default extensions when started the first time
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb/gthumb-2-12] correctly activate the default extensions when started the first time
- Date: Mon, 22 Nov 2010 10:17:22 +0000 (UTC)
commit 8302e856dae93b2df1cdb56c7683485aaec7727c
Author: Paolo Bacchilega <paobac src gnome org>
Date: Mon Nov 22 11:12:26 2010 +0100
correctly activate the default extensions when started the first time
[bug #635475]
data/gthumb.schemas.in | 2 +-
gthumb/gth-main.c | 12 +++++++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/data/gthumb.schemas.in b/data/gthumb.schemas.in
index 083a248..9afe093 100644
--- a/data/gthumb.schemas.in
+++ b/data/gthumb.schemas.in
@@ -48,7 +48,7 @@
<owner>gthumb</owner>
<type>list</type>
<list_type>string</list_type>
- <default>[]</default>
+ <default>[default]</default>
<locale name="C">
<short></short>
<long>
diff --git a/gthumb/gth-main.c b/gthumb/gth-main.c
index 7a480a6..e476310 100644
--- a/gthumb/gth-main.c
+++ b/gthumb/gth-main.c
@@ -1263,10 +1263,20 @@ gth_main_activate_extensions (void)
}
active_extensions = eel_gconf_get_string_list_with_error (PREF_ACTIVE_EXTENSIONS, &error);
- if (error != NULL) {
+ if ((error != NULL)
+ || ((active_extensions != NULL)
+ && (active_extensions->next == NULL)
+ && (g_strcmp0 (active_extensions->data, "default") == 0)))
+ {
g_clear_error (&error);
+ g_slist_foreach (active_extensions, (GFunc) g_free, NULL);
+ g_slist_free (active_extensions);
+
+ active_extensions = NULL;
for (i = 0; default_extensions[i] != NULL; i++)
active_extensions = g_slist_prepend (active_extensions, g_strdup (default_extensions[i]));
+
+ eel_gconf_set_string_list (PREF_ACTIVE_EXTENSIONS, active_extensions);
}
active_extensions = gth_extension_manager_order_extensions (Main->priv->extension_manager, active_extensions);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]