Skip to content

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.
...
  • 3 commits
  • 9 files changed
  • 0 commit comments
  • 1 contributor
Showing with 31 additions and 16 deletions.
  1. +16 −8 src/filemanager.c
  2. +1 −1 src/firstpatch.c
  3. +6 −3 src/french.c
  4. +1 −0 src/ir.c
  5. +1 −0 src/keyboard.c
  6. +2 −1 src/midi.c
  7. +1 −0 src/oscsettings.c
  8. +2 −2 src/performance.c
  9. +1 −1 src/rsswall.c
View
24 src/filemanager.c
@@ -117,6 +117,12 @@ static char *get_selection_panel(int panel)
return selection;
}
+static void get_lfolder(char *buf, int size, int sel)
+{
+ mtk_reqf(appid, buf, size, "p%d_lfolder.text", sel);
+ memmove(buf, buf+1, size-1); /* remove \e */
+}
+
static void copymove(int src, int dst)
{
char orig[384];
@@ -124,8 +130,8 @@ static void copymove(int src, int dst)
char basename[384];
int last;
- mtk_reqf(appid, orig, sizeof(orig), "p%d_lfolder.text", src);
- mtk_reqf(appid, copied, sizeof(copied), "p%d_lfolder.text", dst);
+ get_lfolder(orig, sizeof(orig), src);
+ get_lfolder(copied, sizeof(copied), dst);
mtk_reqf(appid, basename, sizeof(basename), "p%d_name.text", src);
last = strlen(basename)-1;
if(basename[last] == '/')
@@ -177,7 +183,7 @@ static void selcommit_callback(mtk_event *e, void *arg)
update_filename(panel);
mtk_reqf(appid, sel, sizeof(sel), "p%d_name.text", panel);
if(sel[strlen(sel)-1] == '/') {
- mtk_reqf(appid, curfolder, sizeof(curfolder), "p%d_lfolder.text", panel);
+ get_lfolder(curfolder, sizeof(curfolder), panel);
if(strcmp(sel, "../") == 0) {
char *c;
if(strcmp(curfolder, "/") == 0) return;
@@ -201,7 +207,7 @@ static void clear_callback(mtk_event *e, void *arg)
static void refresh(int panel)
{
char curfolder[384];
- mtk_reqf(appid, curfolder, sizeof(curfolder), "p%d_lfolder.text", panel);
+ get_lfolder(curfolder, sizeof(curfolder), panel);
display_folder(panel, curfolder);
}
@@ -212,13 +218,15 @@ static void rename_callback(mtk_event *e, void *arg)
char renamed[384];
char *selection;
- mtk_reqf(appid, orig, sizeof(orig), "p%d_lfolder.text", panel);
+ get_lfolder(orig, sizeof(orig), panel);
strcpy(renamed, orig);
selection = get_selection_panel(panel);
if(selection == NULL) return;
strncat(orig, selection, sizeof(orig));
free(selection);
mtk_reqf(appid, renamed+strlen(renamed), sizeof(renamed)-strlen(renamed), "p%d_name.text", panel);
+ if(renamed[strlen(renamed)-1] == '/')
+ renamed[strlen(renamed)-1] = 0;
call_mv(orig, renamed);
refresh(panel);
}
@@ -232,7 +240,7 @@ static void delete_callback(mtk_event *e, void *arg)
int last;
if(delete_confirm[panel]) {
- mtk_reqf(appid, target, sizeof(target), "p%d_lfolder.text", panel);
+ get_lfolder(target, sizeof(target), panel);
mtk_reqf(appid, target+strlen(target), sizeof(target)-strlen(target), "p%d_name.text", panel);
last = strlen(target)-1;
if(target[last] == '/')
@@ -259,7 +267,7 @@ static void mkdir_callback(mtk_event *e, void *arg)
int panel = (int)arg;
char dirname[384];
- mtk_reqf(appid, dirname, sizeof(dirname), "p%d_lfolder.text", panel);
+ get_lfolder(dirname, sizeof(dirname), panel);
mtk_reqf(appid, dirname+strlen(dirname), sizeof(dirname)-strlen(dirname), "p%d_name.text", panel);
mkdir(dirname, 0777);
refresh(panel);
@@ -446,7 +454,7 @@ static void display_folder(int panel, const char *folder)
*c_list = 0;
}
- mtk_cmdf(appid, "p%d_lfolder.set(-text \"%s\")", panel, folder);
+ mtk_cmdf(appid, "p%d_lfolder.set(-text \"\e%s\")", panel, folder);
mtk_cmdf(appid, "p%d_list.set(-text \"%s\" -selection 0)", panel, fmt_list);
mtk_cmdf(appid, "p%d_listf.expose(0, 0)", panel);
}
View
2 src/firstpatch.c
@@ -81,7 +81,7 @@ void init_firstpatch()
"g_btn = new Grid()",
"b_ok = new Button(-text \"OK\")",
"b_cancel = new Button(-text \"Cancel\")",
- "g_btn.columnconfig(1, -size 200)",
+ "g_btn.columnconfig(1, -size 350)",
"g_btn.place(b_ok, -column 2 -row 1)",
"g_btn.place(b_cancel, -column 3 -row 1)",
View
9 src/french.c
@@ -127,12 +127,12 @@ struct mtk_i18n_entry translation_french[] = {
// RSS wall
{ "Wall:", "Mur :" },
{ "RSS/ATOM wall", "Mur RSS/ATOM" },
- { "RSS/ATOM URL:", "URL RSS/ATOM" },
+ { "RSS/ATOM URL:", "URL RSS/ATOM :" },
{ "Idle message:", "Message d'inactivit\xe9"" :" },
- { "Refresh period:", "P\xe9""riode de rafra\xee""chissement :" },
+ { "Refresh period:", "P\xe9""riode de\nrafra\xee""chissement :" },
{ "Idle period:", "P\xe9""riode d'inactivit\xe9"" :" },
{ "seconds", "secondes" },
- { "refreshes", "rafra\xee""chissements" },
+ { "refreshes", "rafra\xee""ch." },
// Update
{ "Update", "Mise \xe0"" jour" },
@@ -187,6 +187,9 @@ struct mtk_i18n_entry translation_french[] = {
{ "Go!", "D\xe9""marrer !" },
{ "Compiling patches...", "Compilation des patchs..." },
{ "Select first patch", "S\xe9""lection du premier patch" },
+ { "Error", "Erreur" },
+ { "No first patch defined!", "Pas de premier patch d\xe9""fini !" },
+ { "No patches found!", "Pas de patch trouv\xe9"" !" },
// File manager
{ "Copy", "Copier" },
View
1 src/ir.c
@@ -220,6 +220,7 @@ void init_ir()
"g_addedit1.place(e_filename, -column 2 -row 2)",
"g_addedit1.place(b_filename, -column 3 -row 2)",
"g_addedit1.place(b_filenameclear, -column 4 -row 2)",
+ "g_addedit1.columnconfig(2, -size 200)",
"g_addedit1.columnconfig(3, -size 0)",
"g_addedit1.columnconfig(4, -size 0)",
"b_addupdate = new Button(-text \"Add/update\")",
View
1 src/keyboard.c
@@ -282,6 +282,7 @@ void init_keyboard()
"g_addedit1.place(e_filename, -column 2 -row 2)",
"g_addedit1.place(b_filename, -column 3 -row 2)",
"g_addedit1.place(b_filenameclear, -column 4 -row 2)",
+ "g_addedit1.columnconfig(2, -size 200)",
"g_addedit1.columnconfig(3, -size 0)",
"g_addedit1.columnconfig(4, -size 0)",
"b_addupdate = new Button(-text \"Add/update\")",
View
3 src/midi.c
@@ -473,6 +473,7 @@ void init_midi()
"g_addedit1.place(e_filename, -column 2 -row 2)",
"g_addedit1.place(b_filename, -column 3 -row 2)",
"g_addedit1.place(b_filenameclear, -column 4 -row 2)",
+ "g_addedit1.columnconfig(2, -size 135)",
"g_addedit1.columnconfig(3, -size 0)",
"g_addedit1.columnconfig(4, -size 0)",
"b_addupdate = new Button(-text \"Add/update\")",
@@ -525,7 +526,7 @@ void init_midi()
"g.rowconfig(4, -size 10)",
"g.place(g_btn, -column 1 -row 5)",
- "w = new Window(-content g -title \"MIDI settings\")",
+ "w = new Window(-content g -title \"MIDI settings\" -workx 10)",
0);
for(i=0;i<MIDI_COUNT;i++) {
View
1 src/oscsettings.c
@@ -285,6 +285,7 @@ void init_oscsettings()
"g_addedit1.place(e_filename, -column 2 -row 2)",
"g_addedit1.place(b_filename, -column 3 -row 2)",
"g_addedit1.place(b_filenameclear, -column 4 -row 2)",
+ "g_addedit1.columnconfig(2, -size 200)",
"g_addedit1.columnconfig(3, -size 0)",
"g_addedit1.columnconfig(4, -size 0)",
"b_addupdate = new Button(-text \"Add/update\")",
View
4 src/performance.c
@@ -480,7 +480,7 @@ void start_performance(int simple, int dt, int as)
if(simple) {
add_simple_patches();
if(npatches < 1) {
- messagebox("Error", "No patches found!\n");
+ messagebox("Error", "No patches found!");
started = 0;
fb_unblank();
return;
@@ -488,7 +488,7 @@ void start_performance(int simple, int dt, int as)
} else {
add_firstpatch();
if(npatches < 1) {
- messagebox("Error", "No first patch defined!\n");
+ messagebox("Error", "No first patch defined!");
started = 0;
fb_unblank();
return;
View
2 src/rsswall.c
@@ -155,7 +155,7 @@ void init_rsswall()
"g.rowconfig(2, -size 10)",
"g.place(g_btn, -column 1 -row 3)",
- "w = new Window(-content g -title \"RSS/ATOM wall\")",
+ "w = new Window(-content g -title \"RSS/ATOM wall\" -workx 10)",
0);
mtk_bind(appid, "b_ok", "commit", ok_callback, NULL);

No commit comments for this range

Something went wrong with that request. Please try again.