aboutsummaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--ChangeLog1
-rw-r--r--docs/html/default.tvtime.xml8
-rw-r--r--docs/tvtime.xml.512
-rw-r--r--src/tvtime.c8
-rw-r--r--src/tvtimeconf.c11
-rw-r--r--src/tvtimeconf.h1
6 files changed, 41 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 50a4862..da4dcea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
0.9.13 -
+ * vektor: Save always-on-top state across shutdown of tvtime.
* vektor: Replaced the OutputHeight configuration with window geometry
support using the --geometry command line option.
* vektor: Removed the tvtime console, it was not really useful and
diff --git a/docs/html/default.tvtime.xml b/docs/html/default.tvtime.xml
index 78a351d..9aa8049 100644
--- a/docs/html/default.tvtime.xml
+++ b/docs/html/default.tvtime.xml
@@ -162,6 +162,14 @@
<option name="FullscreenPosition" value="Centre"/>
<!--
+ Set this to 1 to have tvtime start in always-on-top mode under
+ supporting window managers. This setting is set at runtime so
+ that when you quit tvtime in always-on-top mode, starting it again
+ will start back in always-on-top mode.
+ -->
+ <option name="AlwaysOnTop" value="0"/>
+
+ <!--
This sets the framerate of the output from tvtime.
0 = Full framerate mode, every field is deinterlaced.
diff --git a/docs/tvtime.xml.5 b/docs/tvtime.xml.5
index 1e813b3..c5563da 100644
--- a/docs/tvtime.xml.5
+++ b/docs/tvtime.xml.5
@@ -278,6 +278,18 @@ you quit
in fullscreen, starting it again will start back in fullscreen mode.
.TP
+<option name="AlwaysOnTop" value="0"/>
+Set this to
+.I 1
+to have
+.B tvtime
+start in always-on-top mode under supporting window managers. This
+setting is set at runtime so that when you quit
+.B tvtime
+in always-on-top mode, starting it again will start back in
+always-on-top mode.
+
+.TP
<option name="FullscreenPosition" value="Centre"/>
Sets the position of the output when in fullscreen mode:
.I top,
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