2006-05-03 Don Allingham <don@gramps-project.org>

* src/ViewManager.py: do a better job of building the buttons.



svn: r6539
This commit is contained in:
Don Allingham 2006-05-04 01:33:37 +00:00
parent e90f4b3705
commit 115e268aec
2 changed files with 18 additions and 9 deletions

View File

@ -1,3 +1,6 @@
2006-05-03 Don Allingham <don@gramps-project.org>
* src/ViewManager.py: do a better job of building the buttons.
2006-05-03 Alex Roitman <shura@gramps-project.org>
* src/GrampsDb/_GrampsInMemDB.py (abort_changes): Remove method.
* src/GrampsDb/_GrampsDbBase.py (abort_changes): Remove method.

View File

@ -570,18 +570,24 @@ class ViewManager:
# create the button and add it to the sidebar
button = gtk.ToggleButton()
if use_text:
if page_stock:
button.set_use_stock(True)
button.set_label(page_stock)
else:
button.set_label(page_title)
else:
hbox = gtk.HBox()
hbox.show()
image = gtk.Image()
if use_text:
image.set_from_stock(page_stock, gtk.ICON_SIZE_BUTTON)
else:
image.set_from_stock(page_stock, gtk.ICON_SIZE_LARGE_TOOLBAR)
image.show()
button.add(image)
button.set_border_width(4)
hbox.pack_start(image,False,False)
hbox.set_spacing(4)
print use_text
if use_text:
label = gtk.Label(page_title)
label.show()
hbox.pack_start(label,False,True)
button.add(hbox)
button.set_relief(gtk.RELIEF_NONE)
button.set_alignment(0, 0.5)
button.connect('clicked',