diff -ru nxtvepg-2.7.3.orig/Makefile nxtvepg-2.7.3/Makefile --- nxtvepg-2.7.3.orig/Makefile 2004-07-18 15:00:26.000000000 +0200 +++ nxtvepg-2.7.3/Makefile 2004-12-24 09:37:51.000000000 +0100 @@ -61,8 +61,8 @@ INCS += -I/usr/include/tcl$(TCL_VER) endif -LDLIBS = -ltk$(TCL_VER) -ltcl$(TCL_VER) -L/usr/X11R6/lib -lX11 -lXmu -lm -ldl - +#LDLIBS = -ltk$(TCL_VER) -ltcl$(TCL_VER) -L/usr/X11R6/lib -lX11 -lXmu -lm -ldl +LDLIBS = -ltcl$(TCL_VER) -lm -ldl # use static libraries for debugging only #LDLIBS += -Ldbglib -static @@ -72,7 +72,7 @@ #INCS += -I/usr/local/tcl/tcl8.0/generic -I/usr/local/tcl/tk8.0/generic # path to Tcl/Tk script library (note Tk is sometimes in X11/lib/tk#.#) -TK_LIBRARY_PATH = /usr/lib/tk$(TCL_VER) +#TK_LIBRARY_PATH = /usr/lib/tk$(TCL_VER) TCL_LIBRARY_PATH = /usr/lib/tcl$(TCL_VER) DEFS += -DTK_LIBRARY_PATH=\"$(TK_LIBRARY_PATH)\" DEFS += -DTCL_LIBRARY_PATH=\"$(TCL_LIBRARY_PATH)\" diff -ru nxtvepg-2.7.3.orig/epgui/epgmain.c nxtvepg-2.7.3/epgui/epgmain.c --- nxtvepg-2.7.3.orig/epgui/epgmain.c 2004-12-31 14:07:50.000000000 +0100 +++ nxtvepg-2.7.3/epgui/epgmain.c 2004-12-24 08:55:29.000000000 +0100 @@ -52,7 +52,7 @@ #include #include -#include +//#include #include "epgctl/mytypes.h" #include "epgctl/epgversion.h" @@ -87,7 +87,7 @@ #include "epgui/dumpxml.h" #include "epgui/shellcmd.h" #include "epgui/loadtcl.h" - +/* #include "images/nxtv_logo.xbm" #include "images/nxtv_small.xbm" #include "images/ptr_up.xbm" @@ -102,7 +102,7 @@ #include "images/col_plus.xbm" #include "images/col_minus.xbm" #include "images/hatch.xbm" - +*/ #include "epgvbi/btdrv.h" #include "epgvbi/winshmsrv.h" #include "epgvbi/ttxdecode.h" @@ -2677,6 +2677,7 @@ Tcl_SetVar(interp, "NXTVEPG_MAILTO", NXTVEPG_MAILTO, TCL_GLOBAL_ONLY); Tcl_Init(interp); +/* if (withTk) { if (Tk_Init(interp) != TCL_OK) @@ -2688,7 +2689,7 @@ #endif } } - +*/ // load all Tcl/Tk scripts which handle toplevel window, menus and dialogs LoadTcl_Init(withTk); @@ -2697,7 +2698,7 @@ sprintf(comm, "proc bgerror foo {}\n"); eval_check(interp, comm); #endif - +/* if (withTk) { Tk_DefineBitmap(interp, Tk_GetUid("bitmap_ptr_up"), ptr_up_bits, ptr_up_width, ptr_up_height); @@ -2736,7 +2737,7 @@ sprintf(comm, "option add *Dialog.msg.font {helvetica -12 bold} userDefault"); eval_check(interp, comm); } - +*/ Tcl_ResetResult(interp); return (TRUE); } @@ -2961,12 +2962,12 @@ if (startIconified) eval_check(interp, "wm iconify ."); - +/* // wait until window is open and everything displayed while ( (Tk_GetNumMainWindows() > 0) && Tcl_DoOneEvent(TCL_ALL_EVENTS | TCL_DONT_WAIT) ) ; - +*/ #if defined(WIN32) && !defined(ICON_PATCHED_INTO_DLL) // set app icon in window title bar - note: must be called *after* the window is mapped! SetWindowsIcon(hInstance); @@ -2983,7 +2984,7 @@ // init main window title, PI listbox state and status line UiControl_AiStateChange(DB_TARGET_UI); - +/* if (Tk_GetNumMainWindows() > 0) { // remove expired items from database and listbox every minute @@ -3035,6 +3036,7 @@ } else debug0("could not open the main window - exiting."); +*/ } #ifdef USE_DAEMON else if (optDaemonMode == DAEMON_STOP) diff -ru nxtvepg-2.7.3.orig/epgui/pioutput.c nxtvepg-2.7.3/epgui/pioutput.c --- nxtvepg-2.7.3.orig/epgui/pioutput.c 2004-05-31 16:34:49.000000000 +0200 +++ nxtvepg-2.7.3/epgui/pioutput.c 2004-12-24 08:46:33.000000000 +0100 @@ -32,7 +32,7 @@ #include #include -#include +//#include #include "epgctl/mytypes.h" #include "epgctl/debug.h" @@ -620,6 +620,8 @@ // void PiOutput_PiListboxInsert( const PI_BLOCK *pPiBlock, uint textrow ) { + printf ("PiOutput_PiListboxInsert called but disabled\n"); +/* Tk_Font piboxFont; Tk_Font piBoldFont; Tcl_Obj * fontNameObj; @@ -854,6 +856,7 @@ Tk_FreeFont(piboxFont); if (piBoldFont != NULL) Tk_FreeFont(piBoldFont); +*/ } // ---------------------------------------------------------------------------- @@ -862,6 +865,8 @@ // uint PiOutput_PiNetBoxInsert( const PI_BLOCK * pPiBlock, uint colIdx, sint textRow ) { + printf ("PiOutput_PiNetBoxInsert calles but disabled\n"); +/* Tk_Font piboxFont; Tk_Font piBoldFont; Tcl_Obj * fontNameObj; @@ -1107,6 +1112,8 @@ Tk_FreeFont(piBoldFont); return bufHeight; +*/ +return 0; } // ---------------------------------------------------------------------------- diff -ru nxtvepg-2.7.3.orig/epgui/wmhooks.c nxtvepg-2.7.3/epgui/wmhooks.c --- nxtvepg-2.7.3.orig/epgui/wmhooks.c 2004-06-20 21:25:15.000000000 +0200 +++ nxtvepg-2.7.3/epgui/wmhooks.c 2004-12-24 09:24:54.000000000 +0100 @@ -32,16 +32,16 @@ #include #include #include - +/* #ifndef WIN32 #include #include #else #include #endif - +*/ #include -#include +//#include #include "epgctl/mytypes.h" #include "epgctl/debug.h" @@ -52,23 +52,24 @@ #ifndef WIN32 #include "images/nxtv_wm_ico.h" -static Atom _NET_SUPPORTED; -static Atom _NET_WM_STATE; -static Atom _NET_WM_STATE_STAYS_ON_TOP; -static Atom _NET_WM_STATE_ABOVE; -static Atom _NET_WM_ICON; -static Atom _WIN_SUPPORTING_WM_CHECK; -static Atom _WIN_PROTOCOLS; -static Atom _WIN_LAYER; +static int _NET_SUPPORTED; +static int _NET_WM_STATE; +static int _NET_WM_STATE_STAYS_ON_TOP; +static int _NET_WM_STATE_ABOVE; +static int _NET_WM_ICON; +static int _WIN_SUPPORTING_WM_CHECK; +static int _WIN_PROTOCOLS; +static int _WIN_LAYER; -static void (*wm_stay_on_top)(Display *dpy, Window win, int state) = NULL; -static void (*wm_set_icon)(Display *dpy, Window win) = NULL; +//static void (*wm_stay_on_top)(Display *dpy, Window win, int state) = NULL; +//static void (*wm_set_icon)(Display *dpy, Window win) = NULL; // ---------------------------------------------------------------------------- // Find the uppermost parent of the xawtv window beneath the root // - direct child of the root window is needed to query dimensions // - error handler must be installed by caller! // +/* static Window Xawtv_QueryParent( Display * dpy, Window wid ) { Window root_ret, parent, *kids; @@ -94,10 +95,11 @@ } return parent_wid; } - +*/ // --------------------------------------------------------------------------- // Set icon hint for X11 window manager // +/* static void netwm_set_icon(Display *dpy, Window wid) { long * pIconArr; @@ -146,12 +148,12 @@ else debug2("netwm-set_icon: bad window ID (%lX) or atom (%lx)", (long)wid, (long)_NET_WM_ICON); } - +*/ /* ------------------------------------------------------------------------ */ #define _NET_WM_STATE_REMOVE 0 /* remove/unset property */ #define _NET_WM_STATE_ADD 1 /* add/set property */ - +/* static void netwm_set_state(Display *dpy, Window win, int operation, Atom state) { @@ -169,7 +171,8 @@ XSendEvent(dpy, DefaultRootWindow(dpy), False, SubstructureRedirectMask, &e); } - +*/ +/* static void netwm_stay_on_top(Display *dpy, Window win, int state) { @@ -183,14 +186,15 @@ int op = state ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE; netwm_set_state(dpy,win,op,_NET_WM_STATE_STAYS_ON_TOP); } - +*/ /* ------------------------------------------------------------------------ */ #define WIN_LAYER_NORMAL 4 #define WIN_LAYER_ONTOP 6 /* tested with icewm + WindowMaker */ -static void +/* + static void gnome_stay_on_top(Display *dpy, Window win, int state) { XClientMessageEvent xev; @@ -209,9 +213,9 @@ if (state) XRaiseWindow(dpy,win); } - +*/ /* ------------------------------------------------------------------------ */ - +/* static int wm_check_capability(Display *dpy, Window root, Atom list, Atom wanted) { @@ -245,9 +249,9 @@ XFree(ldata); return retval; } - -#define INIT_ATOM(dpy,atom) atom = XInternAtom(dpy,#atom,False) - +*/ +//#define INIT_ATOM(dpy,atom) atom = XInternAtom(dpy,#atom,False) +/* static void wm_detect(Display *dpy) { @@ -262,7 +266,7 @@ INIT_ATOM(dpy, _WIN_PROTOCOLS); INIT_ATOM(dpy, _WIN_LAYER); - /* netwm checks */ + // netwm checks if (NULL == wm_stay_on_top && 0 == wm_check_capability(dpy,root,_NET_SUPPORTED, _NET_WM_STATE_ABOVE)) { @@ -276,14 +280,14 @@ wm_stay_on_top = netwm_old_stay_on_top; } - /* gnome checks */ + // gnome checks if (NULL == wm_stay_on_top && 0 == wm_check_capability(dpy,root,_WIN_PROTOCOLS,_WIN_LAYER)) { dprintf0("wmhooks: gnome layer\n"); wm_stay_on_top = gnome_stay_on_top; } - /* netwm check for icon capability */ + // netwm check for icon capability if (NULL == wm_set_icon && 0 == wm_check_capability(dpy,root,_NET_SUPPORTED, _NET_WM_ICON)) { @@ -291,12 +295,15 @@ wm_set_icon = netwm_set_icon; } } - +*/ // --------------------------------------------------------------------------- // X11 Tcl interface for stay on top hook // static int WmHooks_StayOnTop(ClientData ttp, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { + printf("WmHooks_StayOnTop called but disabled\n"); +/* + const char * const pUsage = "Usage: C_Wm_StayOnTop "; Tcl_Obj * pId; Display * dpy; @@ -355,11 +362,15 @@ result = TCL_OK; } return result; + */ + return 0; } // --------------------------------------------------------------------------- // Set icon hint for X11 window manager // +// +/* static int WmHooks_SetIcon(ClientData ttp, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { const char * const pUsage = "Usage: C_Wm_SetIcon "; @@ -404,7 +415,7 @@ } return result; } - +*/ #else // WIN32 // --------------------------------------------------------------------------- @@ -473,6 +484,8 @@ // void WmHooks_Init( Tcl_Interp * interp ) { + printf("WmHooks_Init called but disabled\n"); +/* #ifndef WIN32 Tk_Window tkwin; Display * dpy; @@ -490,5 +503,6 @@ Tcl_CreateCommand(interp, "C_Wm_StayOnTop", WmHooks_StayOnTop, (ClientData) NULL, NULL); Tcl_CreateCommand(interp, "C_Wm_SetIcon", WmHooks_SetIcon, (ClientData) NULL, NULL); +*/ } diff -ru nxtvepg-2.7.3.orig/epgui/xawtv.c nxtvepg-2.7.3/epgui/xawtv.c --- nxtvepg-2.7.3.orig/epgui/xawtv.c 2004-08-29 19:04:22.000000000 +0200 +++ nxtvepg-2.7.3/epgui/xawtv.c 2004-12-24 09:12:07.000000000 +0100 @@ -46,13 +46,14 @@ #include #include #include - +/* #include #include -#include /* for XmuClientWindow() */ +#include for XmuClientWindow() +*/ #include -#include +//#include #include "epgctl/mytypes.h" #include "epgctl/debug.h" @@ -69,19 +70,19 @@ // this atom is set by xawtv: it contains the current channel's name -static Atom xawtv_station_atom = None; +//static Atom xawtv_station_atom = None; // this atom is set by nxtvepg to send remote commands -static Atom xawtv_remote_atom = None; +//static Atom xawtv_remote_atom = None; // this atom is used to identify xawtv in the search across all toplevel windows -static Atom wm_class_atom = None; +//static Atom wm_class_atom = None; // X11 display handle if TV app is on different display than the GUI -static Display * alternate_dpy = NULL; +//static Display * alternate_dpy = NULL; // window IDs (note: on the TV app's X11 server) -static Window xawtv_wid = None; -static Window parent_wid = None; -static Window root_wid = None; +//static Window xawtv_wid = None; +//static Window parent_wid = None; +//static Window root_wid = None; static Tcl_TimerToken popDownEvent = NULL; static Tcl_TimerToken pollVpsEvent = NULL; @@ -109,8 +110,8 @@ static XAWTVCF xawtvcf = {1, 1, 1, POP_EXT, 7}; // forward declaration -static void Xawtv_StationSelected( ClientData clientData ); -static bool Xawtv_QueryRemoteStation( Window wid, char * pBuffer, int bufLen, int * pTvFreq ); +//static void Xawtv_StationSelected( ClientData clientData ); +//static bool Xawtv_QueryRemoteStation( Window wid, char * pBuffer, int bufLen, int * pTvFreq ); static void Xawtv_PopDownNowNext( ClientData clientData ); static void Xawtv_TvAttach( ClientData clientData ); @@ -132,7 +133,8 @@ // ---------------------------------------------------------------------------- // Dummy X11 error event handler for debugging purposes // -#ifdef DEBUG_SWITCH +/* + * #ifdef DEBUG_SWITCH static int Xawtv_X11ErrorHandler( ClientData clientData, XErrorEvent *errEventPtr ) { char msgBuf[256]; @@ -147,7 +149,7 @@ // no debugging -> just have Tk discard all error events const Tk_ErrorProc * Xawtv_X11ErrorHandler = NULL; #endif - +*/ // ---------------------------------------------------------------------------- #ifndef DPRINTF_OFF static void DebugDumpProperty( const char * prop, ulong nitems ) @@ -168,6 +170,7 @@ // - usually the same as the display of the nxtvepg GUI // - can be modified via command line switch (e.g. multi-headed PC) // +/* static Display * Xawtv_GetTvDisplay( void ) { Tk_Window tkwin; @@ -184,12 +187,13 @@ } return dpy; } - +*/ // --------------------------------------------------------------------------- // Check the class of a newly created window // - to find xawtv we cannot check for the STATION property on the window, // because that one's not available right away when the window is created // +/* static bool Xawtv_QueryClass( Display * dpy, Window wid ) { Tk_ErrorHandler errHandler; @@ -224,12 +228,13 @@ return result; } - +*/ // ---------------------------------------------------------------------------- // Find the uppermost parent of the xawtv window beneath the root // - direct child of the root window is needed to query dimensions // - error handler must be installed by caller! // +/* static bool Xawtv_QueryParent( Display * dpy, Window wid ) { Window root_ret, parent, *kids; @@ -253,12 +258,12 @@ } return result; } - +*/ // ---------------------------------------------------------------------------- // Event handler // - this function is called for every incoming X event // - filters out events from the xawtv main window -// +/* static int Xawtv_EventNotification( ClientData clientData, XEvent *eventPtr ) { bool result = FALSE; @@ -315,12 +320,14 @@ } return result; } - +*/ // ---------------------------------------------------------------------------- // Search for the xawtv toplevel window // -static bool Xawtv_FindWindow( Display * dpy, Atom atom ) +/* + * static bool Xawtv_FindWindow( Display * dpy, Atom atom ) { + Window root2, parent, *kids, w; unsigned int nkids; bool result = FALSE; @@ -366,7 +373,7 @@ return result; } - +*/ // --------------------------------------------------------------------------- // Display a popup window below xawtv // - similar to SendCmd: first verify if the old window ID is still valid; @@ -376,7 +383,9 @@ // static void Xawtv_Popup( float rperc, const char *rtime, const char * ptitle ) { - XWindowAttributes wat; + printf("Xawtv_Popup called but disabled\n"); +/* + * XWindowAttributes wat; Tk_ErrorHandler errHandler; Display *dpy; int retry; @@ -446,6 +455,7 @@ else debug0("No Tk display available"); } +*/ } // --------------------------------------------------------------------------- @@ -453,6 +463,8 @@ // void Xawtv_SendCmdArgv(Tcl_Interp *interp, const char * pCmdStr, uint cmdLen ) { + printf("Xawtv_SendCmdArgv called but disabled\n"); +/* Tk_ErrorHandler errHandler; Display *dpy; @@ -517,11 +529,12 @@ } else debug0("No Tk display available"); +*/ } // --------------------------------------------------------------------------- // Query the station name from the xawtv property -// +/* static bool Xawtv_QueryRemoteStation( Window wid, char * pBuffer, int bufLen, int * pTvFreq ) { Tk_ErrorHandler errHandler; @@ -582,7 +595,7 @@ return result; } - +*/ // ---------------------------------------------------------------------------- // Compare given name with all network names in AI // - names in AI can be overridden by network name user-config @@ -930,6 +943,7 @@ // Notification about channel change by xawtv // - invoked after a property notification event // +/* static void Xawtv_StationSelected( ClientData clientData ) { EPGACQ_DESCR acqState; @@ -996,10 +1010,10 @@ if (pollVpsEvent == NULL) pollVpsEvent = Tcl_CreateTimerHandler(200, Xawtv_PollVpsPil, NULL); } - +*/ // ---------------------------------------------------------------------------- // Notification about creation or destruction of xawtv window -// +/* static void Xawtv_TvAttach( ClientData clientData ) { if (xawtv_wid != None) @@ -1018,7 +1032,7 @@ EpgAcqCtl_CheckDeviceAccess(); } } - +*/ // --------------------------------------------------------------------------- // Tcl callback to send a command to connected Xawtv application // @@ -1087,7 +1101,7 @@ } else { - AddMainIdleEvent(Xawtv_StationSelected, NULL, TRUE); + //AddMainIdleEvent(Xawtv_StationSelected, NULL, TRUE); result = TCL_OK; } return result; @@ -1181,6 +1195,8 @@ // static void Xawtv_InitDelayHandler( ClientData clientData ) { + printf("Xawtv_InitDelayHandler called but disabled\n"); +/* Tk_ErrorHandler errHandler; Display *dpy; @@ -1212,6 +1228,7 @@ Tk_DeleteErrorHandler(errHandler); } } +*/ } // ---------------------------------------------------------------------------- @@ -1222,6 +1239,9 @@ // static int Xawtv_InitConfig(ClientData ttp, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { + printf("Xawtv_InitConfig called but disabled\n"); +/* + Tk_ErrorHandler errHandler; Display *dpy; XAWTVCF newXawtvCf; @@ -1296,6 +1316,8 @@ } } return TCL_OK; + */ + return 0; } // ---------------------------------------------------------------------------- @@ -1321,6 +1343,9 @@ // void Xawtv_Init( char * pTvX11Display ) { + printf("Xawtv_Init called but disabled\n"); +/* + Tk_Window tkwin; Tk_Window tvwin; Display * dpy; @@ -1376,7 +1401,8 @@ // read user config and initialize local vars Xawtv_InitConfig((ClientData) TRUE, interp, 0, NULL); - dprintf0("Xawtv-Init: done.\n"); + dprintf0("Xawtv-Init: done.\n"); + */ } #endif // not WIN32