From: Xavier Claessens Date: Sat, 19 May 2007 20:19:42 +0000 (+0000) Subject: Fix indentation Fix not returning the contact in tp_contact_list_find() X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=1ff555e581a89646fa252706d41ae822d1e023e4 Fix indentation Fix not returning the contact in tp_contact_list_find() 2007-05-19 Xavier Claessens * libempathy-gtk/Makefile.am: * libempathy/empathy-tp-chat.c: * libempathy/empathy-contact-manager.c: * libempathy/empathy-contact-list.c: Fix indentation * libempathy/empathy-tp-contact-list.c: Fix not returning the contact in tp_contact_list_find() * TODO: Updated. svn path=/trunk/; revision=75 --- diff --git a/ChangeLog b/ChangeLog index b4b18f6b..88a07a0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-05-19 Xavier Claessens + + * libempathy-gtk/Makefile.am: + * libempathy/empathy-tp-chat.c: + * libempathy/empathy-contact-manager.c: + * libempathy/empathy-contact-list.c: Fix indentation + * libempathy/empathy-tp-contact-list.c: Fix not returning the contact + in tp_contact_list_find() + * TODO: Updated. + 2007-05-19 Xavier Claessens * libempathy-gtk/gossip-contact-list-store.c: diff --git a/TODO b/TODO index 9c39a422..1b78f283 100644 --- a/TODO +++ b/TODO @@ -2,12 +2,12 @@ Things you can do if you want to help: - Rename all files and functions name to use the empathy namespace. - Porting gossip-account-widget-*.{c,h} from gossip project (Guillaume is already working on IRC widget). - - Make a EmpathyTpChatroom object inherited from EmpathyTpChat and adding support for topic, invite, members list, etc. - Porting various UI widgets from gossip to libempathy-gtk for contact info, adding contact, personal info, etc. - GtkWidget-ify gossip widgets imported in libempathy-gtk. Actually most window/dialog do not inherit from GtkWindow/GtkDialog... - - Fix setting subscription for contacts in EmpathyContactList. - - Write a MC plugin to filter channels before dispatching them. For example we need a GtkStatusIcon that blink when an event arrives (text/voip/ft channel) and tells the MC to dispatch the channel only when the user clicked the icon. Like in gossip. - - Make use of NetworkManager and gnome-screensaver to set the presence + - Fix setting subscription for contacts in EmpathyTpContactList. + - Filter channels before dispatching them. For example we need a GtkStatusIcon that blink when an event arrives (text/voip/ft channel) and tells the MC to dispatch the channel only when the user clicked the icon. Like in gossip. For that we need a filter DBus API in MC, not yet written. + - Make use of NetworkManager to set the presence + - Remove Quit option everywhere, empathy is a session service and shouldn't be leaved. - Testing and Bugfixing. SoC projects: diff --git a/libempathy-gtk/Makefile.am b/libempathy-gtk/Makefile.am index a9ea7a7c..42fd8b09 100644 --- a/libempathy-gtk/Makefile.am +++ b/libempathy-gtk/Makefile.am @@ -9,8 +9,6 @@ noinst_LTLIBRARIES = libempathy-gtk.la libempathy_gtk_la_SOURCES = \ ephy-spinner.c ephy-spinner.h \ empathy-images.h \ - gossip-contact-list-store.c gossip-contact-list-store.h \ - gossip-contact-list-view.c gossip-contact-list-view.h \ empathy-main-window.c empathy-main-window.h \ empathy-status-icon.c empathy-status-icon.h \ gossip-accounts-dialog.c gossip-accounts-dialog.h \ @@ -21,6 +19,8 @@ libempathy_gtk_la_SOURCES = \ gossip-cell-renderer-text.c gossip-cell-renderer-text.h \ gossip-spell.c gossip-spell.h \ gossip-contact-groups.c gossip-contact-groups.h \ + gossip-contact-list-store.c gossip-contact-list-store.h \ + gossip-contact-list-view.c gossip-contact-list-view.h \ gossip-preferences.c gossip-preferences.h \ gossip-theme-manager.c gossip-theme-manager.h \ gossip-chat-window.c gossip-chat-window.h \ @@ -50,8 +50,8 @@ glade_DATA = \ gossip-chat.glade dtddir = $(datadir)/empathy -dtd_DATA = \ - gossip-status-presets.dtd \ +dtd_DATA = \ + gossip-status-presets.dtd \ gossip-contact-groups.dtd diff --git a/libempathy/empathy-contact-list.c b/libempathy/empathy-contact-list.c index f763cdb6..b7d02010 100644 --- a/libempathy/empathy-contact-list.c +++ b/libempathy/empathy-contact-list.c @@ -86,7 +86,7 @@ empathy_contact_list_setup (EmpathyContactList *list) GossipContact * empathy_contact_list_find (EmpathyContactList *list, - const gchar *id) + const gchar *id) { g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST (list), NULL); diff --git a/libempathy/empathy-contact-manager.c b/libempathy/empathy-contact-manager.c index a4cae35c..fa62da98 100644 --- a/libempathy/empathy-contact-manager.c +++ b/libempathy/empathy-contact-manager.c @@ -397,7 +397,7 @@ contact_manager_find_foreach (McAccount *account, { data->contact = empathy_contact_list_find (EMPATHY_CONTACT_LIST (list), data->id); - + if (data->contact) { return TRUE; } diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c index 73f60491..8e8a52ac 100644 --- a/libempathy/empathy-tp-chat.c +++ b/libempathy/empathy-tp-chat.c @@ -232,7 +232,7 @@ tp_chat_constructor (GType type, chat = G_OBJECT_CLASS (empathy_tp_chat_parent_class)->constructor (type, n_props, props); priv = GET_PRIV (chat); -g_print ("**********tp_chat_constructor"); + priv->manager = empathy_contact_manager_new (); priv->list = empathy_contact_manager_get_list (priv->manager, priv->account); priv->mc = gossip_mission_control_new (); diff --git a/libempathy/empathy-tp-contact-list.c b/libempathy/empathy-tp-contact-list.c index 43c317e0..60a7fd53 100644 --- a/libempathy/empathy-tp-contact-list.c +++ b/libempathy/empathy-tp-contact-list.c @@ -447,17 +447,14 @@ tp_contact_list_find (EmpathyContactList *list, const gchar *id) { EmpathyTpContactListPriv *priv; - GossipContact *contact; g_return_val_if_fail (EMPATHY_IS_TP_CONTACT_LIST (list), NULL); priv = GET_PRIV (list); - contact = g_hash_table_find (priv->contacts, - (GHRFunc) tp_contact_list_find_foreach, - (gchar*) id); - - return NULL; + return g_hash_table_find (priv->contacts, + (GHRFunc) tp_contact_list_find_foreach, + (gchar*) id); } static void