* src/DisplayState.py: add info button
* src/ViewManager.py: add info button * src/GrampsWidgets.py: add optional size to icon button svn: r5822
This commit is contained in:
parent
b204a3bc70
commit
88dbb8b1fc
@ -1,4 +1,7 @@
|
||||
2006-01-22 Don Allingham <don@gramps-project.org>
|
||||
* src/DisplayState.py: add info button
|
||||
* src/ViewManager.py: add info button
|
||||
* src/GrampsWidgets.py: add optional size to icon button
|
||||
* src/Makefile.am: remove PeopleView.py
|
||||
* src/PeopleView.py: removed, replaced by PersonView
|
||||
* src/PersonView.py: set ellipsize property
|
||||
|
@ -527,7 +527,7 @@ class DisplayState(GrampsDb.GrampsDBCallback):
|
||||
__signals__ = {
|
||||
}
|
||||
|
||||
def __init__(self,window,status,uimanager,dbstate):
|
||||
def __init__(self,window,status,warnbtn,uimanager,dbstate):
|
||||
self.dbstate = dbstate
|
||||
self.uimanager = uimanager
|
||||
self.window = window
|
||||
@ -537,6 +537,7 @@ class DisplayState(GrampsDb.GrampsDBCallback):
|
||||
self.phistory = History()
|
||||
self.gwm = GrampsWindowManager(uimanager)
|
||||
self.widget = None
|
||||
self.warnbtn = warnbtn
|
||||
|
||||
def set_open_widget(self,widget):
|
||||
self.widget = widget
|
||||
@ -568,3 +569,4 @@ class DisplayState(GrampsDb.GrampsDBCallback):
|
||||
self.status.push(self.status_id,text)
|
||||
while gtk.events_pending():
|
||||
gtk.main_iteration()
|
||||
|
||||
|
@ -32,6 +32,8 @@ import re
|
||||
import string
|
||||
import const
|
||||
import time
|
||||
import logging
|
||||
|
||||
from gettext import gettext as _
|
||||
|
||||
# and module sets for earlier pythons
|
||||
@ -1150,9 +1152,6 @@ class GedcomParser:
|
||||
(ok,path) = self.find_file(filename,self.dir_path)
|
||||
if not ok:
|
||||
self.warn(_("Warning: could not import %s") % filename + "\n")
|
||||
self.warn(_("\tThe following paths were tried:\n\t\t"))
|
||||
self.warn("\n\t\t".join(path))
|
||||
self.warn('\n')
|
||||
path = filename.replace('\\','/')
|
||||
photo_handle = self.media_map.get(path)
|
||||
if photo_handle == None:
|
||||
@ -2030,7 +2029,7 @@ class GedcomParser:
|
||||
else:
|
||||
if state.person.get_main_parents_family_handle() == handle:
|
||||
state.person.set_main_parent_family_handle(None)
|
||||
state.person.add_parent_family_handle((handle,ftype,ftype))
|
||||
state.person.add_parent_family_handle(handle,ftype,ftype)
|
||||
|
||||
def func_person_resi(self,matches,state):
|
||||
addr = RelLib.Address()
|
||||
|
@ -67,10 +67,10 @@ class LinkLabel(gtk.EventBox):
|
||||
|
||||
class IconButton(gtk.EventBox):
|
||||
|
||||
def __init__(self,func,handle,icon=gtk.STOCK_EDIT):
|
||||
def __init__(self,func,handle,icon=gtk.STOCK_EDIT,size=gtk.ICON_SIZE_MENU):
|
||||
gtk.EventBox.__init__(self)
|
||||
image = gtk.Image()
|
||||
image.set_from_stock(icon,gtk.ICON_SIZE_MENU)
|
||||
image.set_from_stock(icon,size)
|
||||
image.show()
|
||||
self.add(image)
|
||||
self.show()
|
||||
|
@ -64,6 +64,7 @@ import Tool
|
||||
import Report
|
||||
import GrampsMime
|
||||
import GrampsKeys
|
||||
import GrampsWidgets
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -210,8 +211,15 @@ class ViewManager:
|
||||
self.progress.set_size_request(100,-1)
|
||||
self.progress.hide()
|
||||
self.statusbar.show()
|
||||
self.warnbtn = GrampsWidgets.IconButton(lambda x: True, '',
|
||||
gtk.STOCK_INFO,
|
||||
gtk.ICON_SIZE_MENU)
|
||||
self.warnbtn.hide()
|
||||
hbox2 = gtk.HBox()
|
||||
hbox2.set_spacing(4)
|
||||
hbox2.set_border_width(2)
|
||||
hbox2.pack_start(self.progress,False)
|
||||
hbox2.pack_start(self.warnbtn,False)
|
||||
hbox2.pack_end(self.statusbar,True)
|
||||
hbox2.show()
|
||||
vbox.pack_end(hbox2,False)
|
||||
@ -219,6 +227,7 @@ class ViewManager:
|
||||
|
||||
self.notebook.connect('switch-page',self.change_page)
|
||||
self.uistate = DisplayState.DisplayState(self.window, self.statusbar,
|
||||
self.warnbtn,
|
||||
self.uimanager, self.state)
|
||||
|
||||
toolbar = self.uimanager.get_widget('/ToolBar')
|
||||
|
Loading…
Reference in New Issue
Block a user