[Therion] xtherion
cawa sorix
cawa.sorix at gmail.com
Fri Jan 11 20:37:26 CET 2013
Hello all,
I look for why there is different between linux and windows, it seems
on linux, tcltk add extension at the end of the name if there is not a
"." on the name.
A sample example bellow : open an openbox without xhterion element, it
works on test2 only
package require Tk
set types {
{{Therion files} {.th}}
{{2D therion files} {.th2}}
{{All files} {*}}
}
#Test 1 => KO on linux
#set filename [tk_getOpenFile -filetypes $types -defaultextension {.th}]
#test 2 => OK on linux
set filename [tk_getOpenFile -filetypes $types]
puts "I found $filename"
The documentation is not really clear about defaultextension option on
tk_getOpenFile
I wrote the patch bellow :
--- therion/xtherion/te.tcl
+++ therion/xtherion/te.tcl
@@ -649,11 +649,12 @@
global xth
if {$dialogid} {
set fname [tk_getOpenFile -filetypes $xth(app,te,filetypes) \
-parent $xth(gui,main) \
- -initialdir $xth(gui,initdir) -defaultextension $xth(app,te,fileext)]
+ -initialdir $xth(gui,initdir) ]
+ #-defaultextension $xth(app,te,fileext)]
}
if {[string length $fname] == 0} {
return 0
} else {
If you can test on linux :)
Regards,
C.S.
2013/1/8 Stacho Mudrak <lists at group-s.sk>:
> For me (on win32) it also works fine. Is it a problem on Linux?
>
> S.
>
>
> _______________________________________________
> Therion mailing list
> Therion at speleo.sk
> http://mailman.speleo.sk/mailman/listinfo/therion
>
More information about the Therion
mailing list