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> 2006-05-03 Alex Roitman <shura@gramps-project.org>
* src/GrampsDb/_GrampsInMemDB.py (abort_changes): Remove method. * src/GrampsDb/_GrampsInMemDB.py (abort_changes): Remove method.
* src/GrampsDb/_GrampsDbBase.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 # create the button and add it to the sidebar
button = gtk.ToggleButton() button = gtk.ToggleButton()
hbox = gtk.HBox()
hbox.show()
image = gtk.Image()
if use_text: if use_text:
if page_stock: image.set_from_stock(page_stock, gtk.ICON_SIZE_BUTTON)
button.set_use_stock(True)
button.set_label(page_stock)
else:
button.set_label(page_title)
else: else:
image = gtk.Image()
image.set_from_stock(page_stock, gtk.ICON_SIZE_LARGE_TOOLBAR) image.set_from_stock(page_stock, gtk.ICON_SIZE_LARGE_TOOLBAR)
image.show() image.show()
button.add(image) hbox.pack_start(image,False,False)
button.set_border_width(4) 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_relief(gtk.RELIEF_NONE)
button.set_alignment(0, 0.5) button.set_alignment(0, 0.5)
button.connect('clicked', button.connect('clicked',