Index: apps/lang/english.lang =================================================================== --- apps/lang/english.lang (revision 21992) +++ apps/lang/english.lang (working copy) @@ -12655,3 +12655,17 @@ pitchscreen: "Rate" + + id: LANG_REMOVE_THEME + desc: used in the onplay menu to set a recording dir + user: core + + *: "Remove Theme" + + + *: "Remove Theme" + + + *: "Remove Theme" + + Index: apps/onplay.c =================================================================== --- apps/onplay.c (revision 21992) +++ apps/onplay.c (working copy) @@ -626,6 +626,14 @@ return true; } +static bool remove_theme(void) +{ + if(PLUGIN_USB_CONNECTED == filetype_load_plugin("theme_remove", + selected_file)) + onplay_result = ONPLAY_RELOAD_DIR; + return false; +} + static bool properties(void) { if(PLUGIN_USB_CONNECTED == filetype_load_plugin("properties", @@ -1013,6 +1021,8 @@ delete_file, NULL, clipboard_callback, Icon_NOICON); MENUITEM_FUNCTION(delete_dir_item, 0, ID2P(LANG_DELETE_DIR), delete_dir, NULL, clipboard_callback, Icon_NOICON); +MENUITEM_FUNCTION(remove_theme_item, 0, ID2P(LANG_REMOVE_THEME), + remove_theme, NULL, clipboard_callback, Icon_NOICON); MENUITEM_FUNCTION(properties_item, 0, ID2P(LANG_PROPERTIES), properties, NULL, clipboard_callback, Icon_NOICON); MENUITEM_FUNCTION(create_dir_item, 0, ID2P(LANG_CREATE_DIR), @@ -1096,6 +1106,21 @@ return ACTION_EXIT_MENUITEM; } #endif + else if (this_item == &remove_theme_item) + { + if (selected_file) + { + char *suffix = strrchr(selected_file, '.'); + if (suffix) + { + if (strcasecmp(suffix, ".cfg") == 0) + { + return action; + } + } + } + return ACTION_EXIT_MENUITEM; + } else if ((selected_file_attr & ATTR_DIRECTORY)) { if ((this_item == &delete_dir_item) @@ -1149,7 +1174,8 @@ #if LCD_DEPTH > 1 &set_backdrop_item, #endif - &list_viewers_item, &create_dir_item, &properties_item, + &list_viewers_item, &create_dir_item, + &remove_theme_item, &properties_item, #ifdef HAVE_RECORDING &set_recdir_item, #endif