use ―*20 instead of gajim-muc-separator.png. See #7476
This commit is contained in:
		
							parent
							
								
									f888f57d1c
								
							
						
					
					
						commit
						722429a347
					
				
					 3 changed files with 5 additions and 22 deletions
				
			
		
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 209 B | 
|  | @ -173,8 +173,6 @@ class ConversationTextview(GObject.GObject): | |||
|             ) | ||||
|     ) | ||||
| 
 | ||||
|     FOCUS_OUT_LINE_PIXBUF = gtkgui_helpers.get_icon_pixmap( | ||||
|         'gajim-muc_separator') | ||||
|     MESSAGE_CORRECTED_PIXBUF = gtkgui_helpers.get_icon_pixmap('gtk-spell-check') | ||||
| 
 | ||||
|     # smooth scroll constants | ||||
|  | @ -330,8 +328,6 @@ class ConversationTextview(GObject.GObject): | |||
|         self.xep0184_warning_tooltip = tooltips.BaseTooltip() | ||||
| 
 | ||||
|         self.line_tooltip = tooltips.BaseTooltip() | ||||
|         # use it for hr too | ||||
|         self.tv.focus_out_line_pixbuf = ConversationTextview.FOCUS_OUT_LINE_PIXBUF | ||||
|         self.smooth_id = None | ||||
|         self.just_cleared = False | ||||
| 
 | ||||
|  | @ -587,7 +583,7 @@ class ConversationTextview(GObject.GObject): | |||
|                         self.focus_out_end_mark) | ||||
|                 begin_iter_for_previous_line = end_iter_for_previous_line.copy() | ||||
|                 # img_char+1 (the '\n') | ||||
|                 begin_iter_for_previous_line.backward_chars(2) | ||||
|                 begin_iter_for_previous_line.backward_chars(21) | ||||
| 
 | ||||
|                 # remove focus out line | ||||
|                 buffer_.delete(begin_iter_for_previous_line, | ||||
|  | @ -596,14 +592,12 @@ class ConversationTextview(GObject.GObject): | |||
| 
 | ||||
|             # add the new focus out line | ||||
|             end_iter = buffer_.get_end_iter() | ||||
|             buffer_.insert(end_iter, '\n') | ||||
|             buffer_.insert_pixbuf(end_iter, | ||||
|                     ConversationTextview.FOCUS_OUT_LINE_PIXBUF) | ||||
|             buffer_.insert(end_iter, '\n' + '―' * 20) | ||||
| 
 | ||||
|             end_iter = buffer_.get_end_iter() | ||||
|             before_img_iter = end_iter.copy() | ||||
|             # one char back (an image also takes one char) | ||||
|             before_img_iter.backward_char() | ||||
|             before_img_iter.backward_chars(20) | ||||
|             buffer_.apply_tag_by_name('focus-out-line', before_img_iter, end_iter) | ||||
| 
 | ||||
|             self.allow_focus_out_line = False | ||||
|  |  | |||
|  | @ -796,15 +796,8 @@ class HtmlHandler(xml.sax.handler.ContentHandler): | |||
|         elif name == 'hr': | ||||
|             #FIXME: plenty of unused attributes (width, height,...) :) | ||||
|             self._jump_line() | ||||
|             try: | ||||
|                 if self.conv_textbuf: | ||||
|                     self.textbuf.insert_pixbuf(self.iter, | ||||
|                         self.textview.focus_out_line_pixbuf) | ||||
|                 else: | ||||
|                     self._insert_text('\u2550'*40) | ||||
|                 self._jump_line() | ||||
|             except Exception as e: | ||||
|                 log.debug('Error in hr' + str(e)) | ||||
|             self._insert_text('\u2015'*40) | ||||
|             self._jump_line() | ||||
|         elif name in LIST_ELEMS: | ||||
|             self.list_counters.pop() | ||||
|         elif name == 'li': | ||||
|  | @ -1142,10 +1135,6 @@ if __name__ == '__main__': | |||
| 
 | ||||
|     htmlview = ConversationTextview(None) | ||||
| 
 | ||||
|     path = gtkgui_helpers.get_icon_path('gajim-muc_separator') | ||||
|     # use this for hr | ||||
|     htmlview.tv.focus_out_line_pixbuf =  GdkPixbuf.Pixbuf.new_from_file(path) | ||||
| 
 | ||||
|     tooltip = tooltips.BaseTooltip() | ||||
| 
 | ||||
|     def on_textview_motion_notify_event(widget, event): | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue