* src/ReadXML.py, src/plugins/Check.py, src/plugins/WriteCD.py,
src/plugins/WritePkg.py: Proper use of dialog.run() in file selector for missing media files. svn: r1680
This commit is contained in:
parent
58827a5ccd
commit
c2da2623b1
@ -1,3 +1,8 @@
|
|||||||
|
2003-06-09 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||||
|
* src/ReadXML.py, src/plugins/Check.py, src/plugins/WriteCD.py,
|
||||||
|
src/plugins/WritePkg.py: Proper use of dialog.run() in file
|
||||||
|
selector for missing media files.
|
||||||
|
|
||||||
2003-06-09 Alex Roitman <shura@alex.neuro.umn.edu>
|
2003-06-09 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||||
* src/Plugins.py: Register book items with options and style instead
|
* src/Plugins.py: Register book items with options and style instead
|
||||||
of the functions get_options and get_style.
|
of the functions get_options and get_style.
|
||||||
|
@ -180,7 +180,7 @@ def importData(database, filename, callback,cl=0):
|
|||||||
def select_clicked():
|
def select_clicked():
|
||||||
# File is lost => select a file to replace the lost one
|
# File is lost => select a file to replace the lost one
|
||||||
def fs_close_window(obj):
|
def fs_close_window(obj):
|
||||||
fs_top.destroy()
|
pass
|
||||||
|
|
||||||
def fs_ok_clicked(obj):
|
def fs_ok_clicked(obj):
|
||||||
name = fs_top.get_filename()
|
name = fs_top.get_filename()
|
||||||
@ -190,14 +190,13 @@ def importData(database, filename, callback,cl=0):
|
|||||||
shutil.copystat(name,newfile)
|
shutil.copystat(name,newfile)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
Utils.destroy_passed_object(fs_top)
|
|
||||||
|
|
||||||
fs_top = gtk.FileSelection("%s - GRAMPS" % _("Select file"))
|
fs_top = gtk.FileSelection("%s - GRAMPS" % _("Select file"))
|
||||||
fs_top.hide_fileop_buttons()
|
fs_top.hide_fileop_buttons()
|
||||||
fs_top.ok_button.connect('clicked',fs_ok_clicked)
|
fs_top.ok_button.connect('clicked',fs_ok_clicked)
|
||||||
fs_top.cancel_button.connect('clicked',fs_close_window)
|
fs_top.cancel_button.connect('clicked',fs_close_window)
|
||||||
fs_top.show()
|
|
||||||
fs_top.run()
|
fs_top.run()
|
||||||
|
fs_top.destroy()
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ class CheckIntegrity:
|
|||||||
def select_clicked():
|
def select_clicked():
|
||||||
# File is lost => select a file to replace the lost one
|
# File is lost => select a file to replace the lost one
|
||||||
def fs_close_window(obj):
|
def fs_close_window(obj):
|
||||||
fs_top.destroy()
|
self.bad_photo.append(ObjectMap[ObjectId])
|
||||||
|
|
||||||
def fs_ok_clicked(obj):
|
def fs_ok_clicked(obj):
|
||||||
name = fs_top.get_filename()
|
name = fs_top.get_filename()
|
||||||
@ -150,14 +150,13 @@ class CheckIntegrity:
|
|||||||
self.replaced_photo.append(ObjectMap[ObjectId])
|
self.replaced_photo.append(ObjectMap[ObjectId])
|
||||||
else:
|
else:
|
||||||
self.bad_photo.append(ObjectMap[ObjectId])
|
self.bad_photo.append(ObjectMap[ObjectId])
|
||||||
Utils.destroy_passed_object(fs_top)
|
|
||||||
|
|
||||||
fs_top = gtk.FileSelection("%s - GRAMPS" % _("Select file"))
|
fs_top = gtk.FileSelection("%s - GRAMPS" % _("Select file"))
|
||||||
fs_top.hide_fileop_buttons()
|
fs_top.hide_fileop_buttons()
|
||||||
fs_top.ok_button.connect('clicked',fs_ok_clicked)
|
fs_top.ok_button.connect('clicked',fs_ok_clicked)
|
||||||
fs_top.cancel_button.connect('clicked',fs_close_window)
|
fs_top.cancel_button.connect('clicked',fs_close_window)
|
||||||
fs_top.show()
|
|
||||||
fs_top.run()
|
fs_top.run()
|
||||||
|
fs_top.destroy()
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
ObjectMap = self.db.getObjectMap()
|
ObjectMap = self.db.getObjectMap()
|
||||||
|
@ -211,11 +211,10 @@ class PackageWriter:
|
|||||||
def select_clicked():
|
def select_clicked():
|
||||||
# File is lost => select a file to replace the lost one
|
# File is lost => select a file to replace the lost one
|
||||||
def fs_close_window(obj):
|
def fs_close_window(obj):
|
||||||
fs_top.destroy()
|
pass
|
||||||
|
|
||||||
def fs_ok_clicked(obj):
|
def fs_ok_clicked(obj):
|
||||||
newfile = fs_top.get_filename()
|
newfile = fs_top.get_filename()
|
||||||
fs_top.destroy()
|
|
||||||
if os.path.isfile(newfile):
|
if os.path.isfile(newfile):
|
||||||
self.copy_file(newfile,'burn:///%s/%s' % (base,obase))
|
self.copy_file(newfile,'burn:///%s/%s' % (base,obase))
|
||||||
ntype = Utils.get_mime_type(newfile)
|
ntype = Utils.get_mime_type(newfile)
|
||||||
@ -226,8 +225,8 @@ class PackageWriter:
|
|||||||
fs_top.hide_fileop_buttons()
|
fs_top.hide_fileop_buttons()
|
||||||
fs_top.ok_button.connect('clicked',fs_ok_clicked)
|
fs_top.ok_button.connect('clicked',fs_ok_clicked)
|
||||||
fs_top.cancel_button.connect('clicked',fs_close_window)
|
fs_top.cancel_button.connect('clicked',fs_close_window)
|
||||||
fs_top.show()
|
|
||||||
fs_top.run()
|
fs_top.run()
|
||||||
|
fs_top.destroy()
|
||||||
|
|
||||||
#----------------------------------------------------------
|
#----------------------------------------------------------
|
||||||
|
|
||||||
|
@ -137,11 +137,10 @@ class PackageWriter:
|
|||||||
def select_clicked():
|
def select_clicked():
|
||||||
# File is lost => select a file to replace the lost one
|
# File is lost => select a file to replace the lost one
|
||||||
def fs_close_window(obj):
|
def fs_close_window(obj):
|
||||||
fs_top.destroy()
|
pass
|
||||||
|
|
||||||
def fs_ok_clicked(obj):
|
def fs_ok_clicked(obj):
|
||||||
name = fs_top.get_filename()
|
name = fs_top.get_filename()
|
||||||
fs_top.destroy()
|
|
||||||
if os.path.isfile(name):
|
if os.path.isfile(name):
|
||||||
g = open(name,"rb")
|
g = open(name,"rb")
|
||||||
t.add_file(base,mtime,g)
|
t.add_file(base,mtime,g)
|
||||||
@ -151,8 +150,8 @@ class PackageWriter:
|
|||||||
fs_top.hide_fileop_buttons()
|
fs_top.hide_fileop_buttons()
|
||||||
fs_top.ok_button.connect('clicked',fs_ok_clicked)
|
fs_top.ok_button.connect('clicked',fs_ok_clicked)
|
||||||
fs_top.cancel_button.connect('clicked',fs_close_window)
|
fs_top.cancel_button.connect('clicked',fs_close_window)
|
||||||
fs_top.show()
|
|
||||||
fs_top.run()
|
fs_top.run()
|
||||||
|
fs_top.destroy()
|
||||||
#---------------------------------------------------------------
|
#---------------------------------------------------------------
|
||||||
|
|
||||||
t = TarFile.TarFile(filename)
|
t = TarFile.TarFile(filename)
|
||||||
|
Loading…
Reference in New Issue
Block a user