51
50
from ..widgets.grampletbar import GrampletBar
52
51
from ..configure import ConfigureDialog
53
52
from gramps.gen.config import config
53
from ..actiongroup import ActionGroup
55
55
#------------------------------------------------------------------------------
152
152
self.bottombar = GrampletBar(self.dbstate, self.uistate, self,
153
153
self.ident + "_bottombar",
156
vpane = Gtk.Paned(orientation=Gtk.Orientation.VERTICAL)
157
157
hpane.pack1(vpane, resize=True, shrink=False)
158
158
hpane.pack2(self.sidebar, resize=False, shrink=True)
354
351
Return image associated with the view category, which is used for the
355
352
icon for the button.
357
return Gtk.STOCK_MISSING_IMAGE
354
return 'image-missing'
359
356
def get_viewtype_stock(self):
361
358
Return immage associated with the viewtype inside a view category, it
362
359
will be used for the icon on the button to select view in the category
364
return Gtk.STOCK_MISSING_IMAGE
361
return 'image-missing'
366
363
def get_title(self):
418
415
and self.action_toggle_list. The user should define these in
419
416
self.define_actions
421
self.action_group = Gtk.ActionGroup(name=self.title)
418
self.action_group = ActionGroup(name=self.title)
422
419
if len(self.action_list) > 0:
423
420
self.action_group.add_actions(self.action_list)
424
421
if len(self.action_toggle_list) > 0:
425
422
self.action_group.add_toggle_actions(self.action_toggle_list)
427
def _add_action(self, name, stock_icon, label, accel=None, tip=None,
424
def _add_action(self, name, icon_name, label, accel=None, tip=None,
430
427
Add an action to the action list for the current view.
432
self.action_list.append((name, stock_icon, label, accel, tip,
429
self.action_list.append((name, icon_name, label, accel, tip,
435
def _add_toggle_action(self, name, stock_icon, label, accel=None,
432
def _add_toggle_action(self, name, icon_name, label, accel=None,
436
433
tip=None, callback=None, value=False):
438
435
Add a toggle action to the action list for the current view.
440
self.action_toggle_list.append((name, stock_icon, label, accel,
437
self.action_toggle_list.append((name, icon_name, label, accel,
441
438
tip, callback, value))
443
440
def _add_toolmenu_action(self, name, label, tooltip, callback,
626
623
PageView.__init__(self, title, pdata, dbstate, uistate)
628
625
def build_widget(self):
629
box = Gtk.VBox(homogeneous=False, spacing=1)
626
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=1)
630
627
#top widget at the top
631
628
box.pack_start(Gtk.Label(label=_('View %(name)s: %(msg)s') % {
632
629
'name': self.title,