Bug 0003063: gtk.Tooltips is deprecated -- first batch of updates

svn: r13335
This commit is contained in:
Gerald Britton
2009-10-07 18:15:18 +00:00
parent 42e06746a2
commit fa0805dc60
6 changed files with 30 additions and 67 deletions

View File

@ -221,7 +221,6 @@ class ViewManager(CLIManager):
self.button_handlers = []
self.buttons = []
self.merge_ids = []
self.tips = gtk.Tooltips()
self._key = None
self.show_sidebar = Config.get(Config.VIEW)
@ -364,17 +363,7 @@ class ViewManager(CLIManager):
openbtn = gtk.MenuToolButton('gramps-db')
openbtn.connect('clicked', self.__open_activate)
openbtn.set_sensitive(False)
open_tips = gtk.Tooltips()
openbtn.set_arrow_tooltip(
open_tips,
_("Connect to a recent database"),
_("Connect to a recent database"))
openbtn.set_tooltip(
open_tips,
_("Manage databases"),
_("Manage databases")
)
openbtn.set_tooltip_text(_("Connect to a recent database"))
openbtn.show()
return openbtn
@ -803,15 +792,6 @@ class ViewManager(CLIManager):
self.notebook.set_current_page(page_no)
self.__vb_handlers_unblock()
def __setup_text_tips(self, use_text):
"""
Enable/disable the text tips in the sidebar
"""
if use_text:
self.tips.disable()
else:
self.tips.enable()
def __delete_pages(self):
"""
Calls on_delete() for each view
@ -827,7 +807,6 @@ class ViewManager(CLIManager):
self.prev_nav = PageView.NAVIGATION_NONE
use_text = Config.get(Config.SIDEBAR_TEXT)
self.__setup_text_tips(use_text)
index = 0
for page_def in self.views:
@ -892,7 +871,8 @@ class ViewManager(CLIManager):
button.set_alignment(0, 0.5)
# add the tooltip
self.tips.set_tip(button, page_title)
button.set_tooltip_text(page_title)
#self.tips.set_tip(button, page_title)
# connect the signal, along with the index as user data
handler_id = button.connect('clicked', self.__vb_clicked, index)