+
+void ui_revealscreen ( void ) {
+ char *labels [ 500 ];
+ unsigned int labelmax = 0;
+ unsigned int i;
+
+ for ( i = 0; i < _categories_inviscount; i++ ) {
+ labels [ labelmax++ ] = _categories_invis [ i ].catname;
+ }
+
+ int sel = ui_modal_single_menu ( labels, labelmax, "Temporary Category Reveal",
+ "Enter to select; other to return." );
+
+ if ( sel >= 0 ) {
+
+ if ( category_query ( _categories_invis [ sel ].catname ) ) {
+ // already present
+ return;
+ }
+
+ memmove ( &(g_categories [ g_categorycount ]), &(_categories_invis [ sel ]), sizeof(mm_category_t) );
+ g_categorycount++;
+
+ ui_category = g_categorycount - 1;
+
+ unsigned int screen_width = pnd_conf_get_as_int_d ( g_conf, "display.screen_width", 800 );
+ unsigned int tab_width = pnd_conf_get_as_int ( g_conf, "tabs.tab_width" );
+ if ( ui_category > ui_catshift + ( screen_width / tab_width ) - 1 ) {
+ //ui_catshift++;
+ ui_catshift = ui_category - ( screen_width / tab_width ) + 1;
+ }
+
+ render_mask |= CHANGED_CATEGORY;
+ }
+
+ return;
+}