예제 #1
0
def saveProg():
	
	global cards

	if (filepath):
		Vcf.writeFile(filename, cards)
	else:
		saveAsProg()
예제 #2
0
파일: xvcf.py 프로젝트: schabou/VCardly
	def save(self):
		if(self.currentFile == ""):
			self.addToLog("Please choose the Save As option")
		
		else:
			#self.commit()
			Vcf.writeFile(self.currentFile,self.cardList)
			self.saveWin.destroy()
예제 #3
0
파일: xvcf.py 프로젝트: schabou/VCardly
	def saveandquit(self):
		if(self.currentFile == ""):
			self.addToLog("Please choose the Save As option")
		
		else:
			if self.currentFile == "Database":
				self.storeAll()
			else:
				#self.commit()
				Vcf.writeFile(self.currentFile,self.cardList)

		os.remove("temp.vcf")
		self.db.close()
		killServers()
		
		sys.exit()
예제 #4
0
파일: xvcf.py 프로젝트: mlang03/School
def saveFile():
    global cardList
    global com
    if not com:
        if not askyesno("Continue?","Discard uncommitted changes?"):
            return
    out = Vcf.writeFile(filen,cardList)
    if not out:
       writeLogBox("Can not save empty file.\n")
    else:
        writeLogBox("Saved file.\n")
        writeLogBox(filen)
        writeLogBox("\n")
예제 #5
0
파일: xvcf.py 프로젝트: mlang03/School
 def getsavename():
     saven = entry.get()
     if not saven:
         writeLogBox("Please enter a file name.\n")
         return
     if os.path.isfile(saven):
         if not askokcancel("Overwrite?","Are you sure you want to overwrite the selected file?"):
             return
     global cardList
     global filen
     global com
     out = Vcf.writeFile(saven,cardList)
     if not out:
         writeLogBox("Can not save empty file.\n")
     else:
         writeLogBox("Saved file.\n")
         writeLogBox(saven)
         writeLogBox("\n")
     tk.title(saven)
     filen = saven
     savewin.destroy()
예제 #6
0
파일: xvcf.py 프로젝트: mlang03/School
 def saveFile(self,saveAs = "FALSE"):
     if not self.upToDate:
         if not askyesno("Continue?","Discard uncommitted changes?"):
             return
         else:
             self.revertChanges()
     if not self.cardList:
         self.writeLogBox("Can not save empty file.\n")
         return
     self.filemenu.entryconfig(2,state=NORMAL)
     if saveAs == "TRUE":
         oldfilename = self.filename
         self.filename = filedialog.asksaveasfilename()
         if not self.filename:
             self.filename = oldfilename
             self.writeLogBox("No file selected.\n")
             return
         self.mainArea.title(self.filename)
     out = Vcf.writeFile(self.filename,self.cardList)
     #print (out)
     self.writeLogBox("Saved file.\n")
     self.writeLogBox(self.filename + "\n")
예제 #7
0
def saveAsProg():

	savepath = filedialog.asksaveasfilename(initialfile = filename)
	Vcf.writeFile(savepath, cards);
예제 #8
0
파일: xvcf.py 프로젝트: schabou/VCardly
	def savingFile(self,theFile):
		self.currentFile = theFile
		Vcf.writeFile(self.currentFile,self.cardList)