Let the configuration vendor be overridden
This commit is contained in:
parent
6fdb361bb8
commit
d3fa5f8a70
|
@ -820,8 +820,8 @@ int browser_config_load(Browser * browser)
|
|||
|
||||
if(browser->config == NULL)
|
||||
return 0; /* XXX ignore error */
|
||||
if(config_load_preferences(browser->config, "DeforaOS/" VENDOR, PACKAGE,
|
||||
BROWSER_CONFIG_FILE) != 0)
|
||||
if(config_load_preferences(browser->config, BROWSER_CONFIG_VENDOR,
|
||||
PACKAGE, BROWSER_CONFIG_FILE) != 0)
|
||||
browser_error(NULL, error_get(NULL), 1);
|
||||
#if GTK_CHECK_VERSION(2, 6, 0)
|
||||
/* XXX deserves a rework (enum) */
|
||||
|
@ -878,7 +878,7 @@ int browser_config_save(Browser * browser)
|
|||
browser->prefs.show_hidden_files);
|
||||
if(ret == 0)
|
||||
ret |= config_save_preferences_user(browser->config,
|
||||
"DeforaOS/" VENDOR, PACKAGE,
|
||||
BROWSER_CONFIG_VENDOR, PACKAGE,
|
||||
BROWSER_CONFIG_FILE);
|
||||
return ret;
|
||||
}
|
||||
|
@ -2528,7 +2528,7 @@ static int _browser_config_set(Browser * browser, char const * section,
|
|||
if((ret = config_set(browser->config, s, variable, value)) == 0)
|
||||
{
|
||||
if(config_save_preferences_user(browser->config,
|
||||
"DeforaOS/" VENDOR, PACKAGE,
|
||||
BROWSER_CONFIG_VENDOR, PACKAGE,
|
||||
BROWSER_CONFIG_FILE) != 0)
|
||||
browser_error(NULL, error_get(NULL), 1);
|
||||
}
|
||||
|
|
|
@ -33,11 +33,13 @@
|
|||
# include <System.h>
|
||||
# include <Desktop.h>
|
||||
# include "../../include/Browser.h"
|
||||
# include "../../config.h"
|
||||
|
||||
|
||||
/* Browser */
|
||||
/* defaults */
|
||||
# define BROWSER_CONFIG_FILE "Browser.conf"
|
||||
# define BROWSER_CONFIG_VENDOR "DeforaOS/" VENDOR
|
||||
# define BROWSER_ICON_WRAP_WIDTH 96
|
||||
# define BROWSER_LIST_WRAP_WIDTH 118
|
||||
# define BROWSER_THUMBNAIL_WRAP_WIDTH 112
|
||||
|
|
|
@ -237,7 +237,7 @@ static int _new_load(Properties * properties, char const * plugin)
|
|||
|
||||
if((properties->config = config_new()) != NULL
|
||||
&& config_load_preferences(properties->config,
|
||||
"DeforaOS/" VENDOR, PACKAGE,
|
||||
BROWSER_CONFIG_VENDOR, PACKAGE,
|
||||
BROWSER_CONFIG_FILE) == 0
|
||||
&& (plugins = config_get(properties->config, NULL,
|
||||
"properties")) == NULL)
|
||||
|
|
Loading…
Reference in New Issue
Block a user