# HG changeset patch # User Sadrul Habib Chowdhury # Date 1203907386 0 # Node ID 2ab289f312d09317a035d6f0785f3474f4539aac # Parent 01e181575f2706f5837ddaa186c75bacaa68a301 Hide PurpleSmiley internals. diff -r 01e181575f27 -r 2ab289f312d0 libpurple/smiley.c --- a/libpurple/smiley.c Tue Feb 19 20:02:14 2008 +0000 +++ b/libpurple/smiley.c Mon Feb 25 02:43:06 2008 +0000 @@ -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; diff -r 01e181575f27 -r 2ab289f312d0 libpurple/smiley.h --- a/libpurple/smiley.h Tue Feb 19 20:02:14 2008 +0000 +++ b/libpurple/smiley.h Mon Feb 25 02:43:06 2008 +0000 @@ -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" { diff -r 01e181575f27 -r 2ab289f312d0 pidgin/gtksmiley.c --- a/pidgin/gtksmiley.c Tue Feb 19 20:02:14 2008 +0000 +++ b/pidgin/gtksmiley.c Mon Feb 25 02:43:06 2008 +0000 @@ -86,12 +86,12 @@ 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 @@ 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 @@ gtk_list_store_set(smiley_manager->model, &iter, ICON, sized_smiley, - SHORTCUT, smiley->shortcut, + SHORTCUT, purple_smiley_get_shortcut(smiley), DATA, NULL, -1);