Tidy up quick report and webconnect menu code (fix Gtk3 bug)
svn: r20390
This commit is contained in:
parent
7c1e29aa60
commit
ebf197ad8e
@ -802,49 +802,47 @@ class ListView(NavigationView):
|
|||||||
return True
|
return True
|
||||||
elif gui.utils.is_right_click(event):
|
elif gui.utils.is_right_click(event):
|
||||||
menu = self.uistate.uimanager.get_widget('/Popup')
|
menu = self.uistate.uimanager.get_widget('/Popup')
|
||||||
#construct quick reports if needed
|
if menu:
|
||||||
if menu and self.QR_CATEGORY > -1 :
|
# Quick Reports
|
||||||
qr_menu = self.uistate.uimanager.\
|
qr_menu = self.uistate.uimanager.\
|
||||||
get_widget('/Popup/QuickReport').get_submenu()
|
get_widget('/Popup/QuickReport')
|
||||||
if qr_menu :
|
if qr_menu and self.QR_CATEGORY > -1 :
|
||||||
self.uistate.uimanager.\
|
(ui, qr_actions) = create_quickreport_menu(
|
||||||
get_widget('/Popup/QuickReport').set_submenu(None)
|
|
||||||
reportactions = []
|
|
||||||
if menu and self.get_active():
|
|
||||||
(ui, reportactions) = create_quickreport_menu(
|
|
||||||
self.QR_CATEGORY,
|
self.QR_CATEGORY,
|
||||||
self.dbstate,
|
self.dbstate,
|
||||||
self.uistate,
|
self.uistate,
|
||||||
self.first_selected())
|
self.first_selected())
|
||||||
if len(reportactions) > 1 :
|
self.__build_menu(qr_menu, qr_actions)
|
||||||
qr_menu = Gtk.Menu()
|
|
||||||
for action in reportactions[1:] :
|
# Web Connects
|
||||||
add_menuitem(qr_menu, action[2], None, action[5])
|
web_menu = self.uistate.uimanager.\
|
||||||
self.uistate.uimanager.get_widget('/Popup/QuickReport').\
|
get_widget('/Popup/WebConnect')
|
||||||
set_submenu(qr_menu)
|
if web_menu:
|
||||||
if menu and self.get_active():
|
web_actions = create_web_connect_menu(
|
||||||
popup = self.uistate.uimanager.get_widget('/Popup/WebConnect')
|
|
||||||
if popup:
|
|
||||||
qr_menu = popup.get_submenu()
|
|
||||||
webconnects = []
|
|
||||||
if qr_menu:
|
|
||||||
popup.set_submenu(None)
|
|
||||||
webconnects = create_web_connect_menu(
|
|
||||||
self.dbstate,
|
self.dbstate,
|
||||||
self.uistate,
|
self.uistate,
|
||||||
self.navigation_type(),
|
self.navigation_type(),
|
||||||
self.first_selected())
|
self.first_selected())
|
||||||
if len(webconnects) > 1 :
|
self.__build_menu(web_menu, web_actions)
|
||||||
qr_menu = Gtk.Menu()
|
|
||||||
for action in webconnects[1:] :
|
|
||||||
add_menuitem(qr_menu, action[2], None, action[5])
|
|
||||||
popup.set_submenu(qr_menu)
|
|
||||||
if menu:
|
|
||||||
menu.popup(None, None, None, None, event.button, event.time)
|
menu.popup(None, None, None, None, event.button, event.time)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def __build_menu(self, menu, actions):
|
||||||
|
"""
|
||||||
|
Build a submenu for quick reports and web connects
|
||||||
|
"""
|
||||||
|
if self.get_active() and len(actions) > 1:
|
||||||
|
sub_menu = Gtk.Menu()
|
||||||
|
for action in actions[1:]:
|
||||||
|
add_menuitem(sub_menu, action[2], None, action[5])
|
||||||
|
menu.set_submenu(sub_menu)
|
||||||
|
menu.show()
|
||||||
|
else:
|
||||||
|
menu.hide()
|
||||||
|
|
||||||
def _key_press(self, obj, event):
|
def _key_press(self, obj, event):
|
||||||
"""
|
"""
|
||||||
Called when a key is pressed on a flat listview
|
Called when a key is pressed on a flat listview
|
||||||
|
@ -241,12 +241,8 @@ class BasePersonView(ListView):
|
|||||||
<menuitem action="Remove"/>
|
<menuitem action="Remove"/>
|
||||||
<menuitem action="Merge"/>
|
<menuitem action="Merge"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<menu name="QuickReport" action="QuickReport">
|
<menu name="QuickReport" action="QuickReport"/>
|
||||||
<menuitem action="Dummy"/>
|
<menu name="WebConnect" action="WebConnect"/>
|
||||||
</menu>
|
|
||||||
<menu name="WebConnect" action="WebConnect">
|
|
||||||
<menuitem action="Dummy"/>
|
|
||||||
</menu>
|
|
||||||
</popup>
|
</popup>
|
||||||
</ui>'''
|
</ui>'''
|
||||||
|
|
||||||
@ -324,13 +320,6 @@ class BasePersonView(ListView):
|
|||||||
|
|
||||||
self.uistate.set_busy_cursor(False)
|
self.uistate.set_busy_cursor(False)
|
||||||
|
|
||||||
def dummy_report(self, obj):
|
|
||||||
""" For the xml UI definition of popup to work, the submenu
|
|
||||||
Quick Report must have an entry in the xml
|
|
||||||
As this submenu will be dynamically built, we offer a dummy action
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def define_actions(self):
|
def define_actions(self):
|
||||||
"""
|
"""
|
||||||
Required define_actions function for PageView. Builds the action
|
Required define_actions function for PageView. Builds the action
|
||||||
@ -357,7 +346,6 @@ class BasePersonView(ListView):
|
|||||||
"<PRIMARY>Return", self.EDIT_MSG, self.edit),
|
"<PRIMARY>Return", self.EDIT_MSG, self.edit),
|
||||||
('QuickReport', None, _("Quick View"), None, None, None),
|
('QuickReport', None, _("Quick View"), None, None, None),
|
||||||
('WebConnect', None, _("Web Connection"), None, None, None),
|
('WebConnect', None, _("Web Connection"), None, None, None),
|
||||||
('Dummy', None, ' ', None, None, self.dummy_report),
|
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -174,7 +174,6 @@ class PlaceBaseView(ListView):
|
|||||||
self._add_action('FilterEdit', None, _('Place Filter Editor'),
|
self._add_action('FilterEdit', None, _('Place Filter Editor'),
|
||||||
callback=self.filter_editor)
|
callback=self.filter_editor)
|
||||||
self._add_action('QuickReport', None, _("Quick View"), None, None, None)
|
self._add_action('QuickReport', None, _("Quick View"), None, None, None)
|
||||||
self._add_action('Dummy', None, ' ', None, None, self.dummy_report)
|
|
||||||
|
|
||||||
def change_page(self):
|
def change_page(self):
|
||||||
"""
|
"""
|
||||||
@ -354,21 +353,12 @@ class PlaceBaseView(ListView):
|
|||||||
<menuitem action="Remove"/>
|
<menuitem action="Remove"/>
|
||||||
<menuitem action="Merge"/>
|
<menuitem action="Merge"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<menu name="QuickReport" action="QuickReport">
|
<menu name="QuickReport" action="QuickReport"/>
|
||||||
<menuitem action="Dummy"/>
|
|
||||||
</menu>
|
|
||||||
<separator/>
|
<separator/>
|
||||||
<menuitem action="GotoMap"/>
|
<menuitem action="GotoMap"/>
|
||||||
</popup>
|
</popup>
|
||||||
</ui>'''
|
</ui>'''
|
||||||
|
|
||||||
def dummy_report(self, obj):
|
|
||||||
""" For the xml UI definition of popup to work, the submenu
|
|
||||||
Quick Report must have an entry in the xml
|
|
||||||
As this submenu will be dynamically built, we offer a dummy action
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def add(self, obj):
|
def add(self, obj):
|
||||||
try:
|
try:
|
||||||
EditPlace(self.dbstate, self.uistate, [], gen.lib.Place())
|
EditPlace(self.dbstate, self.uistate, [], gen.lib.Place())
|
||||||
|
@ -181,7 +181,6 @@ class CitationListView(ListView):
|
|||||||
self._add_action('FilterEdit', None, _('Citation Filter Editor'),
|
self._add_action('FilterEdit', None, _('Citation Filter Editor'),
|
||||||
callback=self.filter_editor,)
|
callback=self.filter_editor,)
|
||||||
self._add_action('QuickReport', None, _("Quick View"), None, None, None)
|
self._add_action('QuickReport', None, _("Quick View"), None, None, None)
|
||||||
self._add_action('Dummy', None, ' ', None, None, self.dummy_report)
|
|
||||||
|
|
||||||
self._add_action_group(self.edit_action)
|
self._add_action_group(self.edit_action)
|
||||||
self._add_action_group(self.all_action)
|
self._add_action_group(self.all_action)
|
||||||
@ -244,19 +243,10 @@ class CitationListView(ListView):
|
|||||||
<menuitem action="Remove"/>
|
<menuitem action="Remove"/>
|
||||||
<menuitem action="Merge"/>
|
<menuitem action="Merge"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<menu name="QuickReport" action="QuickReport">
|
<menu name="QuickReport" action="QuickReport"/>
|
||||||
<menuitem action="Dummy"/>
|
|
||||||
</menu>
|
|
||||||
</popup>
|
</popup>
|
||||||
</ui>'''
|
</ui>'''
|
||||||
|
|
||||||
def dummy_report(self, obj):
|
|
||||||
""" For the xml UI definition of popup to work, the submenu
|
|
||||||
Quick Report must have an entry in the xml
|
|
||||||
As this submenu will be dynamically built, we offer a dummy action
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def add(self, obj):
|
def add(self, obj):
|
||||||
"""
|
"""
|
||||||
add: Add a new citation and a new source (this can also be done
|
add: Add a new citation and a new source (this can also be done
|
||||||
|
@ -294,7 +294,6 @@ class CitationTreeView(ListView):
|
|||||||
self._add_action('FilterEdit', None, _('Citation Filter Editor'),
|
self._add_action('FilterEdit', None, _('Citation Filter Editor'),
|
||||||
callback=self.filter_editor,)
|
callback=self.filter_editor,)
|
||||||
self._add_action('QuickReport', None, _("Quick View"), None, None, None)
|
self._add_action('QuickReport', None, _("Quick View"), None, None, None)
|
||||||
self._add_action('Dummy', None, ' ', None, None, self.dummy_report)
|
|
||||||
|
|
||||||
self._add_action_group(self.edit_action)
|
self._add_action_group(self.edit_action)
|
||||||
self._add_action_group(self.all_action)
|
self._add_action_group(self.all_action)
|
||||||
@ -367,19 +366,10 @@ class CitationTreeView(ListView):
|
|||||||
<menuitem action="Remove"/>
|
<menuitem action="Remove"/>
|
||||||
<menuitem action="Merge"/>
|
<menuitem action="Merge"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<menu name="QuickReport" action="QuickReport">
|
<menu name="QuickReport" action="QuickReport"/>
|
||||||
<menuitem action="Dummy"/>
|
|
||||||
</menu>
|
|
||||||
</popup>
|
</popup>
|
||||||
</ui>'''
|
</ui>'''
|
||||||
|
|
||||||
def dummy_report(self, obj):
|
|
||||||
""" For the xml UI definition of popup to work, the submenu
|
|
||||||
Quick Report must have an entry in the xml
|
|
||||||
As this submenu will be dynamically built, we offer a dummy action
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def add_source(self, obj):
|
def add_source(self, obj):
|
||||||
"""
|
"""
|
||||||
add_source: Add a new source (this is also available from the
|
add_source: Add a new source (this is also available from the
|
||||||
|
@ -208,9 +208,7 @@ class EventView(ListView):
|
|||||||
<menuitem action="Remove"/>
|
<menuitem action="Remove"/>
|
||||||
<menuitem action="Merge"/>
|
<menuitem action="Merge"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<menu name="QuickReport" action="QuickReport">
|
<menu name="QuickReport" action="QuickReport"/>
|
||||||
<menuitem action="Dummy"/>
|
|
||||||
</menu>
|
|
||||||
</popup>
|
</popup>
|
||||||
</ui>'''
|
</ui>'''
|
||||||
|
|
||||||
@ -220,8 +218,6 @@ class EventView(ListView):
|
|||||||
callback=self.filter_editor,)
|
callback=self.filter_editor,)
|
||||||
self._add_action('QuickReport', None,
|
self._add_action('QuickReport', None,
|
||||||
_("Quick View"), None, None, None)
|
_("Quick View"), None, None, None)
|
||||||
self._add_action('Dummy', None,
|
|
||||||
' ', None, None, self.dummy_report)
|
|
||||||
|
|
||||||
def get_handle_from_gramps_id(self, gid):
|
def get_handle_from_gramps_id(self, gid):
|
||||||
obj = self.dbstate.db.get_event_from_gramps_id(gid)
|
obj = self.dbstate.db.get_event_from_gramps_id(gid)
|
||||||
@ -278,13 +274,6 @@ class EventView(ListView):
|
|||||||
else:
|
else:
|
||||||
MergeEvent(self.dbstate, self.uistate, mlist[0], mlist[1])
|
MergeEvent(self.dbstate, self.uistate, mlist[0], mlist[1])
|
||||||
|
|
||||||
def dummy_report(self, obj):
|
|
||||||
""" For the xml UI definition of popup to work, the submenu
|
|
||||||
Quick Report must have an entry in the xml
|
|
||||||
As this submenu will be dynamically built, we offer a dummy action
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def get_default_gramplets(self):
|
def get_default_gramplets(self):
|
||||||
"""
|
"""
|
||||||
Define the default gramplets for the sidebar and bottombar.
|
Define the default gramplets for the sidebar and bottombar.
|
||||||
|
@ -191,9 +191,7 @@ class FamilyView(ListView):
|
|||||||
<menuitem action="MakeFatherActive"/>
|
<menuitem action="MakeFatherActive"/>
|
||||||
<menuitem action="MakeMotherActive"/>
|
<menuitem action="MakeMotherActive"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<menu name="QuickReport" action="QuickReport">
|
<menu name="QuickReport" action="QuickReport"/>
|
||||||
<menuitem action="Dummy"/>
|
|
||||||
</menu>
|
|
||||||
</popup>
|
</popup>
|
||||||
</ui>'''
|
</ui>'''
|
||||||
|
|
||||||
@ -212,7 +210,6 @@ class FamilyView(ListView):
|
|||||||
('MakeMotherActive', Gtk.STOCK_APPLY, _("Make Mother Active Person"),
|
('MakeMotherActive', Gtk.STOCK_APPLY, _("Make Mother Active Person"),
|
||||||
None, None, self._make_mother_active),
|
None, None, self._make_mother_active),
|
||||||
('QuickReport', None, _("Quick View"), None, None, None),
|
('QuickReport', None, _("Quick View"), None, None, None),
|
||||||
('Dummy', None, ' ', None, None, self.dummy_report),
|
|
||||||
])
|
])
|
||||||
self._add_action_group(self.all_action)
|
self._add_action_group(self.all_action)
|
||||||
|
|
||||||
@ -308,13 +305,6 @@ class FamilyView(ListView):
|
|||||||
if family:
|
if family:
|
||||||
self.uistate.set_active(family.mother_handle, 'Person')
|
self.uistate.set_active(family.mother_handle, 'Person')
|
||||||
|
|
||||||
def dummy_report(self, obj):
|
|
||||||
""" For the xml UI definition of popup to work, the submenu
|
|
||||||
Quick Report must have an entry in the xml
|
|
||||||
As this submenu will be dynamically built, we offer a dummy action
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def drag_info(self):
|
def drag_info(self):
|
||||||
"""
|
"""
|
||||||
Indicate that the drag type is a FAMILY_LINK
|
Indicate that the drag type is a FAMILY_LINK
|
||||||
|
@ -227,7 +227,6 @@ class MediaView(ListView):
|
|||||||
callback=self.open_containing_folder)
|
callback=self.open_containing_folder)
|
||||||
|
|
||||||
self._add_action('QuickReport', None, _("Quick View"), None, None, None)
|
self._add_action('QuickReport', None, _("Quick View"), None, None, None)
|
||||||
self._add_action('Dummy', None, ' ', None, None, self.dummy_report)
|
|
||||||
|
|
||||||
def set_active(self):
|
def set_active(self):
|
||||||
"""
|
"""
|
||||||
@ -329,19 +328,10 @@ class MediaView(ListView):
|
|||||||
<menuitem action="Remove"/>
|
<menuitem action="Remove"/>
|
||||||
<menuitem action="Merge"/>
|
<menuitem action="Merge"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<menu name="QuickReport" action="QuickReport">
|
<menu name="QuickReport" action="QuickReport"/>
|
||||||
<menuitem action="Dummy"/>
|
|
||||||
</menu>
|
|
||||||
</popup>
|
</popup>
|
||||||
</ui>'''
|
</ui>'''
|
||||||
|
|
||||||
def dummy_report(self, obj):
|
|
||||||
""" For the xml UI definition of popup to work, the submenu
|
|
||||||
Quick Report must have an entry in the xml
|
|
||||||
As this submenu will be dynamically built, we offer a dummy action
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def add(self, obj):
|
def add(self, obj):
|
||||||
"""Add a new media object to the media list"""
|
"""Add a new media object to the media list"""
|
||||||
try:
|
try:
|
||||||
|
@ -195,25 +195,15 @@ class NoteView(ListView):
|
|||||||
<menuitem action="Remove"/>
|
<menuitem action="Remove"/>
|
||||||
<menuitem action="Merge"/>
|
<menuitem action="Merge"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<menu name="QuickReport" action="QuickReport">
|
<menu name="QuickReport" action="QuickReport"/>
|
||||||
<menuitem action="Dummy"/>
|
|
||||||
</menu>
|
|
||||||
</popup>
|
</popup>
|
||||||
</ui>'''
|
</ui>'''
|
||||||
|
|
||||||
def dummy_report(self, obj):
|
|
||||||
""" For the xml UI definition of popup to work, the submenu
|
|
||||||
Quick Report must have an entry in the xml
|
|
||||||
As this submenu will be dynamically built, we offer a dummy action
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def define_actions(self):
|
def define_actions(self):
|
||||||
ListView.define_actions(self)
|
ListView.define_actions(self)
|
||||||
self._add_action('FilterEdit', None, _('Note Filter Editor'),
|
self._add_action('FilterEdit', None, _('Note Filter Editor'),
|
||||||
callback=self.filter_editor,)
|
callback=self.filter_editor,)
|
||||||
self._add_action('QuickReport', None, _("Quick View"), None, None, None)
|
self._add_action('QuickReport', None, _("Quick View"), None, None, None)
|
||||||
self._add_action('Dummy', None, ' ', None, None, self.dummy_report)
|
|
||||||
|
|
||||||
def set_active(self):
|
def set_active(self):
|
||||||
"""
|
"""
|
||||||
|
@ -155,12 +155,8 @@ class PersonTreeView(BasePersonView):
|
|||||||
<menuitem action="Remove"/>
|
<menuitem action="Remove"/>
|
||||||
<menuitem action="Merge"/>
|
<menuitem action="Merge"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<menu name="QuickReport" action="QuickReport">
|
<menu name="QuickReport" action="QuickReport"/>
|
||||||
<menuitem action="Dummy"/>
|
<menu name="WebConnect" action="WebConnect"/>
|
||||||
</menu>
|
|
||||||
<menu name="WebConnect" action="WebConnect">
|
|
||||||
<menuitem action="Dummy"/>
|
|
||||||
</menu>
|
|
||||||
</popup>
|
</popup>
|
||||||
</ui>'''
|
</ui>'''
|
||||||
|
|
||||||
|
@ -184,9 +184,7 @@ class PlaceTreeView(PlaceBaseView):
|
|||||||
<menuitem action="Remove"/>
|
<menuitem action="Remove"/>
|
||||||
<menuitem action="Merge"/>
|
<menuitem action="Merge"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<menu name="QuickReport" action="QuickReport">
|
<menu name="QuickReport" action="QuickReport"/>
|
||||||
<menuitem action="Dummy"/>
|
|
||||||
</menu>
|
|
||||||
<separator/>
|
<separator/>
|
||||||
<menuitem action="GotoMap"/>
|
<menuitem action="GotoMap"/>
|
||||||
</popup>
|
</popup>
|
||||||
|
@ -151,8 +151,6 @@ class RepositoryView(ListView):
|
|||||||
callback=self.filter_editor,)
|
callback=self.filter_editor,)
|
||||||
self._add_action('QuickReport', None,
|
self._add_action('QuickReport', None,
|
||||||
_("Quick View"), None, None, None)
|
_("Quick View"), None, None, None)
|
||||||
self._add_action('Dummy', None,
|
|
||||||
' ', None, None, self.dummy_report)
|
|
||||||
|
|
||||||
def get_stock(self):
|
def get_stock(self):
|
||||||
return 'gramps-repository'
|
return 'gramps-repository'
|
||||||
@ -209,9 +207,7 @@ class RepositoryView(ListView):
|
|||||||
<menuitem action="Remove"/>
|
<menuitem action="Remove"/>
|
||||||
<menuitem action="Merge"/>
|
<menuitem action="Merge"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<menu name="QuickReport" action="QuickReport">
|
<menu name="QuickReport" action="QuickReport"/>
|
||||||
<menuitem action="Dummy"/>
|
|
||||||
</menu>
|
|
||||||
</popup>
|
</popup>
|
||||||
</ui>'''
|
</ui>'''
|
||||||
|
|
||||||
@ -262,13 +258,6 @@ class RepositoryView(ListView):
|
|||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def dummy_report(self, obj):
|
|
||||||
""" For the xml UI definition of popup to work, the submenu
|
|
||||||
Quick Report must have an entry in the xml
|
|
||||||
As this submenu will be dynamically built, we offer a dummy action
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def get_default_gramplets(self):
|
def get_default_gramplets(self):
|
||||||
"""
|
"""
|
||||||
Define the default gramplets for the sidebar and bottombar.
|
Define the default gramplets for the sidebar and bottombar.
|
||||||
|
@ -137,7 +137,6 @@ class SourceView(ListView):
|
|||||||
self._add_action('FilterEdit', None, _('Source Filter Editor'),
|
self._add_action('FilterEdit', None, _('Source Filter Editor'),
|
||||||
callback=self.filter_editor,)
|
callback=self.filter_editor,)
|
||||||
self._add_action('QuickReport', None, _("Quick View"), None, None, None)
|
self._add_action('QuickReport', None, _("Quick View"), None, None, None)
|
||||||
self._add_action('Dummy', None, ' ', None, None, self.dummy_report)
|
|
||||||
|
|
||||||
def get_stock(self):
|
def get_stock(self):
|
||||||
return 'gramps-source'
|
return 'gramps-source'
|
||||||
@ -194,19 +193,10 @@ class SourceView(ListView):
|
|||||||
<menuitem action="Remove"/>
|
<menuitem action="Remove"/>
|
||||||
<menuitem action="Merge"/>
|
<menuitem action="Merge"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<menu name="QuickReport" action="QuickReport">
|
<menu name="QuickReport" action="QuickReport"/>
|
||||||
<menuitem action="Dummy"/>
|
|
||||||
</menu>
|
|
||||||
</popup>
|
</popup>
|
||||||
</ui>'''
|
</ui>'''
|
||||||
|
|
||||||
def dummy_report(self, obj):
|
|
||||||
""" For the xml UI definition of popup to work, the submenu
|
|
||||||
Quick Report must have an entry in the xml
|
|
||||||
As this submenu will be dynamically built, we offer a dummy action
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def add(self, obj):
|
def add(self, obj):
|
||||||
EditSource(self.dbstate, self.uistate, [], gen.lib.Source())
|
EditSource(self.dbstate, self.uistate, [], gen.lib.Source())
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user