Media gallery improvements
svn: r1165
This commit is contained in:
parent
2eacdd41e6
commit
2f9f1660ee
@ -845,8 +845,7 @@ class GlobalMediaProperties:
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def disp_attr(attr):
|
||||
detail = Utils.get_detail_flags(attr)
|
||||
return [const.display_pattr(attr.getType()),attr.getValue(),detail]
|
||||
return [const.display_pattr(attr.getType()),attr.getValue(),'']
|
||||
|
||||
|
||||
class DeleteMediaQuery:
|
||||
|
@ -209,7 +209,6 @@ class MediaView:
|
||||
path = "<local copy>"
|
||||
else:
|
||||
path = src.getPath()
|
||||
details = Utils.get_detail_flags(src,0)
|
||||
stitle = string.upper(title)
|
||||
|
||||
iter = self.model.append()
|
||||
|
12
src/Utils.py
12
src/Utils.py
@ -164,17 +164,7 @@ def destroy_passed_object(obj):
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def get_detail_flags(obj,priv=1):
|
||||
import GrampsCfg
|
||||
|
||||
detail = ""
|
||||
if GrampsCfg.show_detail:
|
||||
if obj.getNote() != "":
|
||||
detail = "N"
|
||||
if len(obj.getSourceRefList()) > 0:
|
||||
detail = detail + "S"
|
||||
if priv and obj.getPrivacy():
|
||||
detail = detail + "P"
|
||||
return detail
|
||||
return ""
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -118,7 +118,7 @@ class EventComparison:
|
||||
self.glade_file = base + os.sep + "eventcmp.glade"
|
||||
self.qual = 0
|
||||
|
||||
self.filterDialog = libglade.GladeXML(self.glade_file,"filters")
|
||||
self.filterDialog = gtk.glade.XML(self.glade_file,"filters")
|
||||
self.filterDialog.signal_autoconnect({
|
||||
"on_apply_clicked" : self.on_apply_clicked,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object
|
||||
@ -186,7 +186,7 @@ class DisplayChart:
|
||||
base = os.path.dirname(__file__)
|
||||
self.glade_file = base + os.sep + "eventcmp.glade"
|
||||
|
||||
self.topDialog = libglade.GladeXML(self.glade_file,"view")
|
||||
self.topDialog = gtk.glade.XML(self.glade_file,"view")
|
||||
self.topDialog.signal_autoconnect({
|
||||
"on_write_table" : self.on_write_table,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object
|
||||
@ -286,7 +286,7 @@ class DisplayChart:
|
||||
return [_("Person"),_("Birth"),_("Death")] + sort_list
|
||||
|
||||
def on_write_table(self,obj):
|
||||
self.form = libglade.GladeXML(self.glade_file,"dialog1")
|
||||
self.form = gtk.glade.XML(self.glade_file,"dialog1")
|
||||
self.form.signal_autoconnect({
|
||||
"on_save_clicked" : self.on_save_clicked,
|
||||
"on_html_toggled" : self.on_html_toggled,
|
||||
|
@ -42,11 +42,12 @@ TABLE = string.maketrans('ABCDEFGHIJKLMNOPQRSTUVWXYZ',
|
||||
def soundex(str):
|
||||
"Return the soundex value to a string argument."
|
||||
|
||||
str = string.strip(string.upper(str))
|
||||
str = str.upper().strip()
|
||||
if not str:
|
||||
return "Z000"
|
||||
str = str.encode('iso-8859-1')
|
||||
str2 = str[0]
|
||||
str = string.translate(str, TABLE, IGNORE)
|
||||
str = str.translate(TABLE, IGNORE)
|
||||
if not str:
|
||||
return "Z000"
|
||||
prev = str[0]
|
||||
|
Loading…
Reference in New Issue
Block a user