[gnome-contacts] Remove unnecessary !empty check
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Remove unnecessary !empty check
- Date: Thu, 25 Aug 2011 20:36:57 +0000 (UTC)
commit 1fd7775678bdf27ddfc4b080c3cbdd0794206a34
Author: Alexander Larsson <alexl redhat com>
Date: Thu Aug 25 22:25:07 2011 +0200
Remove unnecessary !empty check
src/contacts-contact-pane.vala | 28 +++++++++++++---------------
1 files changed, 13 insertions(+), 15 deletions(-)
---
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index 2bbb829..8e4b0ac 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -973,22 +973,20 @@ public class Contacts.ContactPane : EventBox {
var ims = contact.individual.im_addresses;
var im_keys = ims.get_keys ();
- if (!im_keys.is_empty) {
- foreach (var protocol in im_keys) {
- foreach (var id in ims[protocol]) {
- fields_layout.add_label_detail (_("Chat"), contact.format_im_name (protocol, id.value));
- Button? button = null;
- var presence = contact.create_presence_widget (protocol, id.value);
- if (presence != null) {
- button = fields_layout.add_button (null);
- button.add (presence);
- }
+ foreach (var protocol in im_keys) {
+ foreach (var id in ims[protocol]) {
+ fields_layout.add_label_detail (_("Chat"), contact.format_im_name (protocol, id.value));
+ Button? button = null;
+ var presence = contact.create_presence_widget (protocol, id.value);
+ if (presence != null) {
+ button = fields_layout.add_button (null);
+ button.add (presence);
+ }
- if (button != null) {
- button.clicked.connect ( () => {
- Utils.start_chat (contact, protocol, id.value);
- });
- }
+ if (button != null) {
+ button.clicked.connect ( () => {
+ Utils.start_chat (contact, protocol, id.value);
+ });
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]