phatch-dev team mailing list archive
-
phatch-dev team
-
Mailing list archive
-
Message #00389
[Bug 394041] Re: console traceback when clicked on "font"
I went for solution 3 which is provide all the GetDefaultPath methods with the same set of arguments. Thanks Nadia for analyzing that saved me time. About the empty dropdown list that is the intended behaviour. The drop down list autocompletes the current text. So if the text is Default and you don't have fonts which start with Default, it is completely normal the dropdown is empty. To check you should empty the font field and than all the available fonts will popup. Please test this, Dr Slony. If you start typing it will filter the list of fonts down to the partial font input.
Thanks for reporting this bug, please test if it is fixed for you from the latest bzr
$ bzr diff
=== modified file 'phatch/pyWx/lib/popup.py'
--- phatch/pyWx/lib/popup.py 2009-06-23 14:43:21 +0000
+++ phatch/pyWx/lib/popup.py 2009-07-01 16:26:56 +0000
@@ -405,10 +405,10 @@
super(DictionaryFileCtrl,self).__init__(parent,value,size,
choices = choices, **extra)
- def GetDefaultPath(self):
- value = self.path.GetValue()
- #default_path = os.path.dirname(self.dictionary.get(value,value))
- default_path = self.dictionary.get(value,value)
+ def GetDefaultPath(self,default_path=None):
+ if default_path is None:
+ value = self.path.GetValue()
+ default_path = self.dictionary.get(value,value)
return super(DictionaryFileCtrl,self).GetDefaultPath(default_path)
class AutoCompleteDictionaryFileCtrl(DictionaryFileCtrl):
@@ -426,10 +426,10 @@
_label = _t('Fonts')
_busy_cursor = True
- def GetDefaultPath(self):
- value = self.path.GetValue()
- #default_path = os.path.dirname(font_dictionary().get(value,value))
- default_path = font_dictionary().get(value,value)
+ def GetDefaultPath(self,default_path=None):
+ if default_path is None:
+ value = self.path.GetValue()
+ default_path = font_dictionary().get(value,value)
if not os.path.isdir(default_path.strip()):
for path in FONT_PATHS:
if os.path.isdir(path):
$ bzr commit -m "fix GetDefaultPath"
Committing to: /media/16gb/sync/python/phatch/trunk/
modified phatch/pyWx/lib/popup.py
Committed revision 930.
** Changed in: phatch
Status: Confirmed => Fix Committed
** Changed in: phatch
Assignee: (unassigned) => stani (stani)
--
console traceback when clicked on "font"
https://bugs.launchpad.net/bugs/394041
You received this bug notification because you are a member of Phatch
Developers, which is subscribed to Phatch.
Status in Phatch = Photo & Batch!: Fix Committed
Bug description:
Open this action list, doubleclick on "Font: Default", click on the file browser icon for browsing fonts, an empty tooltip pops up which would normally contain a list of fonts, and this appears in the console each time I click on the file browser icon:
Traceback (most recent call last):
File "/usr/lib64/python2.5/site-packages/phatch/pyWx/lib/popup.py", line 361, in OnBrowse
defaultFile = self.GetDefaultPath(),
File "/usr/lib64/python2.5/site-packages/phatch/pyWx/lib/popup.py", line 437, in GetDefaultPath
return super(FontFileCtrl,self).GetDefaultPath(default_path)
TypeError: GetDefaultPath() takes exactly 1 argument (2 given)
References