diff src/gnome_applet_mgr.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 0d9cfc3579a5
children b402a23f35df
line wrap: on
line diff
--- a/src/gnome_applet_mgr.c	Tue Jun 06 21:50:20 2000 +0000
+++ b/src/gnome_applet_mgr.c	Wed Jun 07 01:50:55 2000 +0000
@@ -142,12 +142,14 @@
                            icon_offline_pm,
                            icon_offline_bm );
          	       gtk_label_set( GTK_LABEL(status_label), _MSG_OFFLINE_ );
+		       applet_set_tooltips("Offilne. Click to bring up login box.");
       		break;
       		case signing_on:
       			gtk_pixmap_set( GTK_PIXMAP(icon),
                            icon_connect_pm,
                            icon_connect_bm );   
       			gtk_label_set( GTK_LABEL(status_label), _MSG_CONNECT_ );
+			applet_set_tooltips("Attempting to sign on....");
       		break;
       		case online:
       			gtk_pixmap_set( GTK_PIXMAP(icon),
@@ -238,6 +240,12 @@
 	}
 }
 
+void applet_do_signon(AppletWidget *widget, gpointer data) {
+	show_login();
+	if (general_options & OPT_GEN_REMEMBER_PASS)
+		dologin();
+}
+
 void insert_applet_away() {
 	GList *awy = away_messages;
 	struct away_message *a;
@@ -335,7 +343,7 @@
   applet_widget_register_callback(APPLET_WIDGET(applet),
 				  "signon",
 				  _("Signon"),
-				  applet_show_login,
+				  applet_do_signon,
 				  NULL);
 }
 
@@ -512,7 +520,7 @@
         gdk_imlib_init();
         gtk_widget_push_visual(gdk_imlib_get_visual());
         gtk_widget_push_colormap(gdk_imlib_get_colormap());
-        
+
         applet=applet_widget_new("gaim_applet");
         if(!applet) g_error(_("Can't create GAIM applet!"));
 	gtk_widget_set_events(applet, gtk_widget_get_events(applet) |
@@ -539,6 +547,7 @@
 		
 	icon=gtk_pixmap_new(icon_offline_pm,icon_offline_bm);
 	
+	update_applet(NULL);
 	gtk_timeout_add( 1500, (GtkFunction)update_applet, NULL );
 	
 	vbox = gtk_vbox_new(FALSE,0);
@@ -569,8 +578,6 @@
 	gtk_widget_show( vbox );
 	gtk_widget_show( appletframe );
 	        
-	applet_widget_set_tooltip(APPLET_WIDGET(applet),"GAIM");
-
 	applet_widget_register_stock_callback(APPLET_WIDGET(applet),
 					      "about",
 					      GNOME_STOCK_MENU_ABOUT,
@@ -602,4 +609,8 @@
 	applet_draw_open = FALSE;
 }
 
+void applet_set_tooltips(char *msg) {
+	applet_widget_set_tooltip(APPLET_WIDGET(applet), msg);
+}
+
 #endif /*USE_APPLET*/