Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: m-labs/flickernoise
base: 946dbc2
...
head fork: m-labs/flickernoise
compare: e807609
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Commits on Apr 06, 2012
Xiangfu Liu xiangfu remove useless translation: Control panel * f08c5aa
Xiangfu Liu xiangfu gui/cp.c: break down that cp_notify_changed()
  into one that only sets the title and another one that save config file
e807609
Showing with 11 additions and 12 deletions.
  1. +11 −11 src/gui/cp.c
  2. +0 −1  src/translations/french.c
22 src/gui/cp.c
View
@@ -53,16 +53,22 @@ static int appid;
static struct filedialog *load_dlg;
static struct filedialog *save_dlg;
-static char default_config[8192] = "/ssd/default.per";
+static char default_config[4096] = "/ssd/default.per";
-void cp_notify_changed(void)
+static void update_title_default_config(char * config_name)
{
+ if(config_name) strcpy(default_config, config_name);
+
if(!strcmp(default_config, "/ssd/default.per"))
mtk_cmd(appid, "w.set(-title \"Control panel\")");
else
mtk_cmdf(appid, "w.set(-title \"\e%s\")",
basename(default_config));
+}
+void cp_notify_changed(void)
+{
+ update_title_default_config(NULL);
config_save(default_config);
}
@@ -85,10 +91,8 @@ static void loadok_callback(void *arg)
return;
}
- strcpy(default_config, buf);
-
on_config_change();
- cp_notify_changed();
+ update_title_default_config(buf);
}
static void saveok_callback(void *arg)
@@ -98,10 +102,7 @@ static void saveok_callback(void *arg)
get_filedialog_selection(save_dlg, buf, sizeof(buf));
config_save(buf);
-
- strcpy(default_config, buf);
- on_config_change();
- cp_notify_changed();
+ update_title_default_config(buf);
}
enum {
@@ -390,8 +391,7 @@ void cp_autostart(void)
return;
}
on_config_change();
- strcpy(default_config, autostart);
- cp_notify_changed();
+ update_title_default_config(autostart);
start_performance(0, 0, 0);
break;
}
1  src/translations/french.c
View
@@ -44,7 +44,6 @@ struct mtk_i18n_entry translation_french[] = {
// Control panel
{ "Control panel", "Panneau de contr\xf4""le" },
- { "Control panel *", "Panneau de contr\xf4""le *" },
{ "Interfaces", "Interfaces" },
{ "Keyboard", "Clavier" },
{ "IR remote", "T\xe9""l\xe9""commande IR" },

No commit comments for this range

Something went wrong with that request. Please try again.