From 79a893bff84b9bd675b5a7147c031e24b8730892 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Tue, 11 Oct 2005 14:26:50 +0000 Subject: [PATCH] focus-out line now works in windoz too --- data/pixmaps/muc_separator.png | Bin 141 -> 202 bytes src/groupchat_window.py | 18 ++++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/data/pixmaps/muc_separator.png b/data/pixmaps/muc_separator.png index 0440596d7451f06d169681c9c026909c0d322d2c..ab970695216f6b3d3192821b0fc23b727fe77232 100644 GIT binary patch delta 166 zcmeBWJjFOcT%VhRje&tdK|+ZONU@iA`ns}T<>Ka(v~pp2Y6BEvOY(MiVfYV%3-&Ib zJW)|1C*0G;F(l*O+iM#+TO1@>F52IzJF54DDN;{J+B(8p(tE<*fP2lH`)gJKwKx2i zc|P&&X5Y2%V;5J(PFA_P-!{~A>$O>KpLeB2P7j&XbKhWd_K|cJhKdsANiQa-Syj6h Q0JSlAy85}Sb4q9e0O|2P!T4nJ@Fp@a@ToC2MzL-M3fgGX-Z(~;!__M{Qv*o*k`6$Ya_>jg9i;)<%CGe1;j+1Vekp~o_Al`b#X^f c$$vQpA9J^m6`wEl1C3(vboFyt=akR{021>mvj6}9 diff --git a/src/groupchat_window.py b/src/groupchat_window.py index 205c0552a..61800c0a3 100644 --- a/src/groupchat_window.py +++ b/src/groupchat_window.py @@ -29,7 +29,7 @@ import gtkgui_helpers import history_window import tooltips import sre -import unicodedata +import os from gajim import Contact from common import gajim @@ -230,12 +230,18 @@ class GroupchatWindow(chat.Chat): end_iter_for_previous_line) # add the new focus out line - dash_char = unicodedata.lookup( - 'BOX DRAWINGS HEAVY HORIZONTAL').encode('utf-8') - focus_out_line = '\n' + dash_char * 15 + path_to_file = os.path.join(gajim.DATA_DIR, 'pixmaps', 'muc_separator.png') + focus_out_line_pixbuf = gtk.gdk.pixbuf_new_from_file(path_to_file) end_iter = buffer.get_end_iter() - buffer.insert_with_tags_by_name(end_iter, focus_out_line, - 'focus-out-line') + buffer.insert(end_iter, '\n') + buffer.insert_pixbuf(end_iter, focus_out_line_pixbuf) + + end_iter = buffer.get_end_iter() + before_img_iter = end_iter.copy() + before_img_iter.backward_char() # one char back (an image also takes one char) + buffer.apply_tag_by_name('focus-out-line', before_img_iter, end_iter) + #FIXME: remove this workaround when bug is fixed + # c http://bugzilla.gnome.org/show_bug.cgi?id=318569 self.allow_focus_out_line[room_jid] = False