Revision: 7187 Author: a_engels Date: 2009-08-28 23:11:46 +0000 (Fri, 28 Aug 2009)
Log Message: ----------- 2 changes to flickrripper: 1. Put the buttons 'OK' and 'Skip' directly under the image to avoid having them fall off the screen; 2. Make screen size a configuration variable
Modified Paths: -------------- trunk/pywikipedia/config.py trunk/pywikipedia/flickrripper.py
Modified: trunk/pywikipedia/config.py =================================================================== --- trunk/pywikipedia/config.py 2009-08-28 21:29:48 UTC (rev 7186) +++ trunk/pywikipedia/config.py 2009-08-28 23:11:46 UTC (rev 7187) @@ -146,6 +146,11 @@ except: colorized_output = False
+# An indication of the size of your screen, or rather the size of the screen +# to be shown, for flickrripper +tkhorsize = 1600 +tkvertsize = 1000 + ############## EXTERNAL EDITOR SETTINGS ############## # The command for the editor you want to use. If set to None, a simple Tkinter # editor will be used.
Modified: trunk/pywikipedia/flickrripper.py =================================================================== --- trunk/pywikipedia/flickrripper.py 2009-08-28 21:29:48 UTC (rev 7186) +++ trunk/pywikipedia/flickrripper.py 2009-08-28 23:11:46 UTC (rev 7187) @@ -211,7 +211,7 @@ def __init__(self, photoDescription, photoUrl, filename): self.root=Tk() #"%dx%d%+d%+d" % (width, height, xoffset, yoffset) - self.root.geometry("1600x1000+10-10") + self.root.geometry("%ix%i+10-10"%(config.tkhorsize, config.tkvertsize))
self.root.title(filename) self.photoDescription = photoDescription @@ -245,22 +245,23 @@ self.skipButton=Button(self.root, text="Skip", command=self.skipFile)
## Start grid + # The image self.imagePanel.grid(row=0, column=0, rowspan=11, columnspan=4) - + + # The buttons + self.okButton.grid(row=11, column=1, rowspan=2) + self.skipButton.grid(row=11, column=2, rowspan=2) + # The filename - self.filenameLabel.grid(row=11, column=0) - self.filenameField.grid(row=11, column=1, columnspan=3) + self.filenameLabel.grid(row=13, column=0) + self.filenameField.grid(row=13, column=1, columnspan=3)
# The description - self.descriptionLabel.grid(row=12, column=0) - self.descriptionField.grid(row=12, column=1, columnspan=3) - self.descriptionScrollbar.grid(row=12, column=5) + self.descriptionLabel.grid(row=14, column=0) + self.descriptionField.grid(row=14, column=1, columnspan=3) + self.descriptionScrollbar.grid(row=14, column=5)
- # The buttons - self.okButton.grid(row=13, column=1, rowspan=2) - self.skipButton.grid(row=13, column=2, rowspan=2) - def getImage(self, url, width, height): image=urllib.urlopen(url).read() output = StringIO.StringIO(image)
pywikipedia-svn@lists.wikimedia.org