]> git.0d.be Git - empathy.git/commitdiff
coding style fixes
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 8 Mar 2010 13:30:57 +0000 (14:30 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 15 Mar 2010 08:28:40 +0000 (09:28 +0100)
libempathy-gtk/empathy-contact-list-store.c
libempathy-gtk/empathy-contact-list-view.c
libempathy/empathy-contact-list.c
libempathy/empathy-contact-list.h
libempathy/empathy-contact-manager.c

index ca776682f828949623af3a0273db71c3c7f38816..38fbfa5c586a47305dd5df09577f3e3bbbe21a40 100644 (file)
@@ -930,18 +930,18 @@ contact_list_store_members_changed_cb (EmpathyContactList      *list_iface,
 
 static void
 contact_list_store_change_contact_favourite_status (EmpathyContactListStore *store,
-                                                    EmpathyContact          *contact,
-                                                    gboolean                 is_favourite)
+                                                   EmpathyContact          *contact,
+                                                   gboolean                 is_favourite)
 {
-        GList *iters, *l;
+       GList *iters, *l;
 
        iters = contact_list_store_find_contact (store, contact);
-        for (l = iters; l; l = l->next) {
+       for (l = iters; l; l = l->next) {
                gtk_tree_store_set (GTK_TREE_STORE (store), l->data,
-                                    EMPATHY_CONTACT_LIST_STORE_COL_IS_FAVOURITE,
-                                    is_favourite,
-                                    -1);
-        }
+                       EMPATHY_CONTACT_LIST_STORE_COL_IS_FAVOURITE,
+                       is_favourite,
+                       -1);
+       }
 
        g_list_foreach (iters, (GFunc) gtk_tree_iter_free, NULL);
        g_list_free (iters);
@@ -949,9 +949,9 @@ contact_list_store_change_contact_favourite_status (EmpathyContactListStore *sto
 
 static void
 contact_list_store_favourites_changed_cb (EmpathyContactList      *list_iface,
-                                          EmpathyContact          *contact,
-                                          gboolean                 is_favourite,
-                                          EmpathyContactListStore *store)
+                                         EmpathyContact          *contact,
+                                         gboolean                 is_favourite,
+                                         EmpathyContactListStore *store)
 {
        EmpathyContactListStorePriv *priv;
 
@@ -962,7 +962,8 @@ contact_list_store_favourites_changed_cb (EmpathyContactList      *list_iface,
                empathy_contact_get_handle (contact),
                is_favourite ? "now" : "no longer");
 
-        contact_list_store_change_contact_favourite_status (store, contact, is_favourite);
+       contact_list_store_change_contact_favourite_status (store, contact,
+                                                                                                                                                                                                     is_favourite);
 }
 
 static void
@@ -1550,9 +1551,9 @@ contact_list_store_state_sort_func (GtkTreeModel *model,
        /* Separator, favourites group, or other group? */
        if (is_separator_a || is_separator_b) {
                if (is_separator_a) {
-                        ret_val = -1;
+                       ret_val = -1;
                } else if (is_separator_b) {
-                        ret_val = 1;
+                       ret_val = 1;
                }
        } else if (is_favourite_a && !is_favourite_b) {
                ret_val = -1;
@@ -1627,9 +1628,9 @@ contact_list_store_name_sort_func (GtkTreeModel *model,
 
        if (is_separator_a || is_separator_b) {
                if (is_separator_a) {
-                        ret_val = -1;
+                       ret_val = -1;
                } else if (is_separator_b) {
-                        ret_val = 1;
+                       ret_val = 1;
                }
        } else if (is_favourite_a && !is_favourite_b) {
                ret_val = -1;
index b95f055802a5185c91b385577bc9af76c21b8a9e..8fb08dfdc02811007877dce50e71b814406b308c 100644 (file)
@@ -828,7 +828,7 @@ contact_list_view_favourite_toggled_cb (
        GtkTreeModel *model;
        GtkTreeIter iter;
        EmpathyContact *contact;
-        EmpathyContactList *list;
+       EmpathyContactList *list;
 
        model = gtk_tree_view_get_model (GTK_TREE_VIEW (view));
        if (!gtk_tree_model_get_iter_from_string (model, &iter, path_string))
@@ -840,12 +840,12 @@ contact_list_view_favourite_toggled_cb (
        if (contact == NULL)
                return;
 
-        list = empathy_contact_list_store_get_list_iface (priv->store);
-        if (empathy_contact_list_is_favourite (list, contact)) {
-                empathy_contact_list_remove_from_favourites (list, contact);
-        } else {
-                empathy_contact_list_add_to_favourites (list, contact);
-        }
+       list = empathy_contact_list_store_get_list_iface (priv->store);
+       if (empathy_contact_list_is_favourite (list, contact)) {
+               empathy_contact_list_remove_from_favourites (list, contact);
+       } else {
+               empathy_contact_list_add_to_favourites (list, contact);
+       }
 
        g_object_unref (contact);
 }
@@ -1055,9 +1055,9 @@ contact_list_view_favourite_cell_data_func (
                            EMPATHY_CONTACT_LIST_STORE_COL_IS_FAVOURITE, &is_favourite,
                            -1);
 
-        if (!is_separator && !is_group)
-                icon_name = (is_favourite? EMPATHY_IMAGE_FAVOURITE :
-                                EMPATHY_IMAGE_UNFAVOURITE);
+       if (!is_separator && !is_group)
+               icon_name = (is_favourite? EMPATHY_IMAGE_FAVOURITE :
+                            EMPATHY_IMAGE_UNFAVOURITE);
 
        g_object_set (cell,
                      "visible", (icon_name != NULL),
index 7bd00474fb63fd763c19c09ae56b9cc4e4fc7f2d..0a3d361d497f40205943c430acd4751475b2d3a3 100644 (file)
@@ -266,11 +266,11 @@ empathy_contact_list_is_favourite (EmpathyContactList *list,
 #if HAVE_FAVOURITE_CONTACTS
        if (EMPATHY_CONTACT_LIST_GET_IFACE (list)->is_favourite) {
                return EMPATHY_CONTACT_LIST_GET_IFACE (list)->is_favourite (
-                                list, contact);
+                       list, contact);
        }
 #endif /* HAVE_FAVOURITE_CONTACTS */
 
-        return FALSE;
+       return FALSE;
 }
 
 void
@@ -279,8 +279,8 @@ empathy_contact_list_add_to_favourites (EmpathyContactList *list,
 {
 #if HAVE_FAVOURITE_CONTACTS
        if (EMPATHY_CONTACT_LIST_GET_IFACE (list)->add_favourite) {
-                EMPATHY_CONTACT_LIST_GET_IFACE (list)->add_favourite (list,
-                                contact);
+               EMPATHY_CONTACT_LIST_GET_IFACE (list)->add_favourite (list,
+                       contact);
        }
 #endif /* HAVE_FAVOURITE_CONTACTS */
 }
@@ -291,8 +291,8 @@ empathy_contact_list_remove_from_favourites (EmpathyContactList *list,
 {
 #if HAVE_FAVOURITE_CONTACTS
        if (EMPATHY_CONTACT_LIST_GET_IFACE (list)->remove_favourite) {
-                EMPATHY_CONTACT_LIST_GET_IFACE (list)->remove_favourite (list,
-                                contact);
+               EMPATHY_CONTACT_LIST_GET_IFACE (list)->remove_favourite (list,
+                       contact);
        }
 #endif /* HAVE_FAVOURITE_CONTACTS */
 }
index 6d9427d99b709c9e0f5186e637b4b06c6322b711..8d2f445e16420972a41a2db9ce3ef034378edeb7 100644 (file)
@@ -78,7 +78,7 @@ struct _EmpathyContactListIface {
        void             (*add_favourite)     (EmpathyContactList *list,
                                               EmpathyContact     *contact);
        void             (*remove_favourite)  (EmpathyContactList *list,
-                                               EmpathyContact     *contact);
+                                              EmpathyContact     *contact);
 };
 
 GType    empathy_contact_list_get_type          (void) G_GNUC_CONST;
@@ -111,14 +111,14 @@ EmpathyContactListFlags
          empathy_contact_list_get_flags                (EmpathyContactList *list);
 
 gboolean empathy_contact_list_is_favourite      (EmpathyContactList *list,
-                                                 EmpathyContact     *contact);
+                                                EmpathyContact     *contact);
 
 void     empathy_contact_list_add_to_favourites (EmpathyContactList *list,
-                                                 EmpathyContact     *contact);
+                                                EmpathyContact     *contact);
 
 void     empathy_contact_list_remove_from_favourites
                                                 (EmpathyContactList *list,
-                                                 EmpathyContact     *contact);
+                                                EmpathyContact     *contact);
 
 
 G_END_DECLS
index 255387b7ca20da52e01f07a2413a666be1e455d0..b02b00a84b0266b875b0c3938f8163a226e7aa35 100644 (file)
@@ -225,7 +225,7 @@ contact_manager_is_favourite (EmpathyContactList *manager,
 
 static void
 contact_manager_add_favourite (EmpathyContactList *manager,
-                EmpathyContact *contact)
+                              EmpathyContact *contact)
 {
        EmpathyContactManagerPriv *priv;
        TpAccount *account;
@@ -247,7 +247,7 @@ contact_manager_add_favourite (EmpathyContactList *manager,
 
 static void
 contact_manager_remove_favourite (EmpathyContactList *manager,
-                EmpathyContact *contact)
+                                 EmpathyContact *contact)
 {
        EmpathyContactManagerPriv *priv;
        TpAccount *account;
@@ -269,7 +269,7 @@ contact_manager_remove_favourite (EmpathyContactList *manager,
 
 static void
 logger_favourite_contacts_add_from_value_array (GValueArray           *va,
-                                                EmpathyContactManager *manager)
+                                               EmpathyContactManager *manager)
 {
        EmpathyContactManagerPriv *priv = GET_PRIV (manager);
        guint i;
@@ -316,7 +316,7 @@ logger_favourite_contacts_get_cb (TpProxy         *proxy,
        EmpathyContactManager *manager = EMPATHY_CONTACT_MANAGER (user_data);
 
        if (error == NULL) {
-               g_ptr_array_foreach ((GPtrArray*) result,
+               g_ptr_array_foreach ((GPtrArray *) result,
                                (GFunc)
                                logger_favourite_contacts_add_from_value_array,
                                manager);
@@ -446,8 +446,8 @@ account_manager_prepared_cb (GObject *source_object,
 
 static EmpathyContact *
 contact_manager_lookup_contact (EmpathyContactManager *manager,
-                                const gchar           *account_name,
-                                const gchar           *contact_id)
+                               const gchar           *account_name,
+                               const gchar           *contact_id)
 {
        EmpathyContact *retval = NULL;
        GList *members, *l;
@@ -479,11 +479,11 @@ contact_manager_lookup_contact (EmpathyContactManager *manager,
 
 static void
 logger_favourite_contacts_changed_cb (TpProxy      *proxy,
-                                      const gchar  *account_name,
-                                      const gchar **added,
-                                      const gchar **removed,
-                                      gpointer      user_data,
-                                      GObject      *weak_object)
+                                     const gchar  *account_name,
+                                     const gchar **added,
+                                     const gchar **removed,
+                                     gpointer      user_data,
+                                     GObject      *weak_object)
 {
        EmpathyContactManagerPriv *priv;
        EmpathyContactManager *manager = EMPATHY_CONTACT_MANAGER (weak_object);
@@ -559,10 +559,12 @@ empathy_contact_manager_init (EmpathyContactManager *manager)
                                             empathy_proxy_equal,
                                             (GDestroyNotify) g_object_unref,
                                             (GDestroyNotify) g_object_unref);
-        priv->favourites = g_hash_table_new_full (g_str_hash, g_str_equal,
-                                                  (GDestroyNotify) g_free,
-                                                  (GDestroyNotify)
-                                                        g_hash_table_unref);
+
+       priv->favourites = g_hash_table_new_full (g_str_hash, g_str_equal,
+                                                 (GDestroyNotify) g_free,
+                                                 (GDestroyNotify)
+                                                 g_hash_table_unref);
+
        priv->account_manager = tp_account_manager_dup ();
        priv->contact_monitor = NULL;