diff options
author | hobbs2 <hobbs2> | 2004-10-09 22:57:44 (GMT) |
---|---|---|
committer | hobbs2 <hobbs2> | 2004-10-09 22:57:44 (GMT) |
commit | e1c3597075e8c087370a97c37be6f2c38c7e50b8 (patch) | |
tree | 2a8e7bfcbff5de8c4084b5613a63c1bfd313cc1a /generic | |
parent | f417a7d7fba806ef0324af04604e9b8001b6199e (diff) | |
download | tktreectrl-e1c3597075e8c087370a97c37be6f2c38c7e50b8.zip tktreectrl-e1c3597075e8c087370a97c37be6f2c38c7e50b8.tar.gz tktreectrl-e1c3597075e8c087370a97c37be6f2c38c7e50b8.tar.bz2 |
* pkgIndex.tcl.in: Automate creation of pkgIndex.tcl and use
* demos/demo.tcl: tcl_findLibrary to avoid the issue of build vs.
* tests/all.tcl: install package.
* generic/tkTreeCtrl.c:
* library/filelist-bindings.tcl: ensure TreeCtrl namespace exists
* library/treectrl.tcl: source filelist-bindings
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkTreeCtrl.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/generic/tkTreeCtrl.c b/generic/tkTreeCtrl.c index 8906668..911a59d 100644 --- a/generic/tkTreeCtrl.c +++ b/generic/tkTreeCtrl.c @@ -7,7 +7,7 @@ * Copyright (c) 2002-2003 Christian Krone * Copyright (c) 2003 ActiveState Corporation * - * RCS: @(#) $Id: tkTreeCtrl.c,v 1.24 2004/08/13 20:24:15 treectrl Exp $ + * RCS: @(#) $Id: tkTreeCtrl.c,v 1.25 2004/10/09 22:57:44 hobbs2 Exp $ */ #include "tkTreeCtrl.h" @@ -2960,6 +2960,16 @@ int LoupeCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST #endif /* not TARGET_OS_MAC */ #endif /* not WIN32 */ +static char initScript[] = "if {![llength [info proc ::TreeCtrl::Init]]} {\n\ + namespace eval ::TreeCtrl {}\n\ + proc ::TreeCtrl::Init {} {\n\ + global treectrl_library\n\ + tcl_findLibrary treectrl " PACKAGE_VERSION " " PACKAGE_VERSION " treectrl.tcl TREECTRL_LIBRARY treectrl_library\n\ + }\n\ +}\n\ +::TreeCtrl::Init"; + + DLLEXPORT int Treectrl_Init(Tcl_Interp *interp) { #ifdef USE_TCL_STUBS @@ -2991,7 +3001,10 @@ DLLEXPORT int Treectrl_Init(Tcl_Interp *interp) #endif #endif Tcl_CreateObjCommand(interp, "treectrl", TreeObjCmd, NULL, NULL); - return Tcl_PkgProvide(interp, "treectrl", "1.1"); + if (Tcl_PkgProvide(interp, PACKAGE_NAME, PACKAGE_VERSION) != TCL_OK) { + return TCL_ERROR; + } + return Tcl_EvalEx(interp, initScript, -1, TCL_EVAL_GLOBAL); } DLLEXPORT int Treectrl_SafeInit(Tcl_Interp *interp) |