changeset 2468:16e8b83b10a2

[gaim-migrate @ 2481] David Raeman's applet icons committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Tue, 09 Oct 2001 23:40:18 +0000
parents cd81f1f2c896
children 2e0c9a7c21bb
files Makefile.am pixmaps/Makefile.am pixmaps/away.png pixmaps/connect.png pixmaps/gnome/devil-connect.png pixmaps/gnome/devil-offline.png pixmaps/gnome/devil-online.png pixmaps/gnome/penguin-connect.png pixmaps/gnome/penguin-offline.png pixmaps/gnome/penguin-online.png pixmaps/msgpend.png pixmaps/offline.png pixmaps/online.png src/applet.c src/applet.h src/server.c
diffstat 16 files changed, 84 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.am	Tue Oct 09 23:15:33 2001 +0000
+++ b/Makefile.am	Tue Oct 09 23:40:18 2001 +0000
@@ -2,6 +2,16 @@
 EXTRA_DIST = gaim.spec.in gaim_applet.gnorba gaim.desktop gaim_applet.desktop \
 	HACKING STATUS gaim2blt.pl
 
+if DISTRIB
+
+distribgnorbadir = $(sysconfdir)/CORBA/servers
+distribgnorba_DATA = gaim_applet.gnorba
+
+distribdesktopdir = $(datadir)/applets/Network
+distribdesktop_DATA = gaim_applet.desktop
+
+else
+
 if GNOMEAPPLET
 
 gnomesysconf = `@GNOME_CONFIG@ --sysconfdir`
@@ -15,38 +25,10 @@
 gaimdesktopdir = $(gnomedata)/applets/Network
 gaimdesktop_DATA = $(gaim_DESKTOP)
 
-# We dont need this no more :) I got good english =)
-#gaim_SOUND = gaim.soundlist
-#gaimsounddir = $(gnomesysconf)/sound/events
-#gaimsound_DATA = $(gaim_SOUND)
-
 endif
 
-if DISTRIB
-
-distribgnorbadir = $(sysconfdir)/CORBA/servers
-distribgnorba_DATA = gaim_applet.gnorba
-
-distribdesktopdir = $(datadir)/applets/Network
-distribdesktop_DATA = gaim_applet.desktop
-
-#Get outta here
-#distribsounddir = $(sysconfdir)/sound/events
-#distribsound_DATA = gaim.soundlist
-
 endif
 
-# we used to have gnome-configurable sound events, but now we can configure them
-# ourselves. isn't that lovely
-#
-#if GNOMEBITS
-#
-#bitssysconf = `@GNOME_CONFIG@ --sysconfdir`
-#bitssounddir = $(bitssysconf)/sound/events
-#bitssound_DATA = gaim.soundlist
-#
-#endif
-
 pixmapdir = $(datadir)/gnome/apps/Internet
 pixmap_DATA = gaim.desktop
 
--- a/pixmaps/Makefile.am	Tue Oct 09 23:15:33 2001 +0000
+++ b/pixmaps/Makefile.am	Tue Oct 09 23:40:18 2001 +0000
@@ -11,6 +11,7 @@
 		available-dnd.xpm		\
 		available-xa.xpm		\
 		available.xpm			\
+		away.png			\
 		away_big.xpm			\
 		away_icon.xpm			\
 		away_small.xpm			\
@@ -23,6 +24,7 @@
 		cancel.xpm			\
 		close.xpm			\
 		close_small.xpm			\
+		connect.png			\
 		crazy4.xpm			\
 		crossedlips.xpm			\
 		cry.xpm				\
@@ -61,13 +63,16 @@
 		luke03.xpm			\
 		moneymouth.xpm			\
 		mrt.xpm				\
+		msgpend.png			\
 		msn_away.xpm			\
 		msn_online.xpm			\
 		napster.xpm			\
 		no_icon.xpm			\
 		normal.xpm			\
+		offline.png			\
 		ok.xpm				\
 		oneeye.xpm			\
+		online.png			\
 		panic.xpm			\
 		plugins_small.xpm		\
 		pounce_small.xpm		\
@@ -103,11 +108,31 @@
 		yell.xpm			
 
 
+if DISTRIB
+
+gaimdistpixdir = $(datadir)/pixmaps/gaim
+gaimdistpix_DATA = away.png connect.png msgpend.png offline.png online.png
+
+distpixmapdir = $(datadir)/pixmaps
+distpixmap_DATA = gaim.xpm
+	
+else
+
+if GNOMEAPPLET
+
+gnomedata    = `@GNOME_CONFIG@ --datadir`
+
+gaimdistpmdir = $(gnomedata)/pixmaps/gaim
+gaimdistpm_DATA = away.png connect.png msgpend.png offline.png online.png
+
+gaimpixmapdir = $(gnomedata)/pixmaps
+gaimpixmap_DATA = gaim.xpm
+
+else
+
 pixmapdir = $(datadir)/pixmaps
 pixmap_DATA = gaim.xpm
 	
-if GNOMEAPPLET
-gnomedata    = `@GNOME_CONFIG@ --datadir`
-gaimpixmapdir = $(gnomedata)/pixmaps
-gaimpixmap_DATA = gaim.xpm
 endif
+
+endif
Binary file pixmaps/away.png has changed
Binary file pixmaps/connect.png has changed
Binary file pixmaps/gnome/devil-connect.png has changed
Binary file pixmaps/gnome/devil-offline.png has changed
Binary file pixmaps/gnome/devil-online.png has changed
Binary file pixmaps/gnome/penguin-connect.png has changed
Binary file pixmaps/gnome/penguin-offline.png has changed
Binary file pixmaps/gnome/penguin-online.png has changed
Binary file pixmaps/msgpend.png has changed
Binary file pixmaps/offline.png has changed
Binary file pixmaps/online.png has changed
--- a/src/applet.c	Tue Oct 09 23:15:33 2001 +0000
+++ b/src/applet.c	Tue Oct 09 23:40:18 2001 +0000
@@ -110,7 +110,30 @@
 	} else if (!connections) {
 		gtk_pixmap_set(GTK_PIXMAP(icon), icon_offline_pm, icon_offline_bm);
 		applet_set_tooltips(_("Offline. Click to bring up login box."));
-	} else if (!awaymessage) {
+	} else if (awaymessage) {
+		int dsr = 0;
+
+		if ((away_options & OPT_AWAY_QUEUE) && message_queue) {
+			GSList *m = message_queue;
+			int dsr = 0;
+			while (m) {
+				struct queued_message *qm = m->data;
+				if (qm->flags & WFLAG_RECV)
+					dsr++;
+				m = m->next;
+			}
+		}
+
+		if (dsr) {
+			gtk_pixmap_set(GTK_PIXMAP(icon), icon_msg_pending_pm, icon_msg_pending_bm);
+			g_snprintf(buf, sizeof(buf), _("Away: %d pending."), dsr);
+		} else {
+			gtk_pixmap_set(GTK_PIXMAP(icon), icon_away_pm, icon_away_bm);
+			g_snprintf(buf, sizeof(buf), _("Away."));
+		}
+
+		applet_set_tooltips(buf);
+	} else {
 		gtk_pixmap_set(GTK_PIXMAP(icon), icon_online_pm, icon_online_bm);
 		g_snprintf(buf, sizeof buf, "Online: ");
 		while (c) {
@@ -120,8 +143,6 @@
 				strcat(buf, ", ");
 		}
 		applet_set_tooltips(buf);
-	} else {
-		gtk_pixmap_set(GTK_PIXMAP(icon), icon_online_pm, icon_online_bm);
 	}
 
 	return TRUE;
@@ -135,6 +156,10 @@
 			 &icon_connect_pm, &icon_connect_bm);
 	load_applet_icon(GAIM_GNOME_ONLINE_ICON, (sizehint - 1), (sizehint - 1),
 			 &icon_online_pm, &icon_online_bm);
+	load_applet_icon(GAIM_GNOME_AWAY_ICON, (sizehint - 1), (sizehint - 1),
+			 &icon_away_pm, &icon_away_bm);
+	load_applet_icon(GAIM_GNOME_MSG_PENDING_ICON, (sizehint - 1), (sizehint - 1),
+			 &icon_msg_pending_pm, &icon_msg_pending_bm);
 	update_applet();
 	gtk_widget_set_usize(appletframe, sizehint, sizehint);
 }
@@ -326,7 +351,11 @@
 	/*load online icon */
 	load_applet_icon(GAIM_GNOME_ONLINE_ICON, 32, 32, &icon_online_pm, &icon_online_bm);
 
-	/*icon_away and icon_msg_pennding need to be implemented */
+	/*load away icon */
+	load_applet_icon(GAIM_GNOME_AWAY_ICON, 32, 32, &icon_away_pm, &icon_away_bm);
+
+	/*load msg_pending icon */
+	load_applet_icon(GAIM_GNOME_ONLINE_ICON, 32, 32, &icon_msg_pending_pm, &icon_msg_pending_bm);
 
 	icon = gtk_pixmap_new(icon_offline_pm, icon_offline_bm);
 
--- a/src/applet.h	Tue Oct 09 23:15:33 2001 +0000
+++ b/src/applet.h	Tue Oct 09 23:40:18 2001 +0000
@@ -63,9 +63,17 @@
 #define GAIM_GNOME_PENGUIN_CONNECT "gaim/gnome/penguin-connect.png"
 #define GAIM_GNOME_PENGUIN_ONLINE "gaim/gnome/penguin-online.png"
 
+/*
 #define GAIM_GNOME_OFFLINE_ICON "apple-red.png"
 #define GAIM_GNOME_CONNECT_ICON "gnome-battery.png"
 #define GAIM_GNOME_ONLINE_ICON "apple-green.png"
+*/
+
+#define GAIM_GNOME_OFFLINE_ICON		"gaim/offline.png"
+#define GAIM_GNOME_CONNECT_ICON		"gaim/connect.png"
+#define GAIM_GNOME_ONLINE_ICON 		"gaim/online.png"
+#define GAIM_GNOME_AWAY_ICON		"gaim/away.png"
+#define GAIM_GNOME_MSG_PENDING_ICON	"gaim/msgpend.png"
 
 extern GtkWidget *applet;
 
--- a/src/server.c	Tue Oct 09 23:15:33 2001 +0000
+++ b/src/server.c	Tue Oct 09 23:40:18 2001 +0000
@@ -510,6 +510,10 @@
 			qm->flags = WFLAG_RECV | away;
 			message_queue = g_slist_append(message_queue, qm);
 
+#ifdef USE_APPLET
+			set_user_state(away);
+#endif
+
 			row = find_queue_row_by_name(qm->name);
 
 			if (row >= 0) {