we now show status message under contact name in roster thanks to initial patch by Michał Sobiegraj. if you do not like that, go to prefs and uncheck it. dimgrey to become white when row is selected
This commit is contained in:
parent
2d46c5e8a8
commit
ea11076a0e
|
@ -154,6 +154,8 @@ class Config:
|
|||
'quit_on_roster_x_button': [opt_bool, False, _('If True, quits Gajim when X button of Window Manager is clicked. This setting is taken into account only if trayicon is used.')],
|
||||
'set_xmpp://_handler_everytime': [opt_bool, False, _('If True, Gajim registers for xmpp:// on each startup.')],
|
||||
'show_unread_tab_icon': [opt_bool, False, _('If True, Gajim will display an icon on each tab containing unread messages. Depending on the theme, this icon may be animated.')],
|
||||
'show_status_msgs_in_roster': [opt_bool, True, _('If True, Gajim will display the status message, if not empty, for every contact under the contact name in roster window')],
|
||||
'color_for_status_msg_in_roster': [opt_str, 'dimgrey', ''],
|
||||
}
|
||||
|
||||
__options_per_key = {
|
||||
|
|
|
@ -112,6 +112,10 @@ class PreferencesWindow:
|
|||
st = gajim.config.get('sort_by_show')
|
||||
self.xml.get_widget('sort_by_show_checkbutton').set_active(st)
|
||||
|
||||
# Display status msg under contact name in roster
|
||||
st = gajim.config.get('show_status_msgs_in_roster')
|
||||
self.xml.get_widget('show_status_msgs_in_roster_checkbutton').set_active(st)
|
||||
|
||||
#Use emoticons
|
||||
st = gajim.config.get('useemoticons')
|
||||
self.xml.get_widget('use_emoticons_checkbutton').set_active(st)
|
||||
|
@ -474,6 +478,10 @@ class PreferencesWindow:
|
|||
self.on_checkbutton_toggled(widget, 'sort_by_show')
|
||||
gajim.interface.roster.draw_roster()
|
||||
|
||||
def on_show_status_msgs_in_roster_checkbutton_toggled(self, widget):
|
||||
self.on_checkbutton_toggled(widget, 'show_status_msgs_in_roster')
|
||||
gajim.interface.roster.draw_roster()
|
||||
|
||||
def on_use_emoticons_checkbutton_toggled(self, widget):
|
||||
self.on_checkbutton_toggled(widget, 'useemoticons',
|
||||
[self.xml.get_widget('add_remove_emoticons_button')])
|
||||
|
|
|
@ -3364,48 +3364,18 @@ Agent JID - node</property>
|
|||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox2947">
|
||||
<widget class="GtkCheckButton" id="show_status_msgs_in_roster_checkbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">12</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="use_emoticons_checkbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">If checked, Gajim will replace ascii smilies like ':)' with equivalent graphical emoticons</property>
|
||||
<property name="tooltip" translatable="yes">If checked, Gajim will display the status message, if not empty, for every contact under the contact name in roster window</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Use _emoticons</property>
|
||||
<property name="label" translatable="yes">Display status messages of contacts in roster</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_use_emoticons_checkbutton_toggled" last_modification_time="Wed, 19 Jan 2005 23:02:04 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="add_remove_emoticons_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Manage...</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<signal name="clicked" handler="on_add_remove_emoticons_button_clicked" last_modification_time="Wed, 06 Apr 2005 14:31:44 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<signal name="toggled" handler="on_show_status_msgs_in_roster_checkbutton_toggled" last_modification_time="Sun, 06 Nov 2005 13:15:30 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
@ -3722,6 +3692,57 @@ Agent JID - node</property>
|
|||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox2947">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">12</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="use_emoticons_checkbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">If checked, Gajim will replace ascii smilies like ':)' with equivalent graphical emoticons</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Use _emoticons</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_use_emoticons_checkbutton_toggled" last_modification_time="Wed, 19 Jan 2005 23:02:04 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="add_remove_emoticons_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Manage...</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<signal name="clicked" handler="on_add_remove_emoticons_button_clicked" last_modification_time="Wed, 06 Apr 2005 14:31:44 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkFrame" id="frame24">
|
||||
<property name="visible">True</property>
|
||||
|
|
|
@ -224,12 +224,22 @@ class RosterWindow:
|
|||
contact_instances = gajim.get_contact_instances_from_jid(account, jid)
|
||||
contact = gajim.get_highest_prio_contact_from_contacts(contact_instances)
|
||||
name = contact.name
|
||||
|
||||
if len(contact_instances) > 1:
|
||||
name += ' (' + unicode(len(contact_instances)) + ')'
|
||||
|
||||
# add status msg, if not empty, under contact name in the treeview
|
||||
if contact.status and gajim.config.get('show_status_msgs_in_roster'):
|
||||
status = contact.status.strip()
|
||||
if status != '':
|
||||
# escape markup entities and make them small italic and darkgrey
|
||||
colorstring = gajim.config.get('color_for_status_msg_in_roster')
|
||||
name += '\n' '<span size="small" style="italic" foreground="%s">%s</span>'\
|
||||
% (colorstring, gtkgui_helpers.escape_for_pango_markup(status))
|
||||
|
||||
state_images = self.get_appropriate_state_images(jid)
|
||||
if gajim.awaiting_events[account].has_key(jid):
|
||||
#TODO: change icon for FT
|
||||
#FIXME: change icon for FT
|
||||
img = state_images['message']
|
||||
elif jid.find('@') <= 0: # if not '@' or '@' starts the jid ==> agent
|
||||
img = state_images[contact.show]
|
||||
|
@ -2356,8 +2366,10 @@ _('If "%s" accepts this request you will know his status.') %jid)
|
|||
self.popups_notification_height = 0
|
||||
self.popup_notification_windows = []
|
||||
self.gpg_passphrase = {}
|
||||
|
||||
#(icon, name, type, jid, account, editable, secondary_pixbuf)
|
||||
model = gtk.TreeStore(gtk.Image, str, str, str, str, bool, gtk.gdk.Pixbuf)
|
||||
|
||||
model.set_sort_func(1, self.compareIters)
|
||||
model.set_sort_column_id(1, gtk.SORT_ASCENDING)
|
||||
self.tree.set_model(model)
|
||||
|
@ -2449,7 +2461,7 @@ _('If "%s" accepts this request you will know his status.') %jid)
|
|||
render_text.connect('editing-canceled', self.on_editing_canceled)
|
||||
render_text.connect('editing-started', self.on_editing_started)
|
||||
col.pack_start(render_text, expand = True)
|
||||
col.add_attribute(render_text, 'text', C_NAME) # where we hold the name
|
||||
col.add_attribute(render_text, 'markup', C_NAME) # where we hold the name
|
||||
col.add_attribute(render_text, 'editable', C_EDITABLE) # where we hold if the row is editable
|
||||
col.set_cell_data_func(render_text, self.nameCellDataFunc, None)
|
||||
|
||||
|
|
Loading…
Reference in New Issue