X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=minimenu%2Fmmconf.c;h=2da4da8747423755feac3920758866e79eb8d71b;hb=7109a4ebacc4ec15f323b22ceb31103fa895939f;hp=3f2fac233f7c39143c4b8592a3c5c2e1a11e6c48;hpb=36af8dacb33edc9307d08a2918166c7cf77d72af;p=pandora-libraries.git diff --git a/minimenu/mmconf.c b/minimenu/mmconf.c index 3f2fac2..2da4da8 100644 --- a/minimenu/mmconf.c +++ b/minimenu/mmconf.c @@ -33,9 +33,10 @@ confitem_t page_general[] = { { "Show 'All' tab", "Whethor an All tab is shown or not", "1", "categories.do_all_cat", ct_boolean }, { "Show directory browser tabs", "Show a tab for each SD card?", "0", "filesystem.do_browser", ct_boolean }, { "Detail panel on start?", "Show or hide the detail panel when menu starts", "1", "display.show_detail_pane", ct_boolean }, + { "Default list view not icons?", "Normally we default to icons view not list", "0", "display.viewmode_list", ct_boolean }, { "Sub-categories as folders?", "If no, uses tabs instead of folders within tabs.", "1", "tabs.subcat_as_folders", ct_boolean }, { "Sub-category apps in their main cat?","If no, apps with subcategories are only in subcategories","1", "tabs.subcat_to_parent", ct_boolean }, - { "Start with app selected", "Whethor selection is placed by default or not", "0", "minimenu.start_selected", ct_boolean }, + { "Remember selected app", "On return to menu select previous app; default to selected", "1", "minimenu.start_selected", ct_boolean }, { "Auto discover pnd apps?", "If no, turn on diectory browser to manually find apps", "1", "filesystem.do_pnd_disco", ct_boolean }, // dropped option -- we now strictly enforce free desktop categories (or user defined, but no more bogus PXML categories) // { "Keep bad categories in Other?", "Lazy dev! Put broken categories into Other to keep clean", "1", "categories.good_cats_only", ct_boolean }, @@ -682,7 +683,7 @@ unsigned char conf_write ( pnd_conf_handle h, char *fullpath ) { // does item begin with app or tab tag? char *k = pnd_box_get_key ( v ); - if ( k && + if ( k && ( strncasecmp ( k, "appshow.", 8 ) == 0 || strncasecmp ( k, "tabshow.", 8 ) == 0 ) ) @@ -693,6 +694,22 @@ unsigned char conf_write ( pnd_conf_handle h, char *fullpath ) { v = pnd_box_get_next ( v ); } // while + // really, should write out keys that are not found in the conf items.. + // but since g_conf is merged with other conf files, that may just + // make for big dumps erroneously.. hmm :/ + char *previous_unique_id = pnd_conf_get_as_char ( g_conf, "minimenu.last_known_app_uid" ); + char *lastcat = pnd_conf_get_as_char ( g_conf, "minimenu.last_known_catname" ); + char *lastparentcat = pnd_conf_get_as_char ( g_conf, "minimenu.last_known_parentcatname" ); + if ( previous_unique_id ) { + fprintf ( f, "%s\t%s\n", "minimenu.last_known_app_uid", previous_unique_id ); + } + if ( lastcat ) { + fprintf ( f, "%s\t%s\n", "minimenu.last_known_catname", lastcat ); + } + if ( lastparentcat ) { + fprintf ( f, "%s\t%s\n", "minimenu.last_known_parentcatname", lastparentcat ); + } + fclose ( f ); return ( 1 ); @@ -818,7 +835,7 @@ void conf_reset_to_default ( pnd_conf_handle h ) { // does item begin with app or tab tag? char *k = pnd_box_get_key ( v ); - if ( k && + if ( k && ( strncasecmp ( k, "appshow.", 8 ) == 0 || strncasecmp ( k, "tabshow.", 8 ) == 0 ) )