Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: m-labs/flickernoise
base: 946dbc2
...
head fork: m-labs/flickernoise
compare: e807609
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Commits on Apr 06, 2012
@xiangfu xiangfu remove useless translation: Control panel * f08c5aa
@xiangfu 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
View
22 src/gui/cp.c
@@ -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;
}
View
1  src/translations/french.c
@@ -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.