Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilipp Hörist <forenjunkie@chello.at>2017-06-12 23:04:22 +0300
committerPhilipp Hörist <forenjunkie@chello.at>2017-06-12 23:20:03 +0300
commitf7754487ccee4f4a1e797225041f53966f6639c3 (patch)
treeb55791fc0529e53a3d2761b69c146aca9c3581f9 /src
parentf419127bb94b934a730bb8070ce41f6f3f9661a1 (diff)
Fix Layout issues with long status messages
Fixes #8652
Diffstat (limited to 'src')
-rw-r--r--src/tooltips.py2
-rw-r--r--src/vcard.py16
2 files changed, 6 insertions, 12 deletions
diff --git a/src/tooltips.py b/src/tooltips.py
index 3c9d30388..468bc336f 100644
--- a/src/tooltips.py
+++ b/src/tooltips.py
@@ -31,6 +31,7 @@
from gi.repository import Gtk
from gi.repository import Gdk
from gi.repository import GLib
+from gi.repository import Pango
import os
import time
from datetime import datetime
@@ -207,6 +208,7 @@ class StatusTable:
self.table.insert_row(self.current_row)
self.text_label = Gtk.Label()
self.text_label.set_line_wrap(True)
+ self.text_label.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
self.text_label.set_max_width_chars(35)
self.text_label.set_halign(Gtk.Align.START)
self.text_label.set_valign(Gtk.Align.START)
diff --git a/src/vcard.py b/src/vcard.py
index 6054ee817..be3daf0f3 100644
--- a/src/vcard.py
+++ b/src/vcard.py
@@ -404,11 +404,8 @@ class VcardWindow:
if self.contact.status:
stats += ': ' + self.contact.status
status_label = self.xml.get_object('status_label')
- status_label.set_max_width_chars(15)
status_label.set_text(stats)
-
- status_label_eventbox = self.xml.get_object('status_label_eventbox')
- status_label_eventbox.set_tooltip_text(stats)
+ status_label.set_tooltip_text(stats)
def fill_jabber_page(self):
self.xml.get_object('nickname_label').set_markup(
@@ -430,7 +427,6 @@ class VcardWindow:
else:
uf_sub = helpers.get_uf_sub(self.contact.sub)
subscription_label.set_text(uf_sub)
- eb = self.xml.get_object('subscription_label_eventbox')
if self.contact.sub == 'from':
tt_text = _("This contact is interested in your presence information, but you are not interested in their presence")
elif self.contact.sub == 'to':
@@ -439,16 +435,15 @@ class VcardWindow:
tt_text = _("The contact and you want to exchange presence information")
else: # None
tt_text = _("You and the contact have a mutual disinterest in each-others presence information")
- eb.set_tooltip_text(tt_text)
+ subscription_label.set_tooltip_text(tt_text)
uf_ask = helpers.get_uf_ask(self.contact.ask)
ask_label.set_text(uf_ask)
- eb = self.xml.get_object('ask_label_eventbox')
if self.contact.ask == 'subscribe':
tt_text = _("You are waiting contact's answer about your subscription request")
else:
tt_text = _("There is no pending subscription request.")
- eb.set_tooltip_text(tt_text)
+ ask_label.set_tooltip_text(tt_text)
resources = '%s (%s)' % (self.contact.resource, str(
self.contact.priority))
@@ -613,11 +608,8 @@ class ZeroconfVcardWindow:
if self.contact.status:
stats += ': ' + self.contact.status
status_label = self.xml.get_object('status_label')
- status_label.set_max_width_chars(15)
status_label.set_text(stats)
-
- status_label_eventbox = self.xml.get_object('status_label_eventbox')
- status_label_eventbox.set_tooltip_text(stats)
+ status_label.set_tooltip_text(stats)
def fill_contact_page(self):
self.xml.get_object('nickname_label').set_markup(