pidgin/purple-plugin-pack

merge of '7e1460fcc25ffc569e2f2310b62391ed9fe06418'
org.guifications.plugins
2007-06-29, sadrul
99be26a2cbb6
merge of '7e1460fcc25ffc569e2f2310b62391ed9fe06418'
and 'a28a81f1e5012c3201522c300ca2c09f24254ed5'
--- a/AUTHORS Sun Jun 24 19:38:05 2007 -0400
+++ b/AUTHORS Fri Jun 29 17:04:37 2007 -0400
@@ -29,6 +29,7 @@
Jérôme Poulin (TiCPU)
Lee Roach
Ryan Seeber
+Ankit Singla
Anthony Sofocleous
William Thompson
Chris Weyl
--- a/ChangeLog Sun Jun 24 19:38:05 2007 -0400
+++ b/ChangeLog Fri Jun 29 17:04:37 2007 -0400
@@ -5,13 +5,16 @@
list window. Resolves a number of Pidgin bug reports
* Listhandler now supports alias-only list exports and imports (rseeber)
* Listhandler now exports buddy notes created with the buddynote plugin
- but importing does not yet work
+ but importing does not yet work for AIM and ICQ accounts.
* Added ignore plugin
* Added irc-more plugin
* Added highlight plugin
+ * Added incomplete convbadger plugin
* Added more humorous stuff to eight_ball (resiak)
+ * Added a stop subcommand in gRIM (rageboy04)
* Fixed build-by-default status for switchspell
- * Fix crash in album when using Pidgin 2.0.2 or newer
+ * Fixed crash in album when using Pidgin 2.0.2 or newer
+ * Fixed potential random crashes in irssi plugin
Version 1.0: 5/4/07
* Updated for Pidgin 2.0.0
--- a/album/album.c Sun Jun 24 19:38:05 2007 -0400
+++ b/album/album.c Fri Jun 29 17:04:37 2007 -0400
@@ -155,6 +155,9 @@
char *filename;
char *path;
char *dir;
+ gconstpointer icon_data;
+ size_t len;
+ FILE *file;
#ifndef _WIN32
int status;
@@ -178,10 +181,6 @@
if (status != EEXIST)
{
#endif
- gconstpointer icon_data;
- size_t len;
- FILE *file;
-
icon_data = purple_buddy_icon_get_data(icon, &len);
/* WRITE THE DATA */
--- a/gRIM/gRIM.c Sun Jun 24 19:38:05 2007 -0400
+++ b/gRIM/gRIM.c Fri Jun 29 17:04:37 2007 -0400
@@ -65,33 +65,33 @@
#define LYRICISTS "Kim Fuller and Doug Naylor"
const char *LYRICS[] = {
-"If you're in trouble he will save the day",
-"He's brave and he's fearless come what may",
-"Without him the mission would go astray",
-"",
-"He's Arnold, Arnold, Arnold Rimmer",
-"Without him life would be much grimmer",
-"He's handsome, trim and no-one slimmer",
-"He will never need a Zimmer",
-"",
-"Ask Arnold, Arnold, Arnold Rimmer",
-"More reliable than a garden trimmer",
-"He's never been mistaken for Yul Brynner",
-"He's not bald and his head doesn't glimmer",
-"",
-"Master of the wit and the repartee",
-"His command of space directives is uncanny",
-"How come he's such a genius? Don't ask me",
-"",
-"Ask Arnold, Arnold, Arnold Rimmer",
-"He's also a fantastic swimmer",
-"And if you play your cards right",
-"Then he just might come around for dinner",
-"",
-"He's Arnold, Arnold, Arnold Rimmer",
-"No rhymes left now apart from quimmer",
-"I hope they fade us out before we get to shlimmer",
-"Fade out you stupid brimmer",
+"If you're in trouble he will save the day",
+"He's brave and he's fearless come what may",
+"Without him the mission would go astray",
+"",
+"He's Arnold, Arnold, Arnold Rimmer",
+"Without him life would be much grimmer",
+"He's handsome, trim and no-one slimmer",
+"He will never need a Zimmer",
+"",
+"Ask Arnold, Arnold, Arnold Rimmer",
+"More reliable than a garden trimmer",
+"He's never been mistaken for Yul Brynner",
+"He's not bald and his head doesn't glimmer",
+"",
+"Master of the wit and the repartee",
+"His command of space directives is uncanny",
+"How come he's such a genius? Don't ask me",
+"",
+"Ask Arnold, Arnold, Arnold Rimmer",
+"He's also a fantastic swimmer",
+"And if you play your cards right",
+"Then he just might come around for dinner",
+"",
+"He's Arnold, Arnold, Arnold Rimmer",
+"No rhymes left now apart from quimmer",
+"I hope they fade us out before we get to shlimmer",
+"Fade out you stupid brimmer",
NULL
};
@@ -119,8 +119,7 @@
GtkIMHtml *imhtml = GTK_IMHTML(gtkconv->entry);
GList *list;
- if (data->info->lyric == NULL)
- {
+ if (data->info->lyric == NULL) {
/* XXX: free the lyric if it was dyn-allocated */
g_free(data->info);
g_free(data);
@@ -131,8 +130,7 @@
list = data->info->lyric;
- if (list->next == NULL)
- {
+ if (list->next == NULL) {
/* Is this Ugly or is this UGLY? */
int len = strlen(list->data);
GdkColor gdkcolor;
@@ -140,17 +138,14 @@
char *s = list->data;
if (!gdk_color_parse(color, &gdkcolor))
- {
gdkcolor.red = gdkcolor.green = gdkcolor.blue = 0;
- }
inc_r = (255 - (gdkcolor.red >> 8))/len;
inc_g = (255 - (gdkcolor.green >> 8))/len;
inc_b = (255 - (gdkcolor.blue >> 8))/len;
msg = g_strdup("");
- while(*s)
- {
+ while(*s) {
char *temp = msg;
char t[2] = {*s++, 0};
char tag[16];
@@ -165,8 +160,7 @@
gdkcolor.green += inc_g << 8;
gdkcolor.blue += inc_b << 8;
}
- }
- else if (color)
+ } else if (color)
msg = g_strdup_printf("<font color=\"%s\">%s</font>", color, (char *)list->data);
else
msg = g_strdup(*(char*)list->data ? (char*)list->data : "&nbsp;");
@@ -199,8 +193,7 @@
if (!file) /* XXX: Show an error message that the file doesn't exist */
return NULL;
- while (fgets(str, MAX_LENGTH, file))
- {
+ while (fgets(str, MAX_LENGTH, file)) {
char *s = str + strlen(str) - 1;
if (*s == '\r' || *s == '\n')
*s = 0;
@@ -222,35 +215,41 @@
gint source;
/* XXX: Need to manually parse the arguments :-/ */
- if (*args && *(args+1))
- {
+ if (*args && *(args+1)) {
/* two parameters: filename duration (in seconds) */
info->lyric = rim_get_file_lines(*args);
sscanf(*(args+1), "%d", &info->time);
info->time *= 1000;
- }
- else if (*args)
- {
+ } else if (*args) {
/* one parameter: filename */
info->lyric = rim_get_file_lines(*args);
info->time = g_list_length(info->lyric) * 5000; /* at least 5 seconds between two lines */
- }
- else
- {
+ } else {
int i = 0;
GList *list = NULL;
- while (LYRICS[i])
- {
+
+ while (LYRICS[i]) {
list = g_list_append(list, g_strdup(LYRICS[i]));
i++;
}
+
info->lyric = list;
info->verse = TRUE;
info->time = 60000;
}
- if (info->lyric == NULL)
- {
+ if(*args && !g_ascii_strcasecmp(*args,"quit")) {
+ GList *list = NULL, *tmp = NULL;
+ tmp = info->lyric;
+ list = g_list_append(list, "Fine, I'll stop");
+ info->lyric = list;
+ info->verse = FALSE;
+ info->time = 5000;
+ g_list_free(tmp);
+ } else
+ purple_debug_info("grim","HINT: quit with quit\n");
+
+ if (info->lyric == NULL) {
g_free(info);
g_free(data);
return PURPLE_CMD_STATUS_FAILED;
--- a/listhandler/lh_util.c Sun Jun 24 19:38:05 2007 -0400
+++ b/listhandler/lh_util.c Fri Jun 29 17:04:37 2007 -0400
@@ -38,7 +38,7 @@
purple_account_add_buddy(account, purple_buddy);
if(buddynotes)
- purple_blist_node_set_string((PurpleBlistNode *)buddy, "notes", buddynotes);
+ purple_blist_node_set_string((PurpleBlistNode *)purple_buddy, "notes", buddynotes);
purple_debug_info("listhandler: import",
"group: %s\tbuddy: %s\talias: %s\thas been added to the list\n",