changeset 27740:ae8a9f2866bd

propagate from branch 'im.pidgin.pidgin' (head 9c910ea3009780694450a04dc7a9227f6f8ca1eb) to branch 'im.pidgin.pidgin.yaz' (head 52d2d4e95d9d0c461c92882cf4c9806ba7fb01bc)
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Mon, 26 Nov 2007 07:49:34 +0000
parents b19dd24f2735 (current diff) 6018f0ba6aca (diff)
children 6befd211e707 e81d5493626c
files configure.ac libpurple/protocols/jabber/si.c
diffstat 14 files changed, 161 insertions(+), 83 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Sun Nov 25 08:25:36 2007 +0000
+++ b/configure.ac	Mon Nov 26 07:49:34 2007 +0000
@@ -46,8 +46,8 @@
 m4_define([purple_lt_current], [3])
 m4_define([purple_major_version], [2])
 m4_define([purple_minor_version], [3])
-m4_define([purple_micro_version], [0])
-m4_define([purple_version_suffix], [])
+m4_define([purple_micro_version], [1])
+m4_define([purple_version_suffix], [devel])
 m4_define([purple_version],
           [purple_major_version.purple_minor_version.purple_micro_version])
 m4_define([purple_display_version], purple_version[]m4_ifdef([purple_version_suffix],[purple_version_suffix]))
@@ -55,8 +55,8 @@
 m4_define([gnt_lt_current], [3])
 m4_define([gnt_major_version], [2])
 m4_define([gnt_minor_version], [3])
-m4_define([gnt_micro_version], [0])
-m4_define([gnt_version_suffix], [])
+m4_define([gnt_micro_version], [1])
+m4_define([gnt_version_suffix], [devel])
 m4_define([gnt_version],
           [gnt_major_version.gnt_minor_version.gnt_micro_version])
 m4_define([gnt_display_version], gnt_version[]m4_ifdef([gnt_version_suffix],[gnt_version_suffix]))
@@ -383,7 +383,7 @@
 		AC_MSG_ERROR([
 
 You must have the GTK+ 2.0 development headers installed to compile Pidgin.
-If you only want to build Finch then specify --disable-gtkui when running configure.
+If you want to build only Finch then specify --disable-gtkui when running configure.
 ])])
 
 	AC_SUBST(GTK_CFLAGS)
--- a/finch/gntconn.c	Sun Nov 25 08:25:36 2007 +0000
+++ b/finch/gntconn.c	Mon Nov 26 07:49:34 2007 +0000
@@ -152,6 +152,10 @@
 				purple_conv_chat_has_left(PURPLE_CONV_CHAT(conv)))
 			continue;
 		purple_conversation_set_data(conv, "want-to-rejoin", GINT_TO_POINTER(TRUE));
+		purple_conversation_write(conv, NULL, _("The account has disconnected and you are no "
+					"longer in this chat. You will be automatically rejoined in the chat when "
+					"the account reconnects."),
+				PURPLE_MESSAGE_SYSTEM, time(NULL));
 	}
 }
 
--- a/finch/libgnt/configure.ac	Sun Nov 25 08:25:36 2007 +0000
+++ b/finch/libgnt/configure.ac	Mon Nov 26 07:49:34 2007 +0000
@@ -27,8 +27,8 @@
 m4_define([gnt_lt_current], [3])
 m4_define([gnt_major_version], [2])
 m4_define([gnt_minor_version], [3])
-m4_define([gnt_micro_version], [0])
-m4_define([gnt_version_suffix], [])
+m4_define([gnt_micro_version], [1])
+m4_define([gnt_version_suffix], [devel])
 m4_define([gnt_version],
           [gnt_major_version.gnt_minor_version.gnt_micro_version])
 m4_define([gnt_display_version], gnt_version[]m4_ifdef([gnt_version_suffix],[gnt_version_suffix]))
--- a/finch/libgnt/gntbox.c	Sun Nov 25 08:25:36 2007 +0000
+++ b/finch/libgnt/gntbox.c	Mon Nov 26 07:49:34 2007 +0000
@@ -851,8 +851,14 @@
 
 void gnt_box_give_focus_to_child(GntBox *box, GntWidget *widget)
 {
-	GList *find = g_list_find(box->focus, widget);
-	gpointer now = box->active;
+	GList *find;
+	gpointer now;
+
+	while (GNT_WIDGET(box)->parent)
+		box = GNT_BOX(GNT_WIDGET(box)->parent);
+
+	find = g_list_find(box->focus, widget);
+	now = box->active;
 	if (find)
 		box->active = widget;
 	if (now && now != box->active)
--- a/finch/libgnt/gntmenu.c	Sun Nov 25 08:25:36 2007 +0000
+++ b/finch/libgnt/gntmenu.c	Mon Nov 26 07:49:34 2007 +0000
@@ -47,6 +47,8 @@
 static void (*org_size_request)(GntWidget *wid);
 static gboolean (*org_key_pressed)(GntWidget *w, const char *t);
 
+static void menuitem_activate(GntMenu *menu, GntMenuItem *item);
+
 static void
 menu_hide_all(GntMenu *menu)
 {
@@ -56,6 +58,20 @@
 }
 
 static void
+show_submenu(GntMenu *menu)
+{
+	GntMenuItem *item;
+
+	if (menu->type != GNT_MENU_TOPLEVEL)
+			return;
+
+	item = g_list_nth_data(menu->list, menu->selected);
+	if (!item || !item->submenu)
+		return;
+	menuitem_activate(menu, item);
+}
+
+static void
 gnt_menu_draw(GntWidget *widget)
 {
 	GntMenu *menu = GNT_MENU(widget);
@@ -276,6 +292,8 @@
 			gnt_widget_hide(widget);
 		} else
 			gnt_widget_hide(widget);
+		if (par && par->type == GNT_MENU_TOPLEVEL)
+			gnt_menu_key_pressed(GNT_WIDGET(par), text);
 		return TRUE;
 	}
 
@@ -297,6 +315,7 @@
 			GntMenu *sub = menu->submenu;
 			if (sub)
 				gnt_widget_hide(GNT_WIDGET(sub));
+			show_submenu(menu);
 			gnt_widget_draw(widget);
 			return TRUE;
 		}
--- a/libpurple/Makefile.am	Sun Nov 25 08:25:36 2007 +0000
+++ b/libpurple/Makefile.am	Mon Nov 26 07:49:34 2007 +0000
@@ -156,7 +156,7 @@
 
 dbus_exported = dbus-useful.h dbus-define-api.h account.h blist.h buddyicon.h \
                 connection.h conversation.h core.h ft.h log.h notify.h prefs.h roomlist.h \
-                savedstatuses.h status.h server.h util.h xmlnode.h
+                savedstatuses.h status.h server.h util.h xmlnode.h prpl.h
 
 purple_build_coreheaders = $(addprefix $(srcdir)/, $(purple_coreheaders)) \
 		$(purple_builtheaders)
--- a/libpurple/protocols/jabber/google.c	Sun Nov 25 08:25:36 2007 +0000
+++ b/libpurple/protocols/jabber/google.c	Mon Nov 26 07:49:34 2007 +0000
@@ -532,6 +532,6 @@
 
 char *jabber_google_presence_outgoing(PurpleStatus *tune)
 {
-	char *ret = g_strdup_printf("♫ %s", purple_status_get_attr_string(tune, PURPLE_TUNE_TITLE));
-	return ret;
+	const char *attr = purple_status_get_attr_string(tune, PURPLE_TUNE_TITLE);
+	return attr ? g_strdup_printf("♫ %s", attr) : g_strdup("");
 }
--- a/libpurple/protocols/jabber/libxmpp.c	Sun Nov 25 08:25:36 2007 +0000
+++ b/libpurple/protocols/jabber/libxmpp.c	Mon Nov 26 07:49:34 2007 +0000
@@ -219,33 +219,31 @@
 											   option);
 	
 	option = purple_account_option_bool_new(
-											_("Allow plaintext auth over unencrypted streams"),
-											"auth_plain_in_clear", FALSE);
+						_("Allow plaintext auth over unencrypted streams"),
+						"auth_plain_in_clear", FALSE);
 	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
-											   option);
-	
+						   option);
+
 	option = purple_account_option_int_new(_("Connect port"), "port", 5222);
 	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
-											   option);
-	
+						   option);
+
 	option = purple_account_option_string_new(_("Connect server"),
-											  "connect_server", NULL);
+						  "connect_server", NULL);
 	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
-											   option);
-	
-#if 0 /* TODO: Enable this when we're string unfrozen */
+						  option);
+
 	option = purple_account_option_string_new(_("File transfer proxies"),
 						  "ft_proxies",
 						/* TODO: Is this an acceptable default? */
 						  "proxy.jabber.org:7777");
 	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
 						  option);
-#endif
 
 	jabber_init_plugin(plugin);
-	
+
 	purple_prefs_remove("/plugins/prpl/jabber");
-	
+
 	/* XXX - If any other plugin wants SASL this won't be good ... */
 #ifdef HAVE_CYRUS_SASL
 #ifdef _WIN32
--- a/libpurple/protocols/jabber/presence.c	Sun Nov 25 08:25:36 2007 +0000
+++ b/libpurple/protocols/jabber/presence.c	Mon Nov 26 07:49:34 2007 +0000
@@ -99,8 +99,6 @@
 {
 	PurpleConnection *gc = NULL;
 	JabberStream *js = NULL;
-	gboolean disconnected;
-	int primitive;
 	xmlnode *presence, *x, *photo;
 	char *stripped = NULL;
 	JabberBuddyState state;
@@ -108,22 +106,26 @@
 	const char *artist = NULL, *title = NULL, *source = NULL, *uri = NULL, *track = NULL;
 	int length = -1;
 	gboolean allowBuzz;
-	PurplePresence *p = purple_account_get_presence(account);
+	PurplePresence *p;
 	PurpleStatus *tune;
 
+	if (purple_account_is_disconnected(account))
+		return;
+
+	p = purple_account_get_presence(account);
 	if (NULL == status) {
 		status = purple_presence_get_active_status(p);
 	}
 
-	if(!purple_status_is_active(status))
-		return;
-
-	disconnected = purple_account_is_disconnected(account);
-
-	if(disconnected)
-		return;
-
-	primitive = purple_status_type_get_primitive(purple_status_get_type(status));
+	if (purple_status_is_exclusive(status)) {
+		/* An exclusive status can't be deactivated. You should just
+		 * activate some other exclusive status. */
+		if (!purple_status_is_active(status))
+			return;
+	} else {
+		/* Work with the exclusive status. */
+		status = purple_presence_get_active_status(p);
+	}
 
 	gc = purple_account_get_connection(account);
 	js = gc->proto_data;
--- a/libpurple/protocols/jabber/si.c	Sun Nov 25 08:25:36 2007 +0000
+++ b/libpurple/protocols/jabber/si.c	Mon Nov 26 07:49:34 2007 +0000
@@ -782,6 +782,9 @@
 
 			g_snprintf(port, sizeof(port), "%hu", portnum);
 
+			if(g_list_find_custom(jsx->streamhosts, ft_proxy_list[i], jabber_si_compare_jid) != NULL)
+				continue;
+
 			streamhost = xmlnode_new_child(query, "streamhost");
 			xmlnode_set_attrib(streamhost, "jid", ft_proxy_list[i]);
 			xmlnode_set_attrib(streamhost, "host", ft_proxy_list[i]);
@@ -803,7 +806,10 @@
 
 		/* TODO: deal with zeroconf proxies */
 
-		if (!(sh->host && sh->port > 0))
+		if (!(sh->jid && sh->host && sh->port > 0))
+			continue;
+
+		if(g_list_find_custom(jsx->streamhosts, sh->jid, jabber_si_compare_jid) != NULL)
 			continue;
 
 		streamhost = xmlnode_new_child(query, "streamhost");
--- a/libpurple/prpl.c	Sun Nov 25 08:25:36 2007 +0000
+++ b/libpurple/prpl.c	Mon Nov 26 07:49:34 2007 +0000
@@ -258,8 +258,8 @@
 								PurpleStatus *old_status, PurpleStatus *new_status)
 {
 	g_return_if_fail(account    != NULL);
-	g_return_if_fail(old_status != NULL);
 	g_return_if_fail(new_status != NULL);
+	g_return_if_fail(!purple_status_is_exclusive(new_status) || old_status != NULL);
 
 	do_prpl_change_account_status(account, old_status, new_status);
 
--- a/libpurple/xmlnode.c	Sun Nov 25 08:25:36 2007 +0000
+++ b/libpurple/xmlnode.c	Mon Nov 26 07:49:34 2007 +0000
@@ -303,7 +303,7 @@
 
 const char *xmlnode_get_prefix(xmlnode *node)
 {
-	g_return_val_if_fail(node != NULL, NULL);                                   
+	g_return_val_if_fail(node != NULL, NULL);
 	return node->prefix;
 }
 
@@ -346,6 +346,9 @@
 	g_free(node->data);
 	g_free(node->xmlns);
 
+	if(node->namespace_map)
+		g_hash_table_destroy(node->namespace_map);
+
 	PURPLE_DBUS_UNREGISTER_POINTER(node);
 	g_free(node);
 }
--- a/pidgin/gtkblist.c	Sun Nov 25 08:25:36 2007 +0000
+++ b/pidgin/gtkblist.c	Mon Nov 26 07:49:34 2007 +0000
@@ -4230,7 +4230,7 @@
 {
 	PidginBuddyList *gtkblist = (PidginBuddyList *)user_data;
 	int errors = 0;
-	GList *list;
+	GList *list = NULL;
 	PidginBuddyListPrivate *priv;
 
 	priv = PIDGIN_BUDDY_LIST_GET_PRIVATE(gtkblist);
@@ -4243,8 +4243,7 @@
 		errors = g_list_length(GTK_NOTEBOOK(priv->error_scrollbook->notebook)->children);
 #endif
 	}
-	if ((list = purple_accounts_get_all_active()) != NULL || errors ||
-	    (list = gtk_container_get_children(GTK_CONTAINER(priv->error_scrollbook)))) {
+	if ((list = purple_accounts_get_all_active()) != NULL || errors) {
 		gtk_notebook_set_current_page(GTK_NOTEBOOK(gtkblist->notebook), 1);
 		g_list_free(list);
 	} else
@@ -4491,6 +4490,7 @@
                          PurpleAccount *account)
 {
 	g_hash_table_remove(gtkblist->connection_errors, account);
+	purple_account_clear_current_error(account);
 }
 
 #define SSL_FAQ_URI "http://d.pidgin.im/wiki/FAQssl"
@@ -4511,7 +4511,7 @@
 	gboolean enabled =
 		purple_account_get_enabled(account, purple_core_get_ui());
 	char *primary;
-	
+
 	if (enabled)
 		primary = g_strdup_printf(_("%s disconnected"), username);
 	else
--- a/pidgin/gtkscrollbook.c	Sun Nov 25 08:25:36 2007 +0000
+++ b/pidgin/gtkscrollbook.c	Mon Nov 26 07:49:34 2007 +0000
@@ -1,5 +1,5 @@
 /*
- * @file gtkscrollbook.c GTK+ Scrolling notebook widget 
+ * @file gtkscrollbook.c GTK+ Scrolling notebook widget
  * @ingroup pidgin
  */
 
@@ -29,9 +29,9 @@
 
 static void pidgin_scroll_book_init (PidginScrollBook *scroll_book);
 static void pidgin_scroll_book_class_init (PidginScrollBookClass *klass);
-static void pidgin_scroll_book_forall (GtkContainer *c, 
+static void pidgin_scroll_book_forall (GtkContainer *c,
 					 gboolean include_internals,
-			 		 GtkCallback callback,
+					 GtkCallback callback,
 					 gpointer user_data);
 
 GType
@@ -83,8 +83,8 @@
 	count = gtk_notebook_get_n_pages(GTK_NOTEBOOK(scroll_book->notebook));
 #else
 	count = g_list_length(GTK_NOTEBOOK(scroll_book->notebook)->children);
-#endif	
-	
+#endif
+
 	if (index + 1 < count)
 		gtk_notebook_set_current_page(GTK_NOTEBOOK(scroll_book->notebook), index + 1);
 }
@@ -93,24 +93,30 @@
 refresh_scroll_box(PidginScrollBook *scroll_book, int index, int count)
 {
 	char *label;
+
 	gtk_widget_show_all(GTK_WIDGET(scroll_book));
-	if (count <= 1)
-		gtk_widget_hide(GTK_WIDGET(scroll_book->hbox));
-	else
-		gtk_widget_show_all(GTK_WIDGET(scroll_book->hbox));
-		
-	
+	if (count < 1)
+		gtk_widget_hide_all(scroll_book->hbox);
+	else {
+		gtk_widget_show_all(scroll_book->hbox);
+		if (count == 1) {
+			gtk_widget_hide(scroll_book->label);
+			gtk_widget_hide(scroll_book->left_arrow);
+			gtk_widget_hide(scroll_book->right_arrow);
+		}
+	}
+
 	label = g_strdup_printf("<span size='smaller' weight='bold'>(%d/%d)</span>", index+1, count);
 	gtk_label_set_markup(GTK_LABEL(scroll_book->label), label);
-	g_free(label);				      
+	g_free(label);
 
 	if (index == 0)
 		gtk_widget_set_sensitive(scroll_book->left_arrow, FALSE);
 	else
 		gtk_widget_set_sensitive(scroll_book->left_arrow, TRUE);
 
-	
-	if (index +1== count)
+
+	if (index + 1 == count)
 		gtk_widget_set_sensitive(scroll_book->right_arrow, FALSE);
 	else
 		gtk_widget_set_sensitive(scroll_book->right_arrow, TRUE);
@@ -128,7 +134,12 @@
 	count = g_list_length(GTK_NOTEBOOK(scroll_book->notebook)->children);
 #endif
 	refresh_scroll_box(scroll_book, index, count);
-	
+}
+
+static void
+scroll_close_cb(PidginScrollBook *scroll_book)
+{
+	gtk_widget_destroy(gtk_notebook_get_nth_page(GTK_NOTEBOOK(scroll_book->notebook), gtk_notebook_get_current_page(GTK_NOTEBOOK(scroll_book->notebook))));
 }
 
 static void
@@ -146,17 +157,15 @@
 static void
 pidgin_scroll_book_add(GtkContainer *container, GtkWidget *widget)
 {
-	GList *children;
 	PidginScrollBook *scroll_book;
 
 	g_return_if_fail(GTK_IS_WIDGET (widget));
 	g_return_if_fail (widget->parent == NULL);
 
 	scroll_book = PIDGIN_SCROLL_BOOK(container);
-	children = scroll_book->children;
-	children = g_list_append(children, widget);
+	scroll_book->children = g_list_append(scroll_book->children, widget);
 	gtk_widget_show(widget);
-	gtk_notebook_append_page(GTK_NOTEBOOK(PIDGIN_SCROLL_BOOK(container)->notebook), widget, NULL);
+	gtk_notebook_append_page(GTK_NOTEBOOK(scroll_book->notebook), widget, NULL);
 	page_count_change_cb(PIDGIN_SCROLL_BOOK(container));
 }
 
@@ -164,23 +173,12 @@
 pidgin_scroll_book_remove(GtkContainer *container, GtkWidget *widget)
 {
 	int page;
-	GList *children;
-	GtkWidget *child;
 	PidginScrollBook *scroll_book;
 	g_return_if_fail(GTK_IS_WIDGET(widget));
 
 	scroll_book = PIDGIN_SCROLL_BOOK(container);
-	children = scroll_book->children;
-
-	while (children) {
-		child = children->data;
-		if (child == widget) {
-			gtk_widget_unparent (widget);
-			children = g_list_remove_link (scroll_book->children, children);
-			g_list_free(children);
-			break;
-		}
-	}
+	scroll_book->children = g_list_remove(scroll_book->children, widget);
+	/* gtk_widget_unparent(widget); */
 
 	page = gtk_notebook_page_num(GTK_NOTEBOOK(PIDGIN_SCROLL_BOOK(container)->notebook), widget);
 	if (page >= 0) {
@@ -194,7 +192,9 @@
 			   GtkCallback callback,
 			   gpointer callback_data)
 {
+#if 0
 	GList *children;
+#endif
 	PidginScrollBook *scroll_book;
 
 	g_return_if_fail(GTK_IS_CONTAINER(container));
@@ -206,6 +206,7 @@
 		(*callback)(scroll_book->notebook, callback_data);
 	}
 
+#if 0
 	children = scroll_book->children;
 
 	while (children) {
@@ -214,6 +215,7 @@
 		children = children->next;
 		(*callback)(child, callback_data);
 	}
+#endif
 }
 
 static void
@@ -223,26 +225,66 @@
 
 	container_class->add = pidgin_scroll_book_add;
 	container_class->remove = pidgin_scroll_book_remove;
-	container_class->forall = pidgin_scroll_book_forall;	
-	
+	container_class->forall = pidgin_scroll_book_forall;
+}
+
+static gboolean
+close_button_left_cb(GtkWidget *widget, GdkEventCrossing *event, GtkLabel *label)
+{
+	static GdkCursor *ptr = NULL;
+	if (ptr == NULL) {
+		ptr = gdk_cursor_new(GDK_LEFT_PTR);
+	}
+
+	gtk_label_set_markup(label, "×");
+	gdk_window_set_cursor(event->window, ptr);
+	return FALSE;
+}
+
+static gboolean
+close_button_entered_cb(GtkWidget *widget, GdkEventCrossing *event, GtkLabel *label)
+{
+	static GdkCursor *hand = NULL;
+	if (hand == NULL) {
+		hand = gdk_cursor_new(GDK_HAND2);
+	}
+
+	gtk_label_set_markup(label, "<u>×</u>");
+	gdk_window_set_cursor(event->window, hand);
+	return FALSE;
 }
 
 static void
 pidgin_scroll_book_init (PidginScrollBook *scroll_book)
 {
 	GtkWidget *eb;
+	GtkWidget *close_button;
 
 	scroll_book->hbox = gtk_hbox_new(FALSE, 0);
 
+	/* Close */
+	eb = gtk_event_box_new();
+	gtk_box_pack_end(GTK_BOX(scroll_book->hbox), eb, FALSE, FALSE, 0);
+	gtk_event_box_set_visible_window(GTK_EVENT_BOX(eb), FALSE);
+	gtk_widget_set_events(eb, GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK);
+	close_button = gtk_label_new("×");
+	g_signal_connect(G_OBJECT(eb), "enter-notify-event", G_CALLBACK(close_button_entered_cb), close_button);
+	g_signal_connect(G_OBJECT(eb), "leave-notify-event", G_CALLBACK(close_button_left_cb), close_button);
+	gtk_container_add(GTK_CONTAINER(eb), close_button);
+	g_signal_connect_swapped(G_OBJECT(eb), "button-press-event", G_CALLBACK(scroll_close_cb), scroll_book);
+
+	/* Right arrow */
 	eb = gtk_event_box_new();
 	gtk_box_pack_end(GTK_BOX(scroll_book->hbox), eb, FALSE, FALSE, 0);
 	scroll_book->right_arrow = gtk_arrow_new(GTK_ARROW_RIGHT, GTK_SHADOW_NONE);
 	gtk_container_add(GTK_CONTAINER(eb), scroll_book->right_arrow);
 	g_signal_connect_swapped(G_OBJECT(eb), "button-press-event", G_CALLBACK(scroll_right_cb), scroll_book);
 
+	/* Count */
 	scroll_book->label = gtk_label_new(NULL);
 	gtk_box_pack_end(GTK_BOX(scroll_book->hbox), scroll_book->label, FALSE, FALSE, 0);
 
+	/* Left arrow */
 	eb = gtk_event_box_new();
 	gtk_box_pack_end(GTK_BOX(scroll_book->hbox), eb, FALSE, FALSE, 0);
 	scroll_book->left_arrow = gtk_arrow_new(GTK_ARROW_LEFT, GTK_SHADOW_NONE);
@@ -250,20 +292,18 @@
 	g_signal_connect_swapped(G_OBJECT(eb), "button-press-event", G_CALLBACK(scroll_left_cb), scroll_book);
 
 	gtk_box_pack_start(GTK_BOX(scroll_book), scroll_book->hbox, FALSE, FALSE, 0);
-	
+
 	scroll_book->notebook = gtk_notebook_new();
 	gtk_notebook_set_show_tabs(GTK_NOTEBOOK(scroll_book->notebook), FALSE);
 	gtk_notebook_set_show_border(GTK_NOTEBOOK(scroll_book->notebook), FALSE);
-	
+
 	gtk_box_pack_start(GTK_BOX(scroll_book), scroll_book->notebook, TRUE, TRUE, 0);
-	
+
 	g_signal_connect_swapped(G_OBJECT(scroll_book->notebook), "remove", G_CALLBACK(page_count_change_cb), scroll_book);
 	g_signal_connect(G_OBJECT(scroll_book->notebook), "switch-page", G_CALLBACK(switch_page_cb), scroll_book);
 	gtk_widget_show_all(scroll_book->notebook);
 }
 
-
-
 GtkWidget *
 pidgin_scroll_book_new()
 {