mmenu now uses real app conf (desktop.searchpath) for apps; will add menu searchpath...
authorskeezix <skeezix@flotsam-vm.(none)>
Wed, 10 Mar 2010 17:27:26 +0000 (12:27 -0500)
committerskeezix <skeezix@flotsam-vm.(none)>
Wed, 10 Mar 2010 17:27:26 +0000 (12:27 -0500)
previewpics (deferred load) now work fine with new pnd_run.sh (to come), woowoo

deployment/etc/pandora/conf/mmenu.conf
minimenu/mmenu.c
minimenu/mmenu.conf
minimenu/mmenu.h

index 1d9f9ab..febe476 100644 (file)
@@ -7,11 +7,9 @@ font                   Vera.ttf
 font_ptsize            24
 pndrun                 /usr/pandora/scripts:./testdata/scripts # searchpath to locate "pnd_run.sh"; why aren't I looking in /etc/pandora/conf/apps for this?
 load_previews_now      0       # if >0, will try to load preview pics from pnds at boot time, not defer till later
-load_previews_later    0       # if >0, will try to load preview pics sometime (see defer_timer_ms as well)
+load_previews_later    1       # if >0, will try to load preview pics sometime (see defer_timer_ms as well)
 loglevel               0       # 0 is debug, lots of crap; 3 is better, means 'errors only'. Output may screw up the wrapper!
-
-[apps]
-searchpath             ./testdata/app2:./testdata/app3:/media/*/pandora/desktop
+x11_present_sh         /bin/pidof X # command to invoke to determine if X11 is running or not; expects a number on X is present.
 
 [display]
 fullscreen             1       # 0 for windowed, >0 for fullscreen
index f7fa63c..4a649c0 100644 (file)
@@ -54,6 +54,7 @@ pnd_box_handle *g_active_apps = NULL;
 unsigned int g_active_appcount = 0;
 char g_username [ 128 ]; // since we have to wait for login (!!), store username here
 pnd_conf_handle g_conf = 0;
+pnd_conf_handle g_desktopconf = 0;
 
 char *pnd_run_script = NULL;
 char *g_skinpath = NULL;
@@ -155,6 +156,13 @@ int main ( int argc, char *argv[] ) {
     emit_and_quit ( MM_QUIT );
   }
 
+  g_desktopconf = pnd_conf_fetch_by_id ( pnd_conf_desktop, PND_CONF_SEARCHPATH );
+
+  if ( ! g_desktopconf ) {
+    pnd_log ( pndn_error, "ERROR: Couldn't fetch desktop conf file\n" );
+    emit_and_quit ( MM_QUIT );
+  }
+
   // redo log filter
   pnd_log_set_filter ( pnd_conf_get_as_int_d ( g_conf, "minimenu.loglevel", pndn_error ) );
 
@@ -239,8 +247,8 @@ int main ( int argc, char *argv[] ) {
   ui_discoverscreen ( 1 /* clear screen */ );
 
   // determine current app list, cache icons
-  pnd_log ( pndn_debug, "Looking for pnd applications here: %s\n", pnd_conf_get_as_char ( g_conf, MMENU_APP_SEARCHPATH ) );
-  g_active_apps = pnd_disco_search ( pnd_conf_get_as_char ( g_conf, MMENU_APP_SEARCHPATH ), NULL ); // ignore overrides for now
+  pnd_log ( pndn_debug, "Looking for pnd applications here: %s\n", pnd_conf_get_as_char ( g_desktopconf, "desktop.searchpath" ) );
+  g_active_apps = pnd_disco_search ( pnd_conf_get_as_char ( g_desktopconf, "desktop.searchpath" ), NULL ); // ignore overrides for now
   g_active_appcount = pnd_box_get_size ( g_active_apps );
 
   unsigned char maxwidth, maxheight;
index f8546d2..aed332a 100644 (file)
@@ -11,9 +11,6 @@ load_previews_later   0       # if >0, will try to load preview pics sometime (see defer
 loglevel               0       # 0 is debug, lots of crap; 3 is better, means 'errors only'. Output may screw up the wrapper!
 x11_present_sh         /bin/pidof X # command to invoke to determine if X11 is running or not; expects a number on X is present.
 
-[apps]
-searchpath             ./testdata/app2:./testdata/app3:/media/*/pandora/desktop
-
 [display]
 fullscreen             0       # 0 for windowed, >0 for fullscreen
 screen_width           800     # for some calculations
index 0b688a7..ab17b5e 100644 (file)
@@ -13,7 +13,6 @@ extern char *g_skinpath;
 
 // keys
 #define MMENU_ARTPATH "minimenu.static_art_searchpath"
-#define MMENU_APP_SEARCHPATH "apps.searchpath"
 
 #define MMENU_GRID_FONT "grid.font"
 #define MMENU_GRID_FONTSIZE "grid.font_ptsize"