From: Thierry Lorthiois Date: Tue, 4 May 2010 20:15:46 +0000 (+0000) Subject: fixed : config file use . as decimal separator even when LOCALE is different X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=e60185261b8062abd573220878a7b9ff9aabda4b;p=chaz%2Ftint2 fixed : config file use . as decimal separator even when LOCALE is different --- diff --git a/src/tint.c b/src/tint.c index 357c180..7388035 100644 --- a/src/tint.c +++ b/src/tint.c @@ -130,6 +130,8 @@ void init_X11() XSelectInput (server.dsp, server.root_win, PropertyChangeMask|StructureNotifyMask); setlocale (LC_ALL, ""); + // config file use '.' as decimal separator + setlocale(LC_NUMERIC, "POSIX"); // load default icon gchar *path; diff --git a/src/tint2conf/main.c b/src/tint2conf/main.c index 6e28353..7157067 100644 --- a/src/tint2conf/main.c +++ b/src/tint2conf/main.c @@ -32,6 +32,7 @@ #include "common.h" #include "theme_view.h" +#define SNAPSHOT_TICK 190 // default config file and directory @@ -261,7 +262,7 @@ static void menuAdd() selectTheme(name_first); g_free(name_first); - g_timeout_add(100, (GSourceFunc)update_snapshot, NULL); + g_timeout_add(SNAPSHOT_TICK, (GSourceFunc)update_snapshot, NULL); } @@ -371,7 +372,7 @@ static void menuRefresh() gtk_list_store_set(g_store, &iter, COL_SNAPSHOT, NULL, -1); } - g_timeout_add(100, (GSourceFunc)update_snapshot, NULL); + g_timeout_add(SNAPSHOT_TICK, (GSourceFunc)update_snapshot, NULL); } @@ -388,7 +389,7 @@ static void menuRefreshAll() have_iter = gtk_tree_model_iter_next(model, &iter); } - g_timeout_add(100, (GSourceFunc)update_snapshot, NULL); + g_timeout_add(SNAPSHOT_TICK, (GSourceFunc)update_snapshot, NULL); } @@ -502,7 +503,7 @@ static void load_theme(GtkWidget *list) selectTheme(g_default_theme); - g_timeout_add(100, (GSourceFunc)update_snapshot, NULL); + g_timeout_add(SNAPSHOT_TICK, (GSourceFunc)update_snapshot, NULL); }