do some ellipsize via glade2.10 and remove some fixmes

This commit is contained in:
Nikos Kouremenos 2005-09-03 12:43:12 +00:00
parent 0a482f179a
commit 88b2f3b1f1
5 changed files with 10 additions and 23 deletions

View File

@ -180,10 +180,7 @@ class Chat:
else: else:
close_button.hide() close_button.hide()
#FIXME: when gtk2.4 is OOOOLD do it via glade2.10+ nickname.set_max_width_chars(10)
if gtk.pygtk_version >= (2, 6, 0) and gtk.gtk_version >= (2, 6, 0):
nickname.set_max_width_chars(10)
nickname.set_text(start + self.names[jid]) nickname.set_text(start + self.names[jid])

View File

@ -1020,9 +1020,6 @@ class GroupchatWindow(chat.Chat):
self.name_labels[room_jid] = self.xmls[room_jid].get_widget( self.name_labels[room_jid] = self.xmls[room_jid].get_widget(
'banner_name_label') 'banner_name_label')
self.paint_banner(room_jid) self.paint_banner(room_jid)
#FIXME: when gtk2.4 is OOOOLD do it via glade2.10+
if gtk.pygtk_version >= (2, 6, 0) and gtk.gtk_version >= (2, 6, 0):
self.name_labels[room_jid].set_ellipsize(pango.ELLIPSIZE_END)
# connect the menuitems to their respective functions # connect the menuitems to their respective functions
xm = gtk.glade.XML(GTKGUI_GLADE, 'gc_popup_menu', APP) xm = gtk.glade.XML(GTKGUI_GLADE, 'gc_popup_menu', APP)

View File

@ -9268,7 +9268,7 @@ topic</property>
<property name="yalign">0.5</property> <property name="yalign">0.5</property>
<property name="xpad">0</property> <property name="xpad">0</property>
<property name="ypad">6</property> <property name="ypad">6</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="ellipsize">PANGO_ELLIPSIZE_END</property>
<property name="width_chars">-1</property> <property name="width_chars">-1</property>
<property name="single_line_mode">False</property> <property name="single_line_mode">False</property>
<property name="angle">0</property> <property name="angle">0</property>
@ -9761,7 +9761,7 @@ topic</property>
<property name="spacing">4</property> <property name="spacing">4</property>
<child> <child>
<widget class="GtkLabel" id="label250"> <widget class="GtkLabel" id="tab_name_label">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes"></property> <property name="label" translatable="yes"></property>
<property name="use_underline">False</property> <property name="use_underline">False</property>
@ -10768,7 +10768,7 @@ Status message</property>
<property name="yalign">0.5</property> <property name="yalign">0.5</property>
<property name="xpad">0</property> <property name="xpad">0</property>
<property name="ypad">5</property> <property name="ypad">5</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="ellipsize">PANGO_ELLIPSIZE_END</property>
<property name="width_chars">-1</property> <property name="width_chars">-1</property>
<property name="single_line_mode">False</property> <property name="single_line_mode">False</property>
<property name="angle">0</property> <property name="angle">0</property>

View File

@ -145,14 +145,10 @@ timestamp, contact):
name = gtkgui_helpers.escape_for_pango_markup(contact.name) name = gtkgui_helpers.escape_for_pango_markup(contact.name)
status = contact.status status = contact.status
#FIXME: when gtk2.4 is OOOOLD do it via glade2.10+
if gtk.pygtk_version >= (2, 6, 0) and gtk.gtk_version >= (2, 6, 0) and \ if status is not None:
status is not None:
banner_name_label.set_ellipsize(pango.ELLIPSIZE_END) banner_name_label.set_ellipsize(pango.ELLIPSIZE_END)
status = gtkgui_helpers.reduce_chars_newlines(status, 0, 2) status = gtkgui_helpers.reduce_chars_newlines(status, 0, 2)
#FIXME: remove me when gtk24 is OLD
elif status is not None:
status = gtkgui_helpers.reduce_chars_newlines(status, 50, 2)
status = gtkgui_helpers.escape_for_pango_markup(status) status = gtkgui_helpers.escape_for_pango_markup(status)

View File

@ -307,14 +307,11 @@ class VcardWindow:
'resource_prio_label_eventbox') 'resource_prio_label_eventbox')
tip.set_tip(resource_prio_label_eventbox, uf_resources) tip.set_tip(resource_prio_label_eventbox, uf_resources)
tip = gtk.Tooltips()
status_label_eventbox = self.xml.get_widget('status_label_eventbox')
tip.set_tip(status_label_eventbox, stats)
status_label = self.xml.get_widget('status_label') status_label = self.xml.get_widget('status_label')
#FIXME: when gtk2.4 is OOOOLD do it via glade2.10+ status_label.set_max_width_chars(15)
if gtk.pygtk_version >= (2, 6, 0) and gtk.gtk_version >= (2, 6, 0):
tip = gtk.Tooltips()
status_label_eventbox = self.xml.get_widget('status_label_eventbox')
tip.set_tip(status_label_eventbox, stats)
status_label.set_max_width_chars(15)
status_label.set_text(stats) status_label.set_text(stats)
gajim.connections[self.account].request_vcard(self.contact.jid) gajim.connections[self.account].request_vcard(self.contact.jid)