comparison orpg/mapper/min_dialogs.py @ 13:211ac836b6a0 grumpy-goblin

{090731-00} Fixes problem with Name & Settings window, cleans code.
author sirebral
date Fri, 31 Jul 2009 15:22:11 -0500
parents 4385a7d0efd1
children 97265586402b
comparison
equal deleted inserted replaced
12:d492f137cd3c 13:211ac836b6a0
95 self.listctrl.SetStringItem(self.min.index(m),3,`self.min[self.min.index(m)].face`) 95 self.listctrl.SetStringItem(self.min.index(m),3,`self.min[self.min.index(m)].face`)
96 self.listctrl.SetStringItem(self.min.index(m),4,`self.min[self.min.index(m)].locked`) 96 self.listctrl.SetStringItem(self.min.index(m),4,`self.min[self.min.index(m)].locked`)
97 self.listctrl.SetStringItem(self.min.index(m),5,`self.min[self.min.index(m)].pos`) 97 self.listctrl.SetStringItem(self.min.index(m),5,`self.min[self.min.index(m)].pos`)
98 oldcolumnwidth = self.listctrl.GetColumnWidth(0) 98 oldcolumnwidth = self.listctrl.GetColumnWidth(0)
99 self.listctrl.SetColumnWidth(0, wx.LIST_AUTOSIZE) 99 self.listctrl.SetColumnWidth(0, wx.LIST_AUTOSIZE)
100 if oldcolumnwidth < self.listctrl.GetColumnWidth(0): 100 if oldcolumnwidth < self.listctrl.GetColumnWidth(0): self.listctrl.SetColumnWidth(0, wx.LIST_AUTOSIZE)
101 self.listctrl.SetColumnWidth(0, wx.LIST_AUTOSIZE) 101 else: self.listctrl.SetColumnWidth(0, oldcolumnwidth)
102 else:
103 self.listctrl.SetColumnWidth(0, oldcolumnwidth)
104 self.list_sizer=self.list_sizer 102 self.list_sizer=self.list_sizer
105 103
106 def onEdit(self,event): 104 def onEdit(self,event):
107 min_list = [] 105 min_list = []
108 min_index = [] 106 min_index = []
109 loop_count = 0 107 loop_count = 0
110 item =-1 108 item =-1
111 while True: 109 while True:
112 loop_count += 1 110 loop_count += 1
113 item = self.listctrl.GetNextItem(item,wx.LIST_NEXT_ALL, wx.LIST_STATE_SELECTED) 111 item = self.listctrl.GetNextItem(item,wx.LIST_NEXT_ALL, wx.LIST_STATE_SELECTED)
114 if item == -1: 112 if item == -1: break
115 break
116 min_list.append(self.min[item]) 113 min_list.append(self.min[item])
117 min_index.append(item-loop_count+1) 114 min_index.append(item-loop_count+1)
118 if len(min_list) > 0: 115 if len(min_list) > 0: dlg = min_list_edit_dialog(self.parent,min_index, min_list,self.layers)
119 dlg = min_list_edit_dialog(self.parent,min_index, min_list,self.layers) 116 if dlg.ShowModal() == wx.ID_OK: pass
120 if dlg.ShowModal() == wx.ID_OK:
121 pass
122 self.listctrl.DeleteAllItems() 117 self.listctrl.DeleteAllItems()
123 self.refresh() 118 self.refresh()
124 event.Skip() 119 event.Skip()
125 120
126 def onDelete(self,event): 121 def onDelete(self,event):
127 loop_count = 0 122 loop_count = 0
128 item = -1 123 item = -1
129 while True: 124 while True:
130 loop_count += 1 125 loop_count += 1
131 item = self.listctrl.GetNextItem(item,wx.LIST_NEXT_ALL, wx.LIST_STATE_SELECTED) 126 item = self.listctrl.GetNextItem(item,wx.LIST_NEXT_ALL, wx.LIST_STATE_SELECTED)
132 if item == -1: 127 if item == -1: break
133 break
134 #self.min.remove(self.min[item-loop_count+1])
135 self.layers["miniatures"].del_miniature(self.min[item-loop_count+1]) 128 self.layers["miniatures"].del_miniature(self.min[item-loop_count+1])
136 self.listctrl.DeleteAllItems() 129 self.listctrl.DeleteAllItems()
137 self.refresh() 130 self.refresh()
138 event.Skip() 131 event.Skip()
139 132
143 loop_count = 0 136 loop_count = 0
144 item =-1 137 item =-1
145 while True: 138 while True:
146 loop_count += 1 139 loop_count += 1
147 item = self.listctrl.GetNextItem(item,wx.LIST_NEXT_ALL, wx.LIST_STATE_SELECTED) 140 item = self.listctrl.GetNextItem(item,wx.LIST_NEXT_ALL, wx.LIST_STATE_SELECTED)
148 if item == -1: 141 if item == -1: break
149 break
150 min_list.append(self.min[item]) 142 min_list.append(self.min[item])
151 min_index.append(item-loop_count+1) 143 min_index.append(item-loop_count+1)
152 if len(min_list) > 0: 144 if len(min_list) > 0:
153 for sel_rmin in min_list: 145 for sel_rmin in min_list:
154 ############# 146 #############
155 min_xml = sel_rmin.toxml(action="new") 147 min_xml = sel_rmin.toxml(action="new")
156 node_begin = "<nodehandler module='map_miniature_nodehandler' class='map_miniature_handler' name='" 148 node_begin = "<nodehandler module='map_miniature_nodehandler' class='map_miniature_handler' name='"
157 149
158 if sel_rmin.label: 150 if sel_rmin.label: node_begin += sel_rmin.label + "'"
159 node_begin += sel_rmin.label + "'" 151 else: node_begin += "Unnamed Miniature'"
160 else:
161 node_begin += "Unnamed Miniature'"
162 152
163 node_begin += ">" 153 node_begin += ">"
164 gametree = open_rpg.get_component('tree') 154 gametree = open_rpg.get_component('tree')
165 node_xml = node_begin + min_xml + '</nodehandler>' 155 node_xml = node_begin + min_xml + '</nodehandler>'
166 print "Sending this XML to insert_xml:" + node_xml 156 print "Sending this XML to insert_xml:" + node_xml
167 gametree.insert_xml(node_xml) 157 gametree.insert_xml(node_xml)
168 ########## 158 #############
169 self.listctrl.DeleteAllItems() 159 self.listctrl.DeleteAllItems()
170 self.refresh() 160 self.refresh()
171 event.Skip() 161 event.Skip()
172 162
173 def OnRightDown(self,event): 163 def OnRightDown(self,event):
242 self.pathcombo.Append(min_list[min_list.index(m)].path) 232 self.pathcombo.Append(min_list[min_list.index(m)].path)
243 self.positioncombo.Append(`min_list[min_list.index(m)].pos`) 233 self.positioncombo.Append(`min_list[min_list.index(m)].pos`)
244 listsizer.Add(wx.StaticText(self, -1, "Path:"), 0, wx.EXPAND) 234 listsizer.Add(wx.StaticText(self, -1, "Path:"), 0, wx.EXPAND)
245 listsizer.Add(self.pathcombo, 0, wx.EXPAND) 235 listsizer.Add(self.pathcombo, 0, wx.EXPAND)
246 listsizer.Add(wx.Size(10,10)) 236 listsizer.Add(wx.Size(10,10))
247 self.heading = wx.RadioBox(self, MIN_HEADING, "Heading", choices=["None","N","NE","E","SE","S","SW","W","NW","no change"], majorDimension=5, style=wx.RA_SPECIFY_COLS) 237 self.heading = wx.RadioBox(self, MIN_HEADING, "Heading",
238 choices=["None","N","NE","E","SE","S","SW","W","NW","no change"], majorDimension=5, style=wx.RA_SPECIFY_COLS)
248 self.heading.SetSelection( 9 ) 239 self.heading.SetSelection( 9 )
249 listsizer.Add( self.heading, 0, wx.EXPAND ) 240 listsizer.Add( self.heading, 0, wx.EXPAND )
250 listsizer.Add(wx.Size(10,10)) 241 listsizer.Add(wx.Size(10,10))
251 self.face = wx.RadioBox(self, MIN_FACE, "Facing", choices=["None","N","NE","E","SE","S","SW","W","NW","no change"], majorDimension=5, style=wx.RA_SPECIFY_COLS) 242 self.face = wx.RadioBox(self, MIN_FACE, "Facing",
243 choices=["None","N","NE","E","SE","S","SW","W","NW","no change"], majorDimension=5, style=wx.RA_SPECIFY_COLS)
252 self.face.SetSelection(9) 244 self.face.SetSelection(9)
253 listsizer.Add(self.face, 0, wx.EXPAND) 245 listsizer.Add(self.face, 0, wx.EXPAND)
254 ### 246 ###
255 ### Group together locked, Hide, and snap radioboxes in group2 box 247 ###Group together locked, Hide, and snap radioboxes in group2 box
256 ### 248 ###
257 group2 = wx.BoxSizer(wx.HORIZONTAL) 249 group2 = wx.BoxSizer(wx.HORIZONTAL)
258 self.locked = wx.RadioBox(self, MIN_LOCK, "Lock", choices=["Don't lock","Lock","no change"],majorDimension=1,style=wx.RA_SPECIFY_COLS) 250 self.locked = wx.RadioBox(self, MIN_LOCK, "Lock",
251 choices=["Don't lock","Lock","no change"],majorDimension=1,style=wx.RA_SPECIFY_COLS)
259 self.locked.SetSelection(2) 252 self.locked.SetSelection(2)
260 self.hide = wx.RadioBox(self, MIN_HIDE, "Hide", choices=["Don't hide", "Hide", "no change"],majorDimension=1,style=wx.RA_SPECIFY_COLS) 253 self.hide = wx.RadioBox(self, MIN_HIDE, "Hide",
254 choices=["Don't hide", "Hide", "no change"],majorDimension=1,style=wx.RA_SPECIFY_COLS)
261 self.hide.SetSelection(2) 255 self.hide.SetSelection(2)
262 self.snap = wx.RadioBox(self,MIN_ALIGN,"Snap",choices=["Center","Top left","no change"],majorDimension=1,style=wx.RA_SPECIFY_COLS) 256 self.snap = wx.RadioBox(self,MIN_ALIGN,"Snap",
257 choices=["Center","Top left","no change"],majorDimension=1,style=wx.RA_SPECIFY_COLS)
263 self.snap.SetSelection(2) 258 self.snap.SetSelection(2)
264 group2.Add(self.locked, 0, wx.EXPAND) 259 group2.Add(self.locked, 0, wx.EXPAND)
265 group2.Add(wx.Size(10,0)) 260 group2.Add(wx.Size(10,0))
266 group2.Add(self.hide, 0, wx.EXPAND) 261 group2.Add(self.hide, 0, wx.EXPAND)
267 group2.Add(wx.Size(10,0)) 262 group2.Add(wx.Size(10,0))
268 group2.Add(self.snap, 0, wx.EXPAND) 263 group2.Add(self.snap, 0, wx.EXPAND)
269 group2.Add(wx.Size(10,0)) 264 group2.Add(wx.Size(10,0))
270 listsizer.Add(group2,0,0) 265 listsizer.Add(group2,0,0)
271 ### 266 ###
272 ### group together the postion radiobox and the and its selection elements 267 ###Group together the postion radiobox and the and its selection elements
273 ### 268 ###
274 xpos = int(min_list[0].pos[0]) 269 xpos = int(min_list[0].pos[0])
275 #xpos = int(`min_list[0].pos`[1:`min_list[0].pos`.index(',')]) 270 #xpos = int(`min_list[0].pos`[1:`min_list[0].pos`.index(',')])
276 ypos = int(min_list[0].pos[1]) 271 ypos = int(min_list[0].pos[1])
277 #ypos = int(`min_list[0].pos`[`min_list[0].pos`.rfind(',')+1:len(`min_list[0].pos`)-1]) 272 #ypos = int(`min_list[0].pos`[`min_list[0].pos`.rfind(',')+1:len(`min_list[0].pos`)-1])
278 self.scx = wx.SpinCtrl(self, POS_SPIN, "", (-1,-1), wx.Size(75,25)) 273 self.scx = wx.SpinCtrl(self, POS_SPIN, "", (-1,-1), wx.Size(75,25))
281 self.scy = wx.SpinCtrl(self, POS_SPIN, "", (-1,-1), wx.Size(75,25)) 276 self.scy = wx.SpinCtrl(self, POS_SPIN, "", (-1,-1), wx.Size(75,25))
282 self.scy.SetRange(0,self.grid.return_grid()[1]) 277 self.scy.SetRange(0,self.grid.return_grid()[1])
283 self.scy.SetValue(1) 278 self.scy.SetValue(1)
284 self.scy.SetValue(ypos) 279 self.scy.SetValue(ypos)
285 positionbox = wx.BoxSizer(wx.HORIZONTAL) 280 positionbox = wx.BoxSizer(wx.HORIZONTAL)
286 self.poschoice = wx.RadioBox(self,MIN_POS,"Position",choices=["Manual", "Existing", "no change"],majorDimension=1,style=wx.RA_SPECIFY_COLS) 281 self.poschoice = wx.RadioBox(self,MIN_POS,"Position",
282 choices=["Manual", "Existing", "no change"],majorDimension=1,style=wx.RA_SPECIFY_COLS)
287 self.poschoice.SetSelection(2) 283 self.poschoice.SetSelection(2)
288 positionbox.Add(self.poschoice,0,0) 284 positionbox.Add(self.poschoice,0,0)
289 ### 285 ###
290 ### group together choices under position choice boxsizer 286 ### group together choices under position choice boxsizer
291 ### 287 ###
301 ypos = wx.StaticText(self, -1,"YPOS: ") 297 ypos = wx.StaticText(self, -1,"YPOS: ")
302 spinbox.Add(ypos,0, 0) 298 spinbox.Add(ypos,0, 0)
303 spinbox.Add(self.scy, 0, 0) 299 spinbox.Add(self.scy, 0, 0)
304 poschoicebox.Add(wx.Size(0,15)) 300 poschoicebox.Add(wx.Size(0,15))
305 poschoicebox.Add(spinbox,0,0) 301 poschoicebox.Add(spinbox,0,0)
306 ### 302 ###
307 ### kludge is just a way to horizontaly position text. .Add doesn't seem to work. 303 ### kludge is just a way to horizontaly position text. .Add doesn't seem to work.
308 ### 304 ###
309 kluge = wx.BoxSizer(wx.HORIZONTAL) 305 kluge = wx.BoxSizer(wx.HORIZONTAL)
310 klugetext = wx.StaticText(self, -1, " ") 306 klugetext = wx.StaticText(self, -1, " ")
311 kluge.Add(klugetext,0,0) 307 kluge.Add(klugetext,0,0)
312 kluge.Add(self.positioncombo,0,0) 308 kluge.Add(self.positioncombo,0,0)
313 poschoicebox.Add(wx.Size(0,1)) 309 poschoicebox.Add(wx.Size(0,1))
328 self.Bind(wx.EVT_RADIOBOX, self.on_radio_box, id=MIN_FACE) 324 self.Bind(wx.EVT_RADIOBOX, self.on_radio_box, id=MIN_FACE)
329 325
330 def on_ok(self,min): 326 def on_ok(self,min):
331 self.min = min 327 self.min = min
332 for m in self.min_list: 328 for m in self.min_list:
333 if self.hide.GetSelection() !=2: 329 if self.hide.GetSelection() !=2: m.hide = self.hide.GetSelection()
334 m.hide = self.hide.GetSelection() 330 if self.heading.GetSelection() !=9: m.heading = self.heading.GetSelection()
335 if self.heading.GetSelection() !=9: 331 if self.face.GetSelection() !=9: m.face = self.face.GetSelection()
336 m.heading = self.heading.GetSelection() 332 if self.locked.GetSelection() !=2: m.locked = self.locked.GetSelection()
337 if self.face.GetSelection() !=9: 333 if self.snap.GetSelection() !=2: m.snap_to_align = self.snap.GetSelection()
338 m.face = self.face.GetSelection()
339 if self.locked.GetSelection() !=2:
340 m.locked = self.locked.GetSelection()
341 if self.snap.GetSelection() !=2:
342 m.snap_to_align = self.snap.GetSelection()
343 if self.labelcombo.GetValue() != "no change": 334 if self.labelcombo.GetValue() != "no change":
344 m.label = self.labelcombo.GetValue() 335 m.label = self.labelcombo.GetValue()
345 if self.labelcheck.GetValue(): 336 if self.labelcheck.GetValue(): m.label += " " + `self.layers['miniatures'].next_serial()`
346 m.label += " " + `self.layers['miniatures'].next_serial()`
347 # self.layers['miniatures'].serial_number +=1
348 # m.label += " " + `self.layers['miniatures'].serial_number`
349 if self.pathcombo.GetValue() != "no change": 337 if self.pathcombo.GetValue() != "no change":
350 path = self.pathcombo.GetValue() 338 path = self.pathcombo.GetValue()
351 image = self.evaluate(path) 339 image = self.evaluate(path)
352 if str(image[1]) != '-1': 340 if str(image[1]) != '-1':
353 m.path = image[0] 341 m.path = image[0]
354 m.bmp = image[1] 342 m.bmp = image[1]
355 else: 343 else:
356 image[-1] = -1 344 image[-1] = -1
357 while image[1] == -1: 345 while image[1] == -1:
358 image = 0 346 image = 0
359 self.dlg = wx.TextEntryDialog(self, 'You entered an invalid URL for the image path. Please Enter a valid URL or cancel to leave the old url unchanged') 347 self.dlg = wx.TextEntryDialog(self,
348 'You entered an invalid URL for the image path. Please Enter a valid URL or cancel to leave the old url unchanged')
360 if self.dlg.ShowModal() == wx.ID_OK: 349 if self.dlg.ShowModal() == wx.ID_OK:
361 path = self.dlg.GetValue() 350 path = self.dlg.GetValue()
362 image = self.evaluate(path) 351 image = self.evaluate(path)
363 if image[1] != -1: 352 if image[1] != -1:
364 m.path = image[0] 353 m.path = image[0]
365 m.bmp = image[1] 354 m.bmp = image[1]
366 self.dlg.Destroy() 355 self.dlg.Destroy()
367 else: 356 else: break
368 break
369 if self.poschoice.GetSelection() !=2: 357 if self.poschoice.GetSelection() !=2:
370 if self.poschoice.GetSelection() == 0: 358 if self.poschoice.GetSelection() == 0: m.pos = cmpPoint(self.scx.GetValue(),self.scy.GetValue())
371 m.pos = cmpPoint(self.scx.GetValue(),self.scy.GetValue())
372 else: 359 else:
373 pos = self.positioncombo.GetValue() 360 pos = self.positioncombo.GetValue()
374 m.pos = cmpPoint(int(`pos`[2:`pos`.index(",")]),int(`pos`[`pos`.rfind(',')+1:len(`pos`)-2])) 361 m.pos = cmpPoint(int(`pos`[2:`pos`.index(",")]),int(`pos`[`pos`.rfind(',')+1:len(`pos`)-2]))
375 self.layers["miniatures"].canvas.send_map_data() 362 self.layers["miniatures"].canvas.send_map_data()
376 363
377 def evaluate(self, ckpath): 364 def evaluate(self, ckpath):
378 path = [] 365 path = []
379 if ckpath[:7] != "http://": 366 if ckpath[:7] != "http://": ckpath = "http://" + ckpath
380 ckpath = "http://" + ckpath
381 path = self.check_path(ckpath) 367 path = self.check_path(ckpath)
382 return [ckpath, path] 368 return [ckpath, path]
383 369
384 def check_path(self, path): 370 def check_path(self, path):
385 if ImageHandler.Cache.has_key(path): 371 if ImageHandler.Cache.has_key(path): return ImageHandler.Cache[path]
386 return ImageHandler.Cache[path]
387 img = ImageHandler.directLoad(path) 372 img = ImageHandler.directLoad(path)
388 if img is None: 373 if img is None: return -1
389 return -1
390 return img 374 return img
391 375
392 def on_text(self,evt): 376 def on_text(self,evt):
393 id=evt.GetId() 377 id=evt.GetId()
394 378
430 hSizer = wx.BoxSizer(wx.HORIZONTAL) 414 hSizer = wx.BoxSizer(wx.HORIZONTAL)
431 self.label = wx.TextCtrl(self, MIN_LABEL, min.label) 415 self.label = wx.TextCtrl(self, MIN_LABEL, min.label)
432 sizer.Add(wx.StaticText(self, -1, "Label:"), 0, wx.EXPAND) 416 sizer.Add(wx.StaticText(self, -1, "Label:"), 0, wx.EXPAND)
433 sizer.Add(self.label, 0, wx.EXPAND) 417 sizer.Add(self.label, 0, wx.EXPAND)
434 sizer.Add(wx.Size(10,10)) 418 sizer.Add(wx.Size(10,10))
435 self.heading = wx.RadioBox(self, MIN_HEADING, "Heading", choices=["None","N","NE","E","SE","S","SW","W","NW"],majorDimension=5,style=wx.RA_SPECIFY_COLS) 419 self.heading = wx.RadioBox(self, MIN_HEADING, "Heading",
420 choices=["None","N","NE","E","SE","S","SW","W","NW"],majorDimension=5,style=wx.RA_SPECIFY_COLS)
436 self.heading.SetSelection(min.heading) 421 self.heading.SetSelection(min.heading)
437 self.face = wx.RadioBox(self, MIN_FACE, "Facing", choices=["None","N","NE","E","SE","S","SW","W","NW"],majorDimension=5,style=wx.RA_SPECIFY_COLS) 422 self.face = wx.RadioBox(self, MIN_FACE, "Facing",
423 choices=["None","N","NE","E","SE","S","SW","W","NW"],majorDimension=5,style=wx.RA_SPECIFY_COLS)
438 self.face.SetSelection(min.face) 424 self.face.SetSelection(min.face)
439 self.locked = wx.CheckBox(self, MIN_LOCK, " Lock") 425 self.locked = wx.CheckBox(self, MIN_LOCK, " Lock")
440 self.locked.SetValue(min.locked) 426 self.locked.SetValue(min.locked)
441 self.hide = wx.CheckBox(self, MIN_HIDE, " Hide") 427 self.hide = wx.CheckBox(self, MIN_HIDE, " Hide")
442 self.hide.SetValue(min.hide) 428 self.hide.SetValue(min.hide)
482 self.Bind(wx.EVT_TEXT, self.on_scaling, id=wxID_MIN_HEIGHT) 468 self.Bind(wx.EVT_TEXT, self.on_scaling, id=wxID_MIN_HEIGHT)
483 self.Bind(wx.EVT_RADIOBOX, self.on_radio_box, id=MIN_HEADING) 469 self.Bind(wx.EVT_RADIOBOX, self.on_radio_box, id=MIN_HEADING)
484 self.Bind(wx.EVT_RADIOBOX, self.on_radio_box, id=MIN_FACE) 470 self.Bind(wx.EVT_RADIOBOX, self.on_radio_box, id=MIN_FACE)
485 471
486 def on_scaling(self, evt): 472 def on_scaling(self, evt):
487 if self.min_scaling.GetValue() == False: 473 if self.min_scaling.GetValue() == False: return
488 return
489 elif self.min_width.GetValue() and wxID_MIN_WIDTH == evt.GetId() and self.min_width.GetInsertionPoint(): 474 elif self.min_width.GetValue() and wxID_MIN_WIDTH == evt.GetId() and self.min_width.GetInsertionPoint():
490 self.min_height.SetValue ( str(int((float(self.min_width.GetValue()) / float(self.min_width_old_value)) * float(self.min_height_old_value))) ) 475 self.min_height.SetValue(str(int((float(self.min_width.GetValue()) / float(self.min_width_old_value)) * float(self.min_height_old_value))) )
491 elif self.min_height.GetValue() and wxID_MIN_HEIGHT == evt.GetId() and self.min_height.GetInsertionPoint(): 476 elif self.min_height.GetValue() and wxID_MIN_HEIGHT == evt.GetId() and self.min_height.GetInsertionPoint():
492 self.min_width.SetValue ( str(int((float(self.min_height.GetValue()) / float(self.min_height_old_value)) * float(self.min_width_old_value))) ) 477 self.min_width.SetValue(str(int((float(self.min_height.GetValue()) / float(self.min_height_old_value)) * float(self.min_width_old_value))) )
493 478
494 def update_min(self): 479 def update_min(self):
495 self.min.set_min_props(self.heading.GetSelection(), 480 self.min.set_min_props(self.heading.GetSelection(),
496 self.face.GetSelection(), 481 self.face.GetSelection(),
497 self.label.GetValue(), 482 self.label.GetValue(),
512 self.sizer.SetDimension(20,20,s[0]-40,s[1]-40) 497 self.sizer.SetDimension(20,20,s[0]-40,s[1]-40)
513 self.outline.SetDimensions(5,5,s[0]-10,s[1]-10) 498 self.outline.SetDimensions(5,5,s[0]-10,s[1]-10)
514 499
515 class min_edit_dialog(wx.Dialog): 500 class min_edit_dialog(wx.Dialog):
516 def __init__(self,parent,min): 501 def __init__(self,parent,min):
517 #520,265 502 #520,265
518 wx.Dialog.__init__(self,parent,-1,"Miniature",wx.DefaultPosition,wx.Size(520,350)) 503 wx.Dialog.__init__(self,parent,-1,"Miniature",wx.DefaultPosition,wx.Size(520,350))
519 (w,h) = self.GetClientSizeTuple() 504 (w,h) = self.GetClientSizeTuple()
520 mastersizer = wx.BoxSizer(wx.VERTICAL) 505 mastersizer = wx.BoxSizer(wx.VERTICAL)
521 editor = min_edit_panel(self,min) 506 editor = min_edit_panel(self,min)
522 #editor.SetDimensions(0,0,w,h-25) 507 #editor.SetDimensions(0,0,w,h-25)