summaryrefslogtreecommitdiffstats
path: root/win/tkWinDialog.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-06-07 09:43:31 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-06-07 09:43:31 (GMT)
commit49c4e4c3ca01be0e0567769e44661730c11b1ca3 (patch)
tree37f2212a4d9f05feccd054b13fad434954ef8e8b /win/tkWinDialog.c
parent159e8c69ce74a438bf8a4b81feebfd038d348638 (diff)
downloadtk-49c4e4c3ca01be0e0567769e44661730c11b1ca3.zip
tk-49c4e4c3ca01be0e0567769e44661730c11b1ca3.tar.gz
tk-49c4e4c3ca01be0e0567769e44661730c11b1ca3.tar.bz2
some code cleanup, remove structure which is no longer used.
Diffstat (limited to 'win/tkWinDialog.c')
-rw-r--r--win/tkWinDialog.c35
1 files changed, 9 insertions, 26 deletions
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index f9bb10a..e03862c 100644
--- a/win/tkWinDialog.c
+++ b/win/tkWinDialog.c
@@ -50,19 +50,6 @@
#define OPENFILENAME_SIZE_VERSION_400 76
#endif
-/*
- * The following structure is used by the new Tk_ChooseDirectoryObjCmd to pass
- * data between it and its callback. Unique to Windows platform.
- */
-
-typedef struct ChooseDirData {
- WCHAR initDir[MAX_PATH]; /* Initial folder to use */
- WCHAR retDir[MAX_PATH]; /* Returned folder to use */
- Tcl_Interp *interp;
- int mustExist; /* True if file must exist to return from
- * callback */
-} CHOOSEDIRDATA;
-
typedef struct ThreadSpecificData {
int debugFlag; /* Flags whether we should output debugging
* information while displaying a builtin
@@ -153,16 +140,12 @@ static const struct {int type; int btnIds[3];} allowedTypes[] = {
* chooser function, Tk_ChooseDirectoryObjCmd(), and its dialog hook proc.
*/
-typedef struct ChooseDir {
- Tcl_Interp *interp; /* Interp, used only if debug is turned on,
- * for setting the "tk_dialog" variable. */
- int lastCtrl; /* Used by hook proc to keep track of last
- * control that had input focus, so when OK is
- * pressed we know whether to browse a new
- * directory or return. */
- int lastIdx; /* Last item that was selected in directory
- * browser listbox. */
- OPENFILENAMEW *ofnPtr; /* pointer to the OFN structure */
+typedef struct {
+ WCHAR initDir[MAX_PATH]; /* Initial folder to use */
+ WCHAR retDir[MAX_PATH]; /* Returned folder to use */
+ Tcl_Interp *interp;
+ int mustExist; /* True if file must exist to return from
+ * callback */
} ChooseDir;
/*
@@ -1333,7 +1316,7 @@ Tk_ChooseDirectoryObjCmd(
int oldMode, result = TCL_ERROR, i;
LPCITEMIDLIST pidl; /* Returned by browser */
BROWSEINFOW bInfo; /* Used by browser */
- CHOOSEDIRDATA cdCBData; /* Structure to pass back and forth */
+ ChooseDir cdCBData; /* Structure to pass back and forth */
LPMALLOC pMalloc; /* Used by shell */
Tk_Window tkwin = (Tk_Window) clientData;
HWND hWnd;
@@ -1355,7 +1338,7 @@ Tk_ChooseDirectoryObjCmd(
*/
path[0] = '\0';
- ZeroMemory(&cdCBData, sizeof(CHOOSEDIRDATA));
+ ZeroMemory(&cdCBData, sizeof(ChooseDir));
cdCBData.interp = interp;
/*
@@ -1562,7 +1545,7 @@ ChooseDirectoryValidateProc(
LPARAM lpData)
{
WCHAR selDir[MAX_PATH];
- CHOOSEDIRDATA *chooseDirSharedData = (CHOOSEDIRDATA *) lpData;
+ ChooseDir *chooseDirSharedData = (ChooseDir *) lpData;
Tcl_DString tempString;
Tcl_DString initDirString;
WCHAR string[MAX_PATH];