changeset 25530:d6362d94e747

propagate from branch 'im.pidgin.pidgin' (head ccc9b73a0ff146d9f13b7c05aeb76e6a1abf4733) to branch 'im.pidgin.pidgin.yaz' (head 2af05f3a9881d852d0d99b591f9ec3717732b212)
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Fri, 06 Jul 2007 06:12:02 +0000
parents 1c6abf965d62 (current diff) ac7b380daa0a (diff)
children d4eebb5c3dbb
files
diffstat 8 files changed, 44 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Jul 04 07:46:51 2007 +0000
+++ b/ChangeLog	Fri Jul 06 06:12:02 2007 +0000
@@ -22,6 +22,7 @@
 	* A new status area has been added to the top of conversations to
 	  provide additional detail about the buddy, including buddy icon,
 	  protocol and status message.
+	* Show idle times in the buddy list as days, hours, seconds
 
 	Finch:
 	* There's support for workspaces now (details in the manpage)
--- a/finch/gntaccount.c	Wed Jul 04 07:46:51 2007 +0000
+++ b/finch/gntaccount.c	Fri Jul 06 06:12:02 2007 +0000
@@ -472,6 +472,14 @@
 		}
 	}
 
+	list = purple_plugins_get_protocols();
+	if (list == NULL) {
+		purple_notify_error(NULL, _("Error"),
+				_("There's no protocol plugins installed."),
+				_("(You probably forgot to 'make install'.)"));
+		return;
+	}
+
 	dialog = g_new0(AccountEditDialog, 1);
 	accountdialogs = g_list_prepend(accountdialogs, dialog);
 
@@ -489,7 +497,6 @@
 	gnt_box_add_widget(GNT_BOX(window), hbox);
 
 	dialog->protocol = combo = gnt_combo_box_new();
-	list = purple_plugins_get_protocols();
 	for (iter = list; iter; iter = iter->next)
 	{
 		gnt_combo_box_add_data(GNT_COMBO_BOX(combo), iter->data,
--- a/finch/gntblist.c	Wed Jul 04 07:46:51 2007 +0000
+++ b/finch/gntblist.c	Fri Jul 06 06:12:02 2007 +0000
@@ -507,21 +507,24 @@
 		gboolean ascii = gnt_ascii_only();
 		
 		presence = purple_buddy_get_presence(buddy);
-		now = purple_presence_get_active_status(presence);
+		if (purple_presence_is_status_primitive_active(presence, PURPLE_STATUS_MOBILE))
+			strncpy(status, ascii ? ":" : "☎", sizeof(status) - 1);
+		else {
+			now = purple_presence_get_active_status(presence);
 
-		prim = purple_status_type_get_primitive(purple_status_get_type(now));
+			prim = purple_status_type_get_primitive(purple_status_get_type(now));
 
-		switch(prim)
-		{
-			case PURPLE_STATUS_OFFLINE:
-				strncpy(status, ascii ? "x" : "⊗", sizeof(status) - 1);
-				break;
-			case PURPLE_STATUS_AVAILABLE:
-				strncpy(status, ascii ? "o" : "◯", sizeof(status) - 1);
-				break;
-			default:
-				strncpy(status, ascii ? "." : "⊖", sizeof(status) - 1);
-				break;
+			switch(prim) {
+				case PURPLE_STATUS_OFFLINE:
+					strncpy(status, ascii ? "x" : "⊗", sizeof(status) - 1);
+					break;
+				case PURPLE_STATUS_AVAILABLE:
+					strncpy(status, ascii ? "o" : "◯", sizeof(status) - 1);
+					break;
+				default:
+					strncpy(status, ascii ? "." : "⊖", sizeof(status) - 1);
+					break;
+			}
 		}
 		name = purple_buddy_get_alias(buddy);
 	}
@@ -1269,12 +1272,14 @@
 	PurplePluginProtocolInfo *prpl_info;
 	PurpleAccount *account;
 	PurpleNotifyUserInfo *user_info;
+	PurplePresence *presence;
 	const char *alias = purple_buddy_get_alias(buddy);
 	char *tmp, *strip;
 
 	user_info = purple_notify_user_info_new();
 
 	account = purple_buddy_get_account(buddy);
+	presence = purple_buddy_get_presence(buddy);
 
 	if (!full || g_utf8_collate(purple_buddy_get_name(buddy), alias))
 		purple_notify_user_info_add_pair(user_info, _("Nickname"), alias);
@@ -1308,6 +1313,10 @@
 
 	strip = purple_markup_strip_html(tmp);
 	g_string_append(str, strip);
+
+	if (purple_presence_is_status_primitive_active(presence, PURPLE_STATUS_MOBILE))
+		g_string_append(str, _("On Mobile"));
+
 	g_free(strip);
 	g_free(tmp);
 }
--- a/finch/libgnt/gntfilesel.c	Wed Jul 04 07:46:51 2007 +0000
+++ b/finch/libgnt/gntfilesel.c	Fri Jul 06 06:12:02 2007 +0000
@@ -448,6 +448,9 @@
 	GntFileSel *sel = GNT_FILE_SEL(widget);
 	GntWidget *hbox, *vbox;
 
+	if (sel->current == NULL)
+		gnt_file_sel_set_current_location(sel, g_get_home_dir());
+
 	vbox = gnt_vbox_new(FALSE);
 	gnt_box_set_pad(GNT_BOX(vbox), 0);
 	gnt_box_set_alignment(GNT_BOX(vbox), GNT_ALIGN_MID);
--- a/libpurple/internal.h	Wed Jul 04 07:46:51 2007 +0000
+++ b/libpurple/internal.h	Fri Jul 06 06:12:02 2007 +0000
@@ -93,8 +93,9 @@
 #include <langinfo.h>
 #endif
 
+#include <gmodule.h>
+
 #ifdef PURPLE_PLUGINS
-# include <gmodule.h>
 # ifndef _WIN32
 #  include <dlfcn.h>
 # endif
--- a/libpurple/protocols/gg/gg.c	Wed Jul 04 07:46:51 2007 +0000
+++ b/libpurple/protocols/gg/gg.c	Fri Jul 06 06:12:02 2007 +0000
@@ -1074,9 +1074,7 @@
 		}
 	}
 
-	val = ggp_buddy_get_name(gc, ggp_str_to_uin(who));
-	purple_notify_userinfo(gc, val, user_info, ggp_sr_close_cb, form);
-	g_free(val);
+	purple_notify_userinfo(gc, who, user_info, ggp_sr_close_cb, form);
 	g_free(who);
 	purple_notify_user_info_destroy(user_info);
 }
--- a/libpurple/protocols/msn/directconn.c	Wed Jul 04 07:46:51 2007 +0000
+++ b/libpurple/protocols/msn/directconn.c	Fri Jul 06 06:12:02 2007 +0000
@@ -370,7 +370,7 @@
 	else
 	{
 		struct sockaddr_in client_addr;
-		unsigned int client;
+		socklen_t client;
 		fd = accept (source, (struct sockaddr *)&client_addr, &client);
 	}
 
--- a/pidgin/gtkblist.c	Wed Jul 04 07:46:51 2007 +0000
+++ b/pidgin/gtkblist.c	Fri Jul 06 06:12:02 2007 +0000
@@ -3417,13 +3417,16 @@
 			time_t idle_secs = purple_presence_get_idle_time(presence);
 
 			if (idle_secs > 0) {
-				int ihrs, imin;
+				int iday, ihrs, imin;
 
 				time(&t);
-				ihrs = (t - idle_secs) / 3600;
+				iday = (t - idle_secs) / (24 * 60 * 60);
+				ihrs = ((t - idle_secs) / 60 / 60) % 24;
 				imin = ((t - idle_secs) / 60) % 60;
 
-				if (ihrs)
+                if (iday)
+					idletime = g_strdup_printf(_("Idle %dd %dh %02dm"), iday, ihrs, imin);
+				else if (ihrs)
 					idletime = g_strdup_printf(_("Idle %dh %02dm"), ihrs, imin);
 				else
 					idletime = g_strdup_printf(_("Idle %dm"), imin);