diff options
-rw-r--r-- | apps/plugin.c | 1 | ||||
-rw-r--r-- | apps/plugin.h | 3 | ||||
-rw-r--r-- | apps/plugins/sudoku/sudoku.c | 1 | ||||
-rw-r--r-- | apps/plugins/text_editor.c | 4 |
4 files changed, 8 insertions, 1 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index f332850565..1b1c406af4 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -441,6 +441,7 @@ static const struct plugin_api rockbox_api = { | |||
441 | utf8seek, | 441 | utf8seek, |
442 | 442 | ||
443 | set_int, | 443 | set_int, |
444 | reload_directory, | ||
444 | }; | 445 | }; |
445 | 446 | ||
446 | int plugin_load(const char* plugin, void* parameter) | 447 | int plugin_load(const char* plugin, void* parameter) |
diff --git a/apps/plugin.h b/apps/plugin.h index 2821beeab9..de8f267ec8 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -104,7 +104,7 @@ | |||
104 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ | 104 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ |
105 | 105 | ||
106 | /* increase this every time the api struct changes */ | 106 | /* increase this every time the api struct changes */ |
107 | #define PLUGIN_API_VERSION 21 | 107 | #define PLUGIN_API_VERSION 22 |
108 | 108 | ||
109 | /* update this to latest version if a change to the api struct breaks | 109 | /* update this to latest version if a change to the api struct breaks |
110 | backwards compatibility (and please take the opportunity to sort in any | 110 | backwards compatibility (and please take the opportunity to sort in any |
@@ -520,6 +520,7 @@ struct plugin_api { | |||
520 | bool (*set_int)(const unsigned char* string, const char* unit, int voice_unit, | 520 | bool (*set_int)(const unsigned char* string, const char* unit, int voice_unit, |
521 | int* variable, void (*function)(int), int step, int min, | 521 | int* variable, void (*function)(int), int step, int min, |
522 | int max, void (*formatter)(char*, int, int, const char*) ); | 522 | int max, void (*formatter)(char*, int, int, const char*) ); |
523 | void (*reload_directory)(void); | ||
523 | }; | 524 | }; |
524 | 525 | ||
525 | /* plugin header */ | 526 | /* plugin header */ |
diff --git a/apps/plugins/sudoku/sudoku.c b/apps/plugins/sudoku/sudoku.c index 0c39c463ef..12924e8fe6 100644 --- a/apps/plugins/sudoku/sudoku.c +++ b/apps/plugins/sudoku/sudoku.c | |||
@@ -689,6 +689,7 @@ bool save_sudoku(struct sudoku_state_t* state) | |||
689 | /* Add a blank line at end */ | 689 | /* Add a blank line at end */ |
690 | rb->write(fd,"\r\n",2); | 690 | rb->write(fd,"\r\n",2); |
691 | rb->close(fd); | 691 | rb->close(fd); |
692 | rb->reload_directory(); | ||
692 | /* Save a copy of the saved state - so we can reload without | 693 | /* Save a copy of the saved state - so we can reload without |
693 | using the disk */ | 694 | using the disk */ |
694 | rb->memcpy(state->savedboard,state->currentboard,81); | 695 | rb->memcpy(state->savedboard,state->currentboard,81); |
diff --git a/apps/plugins/text_editor.c b/apps/plugins/text_editor.c index e86606344d..f98194b151 100644 --- a/apps/plugins/text_editor.c +++ b/apps/plugins/text_editor.c | |||
@@ -223,6 +223,10 @@ void save_changes(int overwrite) | |||
223 | return; | 223 | return; |
224 | } | 224 | } |
225 | 225 | ||
226 | if (!overwrite) | ||
227 | /* current directory may have changed */ | ||
228 | rb->reload_directory(); | ||
229 | |||
226 | rb->lcd_clear_display(); | 230 | rb->lcd_clear_display(); |
227 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | 231 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ |
228 | rb->cpu_boost(1); | 232 | rb->cpu_boost(1); |