aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorvektor <devnull@localhost>2004-08-18 03:54:29 +0000
committervektor <devnull@localhost>2004-08-18 03:54:29 +0000
commit20f0d56d0b7f1484aee9b34192e873bd12f11552 (patch)
treeac066017b8aed22bad04647f252906e31aafc72c /src
parent5e2c889d112d312ab93c82580f231adfc314a539 (diff)
17 Aug 2004 Billy Biggs <vektor@dumbterm.net>
* tvtime/src/tvtime.c: Save the state of always-on-top across shutdown of tvtime. * tvtime/src/tvtimeconf.c: Implementation of the AlwaysOnTop config file parameter. * tvtime/src/tvtimeconf.h: Added the API to get the setting. * tvtime/docs/tvtime.xml.5: Document the new config file parameter. * tvtime/docs/html/default.tvtime.xml: Document the new config file parameter. * tvtime/ChangeLog: Note this in the ChangeLog.
Diffstat (limited to 'src')
-rw-r--r--src/tvtime.c8
-rw-r--r--src/tvtimeconf.c11
-rw-r--r--src/tvtimeconf.h1
3 files changed, 20 insertions, 0 deletions
diff --git a/src/tvtime.c b/src/tvtime.c
index de29a64..45ecb6c 100644
--- a/src/tvtime.c
+++ b/src/tvtime.c
@@ -1531,6 +1531,11 @@ int tvtime_main( rtctimer_t *rtctimer, int read_stdin, int realtime,
commands_handle( commands, TVTIME_TOGGLE_FULLSCREEN, 0 );
}
+ /* If we start always-on-top, enter this state now. */
+ if( config_get_alwaysontop( ct ) ) {
+ commands_handle( commands, TVTIME_TOGGLE_ALWAYSONTOP, 0 );
+ }
+
/* If we start half-framerate, toggle that now. */
for( i = 0; i < config_get_framerate_mode( ct ); i++ ) {
commands_handle( commands, TVTIME_TOGGLE_FRAMERATE, 0 );
@@ -2473,6 +2478,9 @@ int tvtime_main( rtctimer_t *rtctimer, int read_stdin, int realtime,
snprintf( number, 4, "%d", commands_get_audio_boost( commands ) );
config_save( ct, "AudioBoost", number );
+ snprintf( number, 4, "%d", output->is_alwaysontop() );
+ config_save( ct, "AlwaysOnTop", number );
+
if( vidin ) {
snprintf( number, 4, "%d", videoinput_get_input_num( vidin ) );
config_save( ct, "V4LInput", number );
diff --git a/src/tvtimeconf.c b/src/tvtimeconf.c
index 19e2290..5a1ce59 100644
--- a/src/tvtimeconf.c
+++ b/src/tvtimeconf.c
@@ -56,6 +56,7 @@ struct config_s
int aspect;
int debug;
int fullscreen;
+ int alwaysontop;
int priority;
int ntsc_mode;
int send_fields;
@@ -294,6 +295,10 @@ static void parse_option( config_t *ct, xmlNodePtr node )
ct->fullscreen = atoi( curval );
}
+ if( !xmlStrcasecmp( name, BAD_CAST "AlwaysOnTop" ) ) {
+ ct->alwaysontop = atoi( curval );
+ }
+
if( !xmlStrcasecmp( name, BAD_CAST "FramerateMode" ) ) {
ct->framerate = atoi( curval );
}
@@ -682,6 +687,7 @@ config_t *config_new( void )
ct->aspect = 0;
ct->debug = 0;
ct->fullscreen = 0;
+ ct->alwaysontop = 0;
ct->priority = -19;
ct->ntsc_mode = 0;
ct->send_fields = 0;
@@ -1458,6 +1464,11 @@ int config_get_fullscreen( config_t *ct )
return ct->fullscreen;
}
+int config_get_alwaysontop( config_t *ct )
+{
+ return ct->alwaysontop;
+}
+
int config_get_priority( config_t *ct )
{
return ct->priority;
diff --git a/src/tvtimeconf.h b/src/tvtimeconf.h
index 16f0e80..b15f90b 100644
--- a/src/tvtimeconf.h
+++ b/src/tvtimeconf.h
@@ -163,6 +163,7 @@ const char *config_get_timeformat( config_t *ct );
unsigned int config_get_channel_text_rgb( config_t *ct );
unsigned int config_get_other_text_rgb( config_t *ct );
int config_get_fullscreen( config_t *ct );
+int config_get_alwaysontop( config_t *ct );
int config_get_priority( config_t *ct );
uid_t config_get_uid( config_t *ct );
const char *config_get_deinterlace_method( config_t *ct );

Privacy Policy