[gnome-shell] contact-display: Don't show non-IM contacts as "offline"
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] contact-display: Don't show non-IM contacts as "offline"
- Date: Wed, 25 Jan 2012 21:20:42 +0000 (UTC)
commit b0ae596de8a59fee4ef553705ab6eb2c6068399a
Author: Florian MÃllner <fmuellner gnome org>
Date: Tue Oct 25 18:06:14 2011 +0200
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
js/ui/contactDisplay.js | 29 ++++++++++++++++++-----------
1 files changed, 18 insertions(+), 11 deletions(-)
---
diff --git a/js/ui/contactDisplay.js b/js/ui/contactDisplay.js
index dae9002..ed213d4 100644
--- a/js/ui/contactDisplay.js
+++ b/js/ui/contactDisplay.js
@@ -93,23 +93,30 @@ const Contact = new Lang.Class({
text = _("Busy");
iconName = 'user-busy';
break;
- default:
+ case Folks.PresenceType.OFFLINE:
text = _("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,
style_class: 'contact-details-status' });
- box.add(icon, { x_fill: true,
- y_fill: false,
- x_align: St.Align.START,
- y_align: St.Align.START });
+
+ if (iconName) {
+ let icon = new St.Icon({ icon_name: iconName,
+ 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,
y_fill: false,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]