]> Dogcows Code - chaz/tint2/commitdiff
fixed : config file use . as decimal separator even when LOCALE is different
authorThierry Lorthiois <lorthiois@bbsoft.fr>
Tue, 4 May 2010 20:15:46 +0000 (20:15 +0000)
committerThierry Lorthiois <lorthiois@bbsoft.fr>
Tue, 4 May 2010 20:15:46 +0000 (20:15 +0000)
src/tint.c
src/tint2conf/main.c

index 357c180f4506b6b67c257be0885fa39d97d80212..7388035bdb41169907abf8d2b1e12fd495fac2ef 100644 (file)
@@ -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;
index 6e283539e75bea85b01be2f24b3e8da55ab0aff0..71570670b5f3e244a53762ebdebfebfd2d8d8064 100644 (file)
@@ -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);
 }
 
 
This page took 0.026504 seconds and 4 git commands to generate.