"Cache previews to SD now",
"Run xfce4 from Minimenu",
"Run a terminal/console",
- "Exit and run xfce4",
- "Exit and run pmenu",
+ "Switch preferred GUI",
"Quit (<- beware)",
"Select a Minimenu skin",
"About Minimenu"
};
- int sel = ui_modal_single_menu ( opts, 11, "Minimenu", "Enter to select; other to return." );
+ int sel = ui_modal_single_menu ( opts, 10, "Minimenu", "Enter to select; other to return." );
char buffer [ 100 ];
if ( sel == 0 ) {
// reset view
ui_selected = NULL;
ui_rows_scrolled_down = 0;
+ // set back to first tab, to be safe
+ ui_category = 0;
+ ui_catshift = 0;
} else if ( sel == 3 ) {
// cache preview to SD now
extern pnd_box_handle g_active_apps;
}
} else if ( sel == 6 ) {
- // set env to xfce
- sprintf ( buffer, "echo startxfce4 > /tmp/gui.load" );
- system ( buffer );
+ char buffer [ PATH_MAX ];
+ sprintf ( buffer, "%s %s\n", MM_RUN, "/usr/pandora/scripts/op_switchgui.sh" );
emit_and_quit ( buffer );
- //sprintf ( buffer, "sudo poweroff" );
- //system ( buffer );
- exit ( 0 );
} else if ( sel == 7 ) {
- // set env to pmenu
- sprintf ( buffer, "echo pmenu > /tmp/gui.load" );
- system ( buffer );
- emit_and_quit ( buffer );
- //sprintf ( buffer, "sudo poweroff" );
- //system ( buffer );
- exit ( 0 );
- } else if ( sel == 8 ) {
emit_and_quit ( MM_QUIT );
- } else if ( sel == 9 ) {
+ } else if ( sel == 8 ) {
// select skin
if ( ui_pick_skin() ) {
emit_and_quit ( MM_RESTART );
}
- } else if ( sel == 10 ) {
+ } else if ( sel == 9 ) {
// about
}
void ui_push_ltrigger ( void ) {
unsigned char oldcat = ui_category;
+ 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 > 0 ) {
ui_category--;
} else {
if ( pnd_conf_get_as_int_d ( g_conf, "tabs.wraparound", 0 ) > 0 ) {
ui_category = g_categorycount - 1;
+ ui_catshift = 0;
+ if ( ui_category >= ( screen_width / tab_width ) ) {
+ ui_catshift = ui_category - ( screen_width / tab_width ) + 1;
+ }
category_fs_restock ( &(g_categories [ ui_category ]) );
}
}
} else {
if ( pnd_conf_get_as_int_d ( g_conf, "tabs.wraparound", 0 ) > 0 ) {
ui_category = 0;
+ ui_catshift = 0;
category_fs_restock ( &(g_categories [ ui_category ]) );
}
}