diff --git a/src/gui/grampsbar.py b/src/gui/grampsbar.py
index 579e59edf..e3cb98276 100644
--- a/src/gui/grampsbar.py
+++ b/src/gui/grampsbar.py
@@ -39,15 +39,6 @@ import os
#
#-------------------------------------------------------------------------
import gtk
-gtk.rc_parse_string("""
- style "tab-button-style" {
- GtkWidget::focus-padding = 0
- GtkWidget::focus-line-width = 0
- xthickness = 0
- ythickness = 0
- }
- widget "*.tab-button" style "tab-button-style"
- """)
#-------------------------------------------------------------------------
#
@@ -319,7 +310,7 @@ class GrampsBar(gtk.Notebook):
def __create_tab_label(self, gramplet):
"""
- Create a tab label consisting of a label and a close button.
+ Create a tab label.
"""
label = gtk.Label()
if hasattr(gramplet.pui, "has_data"):
@@ -412,18 +403,19 @@ class GrampsBar(gtk.Notebook):
Called when a button is pressed in the tabs section of the GrampsBar.
"""
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 3:
- uiman = self.uistate.uimanager
- ag_menu = uiman.get_widget('/GrampsBarPopup/AddGramplet')
+ menu = gtk.Menu()
+
+ ag_menu = gtk.MenuItem(_('Add a gramplet'))
nav_type = self.pageview.navigation_type()
skip = self.all_gramplets()
gramplet_list = GET_GRAMPLET_LIST(nav_type, skip)
gramplet_list.sort()
self.__create_submenu(ag_menu, gramplet_list, self.__add_clicked)
+ ag_menu.show()
+ menu.append(ag_menu)
- rg_menu = uiman.get_widget('/GrampsBarPopup/RemoveGramplet')
- if self.empty:
- rg_menu.hide()
- else:
+ if not self.empty:
+ rg_menu = gtk.MenuItem(_('Remove a gramplet'))
gramplet_list = [(gramplet.title, gramplet.gname)
for gramplet in self.get_children() +
self.detached_gramplets]
@@ -431,11 +423,11 @@ class GrampsBar(gtk.Notebook):
self.__create_submenu(rg_menu, gramplet_list,
self.__remove_clicked)
rg_menu.show()
+ menu.append(rg_menu)
+
+ menu.popup(None, None, None, 1, event.time)
+ return True
- menu = uiman.get_widget('/GrampsBarPopup')
- if menu:
- menu.popup(None, None, None, 1, event.time)
- return True
return False
def __create_submenu(self, main_menu, gramplet_list, callback_func):
diff --git a/src/gui/views/pageview.py b/src/gui/views/pageview.py
index 7bbda9270..678317b0d 100644
--- a/src/gui/views/pageview.py
+++ b/src/gui/views/pageview.py
@@ -111,10 +111,6 @@ class PageView(DbGUIElement):
-
-
-
-
'''
self.dirty = True
self.active = False
@@ -413,9 +409,6 @@ class PageView(DbGUIElement):
self._add_toggle_action('Bottombar', None, _('_Bottombar'),
"B", None, self.__bottombar_toggled,
self.bottombar.get_property('visible'))
- self._add_action("AddGramplet", gtk.STOCK_ADD, _("Add a gramplet"))
- self._add_action("RemoveGramplet", gtk.STOCK_REMOVE,
- _("Remove a gramplet"))
def __build_action_group(self):
"""