projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wxTinderbox build fix.
[wxWidgets.git]
/
wxPython
/
wx
/
lib
/
imagebrowser.py
diff --git
a/wxPython/wx/lib/imagebrowser.py
b/wxPython/wx/lib/imagebrowser.py
index 27b56de806c816dc4f827dad0c2f24585001d8f7..1ff10ca13890c1319e734d1d6c549833e1268b0a 100644
(file)
--- a/
wxPython/wx/lib/imagebrowser.py
+++ b/
wxPython/wx/lib/imagebrowser.py
@@
-82,7
+82,7
@@
class ImageView(wx.Window):
brush = wx.Brush(wx.NamedColour(self.back_color), wx.SOLID)
dc.SetBrush(brush)
dc.SetPen(wx.Pen(wx.NamedColour(self.border_color), 1))
brush = wx.Brush(wx.NamedColour(self.back_color), wx.SOLID)
dc.SetBrush(brush)
dc.SetPen(wx.Pen(wx.NamedColour(self.border_color), 1))
- dc.DrawRectangle(
(0, 0), (self.image_sizex, self.image_sizey)
)
+ dc.DrawRectangle(
0, 0, self.image_sizex, self.image_sizey
)
def DrawImage(self, dc):
try:
def DrawImage(self, dc):
try:
@@
-113,7
+113,7
@@
class ImageView(wx.Window):
image.Rescale(iwidth, iheight) # rescale to fit the window
image.ConvertToBitmap()
bmp = image.ConvertToBitmap()
image.Rescale(iwidth, iheight) # rescale to fit the window
image.ConvertToBitmap()
bmp = image.ConvertToBitmap()
- dc.DrawBitmap(bmp,
(diffx, diffy)
) # draw the image to window
+ dc.DrawBitmap(bmp,
diffx, diffy
) # draw the image to window
class ImageDialog(wx.Dialog):
class ImageDialog(wx.Dialog):
@@
-124,7
+124,7
@@
class ImageDialog(wx.Dialog):
self.y_pos = 20
self.delta = 20
self.y_pos = 20
self.delta = 20
- size = wx
Size(80, 25
)
+ size = wx
.Size(80, -1
)
self.set_dir = os.getcwd()
self.set_file = None
self.set_dir = os.getcwd()
self.set_file = None
@@
-135,11
+135,11
@@
class ImageDialog(wx.Dialog):
self.dir_x = self.x_pos
self.dir_y = self.y_pos
self.dir_x = self.x_pos
self.dir_y = self.y_pos
- self.
DisplayDir() # display the directory value
+ self.
dir = wx.StaticText(self, -1, self.set_dir, (self.dir_x, self.dir_y), (250, -1))
self.y_pos = self.y_pos + self.delta
self.y_pos = self.y_pos + self.delta
- btn = wx.Button(self,
-1, ' Set Directory ', (self.x_pos, self.y_pos), size).SetDefault(
)
+ btn = wx.Button(self,
12331, ' Set Directory ', (self.x_pos, self.y_pos)
)
self.Bind(wx.EVT_BUTTON, self.SetDirect, btn)
self.type_posy = self.y_pos # save the y position for the image type combo
self.Bind(wx.EVT_BUTTON, self.SetDirect, btn)
self.type_posy = self.y_pos # save the y position for the image type combo
@@
-148,7
+148,6
@@
class ImageDialog(wx.Dialog):
self.GetFiles() # get the file list
self.y_pos = self.y_pos + self.delta + 10
self.GetFiles() # get the file list
self.y_pos = self.y_pos + self.delta + 10
-
self.list_height = 150
# List of Labels
self.list_height = 150
# List of Labels
@@
-194,7
+193,7
@@
class ImageDialog(wx.Dialog):
self.y_pos = self.y_pos + height + 20
self.y_pos = self.y_pos + height + 20
- btn = wx.Button(self, -1, ' Select ', (100, self.y_pos), size)
.SetDefault()
+ btn = wx.Button(self, -1, ' Select ', (100, self.y_pos), size)
self.Bind(wx.EVT_BUTTON, self.OnOk, btn)
wx.Button(self, wx.ID_CANCEL, 'Cancel', (250, self.y_pos), size)
self.Bind(wx.EVT_BUTTON, self.OnOk, btn)
wx.Button(self, wx.ID_CANCEL, 'Cancel', (250, self.y_pos), size)
@@
-223,7
+222,8
@@
class ImageDialog(wx.Dialog):
self.fl_list.sort() # sort the file list
def DisplayDir(self): # display the working directory
self.fl_list.sort() # sort the file list
def DisplayDir(self): # display the working directory
- wx.StaticText(self, -1, self.set_dir, (self.dir_x, self.dir_y), (250, -1))
+ if self.dir:
+ self.dir.SetLabel(self.set_dir)
def OnSetType(self, event):
val = event.GetString() # get file type value
def OnSetType(self, event):
val = event.GetString() # get file type value