1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
$NetBSD: patch-bc,v 1.1.1.1 2004/01/26 11:36:40 jmmv Exp $
--- tvmenu.c.orig 2001-02-12 22:19:33.000000000 +0100
+++ tvmenu.c
@@ -103,7 +103,7 @@ typedef void XT_CB( Widget w, XtPointer
/* ******************** Forward declarations ************** */
-static XT_CB QuitCB, FreezeCB, MuteCB, ZoomCB, InputCB, AfcCB, TModeCB,
+static XT_CB QuitCB, FreezeCB, MuteCB, ZoomCB, InputCB, AfcCB, AotCB, TModeCB,
ChanUpDnCB, AppearCB, AspectCB, AboutCB, ImgSavCB, ImgSavAsCB,
AudSavAsCB, VidSavAsCB, FormatCB, AudInpCB, StationPopupCB;
@@ -160,6 +160,7 @@ static TV_MENUITEM_DEF Menuitem_def[] =
{ TVMI( FORMAT,FORMAT_PALNCOMB ), "palncombFmt" , WC_mcmd , FormatCB },
{ TVMI( OPTIONS,OPTIONS_ASPECT ), "aspectLockCmd" , WC_mcmd , AspectCB },
{ TVMI( OPTIONS,OPTIONS_AFC ), "setAfcCmd", WC_mcmd , AfcCB },
+ { TVMI( OPTIONS,OPTIONS_AOT ), "setAotCmd", WC_mcmd , AotCB },
{ TV_MENU_OPTIONS, -1 , "line" , WC_mline, NULL },
/*
{ TVMI( OPTIONS,OPTIONS_SAVE ), "saveOptionsCmd", WC_mcmd , NULL },
@@ -396,6 +397,16 @@ static void AfcCB( Widget w, XtPointer c
TVMENUSetSelectedAfcMode( p->afc_mode );
}
+/* AotCB - Change the always on top mode */
+static void AotCB( Widget w, XtPointer cl, XtPointer cb )
+{
+ TV_PREFS *p = &G_glob.prefs;
+
+ p->aot_mode = !p->aot_mode;
+ XUTILSetAlwaysOnTop( p->aot_mode );
+ TVMENUSetSelectedAotMode( p->aot_mode );
+}
+
void TVMENUSetSelectedInputFormat( TV_INPUT_FORMAT fmt )
{
TV_MENUITEM_DEF *mi;
@@ -1008,6 +1019,19 @@ void TVMENUSetSelectedAfcMode( TV_BOOL a
NULL);
}
+void TVMENUSetSelectedAotMode( TV_BOOL aot )
+{
+ TV_MENUITEM_DEF *item = LookupMenuItemByKey( TV_MENUITEM_OPTIONS_AOT );
+ Pixmap pix;
+
+ if ( Select_pixmap == None )
+ TVMENULoadRadioPixmaps();
+
+ pix = aot ? Select_pixmap : Unselect_pixmap;
+ XtVaSetValues( item->wgt , XtNleftBitmap, pix,
+ NULL);
+}
+
void TVMENUSetSelectedAspectLock( TV_BOOL aspect_lock )
{
TV_MENUITEM_DEF *item = LookupMenuItemByKey( TV_MENUITEM_OPTIONS_ASPECT );
@@ -1043,6 +1067,7 @@ void TVMENUResync()
TVMENUSetSelectedAudioInputDevice( aud_input );
TVMENUSetSelectedTunerMode ( p->tuner_mode );
TVMENUSetSelectedAfcMode ( p->afc_mode );
+ TVMENUSetSelectedAotMode ( p->aot_mode );
}
/* TVTOOLSSetStationText - Sets the channel text to the specified */
|