contact-display: Don't show non-IM contacts as "offline"

Currently we display IM status information for every contact, falling
back to "offline" if the contact does not have an associated IM
account. Instead, don't show IM presence in this case.

https://bugzilla.gnome.org/show_bug.cgi?id=662685
This commit is contained in:
Florian Müllner 2011-10-25 18:06:14 +02:00
parent 1d311e7916
commit b0ae596de8

View File

@ -93,23 +93,30 @@ const Contact = new Lang.Class({
text = _("Busy"); text = _("Busy");
iconName = 'user-busy'; iconName = 'user-busy';
break; break;
default: case Folks.PresenceType.OFFLINE:
text = _("Offline"); text = _("Offline");
iconName = 'user-offline'; iconName = 'user-offline';
break;
default:
text = '';
iconName = null;
} }
let icon = new St.Icon({ icon_name: iconName,
icon_type: St.IconType.FULLCOLOR,
icon_size: 16,
style_class: 'contact-details-status-icon' });
let label = new St.Label({ text: text });
let box = new St.BoxLayout({ vertical: false, let box = new St.BoxLayout({ vertical: false,
style_class: 'contact-details-status' }); style_class: 'contact-details-status' });
box.add(icon, { x_fill: true,
y_fill: false, if (iconName) {
x_align: St.Align.START, let icon = new St.Icon({ icon_name: iconName,
y_align: St.Align.START }); icon_type: St.IconType.FULLCOLOR,
icon_size: 16,
style_class: 'contact-details-status-icon' });
box.add(icon, { x_fill: true,
y_fill: false,
x_align: St.Align.START,
y_align: St.Align.START });
}
let label = new St.Label({ text: text });
box.add(label, { x_fill: true, box.add(label, { x_fill: true,
y_fill: false, y_fill: false,