IMG_ARROW_SCROLLBAR arrowscroller.png
[categories]
+do_all_cat 1 # if >0, will show an All category; if 0, skip it, just your cats.
# Normally for mmenu, an encountered category is just used as is. 5 cats exist, you get 5 tabs.
# If map_on is >0, then category transforms will occur
# @NEWCAT oldcat1:oldcat2 <- means oldcat1, if found, will map to NEWCAT. "@" is discarded.
}
// create all cat
- category_push ( g_x11_present ? CATEGORY_ALL " (X11)" : CATEGORY_ALL " (No X11)", NULL );
+ if ( pnd_conf_get_as_int_d ( g_conf, "categories.do_all_cat", 1 ) ) {
+ category_push ( g_x11_present ? CATEGORY_ALL " (X11)" : CATEGORY_ALL " (No X11)", NULL );
+ }
// set up category mappings
if ( pnd_conf_get_as_int_d ( g_conf, "categories.map_on", 0 ) ) {
// push to All category
// we do this first, so first category is always All
- if ( ! category_push ( g_x11_present ? CATEGORY_ALL " (X11)" : CATEGORY_ALL " (No X11)", iter ) ) {
- pnd_log ( pndn_warning, " Couldn't categorize to All: '%s'\n", IFNULL(iter -> title_en, "No Name") );
- }
+ if ( pnd_conf_get_as_int_d ( g_conf, "categories.do_all_cat", 1 ) ) {
+ if ( ! category_push ( g_x11_present ? CATEGORY_ALL " (X11)" : CATEGORY_ALL " (No X11)", iter ) ) {
+ pnd_log ( pndn_warning, " Couldn't categorize to All: '%s'\n", IFNULL(iter -> title_en, "No Name") );
+ }
+ } // all?
// main categories
if ( iter -> main_category && pnd_conf_get_as_int_d ( g_conf, "tabs.top_maincat", 1 ) ) {
IMG_ARROW_SCROLLBAR arrowscroller.png
[categories]
+do_all_cat 1 # if >0, will show an All category; if 0, skip it, just your cats.
# Normally for mmenu, an encountered category is just used as is. 5 cats exist, you get 5 tabs.
# If map_on is >0, then category transforms will occur
# @NEWCAT oldcat1:oldcat2 <- means oldcat1, if found, will map to NEWCAT. "@" is discarded.
unsigned int text_offset_y = pnd_conf_get_as_int ( g_conf, "tabs.text_offset_y" );
unsigned int text_width = pnd_conf_get_as_int ( g_conf, "tabs.text_width" );
unsigned int maxtab = ( screen_width / tab_width ) < g_categorycount ? ( screen_width / tab_width ) + ui_catshift : g_categorycount + ui_catshift;
+ unsigned int maxtabspot = ( screen_width / tab_width );
// draw tabs with categories
for ( col = ui_catshift;
} else {
if ( col - ui_catshift == 0 ) {
s = g_imagecache [ IMG_TAB_LINEL ].i;
- } else if ( col - ui_catshift == maxtab - 1 ) {
+ } else if ( col - ui_catshift == maxtabspot - 1 ) {
s = g_imagecache [ IMG_TAB_LINER ].i;
} else {
s = g_imagecache [ IMG_TAB_LINE ].i;
} // for
// draw tab lines under where tabs would be if we had categories
- maxtab = ( screen_width / tab_width );
- for ( /* foo */; col < maxtab; col++ ) {
+ for ( /* foo */; col < maxtabspot; col++ ) {
SDL_Surface *s;
if ( col - ui_catshift == 0 ) {
s = g_imagecache [ IMG_TAB_LINEL ].i;
- } else if ( col - ui_catshift == maxtab - 1 ) {
+ } else if ( col - ui_catshift == maxtabspot - 1 ) {
s = g_imagecache [ IMG_TAB_LINER ].i;
} else {
s = g_imagecache [ IMG_TAB_LINE ].i;