diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2007-06-14 05:58:16 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2007-06-14 05:58:16 +0800 |
commit | 4ce14ebec31f60a4a6bdd781f88607731912f557 (patch) | |
tree | 0ee31695ccdd06cae5f5b09bf5098707528b1dd3 /libempathy-gtk/gossip-contact-list-store.c | |
parent | e24e8894479c1b69364faeb315ab0d0dbf7989f1 (diff) | |
download | gsoc2013-empathy-4ce14ebec31f60a4a6bdd781f88607731912f557.tar gsoc2013-empathy-4ce14ebec31f60a4a6bdd781f88607731912f557.tar.gz gsoc2013-empathy-4ce14ebec31f60a4a6bdd781f88607731912f557.tar.bz2 gsoc2013-empathy-4ce14ebec31f60a4a6bdd781f88607731912f557.tar.lz gsoc2013-empathy-4ce14ebec31f60a4a6bdd781f88607731912f557.tar.xz gsoc2013-empathy-4ce14ebec31f60a4a6bdd781f88607731912f557.tar.zst gsoc2013-empathy-4ce14ebec31f60a4a6bdd781f88607731912f557.zip |
New window for viewing logs.
2007-06-13 Xavier Claessens <xclaesse@gmail.com>
* libempathy-gtk/Makefile.am:
* libempathy-gtk/gossip-log-window.glade:
* libempathy-gtk/gossip-log-window.h:
* libempathy-gtk/gossip-log-window.c:
* libempathy/empathy-log-manager.c:
* libempathy/empathy-log-manager.h:
* libempathy-gtk/gossip-chat.c:
* libempathy-gtk/empathy-main-window.c: New window for viewing logs.
* libempathy-gtk/gossip-chat-view.c: Do not use smooth scroll when
resizing the view.
* libempathy-gtk/gossip-contact-list-store.c: Do not set active
contacts when creating the store, and when contact groups changed.
* src/empathy-main.c: Fix warning when using command-line options.
* libempathy/empathy-tp-contact-list.c: Check if we have an aliasing
iface before setting the alias of a contact.
* TODO: Updated.
* data/jabber.profile: Ignore ssl errors by default. This is a security
vulnerability but we don't really have the choice.
* libempathy/gossip-contact.h:
* libempathy/gossip-contact.c: Add a "is-user" property to know if
it's our self contact.
* libempathy/gossip-message.h:
* libempathy/gossip-message.c: Add a "receiver" property like that we
have our self contact for nick highlight.
svn path=/trunk/; revision=148
Diffstat (limited to 'libempathy-gtk/gossip-contact-list-store.c')
-rw-r--r-- | libempathy-gtk/gossip-contact-list-store.c | 42 |
1 files changed, 34 insertions, 8 deletions
diff --git a/libempathy-gtk/gossip-contact-list-store.c b/libempathy-gtk/gossip-contact-list-store.c index 4a5b5506e..887ce13e4 100644 --- a/libempathy-gtk/gossip-contact-list-store.c +++ b/libempathy-gtk/gossip-contact-list-store.c @@ -57,6 +57,7 @@ struct _GossipContactListStorePriv { gboolean is_compact; gboolean show_active; GossipContactListStoreSort sort_criterium; + guint inhibit_active; GossipContactGroupsFunc get_contact_groups; gpointer get_contact_groups_data; @@ -92,6 +93,7 @@ static void contact_list_store_set_property (GObject const GValue *value, GParamSpec *pspec); static void contact_list_store_setup (GossipContactListStore *store); +static gboolean contact_list_store_inibit_active_cb (GossipContactListStore *store); static void contact_list_store_contact_added_cb (EmpathyContactList *list_iface, GossipContact *contact, GossipContactListStore *store); @@ -231,9 +233,9 @@ gossip_contact_list_store_init (GossipContactListStore *store) priv = GET_PRIV (store); - priv->is_compact = FALSE; - priv->show_active = TRUE; - priv->show_avatars = TRUE; + priv->inhibit_active = g_timeout_add (1000, + (GSourceFunc) contact_list_store_inibit_active_cb, + store); } static void @@ -249,6 +251,10 @@ contact_list_store_finalize (GObject *object) g_object_unref (priv->list); } + if (priv->inhibit_active) { + g_source_remove (priv->inhibit_active); + } + G_OBJECT_CLASS (gossip_contact_list_store_parent_class)->finalize (object); } @@ -320,7 +326,6 @@ gossip_contact_list_store_new (EmpathyContactList *list_iface) GossipContactListStore *store; GossipContactListStorePriv *priv; GList *contacts, *l; - gboolean show_active; g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST (list_iface), NULL); @@ -340,9 +345,7 @@ gossip_contact_list_store_new (EmpathyContactList *list_iface) G_CALLBACK (contact_list_store_contact_removed_cb), store); - /* Add contacts already created. Do not highlight them. */ - show_active = priv->show_active; - priv->show_active = FALSE; + /* Add contacts already created. */ contacts = empathy_contact_list_get_members (priv->list); for (l = contacts; l; l = l->next) { GossipContact *contact; @@ -354,7 +357,6 @@ gossip_contact_list_store_new (EmpathyContactList *list_iface) g_object_unref (contact); } g_list_free (contacts); - priv->show_active = show_active; return store; } @@ -681,6 +683,14 @@ void gossip_contact_list_store_update_contact_groups (GossipContactListStore *store, GossipContact *contact) { + GossipContactListStorePriv *priv; + gboolean show_active; + + g_return_if_fail (GOSSIP_IS_CONTACT_LIST_STORE (store)); + g_return_if_fail (GOSSIP_IS_CONTACT (contact)); + + priv = GET_PRIV (store); + gossip_debug (DEBUG_DOMAIN, "Contact:'%s' updating groups", gossip_contact_get_name (contact)); @@ -688,8 +698,11 @@ gossip_contact_list_store_update_contact_groups (GossipContactListStore *store, * would have to check the groups already set up for each * contact and then see what has been updated. */ + show_active = priv->show_active; + priv->show_active = FALSE; contact_list_store_remove_contact (store, contact); contact_list_store_add_contact (store, contact); + priv->show_active = show_active; } static void @@ -726,6 +739,19 @@ contact_list_store_setup (GossipContactListStore *store) gossip_contact_list_store_set_sort_criterium (store, priv->sort_criterium); } +static gboolean +contact_list_store_inibit_active_cb (GossipContactListStore *store) +{ + GossipContactListStorePriv *priv; + + priv = GET_PRIV (store); + + priv->show_active = TRUE; + priv->inhibit_active = 0; + + return FALSE; +} + static void contact_list_store_contact_added_cb (EmpathyContactList *list_iface, GossipContact *contact, |