anygui-checkins Mailing List for anygui - Generic GUI Module for Python (Page 2)
Brought to you by:
mlh
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(110) |
Aug
(245) |
Sep
(134) |
Oct
(89) |
Nov
(221) |
Dec
(465) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(108) |
Feb
(71) |
Mar
(52) |
Apr
(43) |
May
(39) |
Jun
(10) |
Jul
(91) |
Aug
(40) |
Sep
(24) |
Oct
(28) |
Nov
(75) |
Dec
|
2003 |
Jan
(15) |
Feb
(18) |
Mar
(2) |
Apr
(3) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2004 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Magnus L. H. <ml...@us...> - 2003-02-08 02:01:28
|
Update of /cvsroot/anygui/nondist/sandbox/magnus/tester/icons In directory sc8-pr-cvs1:/tmp/cvs-serv14678/icons Added Files: blank.gif up.gif Log Message: --- NEW FILE: blank.gif --- GIF87a --- NEW FILE: up.gif --- GIF89a =p fªªÃ¬ð*8Q¤ÄøH@u}ä1¯ªA!IåÒñµ¤ÒÅs@ÃJÀ×kÀ½ñeeKÈ¡@lº½ÛÞ3D h?+j5N Db50mN D"J51Z$K%j1%DT%v2e%|5/%°O5U*D·¼%xÁ)¢Æ%uÉ%D Í"¹»Ò×"DÒLÚ²®×yá ë áÆ! |
From: Magnus L. H. <ml...@us...> - 2003-02-08 02:01:28
|
Update of /cvsroot/anygui/nondist/sandbox/magnus/tester In directory sc8-pr-cvs1:/tmp/cvs-serv14678 Added Files: runme.py Log Message: --- NEW FILE: runme.py --- #!/usr/bin/env python # FIXME: Currently resets all results; should keep results from other # back-ends. Rewrite to create a single table of successes/failures for all # back-ends, parse in existing test results from the result file, and # display the test descriptions only once, below the table. import os, sys from time import * from glob import glob from anygui import * from anygui.Utils import topologicalSort TEST_DIR = 'tests' TEST_PAT = 'test_*.py' RESULT_FILE = 'results.html' HEAD = """\ <html> <head> <title>Anygui Test Results</title> <style> body { color: #000000; background-color: #ffffff; } a:active { color: #ff0000; } a:visited { color: #551a8b; } a:link { color: #0000bb; } h1, h2, h3, h4, h5, h6 { font-family: avantgarde, sans-serif; font-weight: bold; } h1 { font-size: 180%%; } h2 { font-size: 150%%; } h3, h4 { font-size: 120%%; } code, tt { font-family: lucida typewriter, lucidatypewriter, monospace; } var { font-family: times, serif; font-style: italic; font-weight: normal; } .typelabel { font-family: lucida, sans-serif; } .navigation td { background-color: #99ccff; font-weight: bold; font-family: avantgarde, sans-serif; font-size: 110%%; } .release-info { font-style: italic; } .titlegraphic { vertical-align: top; } .verbatim { color: #00008b; font-family: lucida typewriter, lucidatypewriter, monospace; } .grammar { background-color: #99ccff; margin-right: 0.5in; padding: 0.05in; } .productions { background-color: #bbeeff; } .productions table { vertical-align: baseline; } .grammar-footer { padding: 0.05in; font-size: 85%%; } .email { font-family: avantgarde, sans-serif; } .mailheader { font-family: avantgarde, sans-serif; } .mimetype { font-family: avantgarde, sans-serif; } .newsgroup { font-family: avantgarde, sans-serif; } .url { font-family: avantgarde, sans-serif; } .file { font-family: avantgarde, sans-serif; } .tableheader { background-color: #99ccff; font-family: avantgarde, sans-serif; } </style> </head> <body> <div class="navigation"> <table align="center" width="100%%" cellpadding="0" cellspacing="2"> <tr> <td><img src="icons/blank.gif" border="0" height="32" alt="" width="32"></td> <td><img src="icons/blank.gif" border="0" height="32" alt="Up One Level" width="32"></td> <td><img src="icons/up.gif" border="0" height="32" alt="Next Page" width="32"></td> <td align="center" width="100%%">Anygui Test Results</td> <td><img src="icons/blank.gif" border="0" height="32" alt="Contents" width="32"></td> <td><img src="icons/blank.gif" border="0" height="32" alt="Module Index" width="32"></td> <td><img src="icons/blank.gif" border="0" height="32" alt="Index" width="32"></td> </tr></table> <b class="navlabel">Up:</b> <a class="sectref" HREF="http://www.anygui.org">Anygui home</a> <br /><hr /> </div> <div class="titlepage"> <center> <h1>Anygui Test Results</h1> <strong>%s</strong></p> <p> </center> </div> <br /> <hr /> <h2>Test Results for <code>%sgui</code></h2> """ % (strftime('%Y-%m-%d %H:%M:%S', localtime()), backend()) FOOT = """\ <div class="navigation"> <hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> <td><img src="icons/blank.gif" border="0" height="32" alt="" width="32"></td> <td><img src="icons/blank.gif" border="0" height="32" alt="Up One Level" width="32"></td> <td><img src="icons/up.gif" border="0" height="32" alt="Next Page" width="32"></td> <td align="center" width="100%">Anygui Test Results</td> <td><img src="icons/blank.gif" border="0" height="32" alt="Contents" width="32"></td> <td><img src="icons/blank.gif" border="0" height="32" alt="Module Index" width="32"></td> <td><img src="icons/blank.gif" border="0" height="32" alt="Index" width="32"></td> </tr></table> <b class="navlabel">Up:</b> <a class="sectref" HREF="http://www.anygui.org">Anygui home</a> <br><hr /> </div> </body> </html>""" def testFiles(): return glob(os.path.join(TEST_DIR, TEST_PAT)) class TestResult: status = 'Failed' def __init__(self, name, scope): self.name = name self.scope = scope def __str__(self): docs = self.scope.get('__doc__', '(No description available)') docs = '<p>' + docs.replace('\n\n', '\n</p>\n<p>') + '\n</p>' return '''<h3>%s: %s</h3> %s ''' % (self.name, self.status, docs) class TestWizard(Application): def __init__(self, files, resultFile, *args, **kwds): Application.__init__(self, *args, **kwds) self.files = files self.resultFile = resultFile self.results = [] self.setupGUI() def setupGUI(self): self.win = Window(text='The Anygui Test Program') self.passButton = Button(text='Pass') self.win.add(self.passButton, right=10, bottom=10, hmove=1, vmove=1) link(self.passButton, self.passTest) self.failButton = Button(text='Fail') self.win.add(self.failButton, right=(self.passButton,10), bottom=10, hmove=1, vmove=1) link(self.failButton, self.failTest) self.setupTests() self.nextTest() self.add(self.win) def setupTests(self): testScopes = [] testNames = [] constraints = [] for fname in self.files: scope = {} exec open(fname) in scope testScopes.append(scope) name = os.path.basename(fname) testNames.append(name) for other in eval('after', scope): constraints.append((other, name)) topologicalSort(testNames, testScopes, constraints) testScopes.reverse() testNames.reverse() self.testScopes = testScopes self.testNames = testNames def nextTest(self): if not self.testScopes: self.writeResults() sys.exit() scope = self.testScopes.pop() name = self.testNames.pop() try: self.win.remove(self.frame) except AttributeError: pass self.frame = Frame() assert not hasattr(scope, '__supplied_frame') scope['__supplied_frame'] = self.frame exec 'setup(__supplied_frame)' in scope self.win.add(self.frame, top=0, left=0, right=0, bottom=(self.passButton, 10), hstretch=1, vstretch=1) self.results.append(TestResult(name, scope)) def writeResults(self): out = open(self.resultFile, 'w') print >> out, HEAD for result in self.results: print >> out, result print >> out, FOOT out.close() def passTest(self, event): self.results[-1].status = 'Passed' self.nextTest() def failTest(self, event): self.nextTest() def main(args=[]): tw = TestWizard(testFiles(), RESULT_FILE) tw.run() if __name__ == '__main__': main(sys.argv) |
From: Magnus L. H. <ml...@us...> - 2003-02-08 01:59:30
|
Update of /cvsroot/anygui/nondist/sandbox/magnus/tester/tests In directory sc8-pr-cvs1:/tmp/cvs-serv14114/tests Log Message: Directory /cvsroot/anygui/nondist/sandbox/magnus/tester/tests added to the repository |
From: Magnus L. H. <ml...@us...> - 2003-02-08 01:59:30
|
Update of /cvsroot/anygui/nondist/sandbox/magnus/tester/icons In directory sc8-pr-cvs1:/tmp/cvs-serv14114/icons Log Message: Directory /cvsroot/anygui/nondist/sandbox/magnus/tester/icons added to the repository |
From: Magnus L. H. <ml...@us...> - 2003-02-08 01:59:15
|
Update of /cvsroot/anygui/nondist/sandbox/magnus/tester In directory sc8-pr-cvs1:/tmp/cvs-serv14053/tester Log Message: Directory /cvsroot/anygui/nondist/sandbox/magnus/tester added to the repository |
From: Magnus L. H. <ml...@us...> - 2003-01-29 01:51:46
|
Update of /cvsroot/anygui//anygui In directory sc8-pr-cvs1:/tmp/cvs-serv14670 Modified Files: TODO.txt Log Message: Index: TODO.txt =================================================================== RCS file: /cvsroot/anygui//anygui/TODO.txt,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -r1.60 -r1.61 *** TODO.txt 14 Nov 2002 17:06:12 -0000 1.60 --- TODO.txt 29 Jan 2003 01:51:42 -0000 1.61 *************** *** 50,53 **** --- 50,59 ---- for "widget is None" etc.) + * Consider: Make a "no windows" event, rather than making Application + exit on default when there are no more windows? (Would be + problematic for applications that relied on the exiting behaviour. + Alternatives? Make it possible to override it, perhaps only link per + default, and use unlink to remove the behaviour?) + Objectives for version 0.2a1: ----------------------------- |
From: Magnus L. H. <ml...@us...> - 2003-01-29 01:43:48
|
Update of /cvsroot/anygui/anygui/lib/anygui/backends In directory sc8-pr-cvs1:/tmp/cvs-serv12206 Modified Files: qtgui.py Log Message: Index: qtgui.py =================================================================== RCS file: /cvsroot/anygui/anygui/lib/anygui/backends/qtgui.py,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** qtgui.py 18 Nov 2002 01:58:02 -0000 1.27 --- qtgui.py 29 Jan 2003 01:43:43 -0000 1.28 *************** *** 4,24 **** # FIXME: The "if widget" stuff doesn't seem quite consistent. [mlh] ! try: ! # Anygui specific imports ! from anygui.backends import * ! from anygui.Applications import AbstractApplication ! from anygui.Wrappers import AbstractWrapper ! from anygui.Events import * ! from anygui.Windows import Window ! from anygui import application ! from anygui.Menus import Menu, MenuCommand, MenuCheck, MenuSeparator ! # qtgui specific imports ! import sys ! from weakref import ref as wr ! from qt import * ! except: ! import traceback ! traceback.print_exc() #==============================================================# --- 4,27 ---- # FIXME: The "if widget" stuff doesn't seem quite consistent. [mlh] ! #try: ! # Anygui specific imports ! from anygui.backends import * ! # FIXME: The following shouldn't be necessary [mlh] ! from anygui.Applications import AbstractApplication ! from anygui.Wrappers import AbstractWrapper ! from anygui.Events import * ! from anygui.Windows import Window ! from anygui import application ! from anygui.Menus import Menu, MenuCommand, MenuCheck, MenuSeparator ! # END FIXME ! ! # qtgui specific imports ! import sys ! from weakref import ref as wr ! from qt import * ! #except: ! # import traceback ! # traceback.print_exc() #==============================================================# |
From: Magnus L. H. <ml...@us...> - 2003-01-26 21:30:05
|
Update of /cvsroot/anygui/anygui/lib/anygui/backends In directory sc8-pr-cvs1:/tmp/cvs-serv21361/lib/anygui/backends Modified Files: gtkgui.py Log Message: Removed redundatnt try/except with traceback Index: gtkgui.py =================================================================== RCS file: /cvsroot/anygui/anygui/lib/anygui/backends/gtkgui.py,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** gtkgui.py 26 Jan 2003 16:01:54 -0000 1.26 --- gtkgui.py 26 Jan 2003 21:29:55 -0000 1.27 *************** *** 42,65 **** """ ! try: ! # Import Anygui infrastructure. You shouldn't have to change these. ! from anygui.backends import * ! from anygui.Applications import AbstractApplication ! from anygui.Wrappers import AbstractWrapper ! from anygui.Events import * ! from anygui import application ! # End Anygui imports. ! # Import anything needed to access the backend API. This is ! # your job! ! import pygtk ! pygtk.require('2.0') ! ! import gtk ! # End backend API imports. ! except: ! import traceback ! traceback.print_exc() __all__ = ''' --- 42,65 ---- """ ! #try: ! # Import Anygui infrastructure. You shouldn't have to change these. ! from anygui.backends import * ! from anygui.Applications import AbstractApplication ! from anygui.Wrappers import AbstractWrapper ! from anygui.Events import * ! from anygui import application ! # End Anygui imports. ! # Import anything needed to access the backend API. This is ! # your job! ! import pygtk ! ! pygtk.require('2.0') ! import gtk ! # End backend API imports. ! #except: ! # import traceback ! # traceback.print_exc() __all__ = ''' |
From: Kalle S. <krf...@us...> - 2003-01-26 16:03:14
|
Update of /cvsroot/anygui/nondist/admin In directory sc8-pr-cvs1:/tmp/cvs-serv14624 Modified Files: status.txt Log Message: Test results for new GTK2 backend. Index: status.txt =================================================================== RCS file: /cvsroot/anygui/nondist/admin/status.txt,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -r1.63 -r1.64 *** status.txt 26 Jan 2003 14:05:09 -0000 1.63 --- status.txt 26 Jan 2003 16:03:11 -0000 1.64 *************** *** 8,12 **** beosgui + + + ! - + - ! + + - + ! + ! + + + + - + + + cursesgui ? ? ? ! ? ? ? ! ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! gtkgui ? ? ? ! ? ? ? ! ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? javagui + + + ! + ! - ! + + + + ? + - ! + + + + + + + mswgui + + + ! + + + ! + + + + + ! + + + - + + - + + --- 8,12 ---- beosgui + + + ! - + - ! + + - + ! + ! + + + + - + + + cursesgui ? ? ? ! ? ? ? ! ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! gtkgui + + - ! + + + ! + + + + + + - + - - - + + + + javagui + + + ! + ! - ! + + + + ? + - ! + + + + + + + mswgui + + + ! + + + ! + + + + + ! + + + - + + - + + |
From: Kalle S. <krf...@us...> - 2003-01-26 16:01:58
|
Update of /cvsroot/anygui/anygui/lib/anygui/backends In directory sc8-pr-cvs1:/tmp/cvs-serv14202/lib/anygui/backends Modified Files: gtkgui.py Log Message: Patch from Eugene Pervago <eu...@ul...>, now functional GTK2 backend. Some tests still failing, but it's much better than nothing. Index: gtkgui.py =================================================================== RCS file: /cvsroot/anygui/anygui/lib/anygui/backends/gtkgui.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** gtkgui.py 8 Nov 2002 10:52:23 -0000 1.25 --- gtkgui.py 26 Jan 2003 16:01:54 -0000 1.26 *************** *** 1,2 **** --- 1,45 ---- + """Test status: + + Missing: test_menu + + test_aboutdlg OK + test_backend OK + test_canvas NA + test_button OK + test_checkbox OK + test_combobox OK (Not native though) + test_component NA + test_curses OK + test_defaults OK + test_events OK + test_frame OK + test_interface NA (Others don't pass either) + test_invisible OK + test_label OK + test_layout OK + test_menu + test_modv1 OK + test_modv2 OK + test_modv3 OK + test_openfiledlg OK (Some bugs on exit) + test_place OK + test_radiobutton NA (Can't implement, doesn't work like a toggle button) + test_radiogroup OK + test_references OK + test_remove (Works only the first time) + test_rules NA + test_shake OK + test_tags NA + test_textarea OK + test_textfield OK + test_window OK + + demo/ttt.py OK + demo/ttt2.py NA (Fails on Tk & wx) + demo/ifs.py NA (Fails on Tk & wx. Canvas missing) + demo/chmodgui.py OK + + """ + try: # Import Anygui infrastructure. You shouldn't have to change these. *************** *** 10,14 **** # Import anything needed to access the backend API. This is # your job! ! from gtk import * import gtk # End backend API imports. --- 53,60 ---- # Import anything needed to access the backend API. This is # your job! ! import pygtk ! ! pygtk.require('2.0') ! import gtk # End backend API imports. *************** *** 57,60 **** --- 103,107 ---- if not self.widget: return self.widget.show() + self.proxy.push() def destroy(self): *************** *** 66,86 **** def setContainer(self,container): if container is None: ! self.destroy() return ! parent = container.wrapper.widget ! if parent is None: ! self.create(parent) self.proxy.push(blocked=['container']) ! self.setupChildWidgets() def setGeometry(self,x,y,width,height): if not self.widget: return self.widget.set_uposition(int(x), int(y)) - self.widget.set_usize(int(width), int(height)) ! def getGeometry(self): ! if not self.widget: return ! return self.widget.get_uposition(int(x), int(y)) + \ ! self.widget.get_usize(int(width), int(height)) def setVisible(self,visible): --- 113,150 ---- def setContainer(self,container): if container is None: ! try: ! self.destroy() ! except: ! pass return ! parent = container.wrapper ! if parent is not None: ! self.create() ! cont = parent._getContainer() ! self.widget.unparent() ! if hasattr(cont, 'put'): ! cont.put(self.widget, 0, 0) ! elif hasattr(cont, 'add'): ! cont.add(self.widget) self.proxy.push(blocked=['container']) ! ! def create(self): ! if not self.widget: ! self.widget = self.widgetFactory() ! self.widget.visible = self.proxy.state['visible'] ! self.widgetSetUp() def setGeometry(self,x,y,width,height): if not self.widget: return + if self.widget.parent and hasattr(self.widget.parent, 'move'): + self.widget.parent.move(self.widget, + int(x), int(y)) self.widget.set_uposition(int(x), int(y)) ! width = max(int(width), 1) ! height = max(int(height), 1) ! ! self.widget.set_size_request(int(width), int(height)) ! return def setVisible(self,visible): *************** *** 97,107 **** def setText(self,text): if not self.widget: return ! raise NotImplementedError, 'should be implemented by subclasses' class LabelWrapper(ComponentWrapper): def widgetFactory(self, *args, **kws): ! print "In LabelWrapper.widgetFactory()" ! return GtkLabel(*args, **kws) def setText(self, text): --- 161,175 ---- def setText(self,text): if not self.widget: return ! # raise NotImplementedError, 'should be implemented by subclasses' class LabelWrapper(ComponentWrapper): def widgetFactory(self, *args, **kws): ! try: ! label = args[0] or '' ! except: ! label = '' ! ! return gtk.Label(label, *args, **kws) def setText(self, text): *************** *** 109,121 **** self.widget.set_text(str(text)) ! class ScrollableListBox(GtkScrolledWindow): """ A scrollable list box. Used by ListBoxWrapper. """ def __init__(self, *args, **kw): ! GtkScrolledWindow.__init__(self, *args, **kw) ! self._listbox = GtkCList() self._listbox.show() ! self.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC) self.add_with_viewport(self._listbox) --- 177,200 ---- self.widget.set_text(str(text)) ! class _ComboBoxWrapper(ComponentWrapper): ! def widgetFactory(self, *args, **kws): ! return gtk.Combo() ! def getSelection(self): ! if not self.widget: return ! return int(self.widget.list.selection[0]) ! def setSelection(self, selection): ! if not self.widget: return ! self.widget.list.select_row(int(selection), 0) ! ! ! class ScrollableListBox(gtk.ScrolledWindow): """ A scrollable list box. Used by ListBoxWrapper. """ def __init__(self, *args, **kw): ! gtk.ScrolledWindow.__init__(self, *args, **kw) ! self._listbox = gtk.CList() self._listbox.show() ! self.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) self.add_with_viewport(self._listbox) *************** *** 134,137 **** --- 213,217 ---- if not self.widget: return self.widget._listbox.clear() + self._items = items[:] for item in items: self.widget._listbox.append([str(item)]) *************** *** 142,146 **** """ if not self.widget: return ! return list(self.widget._listbox.rows) def setSelection(self,selection): --- 222,229 ---- """ if not self.widget: return ! items = [] ! for i in range(self.widget._listbox.rows): ! items.append(self.widget._listbox.get_text(i, 0)) ! return items def setSelection(self,selection): *************** *** 157,161 **** """ if not self.widget: return ! return int(self.widget._listbox.selection[0]) def widgetSetUp(self): --- 240,248 ---- """ if not self.widget: return ! listbox = self.widget._listbox ! if listbox.selection: ! return listbox.selection[0] ! else: ! return -1 def widgetSetUp(self): *************** *** 180,184 **** def widgetFactory(self, *args, **kws): ! return GtkButton(*args, **kws) def widgetSetUp(self): --- 267,271 ---- def widgetFactory(self, *args, **kws): ! return gtk.Button(*args, **kws) def widgetSetUp(self): *************** *** 188,203 **** """ if not self.connected: ! self.widget.connect("clicked", self._click) self.connected = 1 def setText(self, text): if not self.widget: return ! self.widget.children()[0].set_text(str(text)) ! def _click(self,*args,**kws): send(self.proxy,'click') - class ToggleButtonMixin(ButtonWrapper): def getOn(self): --- 275,297 ---- """ if not self.connected: ! self.widget.connect("clicked", self.clickHandler) self.connected = 1 def setText(self, text): if not self.widget: return ! ! if self.widget.get_children(): ! self.widget.get_children()[0].set_text(str(text)) ! else: ! label = gtk.Label(str(text)) ! label.show() ! self.widget.add(label) ! def clickHandler(self,*args,**kws): send(self.proxy,'click') class ToggleButtonMixin(ButtonWrapper): + def widgetFactory(self, *args, **kws): + return gtk.ToggleButton(*args, **kws) def getOn(self): *************** *** 206,209 **** --- 300,308 ---- return self.widget.get_active() + def widgetSetUp(self): + ButtonWrapper.widgetSetUp(self) + self._toggling = 0 + self.widget.connect('toggled', self.toggleHandler) + def setOn(self,on): """ Set the button's state. """ *************** *** 212,216 **** --- 311,327 ---- if val == int(on): return + + self._toggling = 1 self.widget.set_active(int(on)) + self._toggling = 0 + + def toggleHandler(self, data): + if not self._toggling: + send(self.proxy, 'click') + + def clickHandler(self, data): + if not self._toggling: + send(self.proxy, 'click') + class CheckBoxWrapper(ToggleButtonMixin): *************** *** 220,223 **** --- 331,337 ---- code here. """ + def widgetFactory(self, *args, **kws): + return gtk.CheckButton(*args, **kws) + class RadioButtonWrapper(ToggleButtonMixin): *************** *** 246,288 **** def widgetFactory(self, *args, **kws): if self.proxy.group and len(self.proxy.group._items) > 1: for item in self.proxy.group._items: if item is not self: ! break else: raise InternalError(self, "Couldn't find non-self group item!") ! return GtkRadioButton(item.widget, *args, **kws) else: ! return GtkRadioButton(None, *args, **kws) ! ! def _click(self,*args,**kws): ! try: ! # Ensure the other buttons in the group are updated ! # properly. Note that if for some reason you need to ! # implement getValue(), this code will no longer ! # work due to the pull mechanism. ! self.proxy.group.value = self.proxy.value ! except AttributeError: ! pass ! send(self.proxy,'click') ! ! class TextControlMixin: ! ! def setText(self,text): ! """ Set/get the text associated with the widget. This might be ! window title, frame caption, label text, entry field text, ! or whatever. ! """ ! if not self.widget: return ! raise NotImplementedError, 'should be implemented by subclasses' ! ! def getText(self): ! """ ! Fetch the widget's associated text. You *must* implement this ! to get the text from the native widget; the default getText() ! from ComponentWrapper (almost) certainly won't work. ! """ ! if not self.widget: return ! raise NotImplementedError, 'should be implemented by subclasses' def setEditable(self,editable): """ --- 360,383 ---- def widgetFactory(self, *args, **kws): if self.proxy.group and len(self.proxy.group._items) > 1: + item = None for item in self.proxy.group._items: if item is not self: ! break else: raise InternalError(self, "Couldn't find non-self group item!") ! return gtk.RadioButton(item.wrapper.widget, *args, **kws) else: ! return gtk.RadioButton(None, *args, **kws) + def setGroup(self,group): + if group is None: + return + if self.proxy not in group._items: + group._items.append(self.proxy) + + class TextFieldWrapper(ComponentWrapper): + """ + Wraps a native single-line entry field. + """ def setEditable(self,editable): """ *************** *** 292,296 **** """ if not self.widget: return ! raise NotImplementedError, 'should be implemented by subclasses' def getSelection(self): --- 387,391 ---- """ if not self.widget: return ! self.widget.set_editable(editable) def getSelection(self): *************** *** 300,304 **** """ if not self.widget: return ! raise NotImplementedError, 'should be implemented by subclasses' def setSelection(self,selection): --- 395,404 ---- """ if not self.widget: return ! bounds = self.widget.get_selection_bounds() ! if bounds: ! return bounds ! else: ! position = self.widget.get_position() ! return (position, position) def setSelection(self,selection): *************** *** 309,333 **** """ if not self.widget: return ! raise NotImplementedError, 'should be implemented by subclasses' ! class TextFieldWrapper(TextControlMixin,ComponentWrapper): ! """ ! Wraps a native single-line entry field. ! """ ! def widgetSetup(self): """ Arrange for a press of the "Enter" key to call self._return. """ ! raise NotImplementedError, 'should be implemented by subclasses' def _return(self,*args,**kws): send(self.proxy, 'enterkey') ! class TextAreaWrapper(TextControlMixin,ComponentWrapper): """ Wraps a native multiline text area. If TextControlMixin works for your backend, you shouldn't need to change anything here. """ # Incomplete: fix the remainder of this file! --- 409,499 ---- """ if not self.widget: return ! self.widget.select_region(selection[0], selection[1]) ! def setText(self,text): ! """ Set/get the text associated with the widget. This might be ! window title, frame caption, label text, entry field text, ! or whatever. ! """ ! if not self.widget: return ! self.widget.delete_text(0, -1) ! self.widget.insert_text(str(text)) ! def getText(self): ! """ ! Fetch the widget's associated text. You *must* implement this ! to get the text from the native widget; the default getText() ! from ComponentWrapper (almost) certainly won't work. ! """ ! if not self.widget: return ! return self.widget.get_chars(0, -1) ! ! def widgetFactory(self, *args, **kws): ! return gtk.Entry(*args, **kws) ! ! def widgetSetUp(self): """ Arrange for a press of the "Enter" key to call self._return. """ ! pass def _return(self,*args,**kws): send(self.proxy, 'enterkey') ! class ScrollableTextView(gtk.ScrolledWindow): ! """ ! A scrollable text view. Used by TextAreaWrapper. ! """ ! def __init__(self, *args, **kw): ! gtk.ScrolledWindow.__init__(self, *args, **kw) ! self._textview = gtk.TextView() ! self._textview.show() ! self.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) ! self.add(self._textview) ! ! class TextAreaWrapper(ComponentWrapper): """ Wraps a native multiline text area. If TextControlMixin works for your backend, you shouldn't need to change anything here. """ + def widgetFactory(self, *args, **kws): + frame = gtk.Frame() + scrollable = ScrollableTextView(*args, **kws) + scrollable.show() + frame.add(scrollable) + frame._textview = scrollable._textview + return frame + + def widgetSetUp(self): + if self.widget: + self.widget._textview.set_wrap_mode(gtk.WRAP_WORD) + + def getText(self): + if not self.widget: return + buffer = self.widget._textview.get_buffer() + return buffer.get_text(buffer.get_start_iter(), + buffer.get_end_iter(), + False) + + def setText(self, text): + if not self.widget: return + self.widget._textview.get_buffer().set_text(str(text)) + + def setSelection(self, selection): + if not self.widget: return + start, end = selection + buffer = self.widget._textview.get_buffer() + buffer.move_mark_by_name('selection_bound', + buffer.get_iter_at_offset(start)) + buffer.move_mark_by_name('insert', + buffer.get_iter_at_offset(end)) + + def getSelection(self): + return self.widget._textview.get_selection_bounds() + + def setEditable(self, editable): + if not self.widget: return + self.widget._textview.set_editable(editable) + # Incomplete: fix the remainder of this file! *************** *** 346,349 **** --- 512,530 ---- ComponentWrapper.__init__(self,*args,**kws) + def widgetFactory(self): + return gtk.Frame() + + def _getContainer(self): + if not hasattr(self, '_gtk_container'): + self.create() + + return self._gtk_container + + def widgetSetUp(self): + if not hasattr(self, '_gtk_container'): + self._gtk_container = gtk.Layout() + self.widget.add(self._gtk_container) + self._gtk_container.show() + def addToContainer(self,container): """ *************** *** 354,357 **** --- 535,555 ---- raise NotImplementedError, 'should be implemented by subclasses' + def setContainer(self, *args, **kws): + """ + OK, this probably needs to be pulled into a mixin heritable by + various backends. + + Ensure all contents are properly created. This looks like it could + be handled at the Proxy level, but it probably *shouldn't* be - + it's handling a Tk-specific requirement about the order in which + widgets must be created. (I did it the Proxy way too. This way + is definitely "the simplest thing that could possibly work.") - jak + """ + ComponentWrapper.setContainer(self, *args, **kws) + # for component in self.proxy.contents: + # component.container = self.proxy + + + class WindowWrapper(ContainerMixin,ComponentWrapper): """ *************** *** 361,366 **** def widgetFactory(self, *args, **kws): ! print "In WindowWrapper.widgetFactory()" ! return GtkWindow(WINDOW_TOPLEVEL) def setTitle(self,title): --- 559,563 ---- def widgetFactory(self, *args, **kws): ! return gtk.Window(gtk.WINDOW_TOPLEVEL) def setTitle(self,title): *************** *** 368,371 **** --- 565,573 ---- self.widget.set_title(str(title)) + def _getContainer(self): + if not hasattr(self, '_gtk_container'): + self.widgetSetUp() + return self._gtk_container + def addToContainer(self,container): """ *************** *** 379,396 **** interactively resizes the window. """ ! self._gtk_container = GtkLayout() ! self.widget.add(self._gtk_container) ! self._gtk_container.show() if not self.connected: ! self.widget.connect('size_allocate', self.resize) self.connected = 1 ! def resize(self,dw,dh): ! """ ! Inform the proxy of a resize event. The proxy then takes care of ! laying out the container contents. Don't change this method, ! just call it from an event handler. ! """ self.proxy.resized(dw, dh) class MenuWrapper: --- 581,630 ---- interactively resizes the window. """ ! if not self.widget: ! self.create() ! ! if not hasattr(self, '_gtk_container'): ! self._gtk_container = gtk.Layout() ! self.widget.add(self._gtk_container) ! self._gtk_container.show() if not self.connected: ! self.widget.connect('size_allocate', self.resizeHandler) ! self.widget.connect('destroy', self.close) self.connected = 1 ! def close(self, event): ! self.widget.destroy() ! self.destroy() ! application().remove(self.proxy) ! ! def resizeHandler(self, *args): ! w = self.widget.get_allocation().width ! h = self.widget.get_allocation().height ! dw = w - self.proxy.state['width'] ! dh = h - self.proxy.state['height'] ! ! if (dw,dh) == (0,0): ! return ! ! #ensure proxy state is updated ! self.proxy.state['height'] = h ! self.proxy.state['width'] = w ! self.proxy.resized(dw, dh) + + def setContainer(self,container): + if not application().isRunning(): return + if container is None: return + if self.widget is None: + self.create() + self.proxy.push(blocked=['container']) + # Ensure contents are properly created. + for comp in self.proxy.contents: + comp.container = self.proxy + + def setGeometry(self, x, y, width, height): + if not self.widget: return + self.widget.set_uposition(x, y) + self.widget.set_default_size(width, height) class MenuWrapper: *************** *** 409,412 **** --- 643,647 ---- pass + class Application(AbstractApplication): """ *************** *** 419,423 **** Application.internalRun() method. """ ! def internalRun(self): """ --- 654,666 ---- Application.internalRun() method. """ ! def __init__(self, **kwds): ! AbstractApplication.__init__(self, **kwds) ! self._isRunning = True ! ! def isRunning(self): return self._isRunning ! def internalRemove(self): ! if not self._windows: ! gtk.main_quit() ! def internalRun(self): """ *************** *** 425,427 **** handling loop. """ ! mainloop() --- 668,671 ---- handling loop. """ ! gtk.main() ! |
From: Magnus L. H. <ml...@us...> - 2003-01-26 14:05:28
|
Update of /cvsroot/anygui/anygui/lib/anygui/backends In directory sc8-pr-cvs1:/tmp/cvs-serv27944/lib/anygui/backends Modified Files: wxgui.py Log Message: Index: wxgui.py =================================================================== RCS file: /cvsroot/anygui/anygui/lib/anygui/backends/wxgui.py,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -r1.48 -r1.49 *** wxgui.py 13 Nov 2002 18:47:49 -0000 1.48 --- wxgui.py 26 Jan 2003 14:05:23 -0000 1.49 *************** *** 131,139 **** def setSize(self,width,height): if self.widget is None: return ! self.widget.SetSize(width,height) def setPosition(self,x,y): if self.widget is None: return ! self.widget.SetPosition(x,y) def setVisible(self,visible): --- 131,139 ---- def setSize(self,width,height): if self.widget is None: return ! self.widget.SetSize((width,height)) def setPosition(self,x,y): if self.widget is None: return ! self.widget.SetPosition((x,y)) def setVisible(self,visible): *************** *** 402,405 **** --- 402,411 ---- self.widget.SetPosition((int(x), int(y))) self.widget.SetClientSize((int(width), int(height))) + + def setSize(self,width,height): + # override this to set the CLIENT size (not the window size) + # to take account for title bar, borders and so on. + if self.widget is None: return + self.widget.SetClientSize((int(width), int(height))) def getGeometry(self): |
From: Magnus L. H. <ml...@us...> - 2003-01-26 14:05:13
|
Update of /cvsroot/anygui//nondist/admin In directory sc8-pr-cvs1:/tmp/cvs-serv27795 Modified Files: status.txt Log Message: Index: status.txt =================================================================== RCS file: /cvsroot/anygui//nondist/admin/status.txt,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -r1.62 -r1.63 *** status.txt 26 Jan 2003 13:42:20 -0000 1.62 --- status.txt 26 Jan 2003 14:05:09 -0000 1.63 *************** *** 14,18 **** textgui ? ? ? ! ? ? ? ! ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tkgui + + + ! + + - ! + + + + ? ! + + + + + + + + + ! wxgui + + + ! + + + ! + + + + + + + + + - + + + + + * Legend: --- 14,18 ---- textgui ? ? ? ! ? ? ? ! ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? tkgui + + + ! + + - ! + + + + ? ! + + + + + + + + + ! wxgui + + + ! + + + ! + + + + + + + + + + + + + + + * Legend: |
From: Magnus L. H. <ml...@us...> - 2003-01-26 13:42:24
|
Update of /cvsroot/anygui//nondist/admin In directory sc8-pr-cvs1:/tmp/cvs-serv16856 Modified Files: status.txt Log Message: Index: status.txt =================================================================== RCS file: /cvsroot/anygui//nondist/admin/status.txt,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -r1.61 -r1.62 *** status.txt 26 Jan 2003 13:36:39 -0000 1.61 --- status.txt 26 Jan 2003 13:42:20 -0000 1.62 *************** *** 6,18 **** 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 -------------------------------------------------------------------------------- ! beosgui + + + - - + - ! + + - + ! + ! + + + + - + + + ! cursesgui ? ? ? ? ? ? ? ! ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! gtkgui ? ? ? ? ? ? ? ! ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! javagui + + + - + ! - ! + + + + ? + - ! + + + + + + + ! mswgui + + + - + + + ! + + + + + ! + + + - + + - + + ! qtgui + + + - - + + ! - + + + - + - + - - - + - - + ! textgui ? ? ? ? ? ? ? ! ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! tkgui + + + - + + - ! + + + + ? ! + + + + + + + + + ! wxgui + + + - + + + ! + + + + + + + + + - + + + + + * Legend: --- 6,18 ---- 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 -------------------------------------------------------------------------------- ! beosgui + + + ! - + - ! + + - + ! + ! + + + + - + + + ! cursesgui ? ? ? ! ? ? ? ! ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! gtkgui ? ? ? ! ? ? ? ! ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! javagui + + + ! + ! - ! + + + + ? + - ! + + + + + + + ! mswgui + + + ! + + + ! + + + + + ! + + + - + + - + + ! qtgui + + + ! - + + ! - + + + - + - + - - - + - - + ! textgui ? ? ? ! ? ? ? ! ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! tkgui + + + ! + + - ! + + + + ? ! + + + + + + + + + ! wxgui + + + ! + + + ! + + + + + + + + + - + + + + + * Legend: |
From: Magnus L. H. <ml...@us...> - 2003-01-26 13:41:28
|
Update of /cvsroot/anygui/anygui/test In directory sc8-pr-cvs1:/tmp/cvs-serv16340 Modified Files: test_component.py Log Message: Index: test_component.py =================================================================== RCS file: /cvsroot/anygui/anygui/test/test_component.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** test_component.py 14 Nov 2002 17:06:13 -0000 1.3 --- test_component.py 26 Jan 2003 13:41:25 -0000 1.4 *************** *** 1,2 **** --- 1,4 ---- + import sys + sys.exit('test_component is not currently pertinent') from unittest import TestCase, main |
From: Magnus L. H. <ml...@us...> - 2003-01-26 13:37:38
|
Update of /cvsroot/anygui/anygui/test In directory sc8-pr-cvs1:/tmp/cvs-serv14388/test Modified Files: test_interface.py Log Message: Index: test_interface.py =================================================================== RCS file: /cvsroot/anygui/anygui/test/test_interface.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** test_interface.py 21 Aug 2002 07:36:00 -0000 1.3 --- test_interface.py 26 Jan 2003 13:37:34 -0000 1.4 *************** *** 1,3 **** --- 1,6 ---- # TODO: Use unittest + import sys + sys.exit('test_interface is not currently pertinent') + from anygui.Utils import log |
From: Magnus L. H. <ml...@us...> - 2003-01-26 13:37:37
|
Update of /cvsroot/anygui/anygui/lib/anygui In directory sc8-pr-cvs1:/tmp/cvs-serv14388/lib/anygui Modified Files: __init__.py Log Message: Index: __init__.py =================================================================== RCS file: /cvsroot/anygui/anygui/lib/anygui/__init__.py,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -r1.76 -r1.77 *** __init__.py 23 Nov 2002 16:42:57 -0000 1.76 --- __init__.py 26 Jan 2003 13:37:34 -0000 1.77 *************** *** 1,4 **** ! #_backends = 'msw gtk java wx tk beos qt curses text' ! _backends = 'java msw wx qt tk' # 20020208:mlh -- starting to experiment with new architecture --- 1,4 ---- ! _backends = 'msw gtk java wx tk beos qt curses text' ! #_backends = 'java msw wx qt tk' # 20020208:mlh -- starting to experiment with new architecture |
From: Magnus L. H. <ml...@us...> - 2003-01-26 13:36:42
|
Update of /cvsroot/anygui//nondist/admin In directory sc8-pr-cvs1:/tmp/cvs-serv14088 Modified Files: status.txt Log Message: Index: status.txt =================================================================== RCS file: /cvsroot/anygui//nondist/admin/status.txt,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -r1.60 -r1.61 *** status.txt 19 Jan 2003 22:42:42 -0000 1.60 --- status.txt 26 Jan 2003 13:36:39 -0000 1.61 *************** *** 6,18 **** 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 -------------------------------------------------------------------------------- ! beosgui + + + - - + - - + + - + ! + ! + + + + - + + + ! cursesgui ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! gtkgui ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! javagui + + + - + ! - - + + + + ? + - ! + + + + + + + ! mswgui + + + - + + + - + + + + + ! + + + - + + - + + ! qtgui + + + - - + + - - + + + - + - + - - - + - - + ! textgui ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! tkgui + + + - + + - - + + + + ? ! + + + + + + + + + ! wxgui + + + - + + + - + + + + + + + + + - + + + + + * Legend: --- 6,18 ---- 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 -------------------------------------------------------------------------------- ! beosgui + + + - - + - ! + + - + ! + ! + + + + - + + + ! cursesgui ? ? ? ? ? ? ? ! ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! gtkgui ? ? ? ? ? ? ? ! ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! javagui + + + - + ! - ! + + + + ? + - ! + + + + + + + ! mswgui + + + - + + + ! + + + + + ! + + + - + + - + + ! qtgui + + + - - + + ! - + + + - + - + - - - + - - + ! textgui ? ? ? ? ? ? ? ! ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! tkgui + + + - + + - ! + + + + ? ! + + + + + + + + + ! wxgui + + + - + + + ! + + + + + + + + + - + + + + + * Legend: |
From: Matthew S. <sch...@us...> - 2003-01-19 22:42:45
|
Update of /cvsroot/anygui/nondist/admin In directory sc8-pr-cvs1:/tmp/cvs-serv28726/admin Modified Files: status.txt Log Message: beosgui.py test results modified Index: status.txt =================================================================== RCS file: /cvsroot/anygui/nondist/admin/status.txt,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -r1.59 -r1.60 *** status.txt 1 Nov 2002 14:30:39 -0000 1.59 --- status.txt 19 Jan 2003 22:42:42 -0000 1.60 *************** *** 6,9 **** --- 6,10 ---- 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 -------------------------------------------------------------------------------- + beosgui + + + - - + - - + + - + ! + ! + + + + - + + + cursesgui ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? gtkgui ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
From: Dallas T. J. <pan...@us...> - 2003-01-14 10:12:44
|
Update of /cvsroot/anygui/anygui/lib/anygui/backends In directory sc8-pr-cvs1:/tmp/cvs-serv15023/lib/anygui/backends Modified Files: genericgui.py Log Message: Not much, just playing around with genericgui comps. By the way, have people pretty much abandoned this project? Index: genericgui.py =================================================================== RCS file: /cvsroot/anygui/anygui/lib/anygui/backends/genericgui.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** genericgui.py 23 Nov 2002 16:42:57 -0000 1.1 --- genericgui.py 14 Jan 2003 10:12:42 -0000 1.2 *************** *** 63,67 **** backends that do not provide the ComboBox widget in their respective toolkits. This also models the creation of Mega-widgets using the ! Anygui GUI API.""" _connected = 0 --- 63,67 ---- backends that do not provide the ComboBox widget in their respective toolkits. This also models the creation of Mega-widgets using the ! Anygui API.""" _connected = 0 *************** *** 79,82 **** --- 79,109 ---- _cbxHeight = 0 + def _getLbxY(self): + # ---------------------------------------- + # calculate position of listbox + # ---------------------------------------- + # if the bottom of the list box is lower + # than the bottom of the containing window, + # then we will display the listbox + # above the textfield. + # note: this does not prevent clipping + # of the listbox when the window + # is too small to contain the entire + # listbox widget + tmpComp = self.proxy.container + mainWindow = None + while not mainWindow: + if isinstance(tmpComp, anygui.Window): + mainWindow = tmpComp + else: + tmpComp = tmpComp.container + txtGeom = self._textFld.geometry + txtBtmY = txtGeom[1] + txtGeom[3] # txtField.y + txtField.height == bottom Y + btmY = txtBtmY + self._lbxHeight # bottom Y + itemLbx.height + if btmY > mainWindow.height: + return txtGeom[1] - self._lbxHeight + else: + return txtBtmY + def _createWidgets(self): *************** *** 100,104 **** items = items, geometry = ( x, ! y + height, width, self._lbxHeight )) --- 127,131 ---- items = items, geometry = ( x, ! y + height, #this will be set later width, self._lbxHeight )) *************** *** 149,152 **** --- 176,180 ---- #print '>> handling Popup...' self._loop = 1 + self._itemLbx.y = self._getLbxY() self._itemLbx.visible = self._popupOpen = not self._popupOpen self._loop = 0 *************** *** 210,215 **** height, height) self._itemLbx.geometry = (x, ! y + height, width, self._lbxHeight) --- 238,244 ---- height, height) + self._itemLbx.geometry = (x, ! self._getLbxY(), width, self._lbxHeight) *************** *** 362,366 **** SORT_RULES={ALPHABETICAL: cmp, DIRS_FIRST: sort_dirs_first,\ ! FILES_FIRST: sort_files_first} # == END SORT_RULES == # --- 391,395 ---- SORT_RULES={ALPHABETICAL: cmp, DIRS_FIRST: sort_dirs_first,\ ! FILES_FIRST: sort_files_first} # == END SORT_RULES == # |
From: Matthew S. <sch...@us...> - 2003-01-08 06:25:37
|
Update of /cvsroot/anygui/anygui/lib/anygui/backends In directory sc8-pr-cvs1:/tmp/cvs-serv6396 Modified Files: beosgui.py Log Message: Made beosgui.py work again. (Execpt Menus & some bugs). Index: beosgui.py =================================================================== RCS file: /cvsroot/anygui/anygui/lib/anygui/backends/beosgui.py,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** beosgui.py 9 Feb 2002 05:18:40 -0000 1.29 --- beosgui.py 8 Jan 2003 06:25:34 -0000 1.30 *************** *** 1,36 **** from anygui.backends import * ! __all__ = anygui.__all__ ! ################################################################# # All Bethon modules are imported. Not all are used. ! ! import BAlert, BApplication ! import BButton [...1645 lines suppressed...] ! ! def AboutRequested(self): ! if self.about is None: ! self.about = BAlert.BAlert("About", __doc__, "Dismiss") ! self.about.Go() ! ! def ArgvRecieved(self, argc, argv): ! pass ! ! def ReadyToRun(self): ! for win in self._windows: ! if win.wrapper is "AboutDialog": ! self.about = win.alert ! else: ! win.wrapper.widget.Show() ! win.wrapper.widget.Minimize(not win.wrapper.proxy.state['visible']) def QuitRequested(self): + self.about = None return 1 |
From: Robin B. <rgb...@us...> - 2002-11-29 09:15:29
|
Update of /cvsroot/anygui/anygui/lib/anygui/backends In directory sc8-pr-cvs1:/tmp/cvs-serv892 Modified Files: ctmswgui.py dwgui.py Log Message: Added **kwds arg to Application Index: ctmswgui.py =================================================================== RCS file: /cvsroot/anygui/anygui/lib/anygui/backends/ctmswgui.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** ctmswgui.py 19 Nov 2002 12:41:44 -0000 1.6 --- ctmswgui.py 29 Nov 2002 09:15:24 -0000 1.7 *************** *** 791,799 **** } ! def __init__(self): global _app if not _app: #if _verbose: log('Application.__init__:start',str(self)) ! AbstractApplication.__init__(self) if not self._wndclass: self._register_class() WindowWrapper._wndclass = self._wndclass --- 791,799 ---- } ! def __init__(self,**kwds): global _app if not _app: #if _verbose: log('Application.__init__:start',str(self)) ! AbstractApplication.__init__(self,**kwds) if not self._wndclass: self._register_class() WindowWrapper._wndclass = self._wndclass Index: dwgui.py =================================================================== RCS file: /cvsroot/anygui/anygui/lib/anygui/backends/dwgui.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** dwgui.py 15 Nov 2002 14:12:00 -0000 1.8 --- dwgui.py 29 Nov 2002 09:15:24 -0000 1.9 *************** *** 714,722 **** } ! def __init__(self): global _app if not _app: if _verbose: log('Application.__init__:start',str(self)) ! AbstractApplication.__init__(self) if not self._wndclass: self._register_class() WindowWrapper._wndclass = self._wndclass --- 714,722 ---- } ! def __init__(self,**kwds): global _app if not _app: if _verbose: log('Application.__init__:start',str(self)) ! AbstractApplication.__init__(self,**kwds) if not self._wndclass: self._register_class() WindowWrapper._wndclass = self._wndclass |
From: Dallas T. J. <pan...@us...> - 2002-11-23 16:43:01
|
Update of /cvsroot/anygui/anygui/test In directory sc8-pr-cvs1:/tmp/cvs-serv5647/test Modified Files: test_aboutdlg.py test_openfiledlg.py Log Message: Moved all the funny frontend widget stuff into genericgui.py. Note that there will be issues with how we want the backend specific use of dialogs to work. This issue mainly relates to naming of backend wrappers. Index: test_aboutdlg.py =================================================================== RCS file: /cvsroot/anygui/anygui/test/test_aboutdlg.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** test_aboutdlg.py 16 Nov 2002 12:41:11 -0000 1.2 --- test_aboutdlg.py 23 Nov 2002 16:42:58 -0000 1.3 *************** *** 1,3 **** --- 1,4 ---- from anygui import * + from anygui.backends.genericgui import AboutDialog app = Application() Index: test_openfiledlg.py =================================================================== RCS file: /cvsroot/anygui/anygui/test/test_openfiledlg.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** test_openfiledlg.py 17 Nov 2002 18:42:07 -0000 1.5 --- test_openfiledlg.py 23 Nov 2002 16:42:58 -0000 1.6 *************** *** 1,3 **** --- 1,4 ---- from anygui import * + from anygui.backends.genericgui import OpenFileDialog import sys |
From: Dallas T. J. <pan...@us...> - 2002-11-23 16:43:01
|
Update of /cvsroot/anygui/anygui/lib/anygui/frontend_wrappers In directory sc8-pr-cvs1:/tmp/cvs-serv5647/lib/anygui/frontend_wrappers Removed Files: ComboBoxWrapper.py __init__.py Log Message: Moved all the funny frontend widget stuff into genericgui.py. Note that there will be issues with how we want the backend specific use of dialogs to work. This issue mainly relates to naming of backend wrappers. --- ComboBoxWrapper.py DELETED --- --- __init__.py DELETED --- |
From: Dallas T. J. <pan...@us...> - 2002-11-23 16:43:00
|
Update of /cvsroot/anygui/anygui/lib/anygui/backends In directory sc8-pr-cvs1:/tmp/cvs-serv5647/lib/anygui/backends Added Files: genericgui.py Log Message: Moved all the funny frontend widget stuff into genericgui.py. Note that there will be issues with how we want the backend specific use of dialogs to work. This issue mainly relates to naming of backend wrappers. --- NEW FILE: genericgui.py --- #==============================================================# # Imports from __future__ import nested_scopes # For Widgets import anygui from anygui.Wrappers import AbstractWrapper from anygui.Events import link, send from time import sleep # For Dialogs from anygui.Models import ListModel from anygui.LayoutManagers import SimpleGridManager from UserList import UserList import re import sys, glob, os import traceback # End Imports #==============================================================# __all__=""" ComboBoxWrapper AboutDialog OpenFileDialog """.split() #==============================================================# # Widgets #--------------------------------------------------------------# # Factoring out creational code... class Wrapper(AbstractWrapper): def __init__(self, *args, **kwds): AbstractWrapper.__init__(self, *args, **kwds) # 'container' before everything... self.setConstraints('container','x','y','width','height','items','selection') # Note: x,y,width, and height probably have no effect here, due to # the way getSetters() works. I'm not sure if that's something # that needs fixing or not... - jak self.addConstraint('geometry', 'visible') # FIXME: Is this the right place to put it? Make sure # 'geometry' implies 'x', 'y', etc. too (see Wrappers.py) # Also, this scheme will cause flashing... (place before # place_forget) def enterMainLoop(self): self.proxy.push() def rebuild(self): pass def rebuildAll(self): pass #--------------------------------------------------------------# class ComboBoxWrapper(Wrapper): """This is a generic implementation of the ComboBox that is provided for backends that do not provide the ComboBox widget in their respective toolkits. This also models the creation of Mega-widgets using the Anygui GUI API.""" _connected = 0 _comps = 0 _textFld = None _popupBtn = None _itemLbx = None _currentItem = 0 _popupOpen = 0 _visible = 1 _enabled = 1 _loop = 0 _btnWidth = 0 _lbxHeight = 0 _cbxHeight = 0 def _createWidgets(self): state = self.proxy.state x = state['x'] y = state['y'] width = state['width'] height = state['height'] self._lbxHeight = state['lbxHeight'] items = list(self.proxy.items) self._textFld = anygui.TextField(geometry = ( x, y, width - height, height )) self._popupBtn = anygui.Button(text = 'v', geometry = ( x + width - height, y, height, height )) self._itemLbx = anygui.ListBox(visible = 0, items = items, geometry = ( x, y + height, width, self._lbxHeight )) def _setupBtn(self): self._popupBtn.container = self.proxy.container def _setupTxtFld(self): self._textFld.container = self.proxy.container def _setupLbx(self): self._itemLbx.container = self.proxy.container def widgetFactory(self, *args, **kws): #print '>> in widgetFactory...' self._createWidgets() self._comps = 1 class Class: pass widget = Class() return widget def widgetSetUp(self): if self._comps and not self._connected: #print '>> in widgetSetUp' link(self._popupBtn, self._handlePopup) link(self._itemLbx, self._handleSelection) self._connected = 1 def setupChildWidgets(self): if self._comps: #print '>> in setupChildWidgets' self._setupTxtFld() self._setupBtn() self._setupLbx() def setContainer(self, container): if container is None: return parent = container.wrapper.widget try: assert parent is None except (AssertionError): self.create(parent) self.proxy.push(blocked=['container']) self.setupChildWidgets() def _handlePopup(self, event): #print '>> handling Popup...' self._loop = 1 self._itemLbx.visible = self._popupOpen = not self._popupOpen self._loop = 0 def _handleSelection(self, event): #print '>> handling Selection...' if not self._loop: self._loop = 1 self._textFld.text = self._itemLbx.items[self._itemLbx.selection] self._itemLbx.visible = 0 sleep(0.1) self._popupOpen = 0 send(self.proxy, 'select') self._loop = 0 def setX(self, x): if self._comps: dummy, y, width, height = self.geometry self.setGeometry(x, y, width, height) def setY(self, y): if self._comps: x, dummy, width, height = self.geometry self.setGeometry(x, y, width, height) def setWidth(self, width): if self._comps: x, y, dummy, height = self.geometry self.setGeometry(x, y, width, height) def setHeight(self, height): if self._comps: x, y, width, dummy = self.geometry self.setGeometry(x, y, width, height) def setPosition(self, x, y): if self._comps: dummy, dummy2, width, height = self.geometry self.setGeometry(x, y, width, height) def setSize(self, width, height): if self._comps: x, y, dummy, dummy2 = self.geometry self.setGeometry(x, y, width, height) def getGeometry(self): if self._comps: x, y, dummy, height = self._textFld.geometry d, d1, width, d2 = self._itemLbx.geometry return (x, y, width, height) def setGeometry(self, x, y, width, height): if self._comps: self._loop = 1 self._textFld.geometry = (x, y, width - height, height) self._popupBtn.geometry = (x + width - height, y, height, height) self._itemLbx.geometry = (x, y + height, width, self._lbxHeight) self._loop = 0 def getSelection(self): if self._comps: return self._itemLbx.selection def setSelection(self, selection): if self._comps: self._loop = 1 self._itemLbx.selection = selection self._textFld.text = self._itemLbx.items[selection] self._loop = 0 def getItems(self): if self._comps: return self._itemLbx.items def setItems(self, items): if self._comps: #print '>> in setItems(items) -> ', items self._loop = 1 self._itemLbx.items = items self._loop = 0 def getText(self): items = list(self._itemLbx.items) text = self._textFld.text if text in items: return text else: return items[self._itemLbx.selection] def getLbxHeight(self): return self._lbxHeight def setLbxHeight(self, lbxHeight): if self._comps: self._lbxHeight = lbxHeight x, y, width, height = self.proxy.geometry self._itemLbx.geometry = ( x, y + height, width, lbxHeight) def getVisible(self): return self._visible def setVisibile(self, visible): if self._comps: self._visible = visible if self._popupOpen: self._itemLbx.visible = visible self._popupOpen = visible self._textFld.visible = visible self._popupBtn.visible = visible def getEnabled(self): return self._enabled def setEnabled(self, enabled): if self._comps: if self._popupOpen: self._itemLbx.visible = 0 self._popupOpen = 0 self._enabled = enabled self._textFld.enabled = enabled self._popupBtn.enabled = enabled def internalDestroy(self): if self._comps: self._connected = 0 self._textFld.destroy() self._popupBtn.destroy() self._itemLbx.destroy() self._comps = 0 #==============================================================# # Dialogs #--------------------------------------------------------------# # About Anygui Dialog ABOUT_TEXT=""" The purpose of the Anygui project is to create an easy-to-use, simple, \ and generic module for making graphical user interfaces in Python. \ Its main feature is that it works transparently with many different \ GUI packages on most platforms. """ class AboutDialog(anygui.Window): def __init__(self): anygui.Window.__init__(self, title='About Anygui', geometry=(250, 200, 300, 225)) self.initWidgets() def initWidgets(self): #self.layout = SimpleGridManager(1,3) self.label = anygui.Label(text="Anygui info:") self.add(self.label, left=10, top=10) self.txtAbout = anygui.TextArea(text=ABOUT_TEXT, enabled=0) self.add(self.txtAbout, left=10, right=10, top=(self.label,5), \ bottom=45, hstretch=1, vstretch=1) self.btnOK = anygui.Button(text="OK") self.add(self.btnOK, right=10, bottom=10, hmove=1, vmove=1) link(self.btnOK, self.close) def close(self, event): self.destroy() #--------------------------------------------------------------# # FileDialog PATH_SEPAR='' ROOT_PATH='' if sys.platform in ['win32', 'dos', 'ms-dos']: PATH_SEPAR = '\\' ROOT_PATH = '[a-zA-Z]:\\\\(?!.)' else: PATH_SEPAR = '/' ROOT_PATH = '/(?!.)' # === SORT_RULES === # ALPHABETICAL=0 # uses cmp DIRS_FIRST=1 def sort_dirs_first(x, y): if x.endswith(PATH_SEPAR) and y.endswith(PATH_SEPAR): pass elif x.endswith(PATH_SEPAR): return -1 elif y.endswith(PATH_SEPAR): return 1 return cmp(x, y) FILES_FIRST=2 def sort_files_first(x, y): if x.endswith(PATH_SEPAR) and y.endswith(PATH_SEPAR): pass elif x.endswith(PATH_SEPAR): return 1 elif y.endswith(PATH_SEPAR): return -1 return cmp(x, y) SORT_RULES={ALPHABETICAL: cmp, DIRS_FIRST: sort_dirs_first,\ FILES_FIRST: sort_files_first} # == END SORT_RULES == # class DirManager: def __init__(self, dir, filter, sort_rule=DIRS_FIRST): #print '>> dir -> ', dir #print '>> filter -> ', filter assert os.path.isdir(dir), '!! DirManager: ' + dir + ' is not a directory.' if not dir.endswith(PATH_SEPAR): dir += PATH_SEPAR self.currDir = dir self.filter = filter self.sortRule = sort_rule self.currDirCache = [] self.oneDirUp = '' self.oneDirUpCache = [] self.twoDirUp = '' self.twoDirUpCache = [] self._genDirCaches() def update(self): self._genDirCaches() def isRootDir(self, dir): if dir == ROOT_PATH or re.match(ROOT_PATH, dir): return 1 else: return 0 def currDirIsRoot(self): return self.isRootDir(self.currDir) def dirUp(self, dir): return dir[:dir[:-1].rfind(PATH_SEPAR)+1] def goDirUp(): self.currDir = self.oneDirUp self._genDirCaches() def globDir(self, dir): if self.filter == '': self.filter = '*' cache = glob.glob(dir + self.filter) objCache = [ obj[obj.rfind(PATH_SEPAR)+1:] for obj in cache ] for i in range(len(cache)): if os.path.isdir(cache[i]): objCache[i] += PATH_SEPAR objCache.sort(SORT_RULES[self.sortRule]) return objCache def _genDirCaches(self): #print '>> self.currDir -> ', self.currDir self.currDirCache = self.globDir(self.currDir) # now generate cache for self.dir/.. if not self.currDirIsRoot(): self.oneDirUp = self.dirUp(self.currDir) #print '>> self.oneDirUp -> ', self.oneDirUp self.oneDirUpCache = self.globDir(self.oneDirUp) # and the same for self.dir/../.. if not self.isRootDir(self.oneDirUp): self.twoUpDir = self.dirUp(self.oneDirUp) #print '>> self.twoDirUp -> ', self.twoDirUp self.twoDirUpCache = self.globDir(self.twoDirUp) class OpenFileDialog(anygui.Window): def __init__(self, dir, filters, sort_rule=DIRS_FIRST): anygui.Window.__init__(self, title='Open File - ' + \ anygui.application().name + '-' + anygui.application().version, \ geometry=(250, 200, 420, 350)) self._updating = 0 self.dirMngr = DirManager(dir, filters[0], sort_rule) self._priorSelections = [] #self.createTripaneDirList() self.initWidgets(filters) #def createTripaneDirList(self): # dirMngr = self.dirMngr # self.dirList = TripanedDoublyLinkedList([dirMngr.currDirCache]) # if not dirMngr.currDirIsRoot(): # self.dirList.prepend(dirMngr.oneDirUpCache) # if not dirMngr.isRootDir(dirMngr.oneDirUp): # self.dirList.prepend(dirMngr.twoDirUpCache) def initWidgets(self, filters): dirMngr = self.dirMngr btnDirBack = self.btnDirBack = anygui.Button(text='<', size=(50,25)) if dirMngr.currDirIsRoot(): btnDirBack.enabled = 0 self.add(btnDirBack, left=10, top=10) link(btnDirBack, self.goDirBack) btnDirFwd = self.btnDirFwd = anygui.Button(text='>', size=(50,25)) btnDirFwd.enabled = 0 self.add(btnDirFwd, left=(btnDirBack, 5), top=10) link(btnDirFwd, self.goDirFwd) frmDirs = self.frmDirs = anygui.Frame() frmDirs.layout = SimpleGridManager(3,1) self.add(frmDirs, left=10, rigth=10, top=(btnDirBack, 5), \ bottom=75, vstretch=1, hstretch=1) lbxDirOne = self.lbxDirOne = anygui.ListBox() #lbxDirOne.items = self.dirList.tripane[0] lbxDirOne.items = self.dirMngr.currDirCache lbxDirOne.selection = 0 frmDirs.add(lbxDirOne) link(lbxDirOne, self.lbxSelect) lbxDirTwo = self.lbxDirTwo = anygui.ListBox() frmDirs.add(lbxDirTwo) link(lbxDirTwo, self.lbxSelect) lbxDirThree = self.lbxDirThree = anygui.ListBox() frmDirs.add(lbxDirThree) link(lbxDirThree, self.lbxSelect) btnCancel = self.btnCancel = anygui.Button(text='Cancel') self.add(btnCancel, right=10, top=(frmDirs, 5), hmove=1, vmove=1) link(self.btnCancel, self.close) btnOpen = self.btnOpen = anygui.Button(text='Open') self.add(btnOpen, right=10, top=(btnCancel, 5), hmove=1, vmove=1) link(self.btnOpen, self.open) lblLocation = self.lblLocation = anygui.Label(text='Location:', width=55) self.add(lblLocation, left=10, top=(frmDirs, 18), vmove=1) lblFilter = self.lblFilter = anygui.Label(text='Filter:', width=55) self.add(lblFilter, left=10, top=(lblLocation, 20), vmove=1) txtLocation = self.txtLocation = anygui.TextField(text=dirMngr.currDir) self.add(txtLocation, left=(lblLocation, 5), right=100, top=(frmDirs, 8), \ hstretch=1, vmove=1) link(txtLocation, self.changeDirs) cbxFilter = self.cbxFilter = anygui.ComboBox(items=filters) #txtFilter = self.txtFilter = TextField(text=dirMngr.filter) self.add(cbxFilter, left=(lblFilter, 5), right=100, top=(txtLocation, 10), \ hstretch=1, vmove=1) link(cbxFilter, self.applyFilter) def open(self, event): send(self, 'open', file=self.txtLocation.text) self.destroy() def close(self, event): self.destroy() def lbxSelect(self, event): if self._updating: return self_updating = 1 source = event.source if source is self.lbxDirOne: self.handleLbxDirOneEvent() elif source is self.lbxDirTwo: self.handleLbxDirTwoEvent() elif source is self.lbxDirThree: self.handleLbxDirThreeEvent() self.btnDirFwd.enabled = 0 self._updating = 0 def handleLbxDirOneEvent(self): #print '>> handling lbxDirOne event' dirMngr = self.dirMngr s = self._state() obj = dirMngr.currDir + s.dirOne if os.path.isdir(obj): dirMngr.filter = self.cbxFilter.text result = dirMngr.globDir(obj) try: s.lbxTwo.items = result s.lbxThree.items = [] except (AttributeError): pass else: try: s.lbxTwo.items = [] s.lbxThree.items = [] except (AttributeError): pass self.txtLocation.text = obj def handleLbxDirTwoEvent(self): #print '>> handling lbxDirTwo event' dirMngr = self.dirMngr s = self._state() obj = dirMngr.currDir + s.dirOne + s.dirTwo if os.path.isdir(obj): dirMngr.filter = self.cbxFilter.text result = dirMngr.globDir(obj) s.lbxThree.items = result else: s.lbxThree.items = [] self.txtLocation.text = obj def handleLbxDirThreeEvent(self): #print '>> handling lbxDirThree event' dirMngr = self.dirMngr s = self._state() obj = dirMngr.currDir + s.dirOne + s.dirTwo + s.dirThree if os.path.isdir(obj): dirMngr.currDir += s.dirOne dirMngr.update() s.lbxOne.items = dirMngr.currDirCache s.lbxOne.selection = s.selTwo dirMngr.filter = self.cbxFilter.text s.lbxTwo.items = dirMngr.globDir(dirMngr.currDir + s.dirTwo) s.lbxTwo.selection = s.selThree s.lbxThree.items = dirMngr.globDir(obj) self.btnDirBack.enabled = 1 self.txtLocation.text = obj def goDirFwd(self, event): #print ">> Got event: ", event #print ">> event dict: ", event.__dict__ self._updating = 1 self.handleLbxDirThreeEvent() if self._priorSelections: priSels = self._priorSelections self.lbxDirThree.selection = priSels[0] del priSels[0] if not self._priorSelections: self.btnDirFwd.enabled = 0 self._updating = 0 def goDirBack(self, event): #print ">> Got event: ", event #print ">> event dict: ", event.__dict__ self._updating = 1 dirMngr = self.dirMngr s = self._state() backDir = dirMngr.currDir currDir = dirMngr.currDir = dirMngr.oneDirUp dirMngr.update() s.lbxOne.items = dirMngr.currDirCache s.lbxOne.selection = dirMngr.currDirCache.index(\ backDir[backDir[:-1].rfind(PATH_SEPAR)+1:]\ ) s.lbxTwo.items = s.itemsOne s.lbxTwo.selection = s.selOne s.lbxThree.items = s.itemsTwo s.lbxThree.selection = s.selTwo self._priorSelections.append(s.selThree) self.btnDirFwd.enabled = 1 if dirMngr.currDirIsRoot(): self.btnDirBack.enabled = 0 s = self._state() self.txtLocation.text = currDir + s.dirOne + s.dirTwo + s.dirThree self._updating = 0 def changeDirs(self, event): print ">> Got event: ", event print ">> event dict: ", event.__dict__ def applyFilter(self, event): #print ">> Got event: ", event #print ">> event dict: ", event.__dict__ self._update = 1 dirMngr = self.dirMngr s = self._state() try: s.dirThree #print '>> filtering lbxThree' self.handleLbxDirTwoEvent() return except (AttributeError): pass try: s.dirTwo #print '>> filtering lbxTwo' self.handleLbxDirOneEvent() return except (AttributeError): pass #print '>> filtering lbxOne' dirMngr.filter = self.cbxFilter.text dirMngr.update() s.lbxOne.items = dirMngr.currDirCache try: selection = s.lbxOne.selection = dirMngr.currDirCache.index(s.dirOne) self.txtLocation.text = dirMngr.currDir + dirMngr.currDirCache[selection] except (AttributeError, ValueError): traceback.print_exc() self.txtLocation.text = dirMngr.currDir self.btnDirFwd.enabled = 0 self._update = 0 def _state(self): class State: def __str__(self): return str(self.__dict__) pass s = State() s.lbxOne = self.lbxDirOne s.itemsOne = s.lbxOne.items s.selOne = s.lbxOne.selection try: s.dirOne = s.lbxOne.items[s.selOne] s.lbxTwo = self.lbxDirTwo s.itemsTwo = s.lbxTwo.items s.selTwo = s.lbxTwo.selection s.dirTwo = s.lbxTwo.items[s.selTwo] s.lbxThree = self.lbxDirThree s.itemsThree = s.lbxThree.items s.selThree = s.lbxThree.selection s.dirThree = s.lbxThree.items[s.selThree] except (IndexError): pass return s |
From: Dallas T. J. <pan...@us...> - 2002-11-23 16:43:00
|
Update of /cvsroot/anygui/anygui/lib/anygui/dialogs In directory sc8-pr-cvs1:/tmp/cvs-serv5647/lib/anygui/dialogs Removed Files: AboutDialog.py OpenFileDialog.py __init__.py Log Message: Moved all the funny frontend widget stuff into genericgui.py. Note that there will be issues with how we want the backend specific use of dialogs to work. This issue mainly relates to naming of backend wrappers. --- AboutDialog.py DELETED --- --- OpenFileDialog.py DELETED --- --- __init__.py DELETED --- |