Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a853adc commit 3369927Copy full SHA for 3369927
1 file changed
Tools/pynche/PyncheWidget.py
@@ -9,6 +9,8 @@
9
import string
10
from Tkinter import *
11
import tkMessageBox
12
+import tkFileDialog
13
+import ColorDB
14
15
# Milliseconds between interrupt checks
16
KEEPALIVE_TIMER = 500
@@ -165,12 +167,15 @@ def __popup_usage(self, event=None):
165
167
self.__helpwin.deiconify()
166
168
169
def __load(self, event=None):
- import FileDialog
- import ColorDB
170
while 1:
171
- d = FileDialog.FileDialog(self.__root)
172
- file = d.go(pattern='*.txt', key=self.__dialogstate)
173
- if file is None:
+ idir, ifile = os.path.split(self.__sb.colordb().filename())
+ file = tkFileDialog.askopenfilename(
+ filetypes=[('Text files', '*.txt'),
174
+ ('All files', '*'),
175
+ ],
176
+ initialdir=idir,
177
+ initialfile=ifile)
178
+ if not file:
179
# cancel button
180
return
181
try:
0 commit comments