pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/fxtv Implement always on top functionality, s...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6f57e2e1a1d4
branches:  trunk
changeset: 462240:6f57e2e1a1d4
user:      jmmv <jmmv%pkgsrc.org@localhost>
date:      Sun Sep 28 15:58:34 2003 +0000

description:
Implement always on top functionality, so that the TV window stays above all
other windows when switching focus.  This only works with window managers
that support the NetWM protocol (even if they do not have "menu" options to
change this state); on others, it has no effect.

The "-noalwaysOnTop" option can be given on the command line to disable this.
The "Fxtv.alwaysOnTop" boolean resource can be used to tune this.

Bump PKGREVISION to 3.  Will feed back these patches to authors.

diffstat:

 graphics/fxtv/Makefile         |   4 +-
 graphics/fxtv/distinfo         |  14 ++++++--
 graphics/fxtv/patches/patch-ad |  65 ++++++++++++++++++++++++++++++++++++---
 graphics/fxtv/patches/patch-aj |  28 +++++++++++++---
 graphics/fxtv/patches/patch-ak |  13 ++++++-
 graphics/fxtv/patches/patch-bb |  12 +++++++
 graphics/fxtv/patches/patch-bc |  66 +++++++++++++++++++++++++++++++++++++++
 graphics/fxtv/patches/patch-bd |  21 ++++++++++++
 graphics/fxtv/patches/patch-be |  13 +++++++
 graphics/fxtv/patches/patch-bf |  70 ++++++++++++++++++++++++++++++++++++++++++
 graphics/fxtv/patches/patch-bg |  14 ++++++++
 11 files changed, 302 insertions(+), 18 deletions(-)

diffs (truncated from 435 to 300 lines):

diff -r 510820a29101 -r 6f57e2e1a1d4 graphics/fxtv/Makefile
--- a/graphics/fxtv/Makefile    Sun Sep 28 15:09:50 2003 +0000
+++ b/graphics/fxtv/Makefile    Sun Sep 28 15:58:34 2003 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.23 2003/07/17 21:40:38 grant Exp $
+# $NetBSD: Makefile,v 1.24 2003/09/28 15:58:34 jmmv Exp $
 
 DISTNAME=      fxtv-1.03
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    graphics
 MASTER_SITES=  ${HOMEPAGE}
 EXTRACT_SUFX=  .tgz
diff -r 510820a29101 -r 6f57e2e1a1d4 graphics/fxtv/distinfo
--- a/graphics/fxtv/distinfo    Sun Sep 28 15:09:50 2003 +0000
+++ b/graphics/fxtv/distinfo    Sun Sep 28 15:58:34 2003 +0000
@@ -1,17 +1,23 @@
-$NetBSD: distinfo,v 1.8 2003/07/17 20:21:30 jmmv Exp $
+$NetBSD: distinfo,v 1.9 2003/09/28 15:58:34 jmmv Exp $
 
 SHA1 (fxtv-1.03.tgz) = 2ed9f2bee879a931c7f963a4ad7d07ef9cd297f9
 Size (fxtv-1.03.tgz) = 198669 bytes
 SHA1 (patch-aa) = cd994d512fe99e962cc9c505285da63d1421f81e
 SHA1 (patch-ab) = a62c497255063a88b7d240e902a45c85f59f84b0
 SHA1 (patch-ac) = 27a825287c17d1cc957fb89ba2f665c01f998c15
-SHA1 (patch-ad) = 63426b2b5c25556fe21fc2fa02e5c041da22096d
+SHA1 (patch-ad) = 39eb6a889ef76c27f2dd296385d9247c703db9eb
 SHA1 (patch-ae) = aa7689ff62388d4d50f89501f2c3084bc04409d8
 SHA1 (patch-af) = 50ab2d960955a8e97b6b56265195ec325b206cf9
 SHA1 (patch-ag) = 13655a94cd6200d12e25d406d7c1923f89000c80
 SHA1 (patch-ah) = 896d5164b176154b398f52d5c9887210da3d1e77
 SHA1 (patch-ai) = 85baa4b457dede91bf74ce0d8e4655fae9da2d96
-SHA1 (patch-aj) = 35ffa80ed5484c0d23a5f4fbe5657217c715e6e7
-SHA1 (patch-ak) = 4f32ae6c6eea2b8b1c26c6861e9bff1429976024
+SHA1 (patch-aj) = 9a9427ba6c9d092e57f652bd6c278c96f9ba6d1c
+SHA1 (patch-ak) = 87e4f9636aa798f9f0f5a4e27a936f800461667a
 SHA1 (patch-al) = d60ac498f40cd9ec833ca436708cb140856826f1
 SHA1 (patch-ba) = 20efae40631bdb5be57e12445bf2135a47952763
+SHA1 (patch-bb) = 1a6cc73078ac7587e6df9de6c3ec9930e498484e
+SHA1 (patch-bc) = d5ddc97b1ba5a1660d622f20d89a3a680596f024
+SHA1 (patch-bd) = c24ef4e00d800368a843d0972d66080ddc2b07eb
+SHA1 (patch-be) = ff86cb36c3379727de59632ac29efdbbc6baa1ec
+SHA1 (patch-bf) = e3ce002d342ae508262f21e9eaa4af20d1d56f77
+SHA1 (patch-bg) = fa2895e34aea2be7fccfb912276a5fbfb6c9d1be
diff -r 510820a29101 -r 6f57e2e1a1d4 graphics/fxtv/patches/patch-ad
--- a/graphics/fxtv/patches/patch-ad    Sun Sep 28 15:09:50 2003 +0000
+++ b/graphics/fxtv/patches/patch-ad    Sun Sep 28 15:58:34 2003 +0000
@@ -1,8 +1,54 @@
-$NetBSD: patch-ad,v 1.7 2003/07/17 20:21:31 jmmv Exp $
+$NetBSD: patch-ad,v 1.8 2003/09/28 15:58:34 jmmv Exp $
 
 --- app_rsrc.h.orig    2001-02-12 22:17:53.000000000 +0100
 +++ app_rsrc.h
-@@ -525,96 +525,95 @@ static XtResource Resources[] = {
+@@ -80,6 +80,8 @@ typedef struct _AppResources {
+     int      Bpp_24bit;
+     int      Bpp_32bit;
+ 
++    Boolean  aot_mode;
++
+     Boolean  afc_mode;
+     Boolean  disable_direct_v;
+     String   remote_type;             /*  Type of Remote Control attached  */
+@@ -191,6 +193,8 @@ extern AppResources     App_res;
+ 
+ #define RNafc               "afc"
+ #define RCafc               "Afc"
++#define RNalwaysOnTop       "alwaysOnTop"
++#define RCalwaysOnTop       "AlwaysOnTop"
+ 
+ #define RNdisableDirectV    "disableDirectV"
+ #define RCdisableDirectV    "DisableDirectV"
+@@ -284,6 +288,7 @@ static XrmOptionDescRec Cmd_line_options
+    { "-Bpp24bit"           , RNBpp24bit       , XrmoptionSepArg, NULL        },
+    { "-Bpp32bit"           , RNBpp32bit       , XrmoptionSepArg, NULL        },
+                                                                              
++   { "-noalwaysOnTop"      , RNalwaysOnTop    , XrmoptionNoArg , pFALSE      },
+    { "-noafc"              , RNafc            , XrmoptionNoArg , pFALSE      },
+    { "-disableDirectV"     , RNdisableDirectV , XrmoptionNoArg , pTRUE       },
+    { "-remoteType"         , RNremoteType     , XrmoptionSepArg, NULL        },
+@@ -389,7 +394,7 @@ static XtResource Resources[] = {
+         (XtPointer) True },
+     { RNdspDevice, RCaudioDevice, XtRString, sizeof(String),
+         XtOffsetOf(AppResources, dsp_device ), XtRImmediate,
+-        "/dev/dsp"  },
++        "/dev/audio"  },
+     { RNmixerDevice, RCaudioDevice, XtRString, sizeof(String),
+         XtOffsetOf(AppResources, mixer_device ), XtRImmediate,
+         "/dev/mixer"  },
+@@ -434,6 +439,10 @@ static XtResource Resources[] = {
+         XtOffsetOf(AppResources, Bpp_32bit), XtRString,
+         "-1" /*  0 = Guess */ },   
+ 
++    { RNalwaysOnTop, RCalwaysOnTop, XtRBoolean, sizeof(Boolean),
++        XtOffsetOf(AppResources, aot_mode), XtRImmediate,
++        (XtPointer) True },
++
+     { RNafc, RCafc, XtRBoolean, sizeof(Boolean),
+         XtOffsetOf(AppResources, afc_mode), XtRImmediate,
+         (XtPointer) True },
+@@ -525,96 +534,96 @@ static XtResource Resources[] = {
  };
  
  
@@ -114,6 +160,7 @@
 +"-satU [0..200]              - U Saturation       (%); def=100\n" \
 +"-satV [0..284]              - V Saturation       (%); def=100\n" \
 +"-aspectlock                 - Enable 4:3 aspect lock on video window\n" \
++"-noalwaysOnTop              - Disable always on top\n" \
 +"\n" \
 +"-deviceNumber <#>           - bktr/tuner device numbers; def=0\n" \
 +"-inputFormat <fmt>          - Tuner signal input format (ntsc,ntscm,ntscj,\n" \
@@ -133,7 +180,7 @@
 +"-antennaFreqSet <freqset>   - Freq set for antenna (def = nabcst)\n" \
 +"\n" \
 +"-noAudio                    - Suppress playing audio through soundcard\n" \
-+"-dspDevice                  - Override default DSP device   (def=/dev/dsp)\n" \
++"-dspDevice                  - Override default DSP device   (def=/dev/audio)\n" \
 +"-mixerDevice                - Override default mixer device (def=/dev/mixer)\n" \
 +"-mixerChannel               - Audio mixer (line,line1/2/3,cd,mic,video)\n" \
 +"\n" \
@@ -188,7 +235,15 @@
  
  static String fallback_resources[] = { 
   /*"Fxtv.geometry: +10+10",*/
-@@ -789,6 +788,7 @@ static String fallback_resources[] = { 
+@@ -681,6 +690,7 @@ static String fallback_resources[] = { 
+    "*menuBox*optionsMenu*captureToCmd.label:  Capture To...",
+    "*menuBox*optionsMenu*saveOptionsCmd.label:Save Options",
+    "*menuBox*optionsMenu*setAfcCmd.label:     AFC",
++   "*menuBox*optionsMenu*setAotCmd.label:     Always on top",
+ 
+    "*menuBox*helpMenu.label:                  Help",
+    "*menuBox*helpMenu.menu.label:             Help",
+@@ -789,6 +799,7 @@ static String fallback_resources[] = { 
     "*imageSaveDialog*suffixLabel.label:            Append Img # Suffix",
     "*imageSaveDialog*formatLabel.label:            Format:",
     "*imageSaveDialog*formatMenuBox*tiffCmd.label:  TIFF",
@@ -196,7 +251,7 @@
     "*imageSaveDialog*formatMenuBox*ppmCmd.label:   PPM",
     "*imageSaveDialog*okCmd.label:                  OK",
  
-@@ -902,6 +902,7 @@ static String fallback_resources[] = { 
+@@ -902,6 +913,7 @@ static String fallback_resources[] = { 
     "*videoSaveDialog*imageEncLabel.label:           IMAGE ENCODE",
     "*videoSaveDialog*iFileFmtLabel.label:           Format:",
     "*videoSaveDialog*iFileFmtMenuBox*tiffCmd.label: TIFF",
diff -r 510820a29101 -r 6f57e2e1a1d4 graphics/fxtv/patches/patch-aj
--- a/graphics/fxtv/patches/patch-aj    Sun Sep 28 15:09:50 2003 +0000
+++ b/graphics/fxtv/patches/patch-aj    Sun Sep 28 15:58:34 2003 +0000
@@ -1,8 +1,26 @@
-$NetBSD: patch-aj,v 1.1 2002/12/21 11:10:03 wiz Exp $
+$NetBSD: patch-aj,v 1.2 2003/09/28 15:58:34 jmmv Exp $
 
---- Fxtv.orig  Sat Dec 21 11:57:15 2002
-+++ Fxtv
-@@ -320,6 +320,7 @@ Fxtv*iconName: FXTV
+--- Fxtv.orig  2003-09-28 17:38:29.000000000 +0200
++++ Fxtv       2003-09-28 17:38:29.000000000 +0200
+@@ -11,6 +11,8 @@
+                                         ! tuner, video, svideo, csvideo, dev3
+ !Fxtv*defaultAudioInput: tuner           
+                                         ! tuner, external, internal, auto
++Fxtv*alwaysOnTop:     True
++                                        ! Always On Top
+ Fxtv*afc:                     False
+                                         ! Automatic Frequency Control
+ !Fxtv*remoteType:     Hauppauge
+@@ -57,7 +59,7 @@
+ 
+ ! Method to override audio device
+ !Fxtv*doSound:          true
+-!Fxtv*dspDevice:        /dev/dsp
++!Fxtv*dspDevice:        /dev/audio
+ !Fxtv*mixerDevice:      /dev/mixer
+ !Fxtv*mixerChannel:     line
+                                         ! line, line1/2/3, cd, mic, video
+@@ -320,6 +322,7 @@
  *imageSaveDialog*suffixLabel.label:            Append Img # Suffix
  *imageSaveDialog*formatLabel.label:            Format:
  *imageSaveDialog*formatMenuBox*tiffCmd.label:  TIFF
@@ -10,7 +28,7 @@
  *imageSaveDialog*formatMenuBox*ppmCmd.label:   PPM
  *imageSaveDialog*okCmd.label:                  OK
  
-@@ -432,6 +433,7 @@ Fxtv*iconName: FXTV
+@@ -432,6 +435,7 @@
  *videoSaveDialog*imageEncLabel.label:           IMAGE ENCODE
  *videoSaveDialog*iFileFmtLabel.label:           Format:
  *videoSaveDialog*iFileFmtMenuBox*tiffCmd.label: TIFF
diff -r 510820a29101 -r 6f57e2e1a1d4 graphics/fxtv/patches/patch-ak
--- a/graphics/fxtv/patches/patch-ak    Sun Sep 28 15:09:50 2003 +0000
+++ b/graphics/fxtv/patches/patch-ak    Sun Sep 28 15:58:34 2003 +0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-ak,v 1.1 2002/12/21 11:10:03 wiz Exp $
+$NetBSD: patch-ak,v 1.2 2003/09/28 15:58:34 jmmv Exp $
 
---- glob.h.orig        Mon Feb 12 20:24:44 2001
+--- glob.h.orig        2001-02-12 20:24:44.000000000 +0100
 +++ glob.h
 @@ -54,6 +54,7 @@ typedef enum {
  
@@ -10,3 +10,12 @@
              TV_STILL_FMT_PPM,
              TV_STILL_FMT_YUV,
              TV_NUM_STILL_FMTS
+@@ -133,6 +134,8 @@ typedef struct {
+     TV_TUNER_MODE tuner_mode;
+     TV_BOOL       afc_mode;
+ 
++    TV_BOOL       aot_mode;
++
+     TV_BOOL       last_station_is_chan;
+     TV_INT32      last_chan;
+     double        last_freq;
diff -r 510820a29101 -r 6f57e2e1a1d4 graphics/fxtv/patches/patch-bb
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/fxtv/patches/patch-bb    Sun Sep 28 15:58:34 2003 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-bb,v 1.1 2003/09/28 15:58:34 jmmv Exp $
+
+--- glob.c.orig        2001-02-12 19:26:16.000000000 +0100
++++ glob.c
+@@ -131,6 +131,7 @@ void TVGLOBInitPrefs( TV_PREFS *p )
+     p->cable_freq_set  = 1;
+     p->tuner_mode      = TV_TUNER_MODE_ANTENNA;
+     p->afc_mode        = TRUE;
++    p->aot_mode        = TRUE;
+ 
+     p->last_chan       = 3;               /*  -1 = use last_freq  */
+     p->last_freq       = 0.0;
diff -r 510820a29101 -r 6f57e2e1a1d4 graphics/fxtv/patches/patch-bc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/fxtv/patches/patch-bc    Sun Sep 28 15:58:34 2003 +0000
@@ -0,0 +1,66 @@
+$NetBSD: patch-bc,v 1.1 2003/09/28 15:58:34 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   );
+ }
+ 



Home | Main Index | Thread Index | Old Index