From: Christian Dywan Date: Tue, 21 Apr 2009 01:48:25 +0000 (+0200) Subject: Save extension settings to a filename based folder X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05967054c6aa52f0d1d63e918c1dba5f50f3f9b8;p=midori Save extension settings to a filename based folder This prevents different folders from being created depending on the user language. --- diff --git a/midori/midori-extension.c b/midori/midori-extension.c index 0bbcfef7..ca9dbd94 100644 --- a/midori/midori-extension.c +++ b/midori/midori-extension.c @@ -459,8 +459,7 @@ midori_extension_get_app (MidoriExtension* extension) * @extension: a #MidoriExtension * * Retrieves the path to a directory reserved for configuration - * files specific to the extension. For that purpose the 'name' - * of the extension is actually part of the path. + * files specific to the extension. * * If settings are installed on the extension, they will be * loaded from and saved to a file "config" in this path. @@ -470,12 +469,16 @@ midori_extension_get_app (MidoriExtension* extension) const gchar* midori_extension_get_config_dir (MidoriExtension* extension) { + g_return_val_if_fail (midori_extension_is_prepared (extension), NULL); if (!extension->priv->config_dir) + { + gchar* filename = g_object_get_data (G_OBJECT (extension), "filename"); + g_return_val_if_fail (filename != NULL, NULL); extension->priv->config_dir = g_build_filename ( - sokoke_set_config_dir (NULL), "extensions", - extension->priv->name, NULL); + sokoke_set_config_dir (NULL), "extensions", filename, NULL); + } return extension->priv->config_dir; }