mirror of
https://github.com/NaN-tic/tryton-gtk2.git
synced 2023-12-14 03:12:58 +01:00
Add tooltips on tab name
This commit is contained in:
parent
0808d0e78b
commit
7a4e6e0079
1 changed files with 9 additions and 1 deletions
|
@ -325,6 +325,8 @@ class Main(object):
|
|||
vbox = self.glade.get_widget('vbox_main')
|
||||
vbox.pack_start(self.notebook, expand=True, fill=True)
|
||||
|
||||
self.tooltips = gtk.Tooltips()
|
||||
|
||||
self.shortcut_menu = self.glade.get_widget('shortcut')
|
||||
|
||||
#
|
||||
|
@ -756,7 +758,13 @@ class Main(object):
|
|||
def win_add(self, page):
|
||||
self.pages.append(page)
|
||||
hbox = gtk.HBox()
|
||||
label = gtk.Label(page.name)
|
||||
if len(page.name) > 15:
|
||||
name = page.name[:13] + '...'
|
||||
else:
|
||||
name = page.name
|
||||
label = gtk.Label(name)
|
||||
self.tooltips.set_tip(label, page.name)
|
||||
self.tooltips.enable()
|
||||
label.set_alignment(0.0, 0.5)
|
||||
hbox.pack_start(label, expand=True, fill=True)
|
||||
button = gtk.Button()
|
||||
|
|
Loading…
Reference in a new issue