예제 #1
0
파일: tk_treeview.py 프로젝트: YQS/eXMLorer
def copyToClipboard(mainApp, oTIG, mode='COPY'):
	if oTIG <> None:
		stringXML = xml_man.getStringXML(oTIG.getTag())
		mainApp.clipboard_clear()
		mainApp.clipboard_append(stringXML[ stringXML.find('\n')+1:])
		if mode == 'CUT':
			tk_app.deleteTagInTree(oTIG.id)
예제 #2
0
파일: tk_treeview.py 프로젝트: YQS/eXMLorer
def unCommentTag(mainApp, commentTIG):
	stringXML = commentTIG.getTag().text
	newTIG = None
	response = 'no'
	try:
		newTag = xml_man.parseStringXML(stringXML)
		newTIG = tk_app.createNewTagInTree(mainApp, commentTIG, 'SIBLING', oTag = newTag)
	except:
		response = tkMessageBox.showwarning("eXMLorer", GL.names['message_uncomment_newtag'], type=tkMessageBox.YESNO)
		if response == 'yes':
			newTIG = tk_app.createNewTagInTree(mainApp, commentTIG, 'SIBLING', text=commentTIG.getTag().text)
	
	if newTIG <> None:
		createChildTIGs(mainApp, newTIG, level=0)
		tk_app.deleteTagInTree(commentTIG.id)
		tk_app.selectAndFocus(newTIG.id)
		
예제 #3
0
파일: tk_treeview.py 프로젝트: YQS/eXMLorer
def commentTag(mainApp, oTIG):
	if oTIG <> None:
		#stringXML = xml_man.getStringXML(oTIG.getTag())
		newComment = tk_app.createNewTagInTree(mainApp, oTIG, 'SIBLING', is_comment=True)
		tk_app.deleteTagInTree(oTIG.id)