From: skeezix Date: Wed, 26 Jan 2011 20:18:06 +0000 (-0500) Subject: In 'reveal hidden tab' menu, now shows 'catname [parent catname]' format, to be more... X-Git-Tag: sz_beta3~101 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-libraries.git;a=commitdiff_plain;h=be8d9dd80391cde8e8877550004ff23b76ab87d5;ds=sidebyside In 'reveal hidden tab' menu, now shows 'catname [parent catname]' format, to be more clear --- diff --git a/minimenu/mmcat.c b/minimenu/mmcat.c index e96aa23..689521f 100644 --- a/minimenu/mmcat.c +++ b/minimenu/mmcat.c @@ -296,7 +296,9 @@ mm_category_t *category_map_query ( char *cat ) { unsigned char category_meta_push ( char *catname, char *parentcatname, pnd_disco_t *app, pnd_conf_handle ovrh, unsigned char visiblep ) { mm_category_t *cat; +#if 0 // prepending char catnamebuffer [ 512 ] = ""; +#endif if ( ! catname ) { return ( 1 ); // fine, just nada @@ -342,10 +344,12 @@ unsigned char category_meta_push ( char *catname, char *parentcatname, pnd_disco } // good cats only? // if invisible, and a parent category name is known, prepend it for ease of use +#if 0 // prepending if ( ! visiblep && parentcatname ) { snprintf ( catnamebuffer, 500, "%s.%s", parentcatname, catname ); catname = catnamebuffer; } +#endif // do we honour cat mapping at all? if ( pnd_conf_get_as_int_d ( g_conf, "categories.map_on", 0 ) ) { diff --git a/minimenu/mmui.c b/minimenu/mmui.c index 2b34fa5..a4d0246 100644 --- a/minimenu/mmui.c +++ b/minimenu/mmui.c @@ -1044,8 +1044,16 @@ void ui_process_input ( unsigned char block_p ) { case SDL_USEREVENT: // update something + // the user-defined SDL events are all for threaded/delayed previews (and icons, which + // generally are not used); if we're in wide mode, we can skip previews + // to avoid slowing things down when they're not shown. + if ( event.user.code == sdl_user_ticker ) { + if ( ui_detail_hidden ) { + break; // skip building previews when not showing them + } + // timer went off, time to load something if ( pnd_conf_get_as_int_d ( g_conf, "minimenu.load_previews_later", 0 ) ) { @@ -2937,6 +2945,7 @@ void ui_revealscreen ( void ) { char *labels [ 500 ]; unsigned int labelmax = 0; unsigned int i; + char fulllabel [ 200 ]; if ( ! category_count ( CFHIDDEN ) ) { return; // nothing to do @@ -2947,7 +2956,14 @@ void ui_revealscreen ( void ) { // build up labels to show in menu for ( i = 0; i < g_categorycount; i++ ) { - labels [ labelmax++ ] = g_categories [ i ] -> catname; + + if ( g_categories [ i ] -> parent_catname ) { + sprintf ( fulllabel, "%s [%s]", g_categories [ i ] -> catname, g_categories [ i ] -> parent_catname ); + } else { + sprintf ( fulllabel, "%s", g_categories [ i ] -> catname ); + } + + labels [ labelmax++ ] = strdup ( fulllabel ); } // show menu @@ -2987,6 +3003,10 @@ void ui_revealscreen ( void ) { render_mask |= CHANGED_CATEGORY; } + for ( i = 0; i < g_categorycount; i++ ) { + free ( labels [ i ] ); + } + return; }