/pidgin/main: d6fe2c2ebbbe: imgstore: remove from headers
Tomasz Wasilczyk
twasilczyk at pidgin.im
Thu Apr 10 17:41:46 EDT 2014
Changeset: d6fe2c2ebbbeb6a5d2113485de103eb4b1c45e56
Author: Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date: 2014-04-10 23:41 +0200
Branch: default
URL: https://hg.pidgin.im/pidgin/main/rev/d6fe2c2ebbbe
Description:
imgstore: remove from headers
diffstat:
pidgin/gtkaccount.c | 2 ++
pidgin/gtkblist.c | 2 ++
pidgin/gtkstatusbox.c | 6 +++---
pidgin/gtkstatusbox.h | 5 ++---
pidgin/gtkutils.c | 1 -
pidgin/gtkwebviewtoolbar.c | 12 ++++++------
6 files changed, 15 insertions(+), 13 deletions(-)
diffs (121 lines):
diff --git a/pidgin/gtkaccount.c b/pidgin/gtkaccount.c
--- a/pidgin/gtkaccount.c
+++ b/pidgin/gtkaccount.c
@@ -45,6 +45,8 @@
#include "gtk3compat.h"
+#include "imgstore.h" /* TODO: temp */
+
enum
{
COLUMN_ICON,
diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c
--- a/pidgin/gtkblist.c
+++ b/pidgin/gtkblist.c
@@ -67,6 +67,8 @@
#include "gtk3compat.h"
+#include "imgstore.h" /* TODO: temp */
+
typedef struct
{
PurpleAccount *account;
diff --git a/pidgin/gtkstatusbox.c b/pidgin/gtkstatusbox.c
--- a/pidgin/gtkstatusbox.c
+++ b/pidgin/gtkstatusbox.c
@@ -2326,12 +2326,12 @@ pidgin_status_box_redisplay_buddy_icon(P
}
void
-pidgin_status_box_set_buddy_icon(PidginStatusBox *status_box, PurpleStoredImage *img)
+pidgin_status_box_set_buddy_icon(PidginStatusBox *status_box, PurpleImage *img)
{
- purple_imgstore_unref(status_box->buddy_icon_img);
+ g_object_unref(status_box->buddy_icon_img);
status_box->buddy_icon_img = img;
if (status_box->buddy_icon_img != NULL)
- purple_imgstore_ref(status_box->buddy_icon_img);
+ g_object_ref(status_box->buddy_icon_img);
pidgin_status_box_redisplay_buddy_icon(status_box);
}
diff --git a/pidgin/gtkstatusbox.h b/pidgin/gtkstatusbox.h
--- a/pidgin/gtkstatusbox.h
+++ b/pidgin/gtkstatusbox.h
@@ -31,7 +31,6 @@
#include <gtk/gtk.h>
#include "gtkwebview.h"
#include "account.h"
-#include "imgstore.h"
#include "savedstatuses.h"
#include "status.h"
@@ -91,7 +90,7 @@ struct _PidginStatusBox
GtkWidget *vbox, *sw;
GtkWidget *webview;
- PurpleStoredImage *buddy_icon_img;
+ PurpleImage *buddy_icon_img;
GdkPixbuf *buddy_icon;
GdkPixbuf *buddy_icon_hover;
GtkWidget *buddy_icon_sel;
@@ -178,7 +177,7 @@ void
pidgin_status_box_pulse_connecting(PidginStatusBox *status_box);
void
-pidgin_status_box_set_buddy_icon(PidginStatusBox *status_box, PurpleStoredImage *img);
+pidgin_status_box_set_buddy_icon(PidginStatusBox *status_box, PurpleImage *img);
char *pidgin_status_box_get_message(PidginStatusBox *status_box);
diff --git a/pidgin/gtkutils.c b/pidgin/gtkutils.c
--- a/pidgin/gtkutils.c
+++ b/pidgin/gtkutils.c
@@ -42,7 +42,6 @@
#include "conversation.h"
#include "debug.h"
#include "desktopitem.h"
-#include "imgstore.h"
#include "notify.h"
#include "prefs.h"
#include "prpl.h"
diff --git a/pidgin/gtkwebviewtoolbar.c b/pidgin/gtkwebviewtoolbar.c
--- a/pidgin/gtkwebviewtoolbar.c
+++ b/pidgin/gtkwebviewtoolbar.c
@@ -22,7 +22,7 @@
#include "internal.h"
#include "pidgin.h"
-#include "imgstore.h"
+#include "image-store.h"
#include "notify.h"
#include "prefs.h"
#include "request.h"
@@ -703,20 +703,20 @@ static void
insert_smiley_text(GtkWidget *widget, PidginWebViewToolbar *toolbar)
{
PurpleSmiley *smiley;
- PurpleStoredImage *image;
- int image_id;
+ PurpleImage *image;
+ guint image_id;
gchar *escaped_smiley, *smiley_html;
const gchar *smiley_class;
smiley = g_object_get_data(G_OBJECT(widget), "smiley");
smiley_class = g_object_get_data(G_OBJECT(widget), "smiley-class");
image = purple_smiley_get_image(smiley);
- image_id = purple_imgstore_add_with_id(image);
+ image_id = purple_image_store_add(image);
escaped_smiley = g_markup_escape_text(
purple_smiley_get_shortcut(smiley), -1);
- smiley_html = g_strdup_printf("<img src=\"" PURPLE_STORED_IMAGE_PROTOCOL
- "%d\" class=\"emoticon %s-emoticon\" alt=\"%s\" title=\"%s\">",
+ smiley_html = g_strdup_printf("<img src=\"" PURPLE_IMAGE_STORE_PROTOCOL
+ "%u\" class=\"emoticon %s-emoticon\" alt=\"%s\" title=\"%s\">",
image_id, smiley_class, escaped_smiley, escaped_smiley);
g_free(escaped_smiley);
More information about the Commits
mailing list