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