the menu with rescan apps, shutdown, etc.
Rescan apps is now functional in the menu
- full-replacement PXML is one option, another is
- apply override to all sections that match -- by unique-id, so apply override to all sub-apps that apply?
-- libpnd: appdata-dir-name
+- libpnd: appdata-dir-name?
- mmwrapper black screen?
-- manual app rescan
- conf .. use also menu searchpath
- About screen
- override
return;
}
+
+void category_freeall ( void ) {
+ unsigned int i;
+ mm_appref_t *iter, *next;
+
+ for ( i = 0; i < g_categorycount; i++ ) {
+
+ iter = g_categories [ i ].refs;
+
+ while ( iter ) {
+ next = iter -> next;
+ free ( iter );
+ iter = next;
+ }
+
+ g_categories [ i ].refs = NULL;
+
+ } // for
+
+ return;
+}
unsigned char category_push ( char *catname, pnd_disco_t *app ); // catname is not pulled from app, so we can make them up on the fly (ie: "All")
mm_category_t *category_query ( char *catname );
void category_dump ( void ); // sort the apprefs
+void category_freeall ( void );
#endif
/* inhale applications, icons, categories, etc
*/
+ applications_scan();
+
+ /* actual work now
+ */
+
+ while ( 1 ) { // forever!
+
+ // show the menu, or changes thereof
+ ui_render ( CHANGED_NOTHING );
+
+ // wait for input or time-based events (like animations)
+ // deal with inputs
+ ui_process_input ( 1 /* block */ );
+
+ // sleep? block?
+ usleep ( 5000 );
+
+ } // while
+
+ return ( 0 );
+}
+
+void emit_and_quit ( char *s ) {
+ printf ( "%s\n", s );
+ exit ( 0 );
+}
+
+void applications_free ( void ) {
+
+ // free up all our category apprefs, but keep the preview and icon cache's..
+ category_freeall();
+
+ // free up old disco_t
+ if ( g_active_apps ) {
+ pnd_disco_t *p = pnd_box_get_head ( g_active_apps );
+ pnd_disco_t *n;
+ while ( p ) {
+ n = pnd_box_get_next ( p );
+ pnd_disco_destroy ( p );
+ p = n;
+ }
+ pnd_box_delete ( g_active_apps );
+ }
+
+ return;
+}
+
+void applications_scan ( void ) {
// show disco screen
ui_discoverscreen ( 1 /* clear screen */ );
// dump categories
//category_dump();
- /* actual work now
- */
-
- while ( 1 ) { // forever!
-
- // show the menu, or changes thereof
- ui_render ( CHANGED_NOTHING );
-
- // wait for input or time-based events (like animations)
- // deal with inputs
- ui_process_input ( 1 /* block */ );
-
- // sleep? block?
- usleep ( 5000 );
-
- } // while
-
- return ( 0 );
-}
-
-void emit_and_quit ( char *s ) {
- printf ( "%s\n", s );
- exit ( 0 );
+ return;
}
font_rgba_a 20 # RGBA for the display text
battery_x 10 # (x,y) for battery level
battery_y 450 # (x,y) for battery level
-hintline Push START for shutdown options # shown at bottom of screen
+hintline Push SELECT for shutdown options # shown at bottom of screen
hint_x 275 # (x,y) for hint line
hint_y 450 # (x,y) for hint line
clock_x 650 # (x,y) for clock
void emit_and_quit ( char *s );
+void applications_free ( void );
+void applications_scan ( void );
+
#endif
ui_event++;
} else if ( event.key.keysym.sym == SDLK_LALT ) { // start button
+ ui_push_exec();
+ ui_event++;
+
+ } else if ( event.key.keysym.sym == SDLK_LCTRL /*LALT*/ ) { // select button
char *opts [ 20 ] = {
"Return to Minimenu",
"Shutdown Pandora",
system ( buffer );
} else if ( sel == 2 ) {
// rescan apps
+ pnd_log ( pndn_debug, "Freeing up applications\n" );
+ applications_free();
+ pnd_log ( pndn_debug, "Rescanning applications\n" );
+ applications_scan();
+ // reset view
+ ui_selected = NULL;
+ ui_rows_scrolled_down = 0;
} else if ( sel == 3 ) {
// run xfce
char buffer [ PATH_MAX ];