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