changeset 660:b3b5d9d18eea

[gaim-migrate @ 670] No more lag-o-meter. committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Thu, 10 Aug 2000 22:17:22 +0000
parents 9e467c13ace7
children 31384b25f7b6
files ChangeLog src/buddy.c src/gaim.h src/prefs.c src/server.c
diffstat 5 files changed, 2 insertions(+), 89 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Aug 10 17:08:29 2000 +0000
+++ b/ChangeLog	Thu Aug 10 22:17:22 2000 +0000
@@ -12,6 +12,7 @@
 	* Background colors
 	* Redesigned preferences dialog
 	* Redesigned conversation dialog
+	* Removed the Lag-O-Meter
 	
 version 0.9.20 (07/14/2000):
 	* More plugin events, more plugin features
--- a/src/buddy.c	Thu Aug 10 17:08:29 2000 +0000
+++ b/src/buddy.c	Thu Aug 10 22:17:22 2000 +0000
@@ -74,8 +74,6 @@
 static GtkWidget *imbutton, *infobutton, *chatbutton;
 static GtkWidget *addbutton, *groupbutton, *rembutton;
 static GtkWidget *addpermbutton, *rempermbutton;
-static GtkWidget *lagometer = NULL;
-static GtkWidget *lagometer_box = NULL;
 
 static int last_lag_us;
 
@@ -205,44 +203,6 @@
 
 }
 
-void update_lagometer(int us)
-{
-        double pct;
-        
-
-        
-        if (us != -1)
-                last_lag_us = us;
-
-
-        if (lagometer_box == NULL)
-                return;
-
-        
-        if (!(general_options & OPT_GEN_SHOW_LAGMETER))
-                gtk_widget_hide(lagometer_box);
-        else
-                gtk_widget_show(lagometer_box);
-
-                
-        pct = last_lag_us/100000;
-
-	if (pct > 0)
-		pct = 25 * log(pct);
-
-        if (pct < 0)
-                pct = 0;
-
-        if (pct > 100)
-                pct = 100;
-
-
-        pct /= 100;
-
-
-        gtk_progress_bar_update(GTK_PROGRESS_BAR(lagometer), pct);
-}
-
 static void adjust_pic(GtkWidget *button, const char *c, gchar **xpm)
 {
         GdkPixmap *pm;
@@ -1980,25 +1940,6 @@
 
         gtk_widget_show(menubar);
 
-        lagometer_box = gtk_hbox_new(FALSE, 0);
-
-        
-        lagometer = gtk_progress_bar_new();
-        gtk_widget_show(lagometer);
-
-        label = gtk_label_new("Lag-O-Meter: ");
-        gtk_widget_show(label);
-        
-        gtk_box_pack_start(GTK_BOX(lagometer_box), label, FALSE, FALSE, 5);
-        gtk_box_pack_start(GTK_BOX(lagometer_box), lagometer, TRUE, TRUE, 5);
-
-        gtk_widget_set_usize(lagometer, 5, 5);
-        
-
-        if ((general_options & OPT_GEN_SHOW_LAGMETER))
-                gtk_widget_show(lagometer_box);
-
-        
 	vbox       = gtk_vbox_new(FALSE, 10);
         
         notebook = gtk_notebook_new();
@@ -2211,7 +2152,6 @@
         gtk_signal_connect(GTK_OBJECT(addpermbutton), "clicked", GTK_SIGNAL_FUNC(add_perm_callback), NULL);
         gtk_signal_connect(GTK_OBJECT(rempermbutton), "clicked", GTK_SIGNAL_FUNC(do_del_perm), permtree);
         gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, TRUE, 0);
-        gtk_box_pack_start(GTK_BOX(vbox), lagometer_box, FALSE, TRUE, 0);
 	gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0);
 
         gtk_container_add(GTK_CONTAINER(blist), vbox);
--- a/src/gaim.h	Thu Aug 10 17:08:29 2000 +0000
+++ b/src/gaim.h	Thu Aug 10 22:17:22 2000 +0000
@@ -364,8 +364,6 @@
 #define B_ICON_UID    "09461346-4C7F-11D1-8222-444553540000"
 #define FILE_GET_UID  "09461348-4C7F-11D1-8222-444553540000"
 
-#define LAGOMETER_STR "123CHECKLAG456"
-
 #define AOL_SRCHSTR "/community/aimcheck.adp/url="
 
 /* These should all be runtime selectable */
@@ -390,7 +388,7 @@
 #define TYPE_SIGNOFF   4
 #define TYPE_KEEPALIVE 5
 
-#define REVISION "gaim:$Revision: 662 $"
+#define REVISION "gaim:$Revision: 670 $"
 #define FLAPON "FLAPON\r\n\r\n"
 
 #define ROAST "Tic/Toc"
@@ -458,7 +456,6 @@
 #define OPT_GEN_APP_BUDDY_SHOW   0x00000010
 #define OPT_GEN_POPUP_WINDOWS    0x00000020
 #define OPT_GEN_SEND_LINKS       0x00000040
-#define OPT_GEN_SHOW_LAGMETER    0x00000080
 #define OPT_GEN_DEBUG            0x00000100
 #define OPT_GEN_REMEMBER_PASS    0x00000200
 #define OPT_GEN_REGISTERED       0x00000400
--- a/src/prefs.c	Thu Aug 10 17:08:29 2000 +0000
+++ b/src/prefs.c	Thu Aug 10 22:17:22 2000 +0000
@@ -89,7 +89,6 @@
 	gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5);
 	gtk_widget_show(sep);
 
-	gaim_button(_("Show Lagometer"), &general_options, OPT_GEN_SHOW_LAGMETER, box);
 	gaim_button(_("Use borderless buttons (requires restart for some buttons)"), &display_options, OPT_DISP_COOL_LOOK, box);
 	gaim_button(_("Show Buddy Ticker after restart"), &display_options, OPT_DISP_SHOW_BUDDYTICKER, box);
 	if (!dw && (general_options & OPT_GEN_DEBUG))
@@ -1233,8 +1232,6 @@
 {
 	general_options = general_options ^ (int)option;
 
-       	if ((int)option == OPT_GEN_SHOW_LAGMETER)
-       		update_lagometer(-1);
        	if ((int)option == OPT_GEN_LOG_ALL)
        		update_log_convs();
 	save_prefs();
--- a/src/server.c	Thu Aug 10 17:08:29 2000 +0000
+++ b/src/server.c	Thu Aug 10 22:17:22 2000 +0000
@@ -87,8 +87,6 @@
 	time(&t);
 
         gettimeofday(&lag_tv, NULL);
-	if (general_options & OPT_GEN_SHOW_LAGMETER)
-		serv_send_im(current_user->username, LAGOMETER_STR, 1);
 
 	if (report_idle != IDLE_GAIM)
                 return TRUE;
@@ -661,26 +659,6 @@
 	g_snprintf(name, strlen(name) + 1, "%s", angel);
 	g_free(angel);
 #endif
-
-	nname = g_strdup(normalize(name));
-
-	if (!strcasecmp(normalize(current_user->username), nname)) {
-		if (!strcmp(message, LAGOMETER_STR)) {
-			struct timeval tv;
-                        int ms;
-
-			gettimeofday(&tv, NULL);
-
-			ms = 1000000 * (tv.tv_sec - lag_tv.tv_sec);
-
-			ms += tv.tv_usec - lag_tv.tv_usec;
-
-                        update_lagometer(ms);
-			g_free(nname);
-                        return;
-		}
-	}
-	g_free(nname);
 	
         cnv = find_conversation(name);