Index: apps/lang/english.lang =================================================================== --- apps/lang/english.lang (revision 23130) +++ apps/lang/english.lang (working copy) @@ -13075,3 +13075,17 @@ swcodec: "Release Time" + + id: LANG_REMOVE_THEME + desc: used in the onplay menu + user: core + + *: "Remove Theme" + + + *: "Remove Theme" + + + *: "Remove Theme" + + Index: apps/onplay.c =================================================================== --- apps/onplay.c (revision 23130) +++ apps/onplay.c (working copy) @@ -623,6 +623,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", @@ -1011,6 +1019,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), @@ -1094,6 +1104,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) @@ -1147,7 +1172,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