im.pidgin.pidgin.custom_smiley: d06694e5c9155025bde320aaa18406cfd2d1992e

sadrul at pidgin.im sadrul at pidgin.im
Sun Feb 24 22:05:44 EST 2008


-----------------------------------------------------------------
Revision: d06694e5c9155025bde320aaa18406cfd2d1992e
Ancestor: af57d48353ad4231d4059dfb8d5069c9e29dfcb7
Author: sadrul at pidgin.im
Date: 2008-02-25T02:43:06
Branch: im.pidgin.pidgin.custom_smiley
URL: http://d.pidgin.im/viewmtn/revision/info/d06694e5c9155025bde320aaa18406cfd2d1992e

Modified files:
        libpurple/smiley.c libpurple/smiley.h pidgin/gtksmiley.c

ChangeLog: 

Hide PurpleSmiley internals.

-------------- next part --------------
============================================================
--- libpurple/smiley.c	5f632e97a9e16bf49530e658b75edc86e917f34a
+++ libpurple/smiley.c	70c4fea21e6decb2eb7e814fe8974a6d10ca1f6c
@@ -36,6 +36,16 @@
 /* Main structures, members and constants                                 */
 /**************************************************************************/
 
+struct _PurpleSmiley
+{
+        PurpleStoredImage *img;        /**< The id of the stored image with the
+                                        the smiley data.        */
+        char *shortcut;                /**< Shortcut associated with the custom
+                                        smiley. This field will work as a
+                                        unique key by this API. */
+        char *checksum;                /**< The smiley checksum.        */
+};
+
 static GHashTable *smiley_data_index = NULL;
 static GHashTable *smiley_shortcut_index = NULL;
 static GHashTable *smiley_checksum_index = NULL;
============================================================
--- libpurple/smiley.h	1cbc22d49a09e1f51ef330a81b8da2cc1a32dc70
+++ libpurple/smiley.h	ad36015fe70a9abc38305aabf986d180de93c601
@@ -36,14 +36,7 @@
  * This contains everything Purple will ever need to know about a custom smiley.
  * Everything.
  */
-typedef struct _PurpleSmiley {
-        PurpleStoredImage *img;        /**< The id of the stored image with the
-                                        the smiley data.        */
-        char *shortcut;                /**< Shortcut associated with the custom
-                                        smiley. This field will work as a
-                                        unique key by this API. */
-        char *checksum;                /**< The smiley checksum.        */
-} PurpleSmiley;
+typedef struct _PurpleSmiley PurpleSmiley;
 
 #ifdef __cplusplus
 extern "C" {
============================================================
--- pidgin/gtksmiley.c	8d5eba22e44d86577fcd23e4b79bf2c94bfa8001
+++ pidgin/gtksmiley.c	53337cdf94e1e67ce4a9c1ed4c641ee161132e6d
@@ -86,12 +86,12 @@ static GtkIMHtmlSmiley *smiley_purple_to
 	gchar *filename;
 	const gchar *file;
 
-	file = purple_imgstore_get_filename(smiley->img);
+	file = purple_imgstore_get_filename(purple_smiley_get_stored_image(smiley));
 
 	filename = g_build_filename(purple_smileys_get_storing_dir(),file, NULL);
 
 	gtksmiley = g_new0(GtkIMHtmlSmiley,1);
-	gtksmiley->smile = g_strdup(smiley->shortcut);
+	gtksmiley->smile = g_strdup(purple_smiley_get_shortcut(smiley));
 	gtksmiley->hidden = FALSE;
 	gtksmiley->file = filename;
 	gtksmiley->flags = GTK_IMHTML_SMILEY_CUSTOM;
@@ -128,7 +128,7 @@ void pidgin_smiley_del_from_list(PurpleS
 	for (; list; list = list->next) {
 		gtksmiley = (GtkIMHtmlSmiley*)list->data;
 
-		if (strcmp(gtksmiley->smile, smiley->shortcut))
+		if (strcmp(gtksmiley->smile, purple_smiley_get_shortcut(smiley)))
 			continue;
 
 		destroy_gtksmiley(gtksmiley);
@@ -417,7 +417,7 @@ static void store_smiley_add(PurpleSmile
 
 	gtk_list_store_set(smiley_manager->model, &iter,
 			ICON, sized_smiley,
-			SHORTCUT, smiley->shortcut,
+			SHORTCUT, purple_smiley_get_shortcut(smiley),
 			DATA, NULL,
 			-1);
 


More information about the Commits mailing list