aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-12-02 01:55:38 +0800
committerChristian Persch <chpe@src.gnome.org>2004-12-02 01:55:38 +0800
commit4759edbaf17bf4c7b3fbd523fdd2f6bb70c5f6c2 (patch)
tree35c9aa5cc718deeada5c124910a89041249fa0b2
parentdbdc93016ca22fc58bf4ee71ba6c55002a256c4a (diff)
downloadgsoc2013-epiphany-4759edbaf17bf4c7b3fbd523fdd2f6bb70c5f6c2.tar
gsoc2013-epiphany-4759edbaf17bf4c7b3fbd523fdd2f6bb70c5f6c2.tar.gz
gsoc2013-epiphany-4759edbaf17bf4c7b3fbd523fdd2f6bb70c5f6c2.tar.bz2
gsoc2013-epiphany-4759edbaf17bf4c7b3fbd523fdd2f6bb70c5f6c2.tar.lz
gsoc2013-epiphany-4759edbaf17bf4c7b3fbd523fdd2f6bb70c5f6c2.tar.xz
gsoc2013-epiphany-4759edbaf17bf4c7b3fbd523fdd2f6bb70c5f6c2.tar.zst
gsoc2013-epiphany-4759edbaf17bf4c7b3fbd523fdd2f6bb70c5f6c2.zip
If the gconf key doesn't exist, or has the wrong value type, set it to
2004-12-01 Christian Persch <chpe@cvs.gnome.org> * src/ephy-extensions-manager.c: (sync_loaded_extensions): If the gconf key doesn't exist, or has the wrong value type, set it to ["extensions-manager-ui"] to ensure the extensions manager UI is loaded if it's installed.
-rw-r--r--ChangeLog8
-rw-r--r--src/ephy-extensions-manager.c27
2 files changed, 33 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 4857bd0b0..7ae0976d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2004-12-01 Christian Persch <chpe@cvs.gnome.org>
+ * src/ephy-extensions-manager.c: (sync_loaded_extensions):
+
+ If the gconf key doesn't exist, or has the wrong value type,
+ set it to ["extensions-manager-ui"] to ensure the extensions manager
+ UI is loaded if it's installed.
+
+2004-12-01 Christian Persch <chpe@cvs.gnome.org>
+
* embed/mozilla/Makefile.am:
Remove cruft.
diff --git a/src/ephy-extensions-manager.c b/src/ephy-extensions-manager.c
index 16aae78ee..a6ef2bf36 100644
--- a/src/ephy-extensions-manager.c
+++ b/src/ephy-extensions-manager.c
@@ -39,6 +39,8 @@
#include <libgnomevfs/gnome-vfs-ops.h>
#include <libgnomevfs/gnome-vfs-utils.h>
+#include <gconf/gconf-client.h>
+
#include <gmodule.h>
#include <dirent.h>
#include <string.h>
@@ -854,14 +856,33 @@ unload_extension (EphyExtensionsManager *manager,
static void
sync_loaded_extensions (EphyExtensionsManager *manager)
{
- GSList *active_extensions;
+ GConfClient *client;
+ GConfValue *value;
+ GSList *active_extensions = NULL;
GList *l;
gboolean active;
ExtensionInfo *info;
LOG ("Synching changed list of active extensions")
- active_extensions = eel_gconf_get_string_list (CONF_LOADED_EXTENSIONS);
+ client = gconf_client_get_default ();
+ g_return_if_fail (client != NULL);
+
+ value = gconf_client_get (client, CONF_LOADED_EXTENSIONS, NULL);
+
+ /* make sure the extensions-manager-ui is loaded */
+ if (value == NULL ||
+ value->type != GCONF_VALUE_LIST ||
+ gconf_value_get_list_type (value) != GCONF_VALUE_STRING)
+ {
+ active_extensions = g_slist_prepend (active_extensions,
+ g_strdup ("extensions-manager-ui"));
+ eel_gconf_set_string_list (CONF_LOADED_EXTENSIONS, active_extensions);
+ }
+ else
+ {
+ active_extensions = eel_gconf_get_string_list (CONF_LOADED_EXTENSIONS);
+ }
for (l = manager->priv->data; l != NULL; l = l->next)
{
@@ -891,6 +912,8 @@ sync_loaded_extensions (EphyExtensionsManager *manager)
g_slist_foreach (active_extensions, (GFunc) g_free, NULL);
g_slist_free (active_extensions);
+
+ g_object_unref (client);
}
static void