Changeset 56207

Show
Ignore:
Timestamp:
10/09/08 19:49:07 (6 weeks ago)
Author:
CJP
Message:

Fix some issues in the button map that turned up on python2.6

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • wxPython/3rdParty/Editra/tests/controls/AdvFindReplaceDialogDemo.py

    r55258 r56207  
    6363                            "All Options Hidden")} 
    6464 
    65 BUTTONS = zip(DIALOG_MAP.keys(), 
    66               ("Default", "Non-Floating", "Replace Dialog", "Options Hidden", 
    67                "Regular Expression", "Lookin Hidden", "Whole Word Disabled", 
    68                "Minimal")) 
     65BUTTONS = [(ID_DEFAULT, "Default"), (ID_DIALOG, "Non-Floating"), 
     66           (ID_REPLACE, "Replace Dialog"), (ID_NOOPTS, "Options Hidden"), 
     67           (ID_REGEX, "Regular Expression"), (ID_NOLOOK, "Lookin Hidden"), 
     68           (ID_NOWHOLEW, "Whole Word Disabled"), (ID_MINIMAL, "Minimal")] 
    6969 
    7070#-----------------------------------------------------------------------------# 
     
    9999            fsizer.Add(btn, 0) 
    100100            fsizer.Add((5, 5), 0) 
    101         self.SetSizer(fsizer) 
     101        msizer = wx.BoxSizer(wx.HORIZONTAL) 
     102        msizer.AddMany([((10, 10), 0), (fsizer, 0, wx.EXPAND), ((10, 10), 0)]) 
     103        self.SetSizer(msizer) 
    102104        self.SetAutoLayout(True) 
    103105 
     
    106108        e_id = evt.GetId() 
    107109        if e_id in DIALOG_MAP: 
    108             self.data, style, title = DIALOG_MAP.get(e_id) 
     110            self.data, style, title = DIALOG_MAP[e_id] 
    109111            self.dlg = finddlg.AdvFindReplaceDlg(self, self.data, title, style) 
    110112            self.dlg.Show() 
     
    151153        frame.CreateStatusBar() 
    152154        frame.SetSizer(sizer) 
    153         frame.SetInitialSize(wx.Size(300, 300)) 
     155        frame.SetInitialSize(wx.Size(350, 350)) 
     156        frame.CenterOnParent() 
    154157        frame.Show() 
    155158        app.MainLoop()