+2007-05-25 Xavier Claessens <xclaesse@gmail.com>
+
+ * libempathy-gtk/gossip-new-chatroom-dialog.c: Do not use the server
+ entry's value if it's hidden.
+ * libempathy-gtk/gossip-contact-list-view.c:Do not highlight groups
+ when adding them in the roster.
+ * libempathy/empathy-tp-contact-list.c: DO not create new GossipContact
+ object in presence/avatar/alias changed signal if we don't already know
+ that contact from a contact list channel. This should fix DBus max
+ pending calls limit reached in some cases.
+
2007-05-25 Xavier Claessens <xclaesse@gmail.com>
* libempathy-gtk/gossip-new-chatroom-dialog.c: Preset the server only
NULL);
}
} else {
-#if 0
- gint color_sum_normal;
- gint color_sum_selected;
-
- color = style->base[GTK_STATE_SELECTED];
- color_sum_normal = color.red+color.green+color.blue;
- color = style->base[GTK_STATE_NORMAL];
- color_sum_selected = color.red+color.green+color.blue;
- color = style->text_aa[GTK_STATE_INSENSITIVE];
-
- if (color_sum_normal < color_sum_selected) {
- /* Found a light theme */
- color.red = (color.red + (style->white).red) / 2;
- color.green = (color.green + (style->white).green) / 2;
- color.blue = (color.blue + (style->white).blue) / 2;
- } else {
- /* Found a dark theme */
- color.red = (color.red + (style->black).red) / 2;
- color.green = (color.green + (style->black).green) / 2;
- color.blue = (color.blue + (style->black).blue) / 2;
- }
-
g_object_set (cell,
- "cell-background-gdk", &color,
+ "cell-background-gdk", NULL,
NULL);
-#endif
}
}
McAccount *account;
MissionControl *mc;
GossipContact *user_contact;
+ gboolean setup;
GossipTelepathyGroup *known;
GossipTelepathyGroup *publish;
gossip_debug (DEBUG_DOMAIN, "setup contact list: %p", list);
+ priv->setup = TRUE;
dbus_g_proxy_connect_signal (DBUS_G_PROXY (priv->tp_conn), "NewChannel",
G_CALLBACK (tp_contact_list_newchannel_cb),
list, NULL);
handle = g_value_get_uint (g_value_array_get_nth (chan_struct, 3));
tp_contact_list_newchannel_cb (DBUS_G_PROXY (priv->tp_conn),
- object_path, chan_iface,
- handle_type, handle,
- FALSE,
- EMPATHY_TP_CONTACT_LIST (list));
+ object_path, chan_iface,
+ handle_type, handle,
+ FALSE,
+ EMPATHY_TP_CONTACT_LIST (list));
g_value_array_free (chan_struct);
}
priv = GET_PRIV (list);
if (strcmp (channel_type, TP_IFACE_CHANNEL_TYPE_CONTACT_LIST) != 0 ||
- suppress_handle) {
+ suppress_handle ||
+ !priv->setup) {
return;
}
gchar *new_token,
EmpathyTpContactList *list)
{
+ EmpathyTpContactListPriv *priv;
+
+ priv = GET_PRIV (list);
+
+ if (!g_hash_table_lookup (priv->contacts, GUINT_TO_POINTER (handle))) {
+ /* We don't know this contact, skip */
+ return;
+ }
+
gossip_debug (DEBUG_DOMAIN, "Changing avatar for %d to %s",
handle, new_token);
GPtrArray *renamed_handlers,
EmpathyTpContactList *list)
{
- gint i;
+ EmpathyTpContactListPriv *priv;
+ guint i;
+
+ priv = GET_PRIV (list);
for (i = 0; renamed_handlers->len > i; i++) {
guint handle;
handle = g_value_get_uint(g_value_array_get_nth (renamed_struct, 0));
alias = g_value_get_string(g_value_array_get_nth (renamed_struct, 1));
- if (alias && *alias == '\0') {
+ if (!g_hash_table_lookup (priv->contacts, GUINT_TO_POINTER (handle))) {
+ /* We don't know this contact, skip */
+ continue;
+ }
+
+ if (G_STR_EMPTY (alias)) {
alias = NULL;
}
GValueArray *presence_struct,
EmpathyTpContactList *list)
{
+ EmpathyTpContactListPriv *priv;
GHashTable *presences_table;
GossipContact *contact;
GossipPresence *presence = NULL;
+ priv = GET_PRIV (list);
+
+ if (!g_hash_table_lookup (priv->contacts, GUINT_TO_POINTER (handle))) {
+ /* We don't know this contact, skip */
+ return;
+ }
+
contact = empathy_tp_contact_list_get_from_handle (list, handle);
presences_table = g_value_get_boxed (g_value_array_get_nth (presence_struct, 1));