conversation history window now has better title (mentions with whom)
This commit is contained in:
		
							parent
							
								
									9be572c32d
								
							
						
					
					
						commit
						0408a86d7b
					
				
					 3 changed files with 10 additions and 8 deletions
				
			
		| 
						 | 
					@ -1,4 +1,4 @@
 | 
				
			||||||
##	plugins/history_window.py
 | 
					##	history_window.py
 | 
				
			||||||
##
 | 
					##
 | 
				
			||||||
## Gajim Team:
 | 
					## Gajim Team:
 | 
				
			||||||
##	- Yann Le Boulanger <asterix@lagaule.org>
 | 
					##	- Yann Le Boulanger <asterix@lagaule.org>
 | 
				
			||||||
| 
						 | 
					@ -35,12 +35,10 @@ class History_window:
 | 
				
			||||||
	"""Class for bowser agent window:
 | 
						"""Class for bowser agent window:
 | 
				
			||||||
	to know the agents on the selected server"""
 | 
						to know the agents on the selected server"""
 | 
				
			||||||
	def on_history_window_destroy(self, widget):
 | 
						def on_history_window_destroy(self, widget):
 | 
				
			||||||
		"""close window"""
 | 
					 | 
				
			||||||
		del self.plugin.windows['logs'][self.jid]
 | 
							del self.plugin.windows['logs'][self.jid]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	def on_close_button_clicked(self, widget):
 | 
						def on_close_button_clicked(self, widget):
 | 
				
			||||||
		"""When Close button is clicked"""
 | 
							self.window.destroy()
 | 
				
			||||||
		widget.get_toplevel().destroy()
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	def on_earliest_button_clicked(self, widget):
 | 
						def on_earliest_button_clicked(self, widget):
 | 
				
			||||||
		start, end = self.history_buffer.get_bounds()
 | 
							start, end = self.history_buffer.get_bounds()
 | 
				
			||||||
| 
						 | 
					@ -141,12 +139,16 @@ class History_window:
 | 
				
			||||||
						_('Status is now: ') + data[0]
 | 
											_('Status is now: ') + data[0]
 | 
				
			||||||
						+ ': ' + msg, 'status')
 | 
											+ ': ' + msg, 'status')
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	def __init__(self, plugin, jid):
 | 
						def __init__(self, plugin, account, jid):
 | 
				
			||||||
		self.plugin = plugin
 | 
							self.plugin = plugin
 | 
				
			||||||
		self.jid = jid
 | 
							self.jid = jid
 | 
				
			||||||
		self.nb_line = gajim.logger.get_nb_line(jid)
 | 
							self.nb_line = gajim.logger.get_nb_line(jid)
 | 
				
			||||||
		xml = gtk.glade.XML(GTKGUI_GLADE, 'history_window', APP)
 | 
							xml = gtk.glade.XML(GTKGUI_GLADE, 'history_window', APP)
 | 
				
			||||||
		self.window = xml.get_widget('history_window')
 | 
							self.window = xml.get_widget('history_window')
 | 
				
			||||||
 | 
							list_users = self.plugin.roster.contacts[account][self.jid]
 | 
				
			||||||
 | 
							user = list_users[0]
 | 
				
			||||||
 | 
							title = 'Conversation History with ' + user.name
 | 
				
			||||||
 | 
							self.window.set_title(title)
 | 
				
			||||||
		self.history_buffer = xml.get_widget('history_textview').get_buffer()
 | 
							self.history_buffer = xml.get_widget('history_textview').get_buffer()
 | 
				
			||||||
		self.earliest_button = xml.get_widget('earliest_button')
 | 
							self.earliest_button = xml.get_widget('earliest_button')
 | 
				
			||||||
		self.previous_button = xml.get_widget('previous_button')
 | 
							self.previous_button = xml.get_widget('previous_button')
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -454,10 +454,10 @@ class Roster_window:
 | 
				
			||||||
		dlg.run()
 | 
							dlg.run()
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
	def on_history(self, widget, user):
 | 
						def on_history(self, widget, user):
 | 
				
			||||||
		'''When history button is pressed : call log window'''
 | 
							'''When history button is pressed: call log window'''
 | 
				
			||||||
		if not self.plugin.windows['logs'].has_key(user.jid):
 | 
							if not self.plugin.windows['logs'].has_key(user.jid):
 | 
				
			||||||
			self.plugin.windows['logs'][user.jid] = history_window.\
 | 
								self.plugin.windows['logs'][user.jid] = history_window.\
 | 
				
			||||||
				History_window(self.plugin, user.jid)
 | 
									History_window(self.plugin, self.account, user.jid)
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	def mk_menu_user(self, event, iter):
 | 
						def mk_menu_user(self, event, iter):
 | 
				
			||||||
		'''Make user's popup menu'''
 | 
							'''Make user's popup menu'''
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -143,7 +143,7 @@ class Tabbed_chat_window(chat.Chat):
 | 
				
			||||||
			self.plugin.windows['logs'][jid].present()
 | 
								self.plugin.windows['logs'][jid].present()
 | 
				
			||||||
		else:
 | 
							else:
 | 
				
			||||||
			self.plugin.windows['logs'][jid] = history_window.\
 | 
								self.plugin.windows['logs'][jid] = history_window.\
 | 
				
			||||||
				History_window(self.plugin, jid)
 | 
									History_window(self.plugin, self.account, jid)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	def remove_tab(self, jid):
 | 
						def remove_tab(self, jid):
 | 
				
			||||||
		if time.time() - self.last_message_time[jid] < 2:
 | 
							if time.time() - self.last_message_time[jid] < 2:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue