Changeset 4325

Show
Ignore:
Timestamp:
03/14/10 15:59:51 (6 months ago)
Author:
andoma
Message:

Add an auto-standby-if-idle configurable option

Location:
trunk/showtime
Files:
2 added
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/showtime/Makefile

    r4320 r4325  
    3131# 
    3232SRCS += src/main.c \ 
     33        src/runcontrol.c \ 
    3334        src/version.c \ 
    3435        src/navigator.c \ 
  • trunk/showtime/src/main.c

    r4283 r4325  
    4343#include "misc/callout.h" 
    4444#include "api/opensubtitles.h" 
     45#include "runcontrol.h" 
    4546 
    4647/** 
     
    119120  const char *startpage; 
    120121  int nuiargs = 0; 
     122  int can_standby = 0; 
     123  int can_poweroff = 0; 
    121124 
    122125  trace_level = TRACE_ERROR; 
     
    142145    } else if(!strcmp(argv[0], "--ffmpeglog")) { 
    143146      ffmpeglog = 1; 
     147      argc -= 1; argv += 1; 
     148      continue; 
     149    } else if(!strcmp(argv[0], "--with-standby")) { 
     150      can_standby = 1; 
     151      argc -= 1; argv += 1; 
     152      continue; 
     153    } else if(!strcmp(argv[0], "--with-poweroff")) { 
     154      can_poweroff = 1; 
    144155      argc -= 1; argv += 1; 
    145156      continue; 
     
    221232  /* opensubtitles.org */ 
    222233  opensub_init(); 
     234 
     235  /* */ 
     236  runcontrol_init(can_standby, can_poweroff); 
    223237 
    224238  TRACE(TRACE_DEBUG, "core", "Starting UI"); 
  • trunk/showtime/src/showtime.h

    r4296 r4325  
    8282} 
    8383 
     84void runcontrol_activity(void); 
     85 
    8486#endif /* SHOWTIME_H */ 
  • trunk/showtime/src/ui/glw/glw.c

    r4273 r4325  
    13411341  dir[2] = p[2] - -100; 
    13421342  
     1343  if(gpe->type != GLW_POINTER_MOTION_REFRESH) 
     1344    runcontrol_activity(); 
    13431345 
    13441346  /* If a widget has grabbed to pointer (such as when holding the button 
     
    14831485  int r; 
    14841486 
     1487  runcontrol_activity(); 
     1488 
    14851489  glw_lock(gr); 
    14861490