changeset 16576:7c57d294d20b

merge of '1af12da31254c9d412a11024c839649754af3a58' and '7c72a955ea30d8fe36798d0a684e836a98622b10'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 28 Apr 2007 09:37:45 +0000
parents b24ca8721fa7 (diff) 7b692d5dd704 (current diff)
children 467698ab6bf0
files
diffstat 7 files changed, 98 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/buddyicon.c	Sat Apr 28 09:35:44 2007 +0000
+++ b/libpurple/buddyicon.c	Sat Apr 28 09:37:45 2007 +0000
@@ -948,7 +948,7 @@
 			}
 			else
 			{
-				PurpleAccount account = purple_buddy_get_account((PurpleBuddy *)node);
+				PurpleAccount *account = purple_buddy_get_account((PurpleBuddy *)node);
 				const char *prpl_id = purple_account_get_protocol_id(account);
 
 				if (!strcmp(prpl_id, "prpl-yahoo"))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libpurple/plugins/perl/scripts/function_list.pl	Sat Apr 28 09:37:45 2007 +0000
@@ -0,0 +1,69 @@
+$MODULE_NAME = "List all Purple:: (and Pidgin::) functions";
+use Purple;
+# Uncomment this to print the Pidgin:: functions as well.
+#use Pidgin;
+
+# All the information Purple gets about our nifty plugin
+%PLUGIN_INFO = (
+	perl_api_version => 2,
+	name             => "Perl: $MODULE_NAME",
+	version          => "0.1",
+	summary          => "Print to standard output all the functions under the Purple:: (and Pidgin::) packages",
+	description      => "Print to standard output all the functions under the Purple:: (and Pidgin::) packages",
+	author           => "Etan Reisner <deryni\@gmail.com>",
+	url              => "http://sourceforge.net/users/deryni9/",
+	id               => "functionlist",
+
+	load             => "plugin_load",
+	unload           => "plugin_unload"
+);
+
+sub plugin_init {
+	return %PLUGIN_INFO;
+}
+
+sub print_array {
+	my $array = shift;
+
+	my @arr = sort @$array;
+	foreach $mod (@arr) {
+		my @sub;
+
+		foreach $key (sort keys %{$mod}) {
+			if ($key =~ /::$/) {
+				push @sub, "$mod$key";
+			} else {
+				print "$mod$key\n";
+			}
+		}
+		print_array(\@sub);
+	}
+}
+
+sub plugin_load {
+	my $plugin = shift;
+	my @purplearray;
+	my @pidginarray;
+
+	foreach $key (sort keys %Purple::) {
+		if ($key =~ /::$/) {
+			push @purplearray, "Purple::$key";
+		} else {
+			print "Purple::$key\n";
+		}
+	}
+	print_array(\@purplearray);
+
+	foreach $key (sort keys %Pidgin::) {
+		if ($key =~ /::$/) {
+			push @pidginarray, "Pidgin::$key";
+		} else {
+			print "Pidgin::$key\n";
+		}
+	}
+	print_array(\@pidginarray);
+}
+
+sub plugin_unload {
+	my $plugin = shift;
+}
--- a/pidgin/gtkconv.c	Sat Apr 28 09:35:44 2007 +0000
+++ b/pidgin/gtkconv.c	Sat Apr 28 09:37:45 2007 +0000
@@ -3134,7 +3134,10 @@
 		gtk_widget_hide(gtkwin->menu.typing_icon);
 	}
 
-	if (!im || (purple_conv_im_get_typing_state(im) == PURPLE_NOT_TYPING)) {
+	if (im == NULL)
+		return;
+
+	if (purple_conv_im_get_typing_state(im) == PURPLE_NOT_TYPING) {
 		if (gtkconv->u.im->typing_timer != 0)
 			g_source_remove(gtkconv->u.im->typing_timer);
 		return;
--- a/pidgin/gtkutils.c	Sat Apr 28 09:35:44 2007 +0000
+++ b/pidgin/gtkutils.c	Sat Apr 28 09:37:45 2007 +0000
@@ -2860,16 +2860,16 @@
 				void *user_data,  ...)
 {
 	GtkWidget *vbox;
-        GtkWidget *hbox;
-        GtkWidget *hbox2;
-        GtkWidget *label;
-        GtkWidget *button;
-        GtkWidget *img = NULL;
+	GtkWidget *hbox;
+	GtkWidget *hbox2;
+	GtkWidget *label;
+	GtkWidget *button;
+	GtkWidget *img = NULL;
 	GtkSizeGroup *sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH);
 	char label_text[2048];
 	const char *button_text;
 	GCallback callback;
-	char *primary_esc, *secondary_esc;
+	char *primary_esc, *secondary_esc = NULL;
 	va_list args;
 	static gboolean first_call = TRUE;
 
@@ -2877,7 +2877,7 @@
 	gtk_misc_set_alignment(GTK_MISC(img), 0, 0);
 
 	vbox = gtk_vbox_new(FALSE,0);
-        gtk_container_set_border_width(GTK_CONTAINER(vbox), PIDGIN_HIG_BOX_SPACE);
+	gtk_container_set_border_width(GTK_CONTAINER(vbox), PIDGIN_HIG_BOX_SPACE);
 
 	g_object_set_data(G_OBJECT(vbox), "gc" ,gc);
 	minidialogs = g_slist_prepend(minidialogs, vbox);
@@ -2890,10 +2890,10 @@
 				    PURPLE_CALLBACK(connection_signed_off_cb), NULL);
 	}
 
-      	hbox = gtk_hbox_new(FALSE, 0);
-        gtk_container_add(GTK_CONTAINER(vbox), hbox);
-
-        if (img != NULL)
+	hbox = gtk_hbox_new(FALSE, 0);
+	gtk_container_add(GTK_CONTAINER(vbox), hbox);
+
+	if (img != NULL)
 		gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0);
 
 	primary_esc = g_markup_escape_text(primary, -1);
@@ -2902,14 +2902,15 @@
 		secondary_esc = g_markup_escape_text(secondary, -1);
 	g_snprintf(label_text, sizeof(label_text),
 		   "<span weight=\"bold\" size=\"smaller\">%s</span>%s<span size=\"smaller\">%s</span>",
-		   primary_esc, secondary ? "\n" : "", secondary?secondary_esc:"");
+		   primary_esc, secondary ? "\n" : "", secondary_esc ? secondary_esc : "");
 	g_free(primary_esc);
+	g_free(secondary_esc);
 	label = gtk_label_new(NULL);
 	gtk_widget_set_size_request(label, purple_prefs_get_int(PIDGIN_PREFS_ROOT "/blist/width")-25,-1);
 	gtk_label_set_markup(GTK_LABEL(label), label_text);
-        gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
-        gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
-        gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
+	gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
+	gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
+	gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
 
 	hbox2 = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
 	gtk_box_pack_start(GTK_BOX(vbox), hbox2, FALSE, FALSE, 0);
--- a/pidgin/pidginstock.c	Sat Apr 28 09:35:44 2007 +0000
+++ b/pidgin/pidginstock.c	Sat Apr 28 09:37:45 2007 +0000
@@ -237,7 +237,7 @@
 
 /* Altered from do_colorshift in gnome-panel */
 static void
-do_alphashift (GdkPixbuf *dest, GdkPixbuf *src, int shift)
+do_alphashift (GdkPixbuf *dest, GdkPixbuf *src)
 {
         gint i, j;
         gint width, height, has_alpha, srcrowstride, destrowstride;
@@ -245,7 +245,6 @@
         guchar *original_pixels;
         guchar *pixsrc;
         guchar *pixdest;
-        int val;
         guchar a;
 
         has_alpha = gdk_pixbuf_get_has_alpha (src);
@@ -267,8 +266,7 @@
                         *(pixdest++) = *(pixsrc++);
                         *(pixdest++) = *(pixsrc++);
                         a = *(pixsrc++);
-                        val = a - shift;
-                        *(pixdest++) = CLAMP(val, 0, 255);
+                        *(pixdest++) = a / 2;
                 }
         }
 }
@@ -286,7 +284,7 @@
 
 	filename = g_build_filename(DATADIR, "pixmaps", "pidgin", dir, size, file, NULL);
 	pixbuf = gdk_pixbuf_new_from_file(filename, NULL);
-	do_alphashift(pixbuf, pixbuf, 128);
+	do_alphashift(pixbuf, pixbuf);
 
 	source = gtk_icon_source_new();
         gtk_icon_source_set_pixbuf(source, pixbuf);
@@ -314,7 +312,7 @@
        if (rtl) {
 		filename = g_build_filename(DATADIR, "pixmaps", "pidgin", dir, size, "rtl", file, NULL);
  		pixbuf = gdk_pixbuf_new_from_file(filename, NULL);
-		do_alphashift(pixbuf, pixbuf, 128);
+		do_alphashift(pixbuf, pixbuf);
 		source = gtk_icon_source_new();
                 gtk_icon_source_set_pixbuf(source, pixbuf);
                 gtk_icon_source_set_direction(source, GTK_TEXT_DIR_RTL);
--- a/pidgin/plugins/Makefile.mingw	Sat Apr 28 09:35:44 2007 +0000
+++ b/pidgin/plugins/Makefile.mingw	Sat Apr 28 09:37:45 2007 +0000
@@ -58,13 +58,13 @@
 .PHONY: all clean plugins install
 
 all: plugins
-#	$(MAKE) -C $(GTKPERL_PLUGIN) -f $(MINGW_MAKEFILE)
+	$(MAKE) -C $(GTKPERL_PLUGIN) -f $(MINGW_MAKEFILE)
 	$(MAKE) -C $(TICKER_PLUGIN) -f $(MINGW_MAKEFILE)
 	$(MAKE) -C $(TRANSPARENCY_PLUGIN) -f $(MINGW_MAKEFILE)
 	$(MAKE) -C $(WINPREFS_PLUGIN) -f $(MINGW_MAKEFILE)
 
 install: all $(PIDGIN_INSTALL_PLUGINS_DIR)
-#	$(MAKE) -C $(GTKPERL_PLUGIN) -f $(MINGW_MAKEFILE) install
+	$(MAKE) -C $(GTKPERL_PLUGIN) -f $(MINGW_MAKEFILE) install
 	$(MAKE) -C $(TICKER_PLUGIN) -f $(MINGW_MAKEFILE) install
 	$(MAKE) -C $(TRANSPARENCY_PLUGIN) -f $(MINGW_MAKEFILE) install
 	$(MAKE) -C $(WINPREFS_PLUGIN) -f $(MINGW_MAKEFILE) install
--- a/pidgin/plugins/perl/common/Makefile.mingw	Sat Apr 28 09:35:44 2007 +0000
+++ b/pidgin/plugins/perl/common/Makefile.mingw	Sat Apr 28 09:37:45 2007 +0000
@@ -91,8 +91,8 @@
 
 install: all $(PURPLE_INSTALL_PERLMOD_DIR)/Purple.pm
 	rm -f $(PIDGIN_INSTALL_PERLMOD_DIR)/$(TARGET).dll $(PIDGIN_INSTALL_PERLMOD_DIR)/Pidgin/$(TARGET).pm
-	mkdir -p $(PIDGIN_INSTALL_PERLMOD_DIR)/Pidgin
-	cp $(TARGET).pm $(PIDGIN_INSTALL_PERLMOD_DIR)/Pidgin/
+	mkdir -p $(PIDGIN_INSTALL_PERLMOD_DIR)
+	cp $(TARGET).pm $(PIDGIN_INSTALL_PERLMOD_DIR)
 	cp $(TARGET).dll $(PIDGIN_INSTALL_PERLMOD_DIR)
 
 $(C_FILES): $(PIDGIN_CONFIG_H)