--- a/pidgin/gtksmiley.c Sun Feb 02 00:51:25 2014 +0100
+++ b/pidgin/gtksmiley.c Sun Feb 02 01:36:26 2014 +0100
@@ -33,9 +33,9 @@
@@ -88,38 +88,49 @@
/******************************************************************************
- * GtkIMHtmlSmileys stuff
+ * GtkWebViewSmileys stuff *****************************************************************************/
/* Perhaps these should be in gtkimhtml.c instead. -- sadrul */
-static void add_gtkimhtml_to_list(GtkIMHtmlSmiley *gtksmiley)
+static void add_gtkimhtml_to_list(GtkWebViewSmiley *gtksmiley) gtk_smileys = g_slist_prepend(gtk_smileys, gtksmiley);
- purple_debug_info("gtksmiley", "adding %s to gtk_smileys\n", gtksmiley->smile);
+ purple_debug_info("gtksmiley", "adding %s to gtk_smileys", + gtk_webview_smiley_get_smile(gtksmiley)); -shortcut_changed_cb(PurpleSmiley *smiley, gpointer dontcare, GtkIMHtmlSmiley *gtksmiley)
+shortcut_changed_cb(PurpleSmiley *smiley, gpointer dontcare, + GtkWebViewSmiley *gtksmiley) g_free(gtksmiley->smile);
gtksmiley->smile = g_strdup(purple_smiley_get_shortcut(smiley));
+ purple_debug_fatal("gtksmiley", "shortcut_changed_cb not implemented"); -image_changed_cb(PurpleSmiley *smiley, gpointer dontcare, GtkIMHtmlSmiley *gtksmiley)
+image_changed_cb(PurpleSmiley *smiley, gpointer dontcare, + GtkWebViewSmiley *gtksmiley) file = purple_imgstore_get_filename(purple_smiley_get_stored_image(smiley));
gtksmiley->file = g_build_filename(purple_smileys_get_storing_dir(), file, NULL);
- gtk_imhtml_smiley_reload(gtksmiley);
+ gtk_webview_smiley_reload(gtksmiley); + purple_debug_fatal("gtksmiley", "image_changed_cb not implemented"); -static GtkIMHtmlSmiley *smiley_purple_to_gtkimhtml(PurpleSmiley *smiley)
+static GtkWebViewSmiley *smiley_purple_to_gtkimhtml(PurpleSmiley *smiley) - GtkIMHtmlSmiley *gtksmiley;
+ GtkWebViewSmiley *gtksmiley; @@ -127,11 +138,13 @@
filename = g_build_filename(purple_smileys_get_storing_dir(), file, NULL);
- gtksmiley = gtk_imhtml_smiley_create(filename, purple_smiley_get_shortcut(smiley),
- FALSE, GTK_IMHTML_SMILEY_CUSTOM);
+ gtksmiley = gtk_webview_smiley_create(filename, + purple_smiley_get_shortcut(smiley), FALSE, + GTK_WEBVIEW_SMILEY_CUSTOM); - /* Make sure the shortcut for the GtkIMHtmlSmiley is updated with the PurpleSmiley */
+ /* Make sure the shortcut for the GtkWebViewSmiley is updated with g_signal_connect(G_OBJECT(smiley), "notify::shortcut",
G_CALLBACK(shortcut_changed_cb), gtksmiley);
@@ -145,7 +158,7 @@
void pidgin_smiley_del_from_list(PurpleSmiley *smiley)
- GtkIMHtmlSmiley *gtksmiley;
+ GtkWebViewSmiley *gtksmiley; @@ -153,12 +166,15 @@
for (; list; list = list->next) {
- gtksmiley = (GtkIMHtmlSmiley*)list->data;
+ gtksmiley = (GtkWebViewSmiley*)list->data; - if (strcmp(gtksmiley->smile, purple_smiley_get_shortcut(smiley)))
+ if (strcmp(gtk_webview_smiley_get_smile(gtksmiley), + purple_smiley_get_shortcut(smiley))) - gtk_imhtml_smiley_destroy(gtksmiley);
+ gtk_webview_smiley_destroy(gtksmiley); g_signal_handlers_disconnect_matched(G_OBJECT(smiley), G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, gtksmiley);
@@ -170,7 +186,7 @@
void pidgin_smiley_add_to_list(PurpleSmiley *smiley)
- GtkIMHtmlSmiley *gtksmiley;
+ GtkWebViewSmiley *gtksmiley; gtksmiley = smiley_purple_to_gtkimhtml(smiley);
add_gtkimhtml_to_list(gtksmiley);
@@ -197,7 +213,7 @@
void pidgin_smileys_uninit(void)
- GtkIMHtmlSmiley *gtksmiley;
+ GtkWebViewSmiley *gtksmiley; @@ -205,8 +221,8 @@
for (; list; list = g_slist_delete_link(list, list)) {
- gtksmiley = (GtkIMHtmlSmiley*)list->data;
- gtk_imhtml_smiley_destroy(gtksmiley);
+ gtksmiley = (GtkWebViewSmiley*)list->data; + gtk_webview_smiley_destroy(gtksmiley); --- a/pidgin/gtksmiley.h Sun Feb 02 00:51:25 2014 +0100
+++ b/pidgin/gtksmiley.h Sun Feb 02 01:36:26 2014 +0100
@@ -34,7 +34,7 @@
- * Add a PurpleSmiley to the GtkIMHtmlSmiley's list to be able to use it
+ * Add a PurpleSmiley to the GtkWebViewSmiley's list to be able to use it * @param smiley The smiley to be added.
@@ -42,24 +42,24 @@
void pidgin_smiley_add_to_list(PurpleSmiley *smiley);
- * Delete a PurpleSmiley from the GtkIMHtmlSmiley's list
+ * Delete a PurpleSmiley from the GtkWebViewSmiley's list * @param smiley The smiley to be deleted.
void pidgin_smiley_del_from_list(PurpleSmiley *smiley);
- * Load the GtkIMHtml list
+ * Load the GtkWebViewSmiley list void pidgin_smileys_init(void);
- * Uninit the GtkIMHtml list
+ * Uninit the GtkWebViewSmiley list void pidgin_smileys_uninit(void);
- * Returns a GSList with the GtkIMHtmlSmiley of each custom smiley
+ * Returns a GSList with the GtkWebViewSmiley of each custom smiley * @constreturn A GtkIMHmlSmiley list