r7179 - in dumbhippo/trunk/client/linux: . src



Author: otaylor
Date: 2008-01-10 12:54:28 -0600 (Thu, 10 Jan 2008)
New Revision: 7179

Removed:
   dumbhippo/trunk/client/linux/src/hippo-dbus-contacts.c
   dumbhippo/trunk/client/linux/src/hippo-dbus-contacts.h
   dumbhippo/trunk/client/linux/src/hippo-person-renderer.c
   dumbhippo/trunk/client/linux/src/hippo-person-renderer.h
Modified:
   dumbhippo/trunk/client/linux/Makefile-libhippo.am
   dumbhippo/trunk/client/linux/Makefile-mugshot.am
   dumbhippo/trunk/client/linux/src/hippo-dbus-mugshot.c
   dumbhippo/trunk/client/linux/src/hippo-dbus-mugshot.h
   dumbhippo/trunk/client/linux/src/hippo-dbus-server.c
   dumbhippo/trunk/client/linux/src/hippo-status-icon.c
   dumbhippo/trunk/client/linux/src/main.c
Log:
Change the block stack to get data via the data model:
 
 * Data cache objects like HippoBlock/HippoPerson/HippoGroup/HippoPost/etc.
   are largely retained (at least for transition purposes) but are backed
   by resources.

 * We use self_resource.stack as the primary way of getting the stack, then
   supplement it with the "getOldBlocks" IQ to get unanswered question blocks
   and extra blocks to replace filtered blocks.

 * Various unnecessary subclasses of HippoBlock have been removed; many
   were there only to deal with irregularities in the legacy protocol.

 * Large amounts of unused old code from previous iterations of the client 
   has been removed.


Modified: dumbhippo/trunk/client/linux/Makefile-libhippo.am
===================================================================
--- dumbhippo/trunk/client/linux/Makefile-libhippo.am	2008-01-10 18:46:33 UTC (rev 7178)
+++ dumbhippo/trunk/client/linux/Makefile-libhippo.am	2008-01-10 18:54:28 UTC (rev 7179)
@@ -46,24 +46,10 @@
 	$(COMMONSRCDIR)/hippo/hippo-block-abstract-person.h	\
 	$(COMMONSRCDIR)/hippo/hippo-block-amazon-activity.c	\
 	$(COMMONSRCDIR)/hippo/hippo-block-amazon-activity.h	\
-	$(COMMONSRCDIR)/hippo/hippo-block-facebook-person.c	\
-	$(COMMONSRCDIR)/hippo/hippo-block-facebook-person.h	\
-	$(COMMONSRCDIR)/hippo/hippo-block-flickr-person.c	\
-	$(COMMONSRCDIR)/hippo/hippo-block-flickr-person.h	\
-	$(COMMONSRCDIR)/hippo/hippo-block-flickr-photoset.c	\
-	$(COMMONSRCDIR)/hippo/hippo-block-flickr-photoset.h	\
-	$(COMMONSRCDIR)/hippo/hippo-block-facebook-event.c	\
-	$(COMMONSRCDIR)/hippo/hippo-block-facebook-event.h	\
-	$(COMMONSRCDIR)/hippo/hippo-block-music-chat.c		\
-	$(COMMONSRCDIR)/hippo/hippo-block-music-chat.h		\
-	$(COMMONSRCDIR)/hippo/hippo-block-music-person.c	\
-	$(COMMONSRCDIR)/hippo/hippo-block-music-person.h	\
 	$(COMMONSRCDIR)/hippo/hippo-block-netflix-movie.c	\
 	$(COMMONSRCDIR)/hippo/hippo-block-netflix-movie.h	\
 	$(COMMONSRCDIR)/hippo/hippo-block-post.c		\
 	$(COMMONSRCDIR)/hippo/hippo-block-post.h		\
-	$(COMMONSRCDIR)/hippo/hippo-block-youtube-person.c	\
-	$(COMMONSRCDIR)/hippo/hippo-block-youtube-person.h	\
 	$(COMMONSRCDIR)/hippo/hippo-canvas-base.c		\
 	$(COMMONSRCDIR)/hippo/hippo-canvas-base.h		\
 	$(COMMONSRCDIR)/hippo/hippo-canvas-block.c		\
@@ -82,10 +68,6 @@
 	$(COMMONSRCDIR)/hippo/hippo-canvas-block-group-member.h	\
 	$(COMMONSRCDIR)/hippo/hippo-canvas-block-music.c	\
 	$(COMMONSRCDIR)/hippo/hippo-canvas-block-music.h	\
-	$(COMMONSRCDIR)/hippo/hippo-canvas-block-music-chat.c	\
-	$(COMMONSRCDIR)/hippo/hippo-canvas-block-music-chat.h	\
-	$(COMMONSRCDIR)/hippo/hippo-canvas-block-music-person.c	\
-	$(COMMONSRCDIR)/hippo/hippo-canvas-block-music-person.h	\
 	$(COMMONSRCDIR)/hippo/hippo-canvas-block-netflix-movie.c	\
 	$(COMMONSRCDIR)/hippo/hippo-canvas-block-netflix-movie.h	\
 	$(COMMONSRCDIR)/hippo/hippo-canvas-block-post.c		\
@@ -106,8 +88,12 @@
 	$(COMMONSRCDIR)/hippo/hippo-canvas-message-preview.h	\
 	$(COMMONSRCDIR)/hippo/hippo-canvas-quipper.c		\
 	$(COMMONSRCDIR)/hippo/hippo-canvas-quipper.h		\
+	$(COMMONSRCDIR)/hippo/hippo-canvas-resource.c		\
+	$(COMMONSRCDIR)/hippo/hippo-canvas-resource.h		\
 	$(COMMONSRCDIR)/hippo/hippo-canvas-stack.c		\
 	$(COMMONSRCDIR)/hippo/hippo-canvas-stack.h		\
+	$(COMMONSRCDIR)/hippo/hippo-canvas-thumbnail.c		\
+	$(COMMONSRCDIR)/hippo/hippo-canvas-thumbnail.h		\
 	$(COMMONSRCDIR)/hippo/hippo-canvas-thumbnails.c		\
 	$(COMMONSRCDIR)/hippo/hippo-canvas-thumbnails.h		\
 	$(COMMONSRCDIR)/hippo/hippo-canvas-timestamp.c		\
@@ -152,8 +138,6 @@
 	$(COMMONSRCDIR)/hippo/hippo-object-cache.h		\
 	$(COMMONSRCDIR)/hippo/hippo-myspace.c			\
 	$(COMMONSRCDIR)/hippo/hippo-myspace.h			\
-	$(COMMONSRCDIR)/hippo/hippo-netflix-movie.c		\
-	$(COMMONSRCDIR)/hippo/hippo-netflix-movie.h		\
 	$(COMMONSRCDIR)/hippo/hippo-person.c			\
 	$(COMMONSRCDIR)/hippo/hippo-person.h			\
 	$(COMMONSRCDIR)/hippo/hippo-platform.c			\

Modified: dumbhippo/trunk/client/linux/Makefile-mugshot.am
===================================================================
--- dumbhippo/trunk/client/linux/Makefile-mugshot.am	2008-01-10 18:46:33 UTC (rev 7178)
+++ dumbhippo/trunk/client/linux/Makefile-mugshot.am	2008-01-10 18:54:28 UTC (rev 7179)
@@ -23,8 +23,6 @@
 	src/hippo-distribution.h		\
 	src/hippo-dbus-client.c			\
 	src/hippo-dbus-client.h			\
-	src/hippo-dbus-contacts.c		\
-	src/hippo-dbus-contacts.h		\
 	src/hippo-dbus-cookies.c		\
 	src/hippo-dbus-cookies.h		\
 	src/hippo-dbus-helper.c			\
@@ -62,8 +60,6 @@
 	src/hippo-im.h				\
 	src/hippo-pixbuf-cache.c		\
 	src/hippo-pixbuf-cache.h		\
-	src/hippo-person-renderer.c		\
-	src/hippo-person-renderer.h		\
 	src/hippo-platform-impl.c		\
 	src/hippo-platform-impl.h		\
 	src/hippo-ui.c				\

Deleted: dumbhippo/trunk/client/linux/src/hippo-dbus-contacts.c
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-dbus-contacts.c	2008-01-10 18:46:33 UTC (rev 7178)
+++ dumbhippo/trunk/client/linux/src/hippo-dbus-contacts.c	2008-01-10 18:54:28 UTC (rev 7179)
@@ -1,377 +0,0 @@
-/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
-#include <config.h>
-#include <glib/gi18n-lib.h>
-#include <stdlib.h>
-#include <string.h>
-#include "hippo-dbus-helper.h"
-#include <hippo/hippo-data-cache.h>
-#include "hippo-dbus-contacts.h"
-#include "main.h"
-
-
-
-
-
-
-/*
- ****************
- *
- *  This API is deprecated junk, use the data model. We need to clean this out.
- *
- ****************
- */
-
-
-
-
-
-
-
-#define HIPPO_DBUS_MUGSHOT_DATACACHE_PATH_PREFIX "/org/mugshot/datacache/"
-
-static void
-ensure_entity_registered(DBusConnection  *connection,
-                         const char      *path,
-                         HippoEntity     *entity)
-{
-    if (!hippo_dbus_helper_object_is_registered(connection, path)) {
-        /* register_g_object will set up a weak ref to unregister a destroyed entity */
-        hippo_dbus_helper_register_g_object(connection,
-                                            path, G_OBJECT(entity),
-                                            HIPPO_DBUS_ENTITY_INTERFACE,
-                                            NULL);
-    }
-}
-                         
-
-#if 0
-static HippoEntity *
-entity_from_path(HippoDBus  *dbus,
-                 const char *path)
-{
-    HippoDataCache *cache;
-    HippoEntity *entity;
-    
-    cache = hippo_app_get_data_cache(hippo_get_app());
-
-    if (!g_str_has_prefix(path, HIPPO_DBUS_MUGSHOT_DATACACHE_PATH_PREFIX))
-        return NULL;
-
-    entity = hippo_data_cache_lookup_entity(cache, path + strlen(HIPPO_DBUS_MUGSHOT_DATACACHE_PATH_PREFIX));
-
-    /* generally the entity should be registered already since the path was handed out,
-     * but just to be sure
-     */
-    ensure_entity_registered(hippo_dbus_get_connection(dbus), path, entity);
-    
-    return entity;
-}
-#endif
-
-static char*
-get_entity_path(DBusConnection  *connection,
-                HippoEntity     *entity)
-{
-    char *path;
-    
-    path = g_strdup_printf(HIPPO_DBUS_MUGSHOT_DATACACHE_PATH_PREFIX "%s",
-                           hippo_entity_get_guid(entity));
-
-    /* if we're handing out the path we need to be sure it exists */
-    ensure_entity_registered(connection, path, entity);
-
-    return path;
-}
-
-static void
-append_entity_to_iter(DBusConnection  *connection,
-                      DBusMessageIter *iter,
-                      HippoEntity     *entity)
-{
-    char *path;
-    
-    path = get_entity_path(connection, entity);
-    dbus_message_iter_append_basic(iter, DBUS_TYPE_OBJECT_PATH, &path);
-    g_free(path);
-}
-
-static void
-append_entity_to_message(DBusConnection  *connection,
-                         DBusMessage     *message,
-                         HippoEntity     *entity)
-{
-    DBusMessageIter iter;
-    
-    dbus_message_iter_init_append(message, &iter);
-    append_entity_to_iter(connection, &iter, entity);
-}
-
-static void
-append_entity_if_in_network(void *entity_ptr, gpointer data)
-{
-    HippoEntity *entity = HIPPO_ENTITY(entity_ptr);
-    DBusMessageIter *iter = (DBusMessageIter*) data;
-    
-    if (hippo_entity_get_in_network(entity)) {
-        DBusConnection *connection;
-        
-        connection = hippo_dbus_get_connection(hippo_app_get_dbus(hippo_get_app()));
-        
-        append_entity_to_iter(connection, iter, entity);
-    }
-}
-
-static void
-append_entity_if_person_in_network(void *entity_ptr, gpointer data)
-{
-    HippoEntity *entity = HIPPO_ENTITY(entity_ptr);
-    DBusMessageIter *iter = (DBusMessageIter*) data;
-    
-    if (hippo_entity_get_in_network(entity) && HIPPO_IS_PERSON(entity)) {
-        DBusConnection *connection;
-        
-        connection = hippo_dbus_get_connection(hippo_app_get_dbus(hippo_get_app()));
-        
-        append_entity_to_iter(connection, iter, entity);
-    }
-}
-
-static void
-append_entity_if_group_in_network(void *entity_ptr, void *data)
-{
-    HippoEntity *entity = HIPPO_ENTITY(entity_ptr);
-    DBusMessageIter *iter = (DBusMessageIter*) data;
-    
-    if (hippo_entity_get_in_network(entity) && HIPPO_IS_GROUP(entity)) {
-        DBusConnection *connection;
-        
-        connection = hippo_dbus_get_connection(hippo_app_get_dbus(hippo_get_app()));
-        
-        append_entity_to_iter(connection, iter, entity);
-    }
-}
-
-static DBusMessage*
-handle_get_entity_list (void            *object,
-                        DBusMessage     *message,
-                        DBusError       *error,
-                        void (* appender) (void *entity_ptr, void *data))
-{
-    DBusMessage *reply;
-    DBusMessageIter iter, array_iter;
-    HippoDataCache *cache;
-
-    cache = hippo_app_get_data_cache(hippo_get_app());
-    reply = dbus_message_new_method_return(message);
-
-    dbus_message_iter_init_append(reply, &iter);
-    dbus_message_iter_open_container(&iter,
-                                     DBUS_TYPE_ARRAY,
-                                     DBUS_TYPE_OBJECT_PATH_AS_STRING,
-                                     &array_iter);
-
-    hippo_data_cache_foreach_entity(cache, appender, &array_iter);
-
-    dbus_message_iter_close_container(&iter, &array_iter);
-
-    return reply;
-}
-
-static DBusMessage*
-handle_get_people (void            *object,
-                   DBusMessage     *message,
-                   DBusError       *error)
-{
-    return handle_get_entity_list(object, message, error, append_entity_if_person_in_network);
-}
-
-static DBusMessage*
-handle_get_groups (void            *object,
-                   DBusMessage     *message,
-                   DBusError       *error)
-{
-    return handle_get_entity_list(object, message, error, append_entity_if_group_in_network);
-}
-
-static DBusMessage*
-handle_get_self (void            *object,
-                 DBusMessage     *message,
-                 DBusError       *error)
-{
-    HippoPerson *self;
-    DBusMessage *reply;
-    HippoDataCache *cache;
-    DBusConnection *connection;
-    
-    connection = hippo_dbus_get_connection(hippo_app_get_dbus(hippo_get_app()));
-    cache = hippo_app_get_data_cache(hippo_get_app());
-
-    self = hippo_data_cache_get_self(cache);
-    if (self == NULL) {
-    	return dbus_message_new_error(message, "org.freedesktop.od.NotOnline", "Not online right now");
-    }
-
-    reply = dbus_message_new_method_return(message);
-    append_entity_to_message(connection, reply, HIPPO_ENTITY(self));
-    return reply;
-}
-
-static DBusMessage*
-handle_get_network (void            *object,
-                    DBusMessage     *message,
-                    DBusError       *error)
-{
-    return handle_get_entity_list(object, message, error, append_entity_if_in_network);
-}
-
-static dbus_bool_t
-handle_get_type(void            *object,
-                const char      *prop_name,
-                DBusMessageIter *append_iter,
-                DBusError       *error)
-{
-    const char *type;
-    HippoEntity *entity;
-
-    entity = HIPPO_ENTITY(object);
-    
-    switch (hippo_entity_get_entity_type(entity)) {
-    case HIPPO_ENTITY_PERSON:
-        type = "person";
-        break;
-    case HIPPO_ENTITY_GROUP:
-        type = "group";
-        break;
-    case HIPPO_ENTITY_RESOURCE:
-        type = "resource";
-        break;
-    case HIPPO_ENTITY_FEED:
-        type = "feed";
-        break;
-    default:
-        g_warning("Unknown entity type %s", g_type_name_from_instance((GTypeInstance*)entity));
-        type = "unknown";
-        break;
-    }
-    
-    dbus_message_iter_append_basic(append_iter, DBUS_TYPE_STRING, &type);
-
-    return TRUE;
-}
-
-static dbus_bool_t
-handle_get_mugshot_guid(void            *object,
-                        const char      *prop_name,
-                        DBusMessageIter *append_iter,
-                        DBusError       *error)
-{
-    const char *guid;
-    HippoEntity *entity;
-
-    entity = HIPPO_ENTITY(object);
-
-    guid = hippo_entity_get_guid(entity);
-    
-    dbus_message_iter_append_basic(append_iter, DBUS_TYPE_STRING, &guid);
-
-    return TRUE;
-}
-
-static dbus_bool_t
-handle_get_name(void            *object,
-                const char      *prop_name,
-                DBusMessageIter *append_iter,
-                DBusError       *error)
-{
-    const char *name;
-    HippoEntity *entity;
-
-    entity = HIPPO_ENTITY(object);
-
-    name = hippo_entity_get_name(entity);
-    
-    dbus_message_iter_append_basic(append_iter, DBUS_TYPE_STRING, &name);
-
-    return TRUE;
-}
-
-static dbus_bool_t
-handle_get_home_url(void            *object,
-                    const char      *prop_name,
-                    DBusMessageIter *append_iter,
-                    DBusError       *error)
-{
-    const char *home_url;
-    HippoEntity *entity;
-
-    entity = HIPPO_ENTITY(object);
-
-    home_url = hippo_entity_get_home_url(entity);
-    
-    dbus_message_iter_append_basic(append_iter, DBUS_TYPE_STRING, &home_url);
-
-    return TRUE;
-}
-
-static dbus_bool_t
-handle_get_photo_url(void            *object,
-                     const char      *prop_name,
-                     DBusMessageIter *append_iter,
-                     DBusError       *error)
-{
-    const char *photo_url;
-    HippoEntity *entity;
-
-    entity = HIPPO_ENTITY(object);
-
-    photo_url = hippo_entity_get_photo_url(entity);
-    
-    dbus_message_iter_append_basic(append_iter, DBUS_TYPE_STRING, &photo_url);
-
-    return TRUE;
-}
-
-static const HippoDBusMember network_members[] = {
-    { HIPPO_DBUS_MEMBER_METHOD, "GetPeople", "", "ao", handle_get_people },
-    { HIPPO_DBUS_MEMBER_METHOD, "GetGroups", "", "ao", handle_get_groups },
-    { HIPPO_DBUS_MEMBER_METHOD, "GetSelf", "", "o", handle_get_self },
-    { HIPPO_DBUS_MEMBER_METHOD, "GetNetwork", "", "ao", handle_get_network },
-    { 0, NULL }
-};
-
-static const HippoDBusProperty entity_properties[] = {
-    { "type", DBUS_TYPE_STRING_AS_STRING, handle_get_type, NULL },
-    { "mugshotGuid", DBUS_TYPE_STRING_AS_STRING, handle_get_mugshot_guid, NULL },
-    { "name", DBUS_TYPE_STRING_AS_STRING, handle_get_name, NULL },
-    { "home-url", DBUS_TYPE_STRING_AS_STRING, handle_get_home_url, NULL },
-    { "photo-url", DBUS_TYPE_STRING_AS_STRING, handle_get_photo_url, NULL },
-    { NULL }
-};
-
-void
-hippo_dbus_init_contacts(DBusConnection *connection,
-                         gboolean        replace)
-{
-    dbus_uint32_t flags;
-    
-    hippo_dbus_helper_register_interface(connection, HIPPO_DBUS_NETWORK_INTERFACE,
-                                         network_members, NULL);
-    hippo_dbus_helper_register_interface(connection, HIPPO_DBUS_ENTITY_INTERFACE,
-                                         NULL, entity_properties);
-    
-    hippo_dbus_helper_register_object(connection, HIPPO_DBUS_NETWORK_PATH,
-                                      NULL, HIPPO_DBUS_NETWORK_INTERFACE,
-                                      NULL);
-
-
-    /* We do want to be queued if we don't get this right away */
-    flags = DBUS_NAME_FLAG_ALLOW_REPLACEMENT;
-    if (replace)
-        flags |= DBUS_NAME_FLAG_REPLACE_EXISTING;
-
-    /* we just ignore errors on this */
-    dbus_bus_request_name(connection, HIPPO_DBUS_NETWORK_BUS_NAME,
-                          flags,
-                          NULL);
-}
-

Deleted: dumbhippo/trunk/client/linux/src/hippo-dbus-contacts.h
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-dbus-contacts.h	2008-01-10 18:46:33 UTC (rev 7178)
+++ dumbhippo/trunk/client/linux/src/hippo-dbus-contacts.h	2008-01-10 18:54:28 UTC (rev 7179)
@@ -1,36 +0,0 @@
-/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
-#ifndef __HIPPO_DBUS_CONTACTS_H__
-#define __HIPPO_DBUS_CONTACTS_H__
-
-/* implement contacts-related dbus methods */
-
-
-/*
- ****************
- *
- *  This API is deprecated junk, use the data model. We need to clean this out.
- *
- ****************
- */
-
-
-
-#include "hippo-dbus-server.h"
-
-G_BEGIN_DECLS
-
-/* generic social network interface */
-#define HIPPO_DBUS_NETWORK_INTERFACE "org.freedesktop.od.Network"
-/* this is a bus name owned by the current "manage my social network" program */
-#define HIPPO_DBUS_NETWORK_BUS_NAME "org.freedesktop.od.FriendNetwork"
-#define HIPPO_DBUS_NETWORK_PATH "/org/freedesktop/od/network"
-
-#define HIPPO_DBUS_ENTITY_INTERFACE "org.freedesktop.od.Entity"
-
-/* try to acquire the bus name, and register our objects */
-void hippo_dbus_init_contacts(DBusConnection *connection,
-                              gboolean        replace);
-
-G_END_DECLS
-
-#endif /* __HIPPO_DBUS_CONTACTS_H__ */

Modified: dumbhippo/trunk/client/linux/src/hippo-dbus-mugshot.c
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-dbus-mugshot.c	2008-01-10 18:46:33 UTC (rev 7178)
+++ dumbhippo/trunk/client/linux/src/hippo-dbus-mugshot.c	2008-01-10 18:54:28 UTC (rev 7179)
@@ -73,61 +73,6 @@
     dbus_message_iter_close_container(iter, &subiter);
 }
 
-static void
-append_entity(HippoDBus         *dbus,
-              DBusMessage       *message,
-              HippoEntity       *entity)
-{
-    DBusMessageIter iter;
-    HippoConnection *connection;
-    const char *guid;
-    const char *name;
-    const char *home_url;
-    const char *photo_url;
-    const char *type;
-
-    connection = hippo_data_cache_get_connection(hippo_app_get_data_cache(hippo_get_app()));
-
-    guid = hippo_entity_get_guid(entity);
-    name = hippo_entity_get_name(entity);
-    home_url = hippo_entity_get_home_url(entity);
-    photo_url = hippo_entity_get_photo_url(entity);
-
-    type = NULL;
-    switch (hippo_entity_get_entity_type(entity)) {
-    case HIPPO_ENTITY_PERSON:
-        type = "person";
-        break;
-    case HIPPO_ENTITY_GROUP:
-        type = "group";
-        break;
-    case HIPPO_ENTITY_RESOURCE:
-        type = "resource";
-        break;
-    case HIPPO_ENTITY_FEED:
-        type = "feed";
-        break;
-    }
-
-    /* append_strings_as_dict will skip pairs with null value */
-    dbus_message_iter_init_append(message, &iter);
-    append_strings_as_dict(&iter, "guid", guid, "type", type, "name", name, "home-url", home_url, "photo-url", photo_url, NULL);
-}
-
-static HippoEntity *
-entity_from_ref(HippoDBus *dbus,
-                const char *ref)
-{
-    HippoDataCache *cache;
-
-    cache = hippo_app_get_data_cache(hippo_get_app());
-
-    if (!g_str_has_prefix(ref, HIPPO_DBUS_MUGSHOT_DATACACHE_PATH_PREFIX))
-        return NULL;
-
-    return hippo_data_cache_lookup_entity(cache, ref + strlen(HIPPO_DBUS_MUGSHOT_DATACACHE_PATH_PREFIX));
-}
-
 static char *
 get_entity_path(HippoEntity *entity)
 {
@@ -224,7 +169,7 @@
 
     have_auth = hippo_connection_get_has_auth(connection);
     connected = hippo_connection_get_connected(connection);
-    contacts_loaded = hippo_connection_get_contacts_loaded(connection);
+    contacts_loaded = FALSE;
 
     reply = dbus_message_new_method_return(message);
     dbus_message_append_args(reply, DBUS_TYPE_BOOLEAN, &have_auth,
@@ -236,40 +181,6 @@
 }
 
 DBusMessage*
-hippo_dbus_handle_mugshot_entity_message(HippoDBus   *dbus,
-                                         DBusMessage  *message)
-{
-    DBusError error;
-    HippoEntity *entity;
-    DBusMessage *reply = NULL;
-
-    dbus_error_init(&error);
-
-    entity = entity_from_ref(dbus, dbus_message_get_path(message));
-
-    if (!entity) {
-    	return dbus_message_new_error(message, "org.mugshot.Mugshot.UnknownEntity", "Unknown entity");
-    }
-
-    if (!strcmp(dbus_message_get_member(message), "GetProperties")) {
-        reply = dbus_message_new_method_return(message);
-        append_entity(dbus, reply, HIPPO_ENTITY(entity));
-    }
-
-    return reply;
-}
-
-DBusMessage*
-hippo_dbus_handle_mugshot_get_whereim(HippoDBus   *dbus,
-                                      HippoConnection *connection,
-                                      DBusMessage *message)
-{
-    hippo_connection_request_mugshot_whereim(connection);
-
-    return dbus_message_new_method_return(message);  /* Send out the results as signals.  */
-}
-
-DBusMessage*
 hippo_dbus_handle_mugshot_send_external_iq(HippoDBus   *dbus,
                                            DBusMessage *message)
 {
@@ -312,43 +223,7 @@
     return reply;
 }
 
-static void
-append_network_ref(gpointer entity_ptr, gpointer data)
-{
-    HippoEntity *entity = (HippoEntity*) entity_ptr;
-    DBusMessageIter *iter = (DBusMessageIter*) data;
-
-    if (hippo_entity_get_in_network(entity)) {
-    	char *ref;
-    	ref = get_entity_path(entity);
-        dbus_message_iter_append_basic(iter, DBUS_TYPE_OBJECT_PATH, &ref);
-        g_free(ref);
-    }
-}
-
 DBusMessage*
-hippo_dbus_handle_mugshot_get_network(HippoDBus   *dbus,
-                                      DBusMessage  *message)
-{
-    DBusMessage *reply;
-    DBusMessageIter iter, array_iter;
-    HippoDataCache *cache = hippo_app_get_data_cache(hippo_get_app());
-
-    reply = dbus_message_new_method_return(message);
-    dbus_message_iter_init_append(reply, &iter);
-    dbus_message_iter_open_container(&iter,
-                                     DBUS_TYPE_ARRAY,
-                                     DBUS_TYPE_OBJECT_PATH_AS_STRING,
-                                     &array_iter);
-
-    hippo_data_cache_foreach_entity(cache, append_network_ref, &array_iter);
-
-    dbus_message_iter_close_container(&iter, &array_iter);
-
-    return reply;
-}
-
-DBusMessage*
 hippo_dbus_handle_mugshot_introspect(HippoDBus   *dbus,
                                      DBusMessage *message)
 {
@@ -396,11 +271,6 @@
                     );
 
     g_string_append(xml,
-                    "    <signal name=\"WhereimChanged\">\n"
-                    "      <arg direction=\"in\" type=\"a{ss}\"/>\n"
-                    "    </signal>\n");
-
-    g_string_append(xml,
                     "    <signal name=\"EntityChanged\">\n"
                     "      <arg direction=\"in\" type=\"a{ss}\"/>\n"
                     "    </signal>\n");
@@ -420,35 +290,6 @@
 }
 
 DBusMessage*
-hippo_dbus_mugshot_signal_whereim_changed(HippoDBus            *dbus,
-                                          HippoConnection      *connection,
-                                          HippoExternalAccount *acct)
-{
-    DBusMessage *signal;
-    DBusMessageIter iter;
-    char *name, *sentiment, *icon_url, *link;
-
-    g_object_get(acct, "name", &name, "sentiment", &sentiment, "icon-url", &icon_url, "link", &link, NULL);
-
-    signal = dbus_message_new_signal(HIPPO_DBUS_MUGSHOT_PATH,
-                                     HIPPO_DBUS_MUGSHOT_INTERFACE,
-                                     "WhereimChanged");
-    dbus_message_iter_init_append(signal, &iter);
-
-    append_strings_as_dict(&iter,
-                           "name", name,
-                           "sentiment", sentiment,
-                           "icon-url", icon_url,
-                           "link", link,
-                           NULL);
-    g_free(name);
-    g_free(sentiment);
-    g_free(icon_url);
-    g_free(link);
-    return signal;
-}
-
-DBusMessage*
 hippo_dbus_mugshot_signal_connection_changed(HippoDBus            *dbus)
 {
     DBusMessage *signal;
@@ -459,20 +300,6 @@
 }
 
 DBusMessage*
-hippo_dbus_mugshot_signal_entity_changed(HippoDBus            *dbus,
-                                         HippoEntity          *entity)
-{
-    DBusMessage *signal;
-    char *path;
-    path = get_entity_path(entity);
-    signal = dbus_message_new_signal(path,
-                                     HIPPO_DBUS_MUGSHOT_ENTITY_INTERFACE,
-                                     "Changed");
-    g_free(path);
-    return signal;
-}
-
-DBusMessage*
 hippo_dbus_mugshot_signal_pref_changed(HippoDBus            *dbus,
                                        const char           *key,
                                        gboolean              value)

Modified: dumbhippo/trunk/client/linux/src/hippo-dbus-mugshot.h
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-dbus-mugshot.h	2008-01-10 18:46:33 UTC (rev 7178)
+++ dumbhippo/trunk/client/linux/src/hippo-dbus-mugshot.h	2008-01-10 18:54:28 UTC (rev 7179)
@@ -58,25 +58,15 @@
 DBusMessage* hippo_dbus_handle_mugshot_get_connection_status(HippoDBus   *dbus,
                                                              DBusMessage  *message);
 
-DBusMessage* hippo_dbus_handle_mugshot_entity_message(HippoDBus   *dbus,
-                                                      DBusMessage  *message);
-
 DBusMessage* hippo_dbus_handle_mugshot_get_baseprops(HippoDBus       *dbus,
                                                      DBusMessage     *message);
 
-DBusMessage* hippo_dbus_handle_mugshot_get_whereim  (HippoDBus       *dbus,
-                                                     HippoConnection *xmpp_connection,
-                                                     DBusMessage     *message);
-
 DBusMessage* hippo_dbus_handle_mugshot_send_external_iq  (HippoDBus       *dbus,
                                                           DBusMessage     *message);
 
 DBusMessage* hippo_dbus_handle_mugshot_get_self 	(HippoDBus   *dbus,
              				                         DBusMessage  *message);   
                                                      
-DBusMessage* hippo_dbus_handle_mugshot_get_network	(HippoDBus   *dbus,
-             				                         DBusMessage  *message);                                                     
-
 DBusMessage* hippo_dbus_handle_mugshot_introspect   (HippoDBus       *dbus,
                                                      DBusMessage     *message);
 
@@ -85,17 +75,10 @@
 
 DBusMessage* hippo_dbus_mugshot_signal_connection_changed       (HippoDBus            *dbus);
 
-DBusMessage* hippo_dbus_mugshot_signal_whereim_changed      (HippoDBus            *dbus,
-                                                             HippoConnection      *xmpp_connection,
-                                                             HippoExternalAccount *acct);
-
 DBusMessage* hippo_dbus_mugshot_signal_pref_changed         (HippoDBus            *dbus,
                                                              const char           *key,
                                                              gboolean              value);
                                                              
-DBusMessage* hippo_dbus_mugshot_signal_entity_changed       (HippoDBus            *dbus,
-                                                             HippoEntity          *entity);
-                                                             
 DBusMessage* hippo_dbus_mugshot_signal_external_iq_return (HippoDBus            *dbus,
                                                            guint                 id,
                                                            const char           *content);

Modified: dumbhippo/trunk/client/linux/src/hippo-dbus-server.c
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-dbus-server.c	2008-01-10 18:46:33 UTC (rev 7178)
+++ dumbhippo/trunk/client/linux/src/hippo-dbus-server.c	2008-01-10 18:54:28 UTC (rev 7179)
@@ -8,7 +8,6 @@
 #include <dbus/dbus-glib-lowlevel.h>
 #include "hippo-dbus-server.h"
 #include "hippo-dbus-client.h"
-#include "hippo-dbus-contacts.h"
 #include "hippo-dbus-cookies.h"
 #include "hippo-dbus-model.h"
 #include "hippo-dbus-mugshot.h"
@@ -406,8 +405,6 @@
      */
     hippo_dbus_try_acquire_online_prefs_manager(connection, FALSE);
     
-    hippo_dbus_init_contacts(connection, FALSE);
-
     hippo_dbus_init_local(connection);
     hippo_dbus_init_pidgin(connection);    
     hippo_dbus_init_model(connection);
@@ -1946,10 +1943,6 @@
             if (strcmp(member, "GetConnectionStatus") == 0) {
                 reply = hippo_dbus_handle_mugshot_get_connection_status(dbus, message);
             } else if (strcmp(member, "NotifyAllWhereim") == 0) {
-                reply = hippo_dbus_handle_mugshot_get_whereim(dbus, xmpp_connection, message);
-            } else if (strcmp(member, "GetNetwork") == 0) {
-                reply = hippo_dbus_handle_mugshot_get_network(dbus, message);
-            } else if (strcmp(member, "SendExternalIQ") == 0) {
                 reply = hippo_dbus_handle_mugshot_send_external_iq(dbus, message);                       
             } else if (strcmp(member, "GetBaseProperties") == 0) {
                 reply = hippo_dbus_handle_mugshot_get_baseprops(dbus, message);                   
@@ -1966,17 +1959,6 @@
                 dbus_connection_send(dbus->connection, reply, NULL);
                 dbus_message_unref(reply);
             }        
-        } else if (path && member &&
-                   g_str_has_prefix(path, HIPPO_DBUS_MUGSHOT_DATACACHE_PATH_PREFIX)) {
-            DBusMessage *reply;
-                               	
-            reply = hippo_dbus_handle_mugshot_entity_message(dbus, message);
-            
-            if (reply != NULL) {
-            	result = DBUS_HANDLER_RESULT_HANDLED;
-        	    dbus_connection_send(dbus->connection, reply, NULL);
-                dbus_message_unref(reply);
-            }
         }        
     } else if (type == DBUS_MESSAGE_TYPE_SIGNAL) {
         const char *sender = dbus_message_get_sender(message);
@@ -2125,27 +2107,6 @@
     }
 }
 
-void       
-hippo_dbus_notify_whereim_changed(HippoDBus               *dbus,
-                                  HippoConnection         *xmpp_connection,
-                                  HippoExternalAccount    *acct)
-{
-    DBusMessage *signal;
-    signal = hippo_dbus_mugshot_signal_whereim_changed(dbus, xmpp_connection, acct);
-    dbus_connection_send(dbus->connection, signal, NULL);
-    dbus_message_unref(signal);
-}
-
-void       
-hippo_dbus_notify_entity_changed(HippoDBus               *dbus,
-                                 HippoEntity             *entity)
-{
-    DBusMessage *signal;
-    signal = hippo_dbus_mugshot_signal_entity_changed(dbus, entity);
-    dbus_connection_send(dbus->connection, signal, NULL);
-    dbus_message_unref(signal);
-}
-
 void
 hippo_dbus_notify_pref_changed(HippoDBus   *dbus,
                                const char  *key,

Deleted: dumbhippo/trunk/client/linux/src/hippo-person-renderer.c
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-person-renderer.c	2008-01-10 18:46:33 UTC (rev 7178)
+++ dumbhippo/trunk/client/linux/src/hippo-person-renderer.c	2008-01-10 18:54:28 UTC (rev 7179)
@@ -1,517 +0,0 @@
-/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
-#include <config.h>
-#include "hippo-person-renderer.h"
-#include "main.h"
-#include <gtk/gtkcellrenderer.h>
-#include <string.h>
-
-static void      hippo_person_renderer_init                (HippoPersonRenderer       *renderer);
-static void      hippo_person_renderer_class_init          (HippoPersonRendererClass  *klass);
-
-static void      hippo_person_renderer_finalize            (GObject               *object);
-
-static void hippo_person_renderer_get_property (GObject              *object,
-                                                guint                 param_id,
-                                                GValue               *value,
-                                                GParamSpec           *pspec);
-static void hippo_person_renderer_set_property (GObject              *object,
-                                                guint                 param_id,
-                                                const GValue         *value,
-                                                GParamSpec           *pspec);
-static void hippo_person_renderer_get_size     (GtkCellRenderer      *cell,
-                                                GtkWidget            *widget,
-                                                GdkRectangle         *rectangle,
-                                                gint                 *x_offset,
-                                                gint                 *y_offset,
-                                                gint                 *width,
-                                                gint                 *height);
-static void hippo_person_renderer_render       (GtkCellRenderer      *cell,
-                                                GdkDrawable          *window,
-                                                GtkWidget            *widget,
-                                                GdkRectangle         *background_area,
-                                                GdkRectangle         *cell_area,
-                                                GdkRectangle         *expose_area,
-                                                GtkCellRendererState  flags);
-
-enum {
-	PROP_ZERO,
-	PROP_PERSON,
-	PROP_PHOTO
-};
-
-struct _HippoPersonRenderer {
-    GtkCellRenderer parent;
-    HippoPerson *person;
-    GdkPixbuf *photo;
-    PangoLayout *name_layout;
-    PangoLayout *song_layout;
-    PangoLayout *artist_layout;
-    GdkPixbuf *note_on;
-    GdkPixbuf *note_off;
-};
-
-struct _HippoPersonRendererClass {
-    GtkCellRendererClass parent_class;
-
-};
-
-G_DEFINE_TYPE(HippoPersonRenderer, hippo_person_renderer, GTK_TYPE_CELL_RENDERER);
-
-static void
-hippo_person_renderer_init(HippoPersonRenderer  *renderer)
-{
-}
-
-static void
-hippo_person_renderer_class_init(HippoPersonRendererClass  *klass)
-{
-    GObjectClass *object_class = G_OBJECT_CLASS(klass);
-    GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS(klass);
-
-    object_class->finalize = hippo_person_renderer_finalize;
-    
-    object_class->get_property = hippo_person_renderer_get_property;
-    object_class->set_property = hippo_person_renderer_set_property;
-
-    cell_class->get_size = hippo_person_renderer_get_size;
-    cell_class->render = hippo_person_renderer_render;
-
-    g_object_class_install_property(object_class,
-                				    PROP_PERSON,
-                                    g_param_spec_object("person",
-                             							_("Person Object"),
-                            							_("The person to render"),
-                            							HIPPO_TYPE_PERSON,
-                            							G_PARAM_READWRITE));
-                            							
-    g_object_class_install_property(object_class,
-                				    PROP_PHOTO,
-                                    g_param_spec_object("photo",
-                             							_("Photo pixbuf"),
-                            							_("The pixbuf to render for this person"),
-                                                        GDK_TYPE_PIXBUF,
-                            							G_PARAM_READWRITE));                            							
-}
-
-GtkCellRenderer*
-hippo_person_renderer_new(void)
-{
-    HippoPersonRenderer *renderer;
-    
-    renderer = g_object_new(HIPPO_TYPE_PERSON_RENDERER,
-                            NULL);
-    
-    return GTK_CELL_RENDERER(renderer);
-}
-
-static void
-nuke_caches(HippoPersonRenderer *renderer)
-{
-    if (renderer->name_layout) {
-        g_object_unref(renderer->name_layout);
-        renderer->name_layout = NULL;
-    }
-    if (renderer->song_layout) {
-        g_object_unref(renderer->song_layout);
-        renderer->song_layout = NULL;
-    }
-    if (renderer->artist_layout) {
-        g_object_unref(renderer->artist_layout);
-        renderer->artist_layout = NULL;
-    }
-}
-
-static void
-hippo_person_renderer_finalize(GObject *object)
-{
-    HippoPersonRenderer *renderer = HIPPO_PERSON_RENDERER(object);
-    
-    if (renderer->person) {
-        g_object_unref(renderer->person);
-        renderer->person = NULL;
-    }
-
-    if (renderer->photo) {
-        g_object_unref(renderer->photo);
-        renderer->photo = NULL;
-    }
-
-    nuke_caches(renderer);
-
-    if (renderer->note_on) {
-        g_object_unref(renderer->note_on);
-    }
-    if (renderer->note_off) {
-        g_object_unref(renderer->note_off);
-    }
-    
-    G_OBJECT_CLASS(hippo_person_renderer_parent_class)->finalize(object);
-}
-
-static void
-hippo_person_renderer_get_property(GObject              *object,
-                                   guint                 param_id,
-                                   GValue               *value,
-                                   GParamSpec           *pspec)
-{
-    HippoPersonRenderer *renderer;
-    
-    renderer = HIPPO_PERSON_RENDERER(object);
-
-    switch (param_id) {
-    case PROP_PERSON:
-        g_value_set_object(value, (GObject*) renderer->person);
-        break;
-    case PROP_PHOTO:
-        g_value_set_object(value, (GObject*) renderer->photo);
-        break;        
-    default:
-        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, param_id, pspec);
-        break;
-    }
-}
-                                   
-static void
-hippo_person_renderer_set_property(GObject              *object,
-                                   guint                 param_id,
-                                   const GValue         *value,
-                                   GParamSpec           *pspec)
-{
-    HippoPersonRenderer *renderer;
-    
-    renderer = HIPPO_PERSON_RENDERER(object);
-
-    switch (param_id) {
-    case PROP_PERSON:
-        {
-            HippoPerson *new_person;
-            new_person = (HippoPerson*) g_value_dup_object(value);
-            
-            if (new_person != renderer->person)
-                nuke_caches(renderer);
-            if (renderer->person)
-                g_object_unref(renderer->person);
-            renderer->person = new_person;
-        }
-        break;
-    case PROP_PHOTO:        
-        {
-            GdkPixbuf *new_pixbuf;
-            new_pixbuf = (GdkPixbuf*) g_value_dup_object(value);
-            
-            if (renderer->photo)
-                g_object_unref(renderer->photo);
-            renderer->photo = new_pixbuf;
-        }
-        break;
-    default:
-        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, param_id, pspec);
-        break;
-    }
-}
-
-static void
-make_layout(GtkWidget    *widget,
-            PangoLayout **layout_p,
-            const char   *value)
-{
-    if (value == NULL)
-        value = "";
-
-    if (*layout_p == NULL) {
-        *layout_p = gtk_widget_create_pango_layout(widget, value);
-    } else {
-        const char *old = pango_layout_get_text(*layout_p);
-        if (old && strcmp(old, value) == 0)
-            /* nothing */;
-        else
-            pango_layout_set_text(*layout_p, value, -1);
-    }
-}
-
-#define PHOTO_SIZE 60
-#define PHOTO_MARGIN_RIGHT 5
-#define NOTE_SIZE 16
-/* we truncate to this */
-#define TOTAL_WIDTH 140
-#define NAME_MARGIN_BOTTOM 5
-#define NOTE_MARGIN_RIGHT 3
-#define SONG_MARGIN_BOTTOM 3
-
-static void
-update_caches(HippoPersonRenderer *renderer,
-              GtkWidget           *widget)
-{
-    const char *name;
-    const char *song;
-    const char *artist;
-    GtkIconTheme *icon_theme;
-    GdkPixbuf *note_on;
-    GdkPixbuf *note_off;            
-    
-    if (renderer->person == NULL) {
-        name = NULL;
-        song = NULL;
-        artist = NULL;
-    } else {
-        /* some of these can return NULL */
-        name = hippo_entity_get_name(HIPPO_ENTITY(renderer->person));
-        song = hippo_person_get_current_song(renderer->person);
-        artist = hippo_person_get_current_artist(renderer->person);
-    }
-    
-    make_layout(widget, &renderer->name_layout, name);
-    /* FIXME better to omit the note and the space for music 
-     * entirely, but this keeps it from looking broken for now
-     */
-    if (song == NULL || *song == '\0')
-        song = _("No song");
-    make_layout(widget, &renderer->song_layout, song);
-    make_layout(widget, &renderer->artist_layout, artist);
-    
-    /* this strongly relies on the icon theme caching the pixbufs
-     * so it typically ends up as a no-op
-     */
-    icon_theme = gtk_icon_theme_get_for_screen(gtk_widget_get_screen(widget));
-    note_on = gtk_icon_theme_load_icon(icon_theme, "mugshot_note_on", NOTE_SIZE, 0, NULL);
-    note_off = gtk_icon_theme_load_icon(icon_theme, "mugshot_note_on", NOTE_SIZE, 0, NULL);
-    
-    if (note_on) {
-        if (renderer->note_on)
-            g_object_unref(renderer->note_on);
-        renderer->note_on = note_on;
-    }
-    if (note_off) {
-        if (renderer->note_off)
-            g_object_unref(renderer->note_off);
-        renderer->note_off = note_off;
-    }
-}
-
-static void
-compute_size(GtkCellRenderer      *cell,
-             GtkWidget            *widget,
-             GdkRectangle         *cell_area,
-             /* content rect relative to cell area */
-             GdkRectangle         *content_rect_p,
-             /* individual items relative to content_rect.x, content_rect.y */
-             GdkRectangle         *photo_rect_p,
-             GdkRectangle         *name_rect_p,
-             GdkRectangle         *song_rect_p,
-             GdkRectangle         *artist_rect_p,
-             GdkRectangle         *note_rect_p)
-{
-    HippoPersonRenderer *renderer;
-    PangoRectangle prect;
-    GdkRectangle content_rect;
-    GdkRectangle photo_rect;
-    GdkRectangle name_rect;
-    GdkRectangle song_rect;
-    GdkRectangle artist_rect;
-    GdkRectangle note_rect;
-    int padded_width;
-    int padded_height;
-    int photo_margin;
-
-    renderer = HIPPO_PERSON_RENDERER(cell);
-
-    update_caches(renderer, widget);
-
-    /* First get all the sizes, then compute positions */
-
-    if (renderer->photo) {
-        photo_rect.width = PHOTO_SIZE;
-        photo_rect.height = PHOTO_SIZE;
-        photo_margin = PHOTO_MARGIN_RIGHT;
-    } else {
-        photo_rect.width = 0;
-        photo_rect.height = 0;
-        photo_margin = 0;
-    }
-    
-    note_rect.width = NOTE_SIZE;
-    note_rect.height = NOTE_SIZE;
-
-    pango_layout_get_pixel_extents(renderer->name_layout, NULL, &prect);
-    name_rect.width = prect.width;
-    name_rect.height = prect.height;
-    
-    pango_layout_get_pixel_extents(renderer->song_layout, NULL, &prect);
-    song_rect.width = prect.width;
-    song_rect.height = prect.height;    
-
-    pango_layout_get_pixel_extents(renderer->artist_layout, NULL, &prect);
-    artist_rect.width = prect.width;
-    artist_rect.height = prect.height;    
-
-    /* now positions */
-
-    photo_rect.x = 0;
-    photo_rect.y = 0;
-    
-    name_rect.x = photo_rect.x + photo_rect.width + photo_margin;
-    name_rect.y = 0;
-    
-    note_rect.x = name_rect.x;
-    note_rect.y = name_rect.y + name_rect.height + NAME_MARGIN_BOTTOM;
-    
-    song_rect.x = note_rect.x + note_rect.y + NOTE_MARGIN_RIGHT;
-    song_rect.y = note_rect.y;
-    
-    artist_rect.x = song_rect.x;
-    artist_rect.y = song_rect.y + song_rect.height + SONG_MARGIN_BOTTOM;
-
-    /* Now compute content rect by union of all other rects, then 
-     * translate to be relative to the cell
-     */
-    content_rect.x = 0;
-    content_rect.y = 0;
-    content_rect.width = 0;
-    content_rect.height = 0;
-
-    gdk_rectangle_union(&content_rect, &photo_rect, &content_rect);    
-    gdk_rectangle_union(&content_rect, &name_rect, &content_rect);
-    gdk_rectangle_union(&content_rect, &note_rect, &content_rect);
-    gdk_rectangle_union(&content_rect, &song_rect, &content_rect);    
-    gdk_rectangle_union(&content_rect, &artist_rect, &content_rect);
-
-    if (photo_rect.height < content_rect.height) {
-        /* center photo rect vertically */
-        photo_rect.y = (content_rect.height - photo_rect.height) / 2;
-    }
-
-    padded_width  = (int) cell->xpad * 2 + content_rect.width;
-    padded_height = (int) cell->ypad * 2 + content_rect.height;
-
-    if (cell_area && content_rect.width > 0 && content_rect.height > 0) {
-        content_rect.x = (((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) ?
-                            1.0 - cell->xalign : cell->xalign) * 
-                            (cell_area->width - padded_width - cell->xpad * 2));
-        content_rect.x = MAX (content_rect.x, 0) + cell->xpad;
-
-        content_rect.y = (cell->yalign *
-                           (cell_area->height - padded_height - 2 * cell->ypad));
-        content_rect.y = MAX (content_rect.y, 0) + cell->ypad;
-    }
-    
-    content_rect.width = padded_width;
-    content_rect.height = padded_height;
-    
-#define OUT(what) do { if (what ## _p) { * what ## _p = what; }  } while(0)
-    OUT(content_rect);
-    OUT(photo_rect);
-    OUT(name_rect);
-    OUT(song_rect);
-    OUT(artist_rect);
-    OUT(note_rect);
-}
-
-static void
-hippo_person_renderer_get_size(GtkCellRenderer      *cell,
-                               GtkWidget            *widget,
-                               GdkRectangle         *cell_area,
-                               gint                 *x_offset_p,
-                               gint                 *y_offset_p,
-                               gint                 *width_p,
-                               gint                 *height_p)
-{
-    GdkRectangle content_rect;
-    
-    compute_size(cell, widget, cell_area, &content_rect, 
-                 NULL, NULL, NULL, NULL, NULL);
-    if (x_offset_p)                 
-        *x_offset_p = content_rect.x;
-    if (y_offset_p)
-        *y_offset_p = content_rect.y;
-    if (width_p)
-        *width_p = content_rect.width;
-    if (height_p)
-        *height_p = content_rect.height;
-}                               
-
-static void
-hippo_person_renderer_render(GtkCellRenderer      *cell,
-                             GdkDrawable          *window,
-                             GtkWidget            *widget,
-                             GdkRectangle         *background_area,
-                             GdkRectangle         *cell_area,
-                             GdkRectangle         *expose_area,
-                             GtkCellRendererState  flags)
-{
-    HippoPersonRenderer *renderer;
-    GdkRectangle content_rect;
-    GdkRectangle photo_rect;
-    GdkRectangle name_rect;
-    GdkRectangle song_rect;
-    GdkRectangle artist_rect;
-    GdkRectangle note_rect;    
-    GdkRectangle draw_rect;
-    GtkStateType state;
-    /* cairo_t *cr; */
-
-    renderer = HIPPO_PERSON_RENDERER(cell);
-
-    /* content_rect relative to cell area, others relative to content_rect */
-    compute_size(cell, widget, cell_area, &content_rect, &photo_rect,
-                 &name_rect, &song_rect, &artist_rect, &note_rect);
-               
-    /* move content_rect relative to the window */
-    content_rect.x += cell_area->x;
-    content_rect.y += cell_area->y;               
-                 
-    if (!gdk_rectangle_intersect (cell_area, &content_rect, &draw_rect) ||
-        !gdk_rectangle_intersect (expose_area, &draw_rect, &draw_rect))
-        return;
-
-    if ((flags & (GTK_CELL_RENDERER_SELECTED|GTK_CELL_RENDERER_PRELIT)) != 0) {
-        if ((flags & GTK_CELL_RENDERER_SELECTED) != 0) {
-            if (GTK_WIDGET_HAS_FOCUS (widget))
-        	    state = GTK_STATE_SELECTED;
-            else
-                state = GTK_STATE_ACTIVE;
-	    } else {
-           state = GTK_STATE_PRELIGHT;
-        }
-    } else {
-        state = GTK_STATE_NORMAL;
-    }
-
-    /* draw name */
-#define PAINT_LAYOUT(what) \
-    gtk_paint_layout(widget->style, window, state, TRUE, &draw_rect, widget, "hippopersonrenderer",   \
-                     content_rect.x + what##_rect.x,                                                   \
-                     content_rect.y + what##_rect.y,                                                   \
-                     renderer->what##_layout)
-    PAINT_LAYOUT(name);
-    PAINT_LAYOUT(song);
-    PAINT_LAYOUT(artist);
-        
-    /* draw photo */
-    if (renderer->photo) {
-        gdk_draw_pixbuf(window, widget->style->fg_gc[state], renderer->photo, 
-                        0, 0, content_rect.x + photo_rect.x, content_rect.y + photo_rect.y,
-                        -1, -1, GDK_RGB_DITHER_NORMAL, 0, 0);
-    }                        
-
-    /* draw note */
-    if (renderer->person) {
-        gboolean playing = hippo_person_get_music_playing(renderer->person);
-        GdkPixbuf *note;
-        if (playing)
-            note = renderer->note_on;
-        else
-            note = renderer->note_off;
-        if (note) {
-            gdk_draw_pixbuf(window, widget->style->fg_gc[state], note,
-                            0, 0, content_rect.x + note_rect.x, content_rect.y + note_rect.y,
-                            -1, -1, GDK_RGB_DITHER_NORMAL, 0, 0);
-        }
-    }
-
-    /*
-    cr = gdk_cairo_create(window);
-    gdk_cairo_rectangle (cr, &draw_rect);
-    cairo_fill(cr);
-    cairo_destroy (cr);
-    */
-}

Deleted: dumbhippo/trunk/client/linux/src/hippo-person-renderer.h
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-person-renderer.h	2008-01-10 18:46:33 UTC (rev 7178)
+++ dumbhippo/trunk/client/linux/src/hippo-person-renderer.h	2008-01-10 18:54:28 UTC (rev 7179)
@@ -1,26 +0,0 @@
-/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
-#ifndef __HIPPO_PERSON_RENDERER_H__
-#define __HIPPO_PERSON_RENDERER_H__
-
-#include <hippo/hippo-common.h>
-#include <gtk/gtkcellrenderer.h>
-
-G_BEGIN_DECLS
-
-typedef struct _HippoPersonRenderer      HippoPersonRenderer;
-typedef struct _HippoPersonRendererClass HippoPersonRendererClass;
-
-#define HIPPO_TYPE_PERSON_RENDERER              (hippo_person_renderer_get_type ())
-#define HIPPO_PERSON_RENDERER(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), HIPPO_TYPE_PERSON_RENDERER, HippoPersonRenderer))
-#define HIPPO_PERSON_RENDERER_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), HIPPO_TYPE_PERSON_RENDERER, HippoPersonRendererClass))
-#define HIPPO_IS_PERSON_RENDERER(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), HIPPO_TYPE_PERSON_RENDERER))
-#define HIPPO_IS_PERSON_RENDERER_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), HIPPO_TYPE_PERSON_RENDERER))
-#define HIPPO_PERSON_RENDERER_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), HIPPO_TYPE_PERSON_RENDERER, HippoPersonRendererClass))
-
-GType          	     hippo_person_renderer_get_type               (void) G_GNUC_CONST;
-
-GtkCellRenderer*     hippo_person_renderer_new                (void);
-
-G_END_DECLS
-
-#endif /* __HIPPO_PERSON_RENDERER_H__ */

Modified: dumbhippo/trunk/client/linux/src/hippo-status-icon.c
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-status-icon.c	2008-01-10 18:46:33 UTC (rev 7178)
+++ dumbhippo/trunk/client/linux/src/hippo-status-icon.c	2008-01-10 18:54:28 UTC (rev 7179)
@@ -5,11 +5,6 @@
 #include "main.h"
 #include <hippo/hippo-stack-manager.h>
 
-typedef struct {
-    const HippoHotness hotness;
-    const char *icon_name;
-} HotnessIcon;
-
 static void      hippo_status_icon_init                (HippoStatusIcon       *icon);
 static void      hippo_status_icon_class_init          (HippoStatusIconClass  *klass);
 

Modified: dumbhippo/trunk/client/linux/src/main.c
===================================================================
--- dumbhippo/trunk/client/linux/src/main.c	2008-01-10 18:46:33 UTC (rev 7178)
+++ dumbhippo/trunk/client/linux/src/main.c	2008-01-10 18:54:28 UTC (rev 7179)
@@ -595,15 +595,6 @@
 }
 
 static void
-on_contacts_loaded(HippoConnection *connection,
-                   void            *data)
-{
-    HippoApp *app = data;
-
-    hippo_dbus_notify_contacts_loaded(app->dbus);
-}
-
-static void
 on_pref_changed(HippoConnection *connection,
                 const char      *key,
                 gboolean         value,
@@ -615,15 +606,6 @@
 }
 
 static void
-on_whereim_changed(HippoConnection            *connection,
-                   HippoExternalAccount       *acct,
-                   void                       *data)
-{
-    HippoApp *app = data;
-    hippo_dbus_notify_whereim_changed(app->dbus, app->connection, acct);
-}
-
-static void
 on_external_iq_return(HippoConnection      *connection,
                       guint                 id,
                       const char           *content,
@@ -634,19 +616,6 @@
     hippo_dbus_notify_external_iq_return(app->dbus, id, content);
 }
 
-static void
-on_entity_changed(HippoEntity *entity, HippoApp *app)
-{
-	hippo_dbus_notify_entity_changed(app->dbus, entity);	
-}
-
-static void
-on_entity_added(HippoDataCache *cache, HippoEntity *entity, HippoApp *app)
-{
-    g_signal_connect(G_OBJECT(entity), "changed",
-                     G_CALLBACK(on_entity_changed), app);	
-}
-
 static HippoApp*
 hippo_app_new(HippoInstanceType  instance_type,
               HippoPlatform     *platform,
@@ -678,9 +647,6 @@
 
     /*** If you add handlers here, disconnect them in hipp_app_free() ***/
     
-    g_signal_connect(G_OBJECT(app->cache), "entity-added",
-                     G_CALLBACK(on_entity_added), app);
-    
     g_signal_connect(G_OBJECT(app->connection), "client-info-available", 
                      G_CALLBACK(on_client_info_available), app);
     g_signal_connect(G_OBJECT(app->connection), "auth-failed",
@@ -691,14 +657,10 @@
                      G_CALLBACK(on_connected_changed), app);
     g_signal_connect(G_OBJECT(app->connection), "initial-application-burst",
                      G_CALLBACK(on_initial_application_burst), app);
-    g_signal_connect(G_OBJECT(app->connection), "contacts-loaded", 
-                     G_CALLBACK(on_contacts_loaded), app);
     g_signal_connect(G_OBJECT(app->connection), "pref-changed", 
                      G_CALLBACK(on_pref_changed), app);   
                      
     /* Hook up D-BUS reflectors */
-    g_signal_connect(G_OBJECT(app->connection), "whereim-changed",
-                     G_CALLBACK(on_whereim_changed), app);      
     g_signal_connect(G_OBJECT(app->connection), "external-iq-return",
                      G_CALLBACK(on_external_iq_return), app);
     
@@ -735,9 +697,6 @@
     g_signal_handlers_disconnect_by_func(G_OBJECT(app->dbus),
                                          G_CALLBACK(on_dbus_song_changed), app);
     
-    g_signal_handlers_disconnect_by_func(G_OBJECT(app->cache),
-                                         G_CALLBACK(on_entity_added), app);
-    
     g_signal_handlers_disconnect_by_func(G_OBJECT(app->connection),
                                          G_CALLBACK(on_client_info_available), app);
     g_signal_handlers_disconnect_by_func(G_OBJECT(app->connection),
@@ -749,10 +708,6 @@
     g_signal_handlers_disconnect_by_func(G_OBJECT(app->connection),
                                          G_CALLBACK(on_initial_application_burst), app);
     g_signal_handlers_disconnect_by_func(G_OBJECT(app->connection),
-                                         G_CALLBACK(on_contacts_loaded), app);
-    g_signal_handlers_disconnect_by_func(G_OBJECT(app->connection),
-                                         G_CALLBACK(on_whereim_changed), app);
-    g_signal_handlers_disconnect_by_func(G_OBJECT(app->connection),
                                          G_CALLBACK(on_external_iq_return), app);
 
     if (app->upgrade_dialog)
@@ -771,18 +726,6 @@
     g_free(app);
 }
 
-static gboolean
-show_debug_share_timeout(void *data)
-{
-    HippoApp *app = data;
-    
-    g_debug("Adding debug share data");
-    
-    hippo_data_cache_add_debug_data(app->cache);
-    /* remove timeout */
-    return FALSE;
-}
-
 /* 
  * Singleton HippoApp and main()
  */
@@ -920,11 +863,6 @@
     /* enable stacker UI */
     hippo_app_set_show_stacker(the_app, TRUE);
     
-    if (options.initial_debug_share) {
-        /* timeout removes itself */
-        g_timeout_add(1000, show_debug_share_timeout, the_app);
-    }
-    
     hippo_options_free_fields(&options);
 
     g_main_loop_run(the_app->loop);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]