Changeset 177


Ignore:
Timestamp:
Jun 2, 2010 12:52:24 PM (14 years ago)
Author:
jemian
Message:

prepare menuLauncher to accept a command-line argument identifying a configuration file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wxmtxy/trunk/menuLauncher.py

    r69 r177  
    2929
    3030
     31DEFAULT_MENU_ITEMS = (
     32            ("xcalc RPN", "HP-style", "xcalc -rpn"),
     33            ("xcalc", "TI-style", "xcalc"),
     34            ("gcalc", "Gnome calculator", "gcalctool"),
     35            ("nedit-client", "window editor", "nedit-client"),
     36            ("nedit-nc", "window editor", "nedit-nc"),
     37            ("xman", "X11 man pages", "xman -bothshown"),
     38            ("xeyes", "Here's looking at you, kid!", "xeyes"),
     39            ("separator", ),
     40            ("xclock", "conventional analog clock", "xclock")
     41        )
     42
     43
    3144def create(parent):
    3245    return Frame1(parent)
     
    4760        wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=prnt,
    4861              pos=wx.Point(294, 331), size=wx.Size(223, 65),
    49               style=wx.DEFAULT_FRAME_STYLE, title='Frame1')
     62              style=wx.DEFAULT_FRAME_STYLE, title='menuLanucher')
    5063        self.SetClientSize(wx.Size(215, 31))
    5164
     
    129142if __name__ == '__main__':
    130143    app = wx.PySimpleApp()
    131     menu_items = (
    132             ("RPN calculator", "HP-style", "xcalc -rpn"),
    133             ("basic calculator", "TI-style", "xcalc"),
    134             ("nedit", "window editor", "nedit-nc"),
    135             ("xman", "X11 man pages", "xman -bothshown"),
    136             ("xeyes", "Here's looking at you, kid!", "xeyes"),
    137             ("separator", ),
    138             ("xclock", "conventional analog clock", "xclock")
    139         )
    140     frame = Frame1(None, label="menuUSAXS", contents=menu_items)
     144    menu_items = DEFAULT_MENU_ITEMS
     145    frame = Frame1(None, label="menuLauncher", contents=menu_items)
    141146    frame.Show()
    142147
Note: See TracChangeset for help on using the changeset viewer.