save emoticons before building them
This commit is contained in:
		
							parent
							
								
									e8b9f4c1c0
								
							
						
					
					
						commit
						0ab5416432
					
				
					 1 changed files with 9 additions and 9 deletions
				
			
		| 
						 | 
					@ -217,6 +217,15 @@ class preference_Window:
 | 
				
			||||||
		else:
 | 
							else:
 | 
				
			||||||
			self.plugin.config['mergeaccounts'] = 0
 | 
								self.plugin.config['mergeaccounts'] = 0
 | 
				
			||||||
		self.plugin.roster.regroup = self.plugin.config['mergeaccounts']
 | 
							self.plugin.roster.regroup = self.plugin.config['mergeaccounts']
 | 
				
			||||||
 | 
							#Emoticons
 | 
				
			||||||
 | 
							model = self.emot_tree.get_model()
 | 
				
			||||||
 | 
							iter = model.get_iter_first()
 | 
				
			||||||
 | 
							emots = []
 | 
				
			||||||
 | 
							while iter:
 | 
				
			||||||
 | 
								emots.append(model.get_value(iter, 0))
 | 
				
			||||||
 | 
								emots.append(model.get_value(iter, 1))
 | 
				
			||||||
 | 
								iter = model.iter_next(iter)
 | 
				
			||||||
 | 
							self.plugin.config['emoticons'] = string.join(emots, '\t')
 | 
				
			||||||
		#use emoticons
 | 
							#use emoticons
 | 
				
			||||||
		chk = self.xml.get_widget('use_emoticons_checkbutton')
 | 
							chk = self.xml.get_widget('use_emoticons_checkbutton')
 | 
				
			||||||
		if chk.get_active():
 | 
							if chk.get_active():
 | 
				
			||||||
| 
						 | 
					@ -264,15 +273,6 @@ class preference_Window:
 | 
				
			||||||
			del self.plugin.config['msg%i_name' % i]
 | 
								del self.plugin.config['msg%i_name' % i]
 | 
				
			||||||
			del self.plugin.config['msg%i' % i]
 | 
								del self.plugin.config['msg%i' % i]
 | 
				
			||||||
			i += 1
 | 
								i += 1
 | 
				
			||||||
		#Emoticons
 | 
					 | 
				
			||||||
		model = self.emot_tree.get_model()
 | 
					 | 
				
			||||||
		iter = model.get_iter_first()
 | 
					 | 
				
			||||||
		emots = []
 | 
					 | 
				
			||||||
		while iter:
 | 
					 | 
				
			||||||
			emots.append(model.get_value(iter, 0))
 | 
					 | 
				
			||||||
			emots.append(model.get_value(iter, 1))
 | 
					 | 
				
			||||||
			iter = model.iter_next(iter)
 | 
					 | 
				
			||||||
		self.plugin.config['emoticons'] = string.join(emots, '\t')
 | 
					 | 
				
			||||||
		#trayicon
 | 
							#trayicon
 | 
				
			||||||
		if self.chk_trayicon.get_active():
 | 
							if self.chk_trayicon.get_active():
 | 
				
			||||||
			self.plugin.config['trayicon'] = 1
 | 
								self.plugin.config['trayicon'] = 1
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue