r7191 - in dumbhippo/trunk/client/linux: . src
- From: commits mugshot org
- To: online-desktop-list gnome org
- Subject: r7191 - in dumbhippo/trunk/client/linux: . src
- Date: Fri, 11 Jan 2008 10:44:29 -0600 (CST)
Author: otaylor
Date: 2008-01-11 10:44:29 -0600 (Fri, 11 Jan 2008)
New Revision: 7191
Removed:
dumbhippo/trunk/client/linux/src/hippo-pixbuf-cache.c
dumbhippo/trunk/client/linux/src/hippo-pixbuf-cache.h
Modified:
dumbhippo/trunk/client/linux/Makefile-mugshot.am
dumbhippo/trunk/client/linux/src/hippo-ui.c
dumbhippo/trunk/client/linux/src/hippo-ui.h
dumbhippo/trunk/client/linux/src/main.c
dumbhippo/trunk/client/linux/src/main.h
Log:
Remove unused HippoPixbufCache
Modified: dumbhippo/trunk/client/linux/Makefile-mugshot.am
===================================================================
--- dumbhippo/trunk/client/linux/Makefile-mugshot.am 2008-01-11 16:32:20 UTC (rev 7190)
+++ dumbhippo/trunk/client/linux/Makefile-mugshot.am 2008-01-11 16:44:29 UTC (rev 7191)
@@ -58,8 +58,6 @@
src/hippo-idle.h \
src/hippo-im.c \
src/hippo-im.h \
- src/hippo-pixbuf-cache.c \
- src/hippo-pixbuf-cache.h \
src/hippo-platform-impl.c \
src/hippo-platform-impl.h \
src/hippo-ui.c \
Deleted: dumbhippo/trunk/client/linux/src/hippo-pixbuf-cache.c
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-pixbuf-cache.c 2008-01-11 16:32:20 UTC (rev 7190)
+++ dumbhippo/trunk/client/linux/src/hippo-pixbuf-cache.c 2008-01-11 16:44:29 UTC (rev 7191)
@@ -1,118 +0,0 @@
-/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
-#include <config.h>
-#include "main.h"
-#include "hippo-pixbuf-cache.h"
-#include <hippo/hippo-object-cache.h>
-#include <string.h>
-
-static void hippo_pixbuf_cache_init (HippoPixbufCache *cache);
-static void hippo_pixbuf_cache_class_init (HippoPixbufCacheClass *klass);
-
-static void hippo_pixbuf_cache_finalize (GObject *object);
-
-static GObject* hippo_pixbuf_cache_parse (HippoObjectCache *cache,
- const char *url,
- const char *content_type,
- GString *content,
- GError **error);
-
-struct _HippoPixbufCache {
- HippoObjectCache parent;
-};
-
-struct _HippoPixbufCacheClass {
- HippoObjectCacheClass parent_class;
-
-};
-
-G_DEFINE_TYPE(HippoPixbufCache, hippo_pixbuf_cache, HIPPO_TYPE_OBJECT_CACHE);
-
-static void
-hippo_pixbuf_cache_init(HippoPixbufCache *cache)
-{
-}
-
-static void
-hippo_pixbuf_cache_class_init(HippoPixbufCacheClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS(klass);
- HippoObjectCacheClass *cache_class = HIPPO_OBJECT_CACHE_CLASS(klass);
-
- object_class->finalize = hippo_pixbuf_cache_finalize;
-
- cache_class->parse = hippo_pixbuf_cache_parse;
-}
-
-HippoPixbufCache*
-hippo_pixbuf_cache_new(HippoPlatform *platform)
-{
- HippoPixbufCache *cache;
-
- cache = g_object_new(HIPPO_TYPE_PIXBUF_CACHE,
- "platform", platform,
- NULL);
-
- return cache;
-}
-
-static void
-hippo_pixbuf_cache_finalize(GObject *object)
-{
- /* HippoPixbufCache *cache = HIPPO_PIXBUF_CACHE(object); */
-
- G_OBJECT_CLASS(hippo_pixbuf_cache_parent_class)->finalize(object);
-}
-
-
-static GObject*
-hippo_pixbuf_cache_parse(HippoObjectCache *cache,
- const char *url,
- const char *content_type,
- GString *content,
- GError **error_p)
-{
- GdkPixbufLoader *loader;
- GdkPixbuf *pixbuf;
-
- loader = gdk_pixbuf_loader_new();
-
- if (!gdk_pixbuf_loader_write(loader, (guchar*) content->str, content->len, error_p))
- goto failed;
-
- if (!gdk_pixbuf_loader_close(loader, error_p))
- goto failed;
-
- pixbuf = gdk_pixbuf_loader_get_pixbuf(loader);
- if (pixbuf == NULL) {
- g_set_error(error_p,
- GDK_PIXBUF_ERROR,
- GDK_PIXBUF_ERROR_FAILED,
- _("Could not load pixbuf"));
- goto failed;
- }
-
- g_object_ref(pixbuf);
- g_object_unref(loader);
- return G_OBJECT(pixbuf);
-
- failed:
- g_assert(error_p == NULL || *error_p != NULL);
-
- if (loader)
- g_object_unref(loader);
-
- return NULL;
-}
-
-void
-hippo_pixbuf_cache_load(HippoPixbufCache *cache,
- const char *url,
- HippoPixbufCacheLoadFunc func,
- void *data)
-{
- /* g_debug("pixbuf load '%s'", url); */
- hippo_object_cache_load(HIPPO_OBJECT_CACHE(cache),
- url,
- (HippoObjectCacheLoadFunc) func,
- data);
-}
Deleted: dumbhippo/trunk/client/linux/src/hippo-pixbuf-cache.h
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-pixbuf-cache.h 2008-01-11 16:32:20 UTC (rev 7190)
+++ dumbhippo/trunk/client/linux/src/hippo-pixbuf-cache.h 2008-01-11 16:44:29 UTC (rev 7191)
@@ -1,36 +0,0 @@
-/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
-#ifndef __HIPPO_PIXBUF_CACHE_H__
-#define __HIPPO_PIXBUF_CACHE_H__
-
-#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <hippo/hippo-object-cache.h>
-
-G_BEGIN_DECLS
-
-/* pixbuf == NULL on error */
-typedef void (* HippoPixbufCacheLoadFunc) (GdkPixbuf *pixbuf,
- void *data);
-
-typedef struct _HippoPixbufCache HippoPixbufCache;
-typedef struct _HippoPixbufCacheClass HippoPixbufCacheClass;
-
-#define HIPPO_TYPE_PIXBUF_CACHE (hippo_pixbuf_cache_get_type ())
-#define HIPPO_PIXBUF_CACHE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), HIPPO_TYPE_PIXBUF_CACHE, HippoPixbufCache))
-#define HIPPO_PIXBUF_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), HIPPO_TYPE_PIXBUF_CACHE, HippoPixbufCacheClass))
-#define HIPPO_IS_PIXBUF_CACHE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), HIPPO_TYPE_PIXBUF_CACHE))
-#define HIPPO_IS_PIXBUF_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), HIPPO_TYPE_PIXBUF_CACHE))
-#define HIPPO_PIXBUF_CACHE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), HIPPO_TYPE_PIXBUF_CACHE, HippoPixbufCacheClass))
-
-GType hippo_pixbuf_cache_get_type (void) G_GNUC_CONST;
-
-HippoPixbufCache* hippo_pixbuf_cache_new (HippoPlatform *platform);
-
-/* callback is invoked synchronously if there's a cache hit */
-void hippo_pixbuf_cache_load (HippoPixbufCache *cache,
- const char *url,
- HippoPixbufCacheLoadFunc func,
- void *data);
-
-G_END_DECLS
-
-#endif /* __HIPPO_PIXBUF_CACHE_H__ */
Modified: dumbhippo/trunk/client/linux/src/hippo-ui.c
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-ui.c 2008-01-11 16:32:20 UTC (rev 7190)
+++ dumbhippo/trunk/client/linux/src/hippo-ui.c 2008-01-11 16:44:29 UTC (rev 7191)
@@ -21,7 +21,6 @@
HippoStatusIcon *icon;
GtkWidget *about_dialog;
- HippoPixbufCache *photo_cache;
};
static void
@@ -322,31 +321,6 @@
return summary_state;
}
-void
-hippo_ui_load_photo(HippoUI *ui,
- HippoEntity *entity,
- HippoPixbufCacheLoadFunc func,
- void *data)
-{
- const char *url;
-
- url = hippo_entity_get_photo_url(entity);
-
- g_debug("Loading photo for entity '%s' url '%s'",
- hippo_entity_get_guid(entity),
- url ? url : "null");
-
- if (url == NULL) {
- /* not gonna succeed in loading this... */
- (* func)(NULL, data);
- } else {
- char *absolute = hippo_connection_make_absolute_url(ui->connection,
- url);
- hippo_pixbuf_cache_load(ui->photo_cache, absolute, func, data);
- g_free(absolute);
- }
-}
-
/* This is copied from gdk_cairo_set_source_pixbuf()
* in GDK
*/
@@ -693,8 +667,6 @@
ui->dbus = dbus;
g_object_ref(ui->dbus);
- ui->photo_cache = hippo_pixbuf_cache_new(ui->platform);
-
ui->stack = hippo_stack_manager_new(ui->cache);
ui->icon = hippo_status_icon_new(ui->cache);
@@ -722,7 +694,6 @@
ui);
g_object_unref(ui->icon);
- g_object_unref(ui->photo_cache);
g_object_unref(ui->dbus);
g_object_unref(ui->cache);
g_free(ui);
Modified: dumbhippo/trunk/client/linux/src/hippo-ui.h
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-ui.h 2008-01-11 16:32:20 UTC (rev 7190)
+++ dumbhippo/trunk/client/linux/src/hippo-ui.h 2008-01-11 16:44:29 UTC (rev 7191)
@@ -29,10 +29,6 @@
const char *chat_id);
HippoWindowState hippo_ui_get_chat_state (HippoUI *ui,
const char *chat_id);
-void hippo_ui_load_photo (HippoUI *ui,
- HippoEntity *entity,
- HippoPixbufCacheLoadFunc func,
- void *data);
HippoStackManager* hippo_ui_get_stack_manager (HippoUI *ui);
G_END_DECLS
Modified: dumbhippo/trunk/client/linux/src/main.c
===================================================================
--- dumbhippo/trunk/client/linux/src/main.c 2008-01-11 16:32:20 UTC (rev 7190)
+++ dumbhippo/trunk/client/linux/src/main.c 2008-01-11 16:44:29 UTC (rev 7191)
@@ -183,15 +183,6 @@
}
void
-hippo_app_load_photo(HippoApp *app,
- HippoEntity *entity,
- HippoPixbufCacheLoadFunc func,
- void *data)
-{
- hippo_ui_load_photo(app->ui, entity, func, data);
-}
-
-void
hippo_app_get_screen_info(HippoApp *app,
HippoRectangle *monitor_rect_p,
HippoRectangle *tray_icon_rect_p,
Modified: dumbhippo/trunk/client/linux/src/main.h
===================================================================
--- dumbhippo/trunk/client/linux/src/main.h 2008-01-11 16:32:20 UTC (rev 7190)
+++ dumbhippo/trunk/client/linux/src/main.h 2008-01-11 16:44:29 UTC (rev 7191)
@@ -22,7 +22,6 @@
#include <gtk/gtkaboutdialog.h>
#include <gtk/gtkmessagedialog.h>
#include <glib/gi18n-lib.h>
-#include "hippo-pixbuf-cache.h"
G_BEGIN_DECLS
@@ -54,13 +53,6 @@
HippoWindowState hippo_app_get_chat_state (HippoApp *app,
const char *chat_id);
-/* use this only for user and group photos, caching is weird
- * if the cache for lots of image types interacts
- */
-void hippo_app_load_photo (HippoApp *app,
- HippoEntity *entity,
- HippoPixbufCacheLoadFunc func,
- void *data);
void hippo_app_get_screen_info (HippoApp *app,
HippoRectangle *monitor_rect_p,
HippoRectangle *tray_icon_rect_p,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]