fix #441 by adding a tooltip and max_width [pygtk2.6 only]

This commit is contained in:
Nikos Kouremenos 2005-06-14 15:51:34 +00:00
parent 027d247f55
commit 268fba26b4
2 changed files with 45 additions and 28 deletions

View File

@ -5847,31 +5847,6 @@ Custom</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="status_label">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">5</property>
<property name="ypad">5</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label59">
<property name="visible">True</property>
@ -6214,6 +6189,39 @@ Custom</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEventBox" id="status_label_eventbox">
<property name="visible">True</property>
<property name="visible_window">True</property>
<property name="above_child">False</property>
<child>
<widget class="GtkLabel" id="status_label">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">5</property>
<property name="ypad">5</property>
</widget>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
<packing>
<property name="tab_expand">False</property>

View File

@ -254,7 +254,16 @@ class VcardWindow:
'os': ''}
i += 1
self.xml.get_widget('resource_label').set_text(resources)
self.xml.get_widget('status_label').set_text(stats)
status_label = self.xml.get_widget('status_label')
#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):
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)
gajim.connections[self.account].request_vcard(self.user.jid)
def add_to_vcard(self, vcard, entry, txt):
@ -351,14 +360,14 @@ class VcardWindow:
#publish button
button = gtk.Button(stock = gtk.STOCK_GOTO_TOP)
button.get_children()[0].get_children()[0].get_children()[1].set_text(
_('Publish'))
_('_Publish'))
button.connect('clicked', self.on_publish_button_clicked)
button.show_all()
information_hbuttonbox.pack_start(button)
#retrieve button
button = gtk.Button(stock = gtk.STOCK_GOTO_BOTTOM)
button.get_children()[0].get_children()[0].get_children()[1].set_text(
_('Retrieve'))
_('_Retrieve'))
button.connect('clicked', self.on_retrieve_button_clicked)
button.show_all()
information_hbuttonbox.pack_start(button)