Branch: refs/heads/master Author: Enrico enrico.trt@gmail.com Committer: Enrico enrico.trt@gmail.com Date: Sun, 24 Jun 2012 13:02:01 Commit: 6cf2e04b865fac2372289fdc5014fab28778a3cc https://github.com/geany/geany-plugins/commit/6cf2e04b865fac2372289fdc5014fa...
Log Message: ----------- geniuspaste: replace g_key_file_get_* with utils_get_setting_*
Modified Paths: -------------- geniuspaste/src/geniuspaste.c
Modified: geniuspaste/src/geniuspaste.c 20 files changed, 3 insertions(+), 17 deletions(-) =================================================================== @@ -97,29 +97,15 @@ static gint indexof(const gchar * string, gchar c) static void load_settings(void) { GKeyFile *config = g_key_file_new(); - GError *err = NULL; - gint tmp_website; - gboolean tmp_open_browser; - gchar *tmp_author_name;
config_file = g_strconcat(geany->app->configdir, G_DIR_SEPARATOR_S, "plugins", G_DIR_SEPARATOR_S, "geniuspaste", G_DIR_SEPARATOR_S, "geniuspaste.conf", NULL); g_key_file_load_from_file(config, config_file, G_KEY_FILE_NONE, NULL);
- tmp_website = g_key_file_get_integer(config, "geniuspaste", "website", &err); - tmp_open_browser = g_key_file_get_boolean(config, "geniuspaste", "open_browser", &err); - tmp_author_name = g_key_file_get_string(config, "geniuspaste", "author_name", &err); + website_selected = utils_get_setting_integer(config, "geniuspaste", "website", 2); + check_button_is_checked = utils_get_setting_boolean(config, "geniuspaste", "open_browser", FALSE); + author_name = utils_get_setting_string(config, "geniuspaste", "author_name", NULL);
- if (err) - { - g_error_free(err); - } - else - { - website_selected = tmp_website; - check_button_is_checked = tmp_open_browser; - author_name = tmp_author_name; - } g_key_file_free(config); }
@@ Diff output truncated at 100000 characters. @@
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
plugins-commits@lists.geany.org