mmenu; fix 'reveal hidden' to work (broken in recent changes to category_publish...
authorskeezix <skeezix@flotsam-vm.(none)>
Tue, 8 Feb 2011 20:22:49 +0000 (15:22 -0500)
committerskeezix <skeezix@flotsam-vm.(none)>
Tue, 8 Feb 2011 20:22:49 +0000 (15:22 -0500)
minimenu/mmui.c

index 6447ca9..ceffeca 100644 (file)
@@ -3116,11 +3116,13 @@ void ui_revealscreen ( void ) {
   if ( sel >= 0 ) {
 
     // fix up category name, if its been hacked
+#if 0 // prepending and .. wtf crap is this
     if ( strchr ( g_categories [ sel ] -> catname, '.' ) ) {
       char *t = g_categories [ sel ] -> catname;
       g_categories [ sel ] -> catname = strdup ( strchr ( g_categories [ sel ] -> catname, '.' ) + 1 );
       free ( t );
     }
+#endif
 
     // reflag this guy to be visible
     g_categories [ sel ] -> catflags = CFNORMAL;
@@ -3141,13 +3143,13 @@ void ui_revealscreen ( void ) {
       ui_catshift = ui_category - ( screen_width / tab_width ) + 1;
     }
 
-    // redraw tabs
-    render_mask |= CHANGED_CATEGORY;
   }
 
-  for ( i = 0; i < g_categorycount; i++ ) {
-    free ( labels [ i ] );
-  }
+  // republish categories
+  category_publish ( CFNORMAL, NULL );
+
+  // redraw tabs
+  render_mask |= CHANGED_CATEGORY;
 
   return;
 }