pidgin/pidgin

Merged default branch
gtkdoc-conversion
2014-02-02, Ankit Vani
a4d13be287e0
Merged default branch
--- a/libpurple/http.c Sun Feb 02 06:27:23 2014 +0530
+++ b/libpurple/http.c Sun Feb 02 06:30:14 2014 +0530
@@ -305,13 +305,14 @@
g_match_info_free(match_info);
return 0;
}
- g_match_info_free(match_info);
d_date = g_match_info_fetch(match_info, 1);
d_month = g_match_info_fetch(match_info, 2);
d_year = g_match_info_fetch(match_info, 3);
d_time = g_match_info_fetch(match_info, 4);
+ g_match_info_free(match_info);
+
month = 0;
while (months[month] != NULL)
{
--- a/pidgin/gtksmiley.c Sun Feb 02 06:27:23 2014 +0530
+++ b/pidgin/gtksmiley.c Sun Feb 02 06:30:14 2014 +0530
@@ -33,9 +33,9 @@
#include "notify.h"
#include "smiley.h"
-#include "gtkimhtml.h"
#include "gtksmiley.h"
#include "gtkutils.h"
+#include "gtkwebview.h"
#include "pidginstock.h"
#include "gtk3compat.h"
@@ -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));
}
static void
-shortcut_changed_cb(PurpleSmiley *smiley, gpointer dontcare, GtkIMHtmlSmiley *gtksmiley)
+shortcut_changed_cb(PurpleSmiley *smiley, gpointer dontcare,
+ GtkWebViewSmiley *gtksmiley)
{
+#if 0
g_free(gtksmiley->smile);
gtksmiley->smile = g_strdup(purple_smiley_get_shortcut(smiley));
+#else
+ purple_debug_fatal("gtksmiley", "shortcut_changed_cb not implemented");
+#endif
}
static void
-image_changed_cb(PurpleSmiley *smiley, gpointer dontcare, GtkIMHtmlSmiley *gtksmiley)
+image_changed_cb(PurpleSmiley *smiley, gpointer dontcare,
+ GtkWebViewSmiley *gtksmiley)
{
+#if 0
const char *file;
g_free(gtksmiley->file);
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);
+#else
+ purple_debug_fatal("gtksmiley", "image_changed_cb not implemented");
+#endif
}
-static GtkIMHtmlSmiley *smiley_purple_to_gtkimhtml(PurpleSmiley *smiley)
+static GtkWebViewSmiley *smiley_purple_to_gtkimhtml(PurpleSmiley *smiley)
{
- GtkIMHtmlSmiley *gtksmiley;
+ GtkWebViewSmiley *gtksmiley;
gchar *filename;
const gchar *file;
@@ -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);
g_free(filename);
- /* Make sure the shortcut for the GtkIMHtmlSmiley is updated with the PurpleSmiley */
+ /* Make sure the shortcut for the GtkWebViewSmiley is updated with
+ * the PurpleSmiley */
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)
{
GSList *list = NULL;
- GtkIMHtmlSmiley *gtksmiley;
+ GtkWebViewSmiley *gtksmiley;
if (gtk_smileys == NULL)
return;
@@ -153,12 +166,15 @@
list = gtk_smileys;
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)))
+ {
continue;
+ }
- 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);
break;
@@ -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)
{
GSList *list;
- GtkIMHtmlSmiley *gtksmiley;
+ GtkWebViewSmiley *gtksmiley;
list = gtk_smileys;
@@ -205,8 +221,8 @@
return;
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);
}
gtk_smileys = NULL;
--- a/pidgin/gtksmiley.h Sun Feb 02 06:27:23 2014 +0530
+++ b/pidgin/gtksmiley.h Sun Feb 02 06:30:14 2014 +0530
@@ -34,7 +34,7 @@
G_BEGIN_DECLS
/**
- * 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
* in pidgin
*
* @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
*
* @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
*
* Returns: (transfer none): A GtkIMHmlSmiley list
*/
--- a/pidgin/smileyparser.c Sun Feb 02 06:27:23 2014 +0530
+++ b/pidgin/smileyparser.c Sun Feb 02 06:30:14 2014 +0530
@@ -157,7 +157,9 @@
}
for (list = current_smiley_theme->list; list; list = list->next) {
- if (g_str_equal(list->sml, proto_name)) {
+ if (g_str_equal(list->sml, "default") ||
+ g_str_equal(list->sml, proto_name))
+ {
temp2 = parse_for_smiley_list(temp, list->files);
g_free(temp);
temp = temp2;