Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Mon, 04 Mar 2013 16:31:25 UTC Commit: b3ae949dbe4b611cbff30e567a5d90c379408484 https://github.com/geany/geany-plugins/commit/b3ae949dbe4b611cbff30e567a5d90...
Log Message: ----------- TreeBrowser: Don't assign a literal string to a non-constant pointer
Modified Paths: -------------- treebrowser/src/treebrowser.c
Modified: treebrowser/src/treebrowser.c 12 files changed, 7 insertions(+), 5 deletions(-) =================================================================== @@ -57,12 +57,14 @@ * CONFIG VARS * ------------------ */
-static gchar *CONFIG_FILE = NULL; #ifdef G_OS_WIN32 -static gchar *CONFIG_OPEN_EXTERNAL_CMD = "nautilus '%d'"; +# define CONFIG_OPEN_EXTERNAL_CMD_DEFAULT "nautilus '%d'" #else -static gchar *CONFIG_OPEN_EXTERNAL_CMD = "explorer '%d'"; +# define CONFIG_OPEN_EXTERNAL_CMD_DEFAULT "explorer '%d'" #endif + +static gchar *CONFIG_FILE = NULL; +static gchar *CONFIG_OPEN_EXTERNAL_CMD = NULL; static gboolean CONFIG_REVERSE_FILTER = FALSE; static gboolean CONFIG_ONE_CLICK_CHDOC = FALSE; static gboolean CONFIG_SHOW_HIDDEN_FILES = FALSE; @@ -440,7 +442,7 @@ enum { gchar *directory;
- if (g_str_has_suffix(directory, G_DIR_SEPARATOR_S)) + if (g_str_has_suffix(dir, G_DIR_SEPARATOR_S)) directory = g_strndup(dir, strlen(dir)-1); else directory = g_strdup(dir); @@ -1798,7 +1800,7 @@ enum
g_key_file_load_from_file(config, CONFIG_FILE, G_KEY_FILE_NONE, NULL);
- CONFIG_OPEN_EXTERNAL_CMD = utils_get_setting_string(config, "treebrowser", "open_external_cmd", CONFIG_OPEN_EXTERNAL_CMD); + CONFIG_OPEN_EXTERNAL_CMD = utils_get_setting_string(config, "treebrowser", "open_external_cmd", CONFIG_OPEN_EXTERNAL_CMD_DEFAULT); CONFIG_REVERSE_FILTER = utils_get_setting_boolean(config, "treebrowser", "reverse_filter", CONFIG_REVERSE_FILTER); CONFIG_ONE_CLICK_CHDOC = utils_get_setting_boolean(config, "treebrowser", "one_click_chdoc", CONFIG_ONE_CLICK_CHDOC); CONFIG_SHOW_HIDDEN_FILES = utils_get_setting_boolean(config, "treebrowser", "show_hidden_files", CONFIG_SHOW_HIDDEN_FILES);
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org