Create own menu structure for log view context menu

This commit is contained in:
René Stadler 2008-01-24 12:16:41 +02:00 committed by Stefan Sauer
parent 04d90a4e38
commit b5caf22bdb
2 changed files with 25 additions and 1 deletions

View file

@ -1628,7 +1628,7 @@ class Window (object):
self.log_view.drag_dest_unset ()
self.log_view.set_search_column (-1)
self.view_popup = ui.get_widget ("/ui/menubar/ViewMenu").get_submenu ()
self.view_popup = ui.get_widget ("/ui/context/LogViewContextMenu").get_submenu ()
Common.GUI.widget_add_popup_menu (self.log_view, self.view_popup)
self.line_view = LineView ()

View file

@ -40,6 +40,30 @@
</menu>
</menubar>
<menubar name="context">
<menu name="LogViewContextMenu" action="ViewMenuAction">
<menu name="ViewColumnsMenu" action="ViewColumnsMenuAction">
<menuitem name="ViewColumnsTime" action="show-time-column"/>
<menuitem name="ViewColumnsLevel" action="show-level-column"/>
<menuitem name="ViewColumnsPid" action="show-pid-column"/>
<menuitem name="ViewColumnsThread" action="show-thread-column"/>
<menuitem name="ViewColumnsCode" action="show-code-column"/>
<menuitem name="ViewColumnsCategory" action="show-category-column"/>
<menuitem name="ViewColumnsFunction" action="show-function-column"/>
<menuitem name="ViewColumnsObject" action="show-object-column"/>
<menuitem name="ViewColumnsMessage" action="show-message-column"/>
</menu>
<placeholder name="LogViewContextMenuAdditions"/>
<separator/>
<menuitem name="ViewContextMenuHideLevel" action="hide-log-level"/>
<menuitem name="ViewContextMenuHideCategory" action="hide-log-category"/>
<menuitem name="ViewContextMenuHideObject" action="hide-log-object"/>
<menuitem name="ViewContextMenuHideBefore" action="hide-before-line"/>
<menuitem name="ViewContextMenuHideAfter" action="hide-after-line"/>
<menuitem name="ViewContextMenuShowHidden" action="show-hidden-lines"/>
<separator/>
<menuitem name="ViewContextMenuCopyMessage" action="edit-copy-message"/>
<menuitem name="ViewContextMenuCopyLine" action="edit-copy-line"/>
</menu>
<menu name="LineViewContextMenu" action="LineViewContextMenuAction">
<menuitem name="LineViewContextMenuClear" action="clear-line-view"/>
<placeholder name="LineViewContextMenuAdditions"/>