Skip to content

Commit

Permalink
Add menu related widgets to a Menu category in widget list. fixes #92
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandroautalan committed Apr 13, 2017
1 parent 5fc64c0 commit 0b62caa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions pygubu/builder/tkstdwidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def add_child(self, bobject):
self.widget.configure(menu=bobject.widget)

register_widget('tk.Menubutton', TKMenubutton,
'Menubutton', ('Control & Display', 'tk',))
'Menubutton', ('Menu', 'Control & Display', 'tk',))


class TKMessage(BuilderObject):
Expand Down Expand Up @@ -425,7 +425,7 @@ class TKMenu(BuilderObject):
def layout(self):
pass

register_widget('tk.Menu', TKMenu, 'Menu', ('Containers', 'tk', 'ttk'))
register_widget('tk.Menu', TKMenu, 'Menu', ('Menu', 'Containers', 'tk', 'ttk'))

#
# Helpers for Standard tk widgets
Expand Down Expand Up @@ -537,15 +537,15 @@ def layout(self):
pass

register_widget('tk.Menuitem.Submenu', TKMenuitemSubmenu,
'Menuitem.Submenu', ('Pygubu Helpers', 'tk', 'ttk'))
'Menuitem.Submenu', ('Menu', 'Pygubu Helpers', 'tk', 'ttk'))


class TKMenuitemCommand(TKMenuitem):
allowed_parents = ('tk.Menu', 'tk.Menuitem.Submenu')
itemtype = tk.COMMAND

register_widget('tk.Menuitem.Command', TKMenuitemCommand,
'Menuitem.Command', ('Pygubu Helpers', 'tk', 'ttk'))
'Menuitem.Command', ('Menu', 'Pygubu Helpers', 'tk', 'ttk'))


class TKMenuitemCheckbutton(TKMenuitem):
Expand All @@ -559,7 +559,7 @@ class TKMenuitemCheckbutton(TKMenuitem):
properties = OPTIONS_STANDARD + OPTIONS_SPECIFIC + OPTIONS_CUSTOM

register_widget('tk.Menuitem.Checkbutton', TKMenuitemCheckbutton,
'Menuitem.Checkbutton', ('Pygubu Helpers', 'tk', 'ttk'))
'Menuitem.Checkbutton', ('Menu', 'Pygubu Helpers', 'tk', 'ttk'))


class TKMenuitemRadiobutton(TKMenuitem):
Expand All @@ -573,7 +573,7 @@ class TKMenuitemRadiobutton(TKMenuitem):
properties = OPTIONS_STANDARD + OPTIONS_SPECIFIC + OPTIONS_CUSTOM

register_widget('tk.Menuitem.Radiobutton', TKMenuitemRadiobutton,
'Menuitem.Radiobutton', ('Pygubu Helpers', 'tk', 'ttk'))
'Menuitem.Radiobutton', ('Menu', 'Pygubu Helpers', 'tk', 'ttk'))


class TKMenuitemSeparator(TKMenuitem):
Expand All @@ -586,7 +586,7 @@ class TKMenuitemSeparator(TKMenuitem):
command_properties = tuple()

register_widget('tk.Menuitem.Separator', TKMenuitemSeparator,
'Menuitem.Separator', ('Pygubu Helpers', 'tk', 'ttk'))
'Menuitem.Separator', ('Menu', 'Pygubu Helpers', 'tk', 'ttk'))


class TKPanedWindowPane(PanedWindowPaneBO):
Expand Down
2 changes: 1 addition & 1 deletion pygubu/builder/ttkstdwidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def add_child(self, bobject):
self.widget.configure(menu=bobject.widget)

register_widget('ttk.Menubutton', TTKMenubuttonBO,
'Menubutton', ('Control & Display', 'ttk',))
'Menubutton', ('Menu', 'Control & Display', 'ttk',))


class TTKTreeviewBO(TTKWidgetBO):
Expand Down

0 comments on commit 0b62caa

Please sign in to comment.