changeset 1232:0c7c659fc730

[gaim-migrate @ 1242] cool pixmaps for yahoo, better signon time for yahoo/icq, better idle time for yahoo. i have a final tomorrow. now today. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 11 Dec 2000 11:44:22 +0000
parents 11d67bbda8ae
children 728a90516211
files ChangeLog pixmaps/Makefile.am pixmaps/status-away.xpm pixmaps/status-here.xpm pixmaps/status-idle.xpm plugins/icq/gaim_icq.c plugins/yay/yay.c
diffstat 7 files changed, 114 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Dec 11 11:13:49 2000 +0000
+++ b/ChangeLog	Mon Dec 11 11:44:22 2000 +0000
@@ -5,6 +5,8 @@
 	* More GUI adjustments
 	* Can optionally run command to play sound files
 	* Icons for ICQ plugin (blatently stolen from GnomeICU)
+	* Icons for Yahoo plugin (not-so-blatently stolen from GTKYahoo)
+	* Signon times for Yahoo and ICQ sane (but not correct)
 
 version 0.11.0-pre2 (12/04/2000):
 	* Fixed a segfault with a bad util.c 
--- a/pixmaps/Makefile.am	Mon Dec 11 11:13:49 2000 +0000
+++ b/pixmaps/Makefile.am	Mon Dec 11 11:44:22 2000 +0000
@@ -101,6 +101,9 @@
 		smile_sad.xpm			\
 		smile_wink.xpm			\
 		speaker.xpm			\
+		status-away.xpm			\
+		status-here.xpm			\
+		status-idle.xpm			\
 		strike.xpm			\
 		tb_forward.xpm			\
 		tb_search.xpm			\
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/status-away.xpm	Mon Dec 11 11:44:22 2000 +0000
@@ -0,0 +1,30 @@
+/* XPM */
+static char * status_away_xpm[] = {
+"17 17 10 1",
+" 	c None",
+".	c #FFFFFF",
+"+	c #FFFF00",
+"@	c #FF0000",
+"#	c #C6C3C6",
+"$	c #848284",
+"%	c #848200",
+"&	c #840000",
+"*	c #000084",
+"=	c #000000",
+"                 ",
+"      ######     ",
+"    ###==%%###   ",
+"   ##==++++%%##  ",
+"   #=++....+.%#  ",
+"  ##=+...++++%## ",
+"  #=+..*.+*.++%# ",
+"  #=+.#$##$#++%# ",
+"  $=&&=+++++++%# ",
+" #=@@@@=+++%++%# ",
+" &@@@@@@=#%++%## ",
+" &......=++++%#  ",
+" &......=.+%%##  ",
+" &@@@@@@==%###   ",
+" #&@@@@=####     ",
+"  #&&&=          ",
+"                 "};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/status-here.xpm	Mon Dec 11 11:44:22 2000 +0000
@@ -0,0 +1,30 @@
+/* XPM */
+static char * status_here_xpm[] = {
+"16 16 10 1",
+"       c None",
+".      c #C0C0C0",
+"+      c #000000",
+"@      c #808000",
+"#      c #FFFF00",
+"$      c #FFFFFF",
+"%      c #000080",
+"&      c #808080",
+"*      c #800000",
+"=      c #FF0000",
+"                ",
+"     ......     ",
+"   ...++@@...   ",
+"  ..++####@@..  ",
+"  .+##$$$$#$@.  ",
+" ..+#$$$####@.. ",
+" .+#$$%$#%$##@. ",
+" .+#$.&..&.##@. ",
+" .+##########@. ",
+" .+##*####=##@. ",
+" ..+##*==*##@.. ",
+"  .+########@.  ",
+"  ..++#$$#@@..  ",
+"   ...+++@...   ",
+"     ......     ",
+"                "};
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pixmaps/status-idle.xpm	Mon Dec 11 11:44:22 2000 +0000
@@ -0,0 +1,31 @@
+/* XPM */
+static char * status_idle_xpm[] = {
+"17 17 11 1",
+" 	c None",
+".	c #FFFFFF",
+"+	c #FFFF00",
+"@	c #C6C3C6",
+"#	c #848284",
+"$	c #848200",
+"%	c #840084",
+"&	c #00FFFF",
+"*	c #0000FF",
+"=	c #000084",
+"-	c #000000",
+"                 ",
+"      @@@@@@     ",
+"    @@@--$$@@@   ",
+"   @@--++++$$@@  ",
+"   @-++....+.$@  ",
+"  @@-+...++++$@@ ",
+"  @-+..=.+=.++$@ ",
+"  @-+.@#@@#@++$@ ",
+"  @-**=+++++++$@ ",
+" @=&&#&=+++$++$@ ",
+" =&@.-.&=$$++$@@ ",
+" =&..=.&=++++$@  ",
+" =&-$=.@=.+$$@@  ",
+" =&.@.@&%-$@@@   ",
+" @=&&&&%@@@@     ",
+"  @%%%%@         ",
+"                 "};
--- a/plugins/icq/gaim_icq.c	Mon Dec 11 11:13:49 2000 +0000
+++ b/plugins/icq/gaim_icq.c	Mon Dec 11 11:44:22 2000 +0000
@@ -112,10 +112,12 @@
 	struct gaim_connection *gc = find_gaim_conn_by_icq_link(link);
 	guint status;
 	char buf[256];
+	time_t t;
 
 	g_snprintf(buf, sizeof buf, "%lu", uin);
 	status = (st == STATUS_ONLINE) ? UC_NORMAL : UC_UNAVAILABLE | (st << 5);
-	serv_got_update(gc, buf, 1, 0, 0, 0, status, 0);
+	time(&t);
+	serv_got_update(gc, buf, 1, 0, t, 0, status, 0);
 }
 
 static void icq_user_offline(ICQLINK *link, unsigned long uin) {
--- a/plugins/yay/yay.c	Mon Dec 11 11:13:49 2000 +0000
+++ b/plugins/yay/yay.c	Mon Dec 11 11:44:22 2000 +0000
@@ -42,9 +42,9 @@
 #include "gaim.h"
 #include "libyahoo.h"
 
-#include "pixmaps/free_icon.xpm"
-#include "pixmaps/away_icon.xpm"
-#include "pixmaps/dt_icon.xpm"
+#include "pixmaps/status-away.xpm"
+#include "pixmaps/status-here.xpm"
+#include "pixmaps/status-idle.xpm"
 
 struct yahoo_data {
 	struct yahoo_context *ctxt;
@@ -67,6 +67,7 @@
 static void process_packet_status(struct gaim_connection *gc, struct yahoo_packet *pkt) {
 	struct yahoo_data *yd = (struct yahoo_data *)gc->proto_data;
 	int i;
+	time_t tmptime;
 
 	if (pkt->service == YAHOO_SERVICE_LOGOFF && !strcasecmp(pkt->active_id, gc->username)) {
 		hide_login_progress(gc, "Disconnected");
@@ -91,15 +92,18 @@
 			if (!b)
 				continue; /* ???!!! */
 		}
+		time(&tmptime);
+		if (b->signon == 0) b->signon = tmptime;
 		if (pkt->service == YAHOO_SERVICE_LOGOFF)
 			serv_got_update(gc, b->name, 0, 0, 0, 0, 0, 0);
 		else {
 			if (rec->status == YAHOO_STATUS_IDLE)
-				serv_got_update(gc, b->name, 1, 0, 0, 10, UC_NORMAL, 0);
+				serv_got_update(gc, b->name, 1, 0, b->signon, tmptime - 600,
+						(rec->status << 5) | UC_NORMAL, 0);
 			else if (rec->status == YAHOO_STATUS_AVAILABLE)
-				serv_got_update(gc, b->name, 1, 0, 0, 0, UC_NORMAL, 0);
+				serv_got_update(gc, b->name, 1, 0, b->signon, 0, UC_NORMAL, 0);
 			else
-				serv_got_update(gc, b->name, 1, 0, 0, 0,
+				serv_got_update(gc, b->name, 1, 0, b->signon, 0,
 						(rec->status << 5) | UC_UNAVAILABLE, 0);
 			if (rec->status == YAHOO_STATUS_CUSTOM) {
 				gpointer val = g_hash_table_lookup(yd->hash, b->name);
@@ -335,11 +339,11 @@
 }
 
 static char **yahoo_list_icon(int uc) {
-	if (uc & UC_NORMAL)
-		return free_icon_xpm;
-	if ((uc >> 5) == YAHOO_STATUS_CUSTOM)
-		return dt_icon_xpm;
-	return away_icon_xpm;
+	if ((uc >> 5) == YAHOO_STATUS_IDLE)
+		return status_idle_xpm;
+	else if (uc == UC_NORMAL)
+		return status_here_xpm;
+	return status_away_xpm;
 }
 
 static void yahoo_action_menu(GtkWidget *menu, struct gaim_connection *gc, char *who) {