diff src/buddy.c @ 342:f4fba304b236

[gaim-migrate @ 352] More changes to the applet: tooltips are set different, and choosing "Signon" from the right-click menu actually tries to sign you on, as opposed to just bringing up the login window. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 07 Jun 2000 01:50:55 +0000
parents df984d56efb4
children b402a23f35df
line wrap: on
line diff
--- a/src/buddy.c	Tue Jun 06 21:50:20 2000 +0000
+++ b/src/buddy.c	Wed Jun 07 01:50:55 2000 +0000
@@ -103,8 +103,13 @@
 	int pres, total;
         char buf[BUF_LONG];
 
+#ifndef USE_APPLET
         if (!(display_options & OPT_DISP_SHOW_GRPNUM))
                 return;
+#else
+	int onl = 0;
+	int all = 0;
+#endif
 
         while(grp) {
 		g = (struct group *)grp->data;
@@ -123,10 +128,18 @@
 
                 g_snprintf(buf, sizeof(buf), "%s  (%d/%d)", g->name, pres, total);
 
+#ifdef USE_APPLET
+		onl += pres;
+		all += total;
+		if (display_options & OPT_DISP_SHOW_GRPNUM)
+#endif
                 gtk_label_set(GTK_LABEL(g->label), buf);
                 grp = grp->next;
         }
-        
+#ifdef USE_APPLET
+	g_snprintf(buf, sizeof(buf), "%d/%d Buddies Online", onl, all);
+	applet_set_tooltips(buf);
+#endif
 }
 
 void update_show_idlepix()
@@ -348,7 +361,7 @@
         applet_widget_register_callback(APPLET_WIDGET(applet),
                 "signon",
                 _("Signon"),
-                applet_show_login,
+                applet_do_signon,
                 NULL);
 #else
         show_login();