diff -u -r gnome-applets-2.4.1.orig/battstat/acpi-linux.c gnome-applets-2.4.1/battstat/acpi-linux.c
--- gnome-applets-2.4.1.orig/battstat/acpi-linux.c	2003-07-26 17:28:17.000000000 -0400
+++ gnome-applets-2.4.1/battstat/acpi-linux.c	2003-10-14 19:06:56.000000000 -0400
@@ -142,7 +142,7 @@
  */
 gboolean acpi_linux_read(struct apm_info *apminfo)
 {
-  guint32 max_capacity, low_capacity, critical_capacity, remain;
+  guint32 max_capacity, low_capacity, critical_capacity, remain, seconds, rate;
   gboolean charging, ac_online;
   gulong acpi_ver;
   char buf[BUFSIZ];
@@ -167,6 +167,8 @@
   critical_capacity = 0;
   charging = FALSE;
   remain = 0;
+  rate = 0;
+  seconds = 0;
   ac_online = FALSE;
 
   hash = read_file ("/proc/acpi/info", buf, sizeof (buf));
@@ -219,6 +221,7 @@
           charging = s ? (strcmp (s, "charging") == 0) : 0;
          }
         remain += read_long (hash, "remaining capacity");
+        rate += read_long (hash, "present rate");
         g_hash_table_destroy (hash);
        }
      }
@@ -252,9 +255,17 @@
    }
   closedir(procdir);
 
+  if (rate)
+    if (charging) {
+    seconds = 3600 * (double)(max_capacity - remain) / rate;
+  } else if (!ac_online) {
+    seconds = 3600 * (float)remain / rate;
+  }
+
   apminfo->ac_line_status = ac_online ? 1 : 0;
   apminfo->battery_status = remain < low_capacity ? 1 : remain < critical_capacity ? 2 : 0;
   apminfo->battery_percentage = (int) (remain/(float)max_capacity*100);
+  apminfo->battery_time = seconds;
   apminfo->battery_flags = charging ? 0x8 : 0;
 
   return TRUE;
diff -u -r gnome-applets-2.4.1.orig/battstat/AUTHORS gnome-applets-2.4.1/battstat/AUTHORS
--- gnome-applets-2.4.1.orig/battstat/AUTHORS	2001-12-28 06:18:24.000000000 -0500
+++ gnome-applets-2.4.1/battstat/AUTHORS	2003-10-27 04:23:44.000000000 -0500
@@ -14,3 +14,4 @@
  Joe Ammond <jra@twinight.org>
  Michael Reinsch <mr@uue.org>
  Dave Camp <dave@ximian.com>
+ Behdad Esfahbod <gnomeapplets@behdad.org>
Only in gnome-applets-2.4.1/battstat: autogen.sh
diff -u -r gnome-applets-2.4.1.orig/battstat/battstat_applet.c gnome-applets-2.4.1/battstat/battstat_applet.c
--- gnome-applets-2.4.1.orig/battstat/battstat_applet.c	2003-07-23 22:02:45.000000000 -0400
+++ gnome-applets-2.4.1/battstat/battstat_applet.c	2003-10-27 04:20:11.000000000 -0500
@@ -307,10 +307,11 @@
   guint progress_value;
   guint pixmap_index;
   guint charging;
+  guint batt_time;
   gint i, x;
   gboolean batterypresent;
-  gchar new_label[80];
-  gchar new_string[80];
+  gchar new_label[160];
+  gchar time_label[80];
   gchar *status[]={
     /* The following four messages will be displayed as tooltips over
      the battery meter.  
@@ -366,6 +367,7 @@
    charging = TRUE;
    batterypresent = FALSE;
 #endif
+   batt_time = (guint) apminfo.battery_time;
   if(batt_state > 3) {
     batt_state = 0;
     batterypresent = FALSE;
@@ -435,37 +437,40 @@
    if(
       acline_status != battery->last_acline_status
       || batt_life != battery->last_batt_life
+      || batt_time != battery->last_batt_time
       || batt_state != battery->last_batt_state
-      || battery->colors_changed )
+      || battery->colors_changed
+      || battery->conf_changed )
    {
       /* Something changed */
+      int hours, minutes, seconds;
 
-      /* Update the tooltip */
-
-      if(!battery->showbattery && !battery->showpercent) {
-	 if(acline_status == 0) {
-	    snprintf(new_label, sizeof(new_label),
-		     _("System is running on battery power\nBattery: %d%% (%s)"),
-		     batt_life, _(status[batt_state]));
-	 } else {
-	    snprintf(new_label, sizeof(new_label),
-		     _("System is running on AC power\nBattery: %d%% (%s)"),
-		     batt_life, _(status[batt_state]));
-	 }
+      if (batt_time > 0) {
+        seconds = batt_time;
+        hours = seconds / 3600;
+        seconds -= 3600 * hours;
+        minutes = seconds / 60;
+        seconds -= 60 * minutes;
       } else {
-	 if(acline_status == 0) {
-	    snprintf(new_label, sizeof(new_label),
-		     _("System is running on battery power"));
-	 } else {
-	    snprintf(new_label, sizeof(new_label),
-		     _("System is running on AC power"));
-	 }
+        hours = minutes = seconds = 0;
       }
 
-      gtk_tooltips_set_tip (battery->ac_tip,
-			    battery->eventstatus,
-			    new_label,
-			    NULL);
+      /* Update the remaining battery or charging time tip */
+      if (batt_time>0 && (charging || !acline_status)) {
+        
+	 *time_label = '\n';
+         if(charging) {
+            snprintf(time_label + 1, sizeof(time_label) - 1,
+                    _("Estimated time until fully charged: %d:%02d"), 
+                    hours, minutes);
+         } else {
+            snprintf(time_label + 1, sizeof(time_label) - 1,
+                    _("Estimated remaining battery time: %d:%02d"), 
+                    hours, minutes);
+         }
+      } else {
+         *time_label = 0;
+      }
    
       /* Update the battery meter, tooltip and label */
       
@@ -478,6 +483,15 @@
       gtk_label_set_text (GTK_LABEL (battery->percent), new_label);
       gtk_label_set_text (GTK_LABEL (battery->statuspercent), new_label);
       
+      if (batt_time > 0 && batterypresent) {
+         snprintf(new_label, sizeof(new_label),"%d:%02d", hours, minutes);
+      } else {
+	 *new_label = 0; 
+      }
+
+      gtk_label_set_text (GTK_LABEL (battery->time), new_label);
+      gtk_label_set_text (GTK_LABEL (battery->statustime), new_label);
+
       if (batt_life <= battery->red_val) {
 	 color=red;
 	 darkcolor=darkred;
@@ -593,39 +607,39 @@
       if (battery->showstatus == 0) {
 	 if (batterypresent) {
 	    if(acline_status == 0) {
-	       snprintf(new_string, sizeof(new_string), 
+	       snprintf(new_label, sizeof(new_label), 
 			/* This string will display as a tooltip over the battery frame
 			 when the computer is using battery power.*/
-			_("System is running on battery power. Battery: %d%% (%s)"),
+			_("System is running on battery power\nBattery: %d%% (%s)"),
 			batt_life,
 			_(status[batt_state]));
 	    } else {
-	       snprintf(new_string, sizeof(new_string), 
+	       snprintf(new_label, sizeof(new_label), 
 			/* This string will display as a tooltip over the battery frame
 			 when the computer is using AC power.*/
-			_("System is running on AC power. Battery: %d%% (%s)"),
+			_("System is running on AC power\nBattery: %d%% (%s)"),
 			batt_life,
 			_(status[batt_state]));
 	    }
 	 } else {
 	    if(acline_status == 0) {
-	       snprintf(new_string, sizeof(new_string), 
+	       snprintf(new_label, sizeof(new_label), 
 			/* This string will display as a tooltip over the
 			 battery frame when the computer is using battery
 			 power and the battery isn't present. Not a
 			 possible combination, I guess... :)*/
-			_("System is running on battery power. Battery: Not present"));
+			_("System is running on battery power\nBattery: Not present"));
 	    } else {
-	       snprintf(new_string, sizeof(new_string), 
+	       snprintf(new_label, sizeof(new_label), 
 			/* This string will display as a tooltip over the
 			 battery frame when the computer is using AC
 			 power and the battery isn't present.*/
-			_("System is running on AC power. Battery: Not present"));
+			_("System is running on AC power\nBattery: Not present"));
 	    }
 	 }
       } else {
 	 if (batterypresent) {
-	   snprintf(new_string, sizeof(new_string), 
+	   snprintf(new_label, sizeof(new_label), 
 		    /* Displayed as a tooltip over the battery meter when there is
 		     a battery present. %d will hold the current charge and %s will
 		     hold the status of the battery, (High, Low, Critical, Charging. */
@@ -633,21 +647,80 @@
 		    batt_life,
 		    _(status[batt_state]));
 	 } else {
-	    snprintf(new_string, sizeof(new_string), 
+	    snprintf(new_label, sizeof(new_label), 
 		     /* Displayed as a tooltip over the battery meter when no
 		      battery is present. */
 		     (_("Battery: Not present")));
 	 }
       }
+
+      strncat(new_label, time_label, sizeof(new_label));
       
       gtk_tooltips_set_tip(battery->progress_tip,
 			   battery->eventbattery,
-			   gettext(new_string),
+			   gettext(new_label),
 			   NULL);
       gtk_tooltips_set_tip(battery->progressy_tip,
 			   battery->eventybattery,
-			   gettext(new_string),
+			   gettext(new_label),
 			   NULL);
+
+      /* Update the AC tooltip */
+
+      if(battery->showbattery == 0) {
+	 if (batterypresent) {
+	    if(acline_status == 0) {
+	       snprintf(new_label, sizeof(new_label), 
+			/* This string will display as a tooltip over the battery frame
+			 when the computer is using battery power.*/
+			_("System is running on battery power\nBattery: %d%% (%s)"),
+			batt_life,
+			_(status[batt_state]));
+	    } else {
+	       snprintf(new_label, sizeof(new_label), 
+			/* This string will display as a tooltip over the battery frame
+			 when the computer is using AC power.*/
+			_("System is running on AC power\nBattery: %d%% (%s)"),
+			batt_life,
+			_(status[batt_state]));
+	    }
+	 } else {
+	    if(acline_status == 0) {
+	       snprintf(new_label, sizeof(new_label), 
+			/* This string will display as a tooltip over the
+			 battery frame when the computer is using battery
+			 power and the battery isn't present. Not a
+			 possible combination, I guess... :)*/
+			_("System is running on battery power\nBattery: Not present"));
+	    } else {
+	       snprintf(new_label, sizeof(new_label), 
+			/* This string will display as a tooltip over the
+			 battery frame when the computer is using AC
+			 power and the battery isn't present.*/
+			_("System is running on AC power\nBattery: Not present"));
+	    }
+	 }
+         strncat(new_label, time_label, sizeof(new_label));
+      } else {
+	 if(acline_status == 0) {
+	    /* 0 = Battery power */
+	    snprintf(new_label, sizeof(new_label),
+		     /* This string will display as a tooltip over the status frame
+		      when the computer is using battery power.*/
+		     _("System is running on battery power"));
+	 } else {
+	    /* 1 = AC power. I should really test it explicitly here. */
+	    snprintf(new_label, sizeof(new_label),
+		     /* This string will display as a tooltip over the status frame
+		      when the computer is using AC power.*/
+		     _("System is running on AC power"));
+	 }
+      }
+
+      gtk_tooltips_set_tip (battery->ac_tip,
+			    battery->eventstatus,
+			    new_label,
+			    NULL);
       
       if (DEBUG) printf("Percent: %d, Status: %s\n", batt_life, status[batt_state]);
    }
@@ -655,9 +728,10 @@
    battery->last_charging = charging;
    battery->last_batt_state = batt_state;
    battery->last_batt_life = batt_life;
+   battery->last_batt_life = batt_time;
    battery->last_acline_status = acline_status;
    battery->last_pixmap_index = pixmap_index;
-
+   battery->conf_changed = 0;
    
    return TRUE;
 }
@@ -872,47 +946,6 @@
 	       PanelAppletOrient  orient,
 	       ProgressData      *battstat)
 {
-   gchar new_label[80];
-   guint acline_status;
-   guint batt_state;
-   guint batt_life;
-   gchar *status[]={
-      /* The following four messages will be displayed as tooltips over
-       the battery meter.  
-       High = The APM BIOS thinks that the battery charge is High.*/
-      gettext_noop ("High"),
-      /* Low = The APM BIOS thinks that the battery charge is Low.*/
-      gettext_noop ("Low"),
-      /* Critical = The APM BIOS thinks that the battery charge is Critical.*/
-      gettext_noop ("Critical"),
-      /* Charging = The APM BIOS thinks that the battery is recharging.*/
-      gettext_noop ("Charging")};
-
-   battstat->orienttype = orient;
-   
-   if (DEBUG) g_print("change_orient()\n");
-
-   apm_readinfo(PANEL_APPLET (applet));
-#ifdef __FreeBSD__
-   acline_status = apminfo.ai_acline ? 1 : 0;
-   batt_state = apminfo.ai_batt_stat;
-   batt_life = apminfo.ai_batt_life;
-#elif __OpenBSD__
-   acline_status = apminfo.ac_state ? 1 : 0;
-   batt_state = apminfo.battery_state;
-   batt_life = apminfo.battery_life;
-#elif __linux__
-   acline_status = apminfo.ac_line_status ? 1 : 0;
-   batt_state = apminfo.battery_status;
-   batt_life = apminfo.battery_percentage;
-#else
-   acline_status = 1;
-   batt_state = 0;
-   batt_life = 100;
-#endif
-   if(batt_state > 3) batt_state = 0;
-   if(batt_life > 100) batt_life = 100;
-
    switch(battstat->orienttype) {
     case PANEL_APPLET_ORIENT_UP:
       if(battstat->panelsize<40)
@@ -937,6 +970,7 @@
    if (battstat->horizont) {
       /* Horizontal mode */
       gtk_widget_hide (battstat->statuspercent);
+      gtk_widget_hide (battstat->statustime);
       gtk_widget_hide (battstat->frameybattery);
       gtk_widget_show (battstat->framebattery);
       
@@ -945,62 +979,24 @@
 	gtk_widget_hide (battstat->statuspixmapwid);
       battstat->showpercent ?
 	gtk_widget_show (battstat->percent):gtk_widget_hide (battstat->percent);
+      battstat->showtime ?
+	gtk_widget_show (battstat->time):gtk_widget_hide (battstat->time);
       battstat->showbattery ?
 	gtk_widget_show (battstat->pixmapwid):gtk_widget_hide (battstat->pixmapwid);
-      (battstat->showbattery || battstat->showpercent) ?
+      (battstat->showbattery || battstat->showpercent || battstat->showtime) ?
 	gtk_widget_show (battstat->framebattery):gtk_widget_hide (battstat->framebattery);
-      
-      if (battstat->showbattery == 0 && battstat->showpercent == 0) {
-	 if(acline_status == 0) {
-	    snprintf(new_label, sizeof(new_label),
-		     /* This string will display as a tooltip over the status frame
-		      when the computer is using battery power and the battery meter
-		      and percent meter is hidden by the user.*/
-		     _("System is running on battery power. Battery: %d%% (%s)"),
-		     batt_life, _(status[batt_state]));
-	 } else {
-	    snprintf(new_label, sizeof(new_label),
-		     /* This string will display as a tooltip over the status frame
-		      when the computer is using AC power and the battery meter
-		      and percent meter is hidden by the user.*/
-		     _("System is running on AC power. Battery: %d%% (%s)"),
-		     batt_life, _(status[batt_state]));      
-	 }
-	 gtk_tooltips_set_tip (battstat->ac_tip,
-			       battstat->eventstatus,
-			       new_label,
-			       NULL);
-      } else {
-	 if(acline_status == 0) {
-	    /* 0 = Battery power */
-	    snprintf(new_label, sizeof(new_label),
-		     /* This string will display as a tooltip over the status frame
-		      when the computer is using battery power.*/
-		     _("System is running on battery power"));
-	 } else {
-	    /* 1 = AC power. I should really test it explicitly here. */
-	    snprintf(new_label, sizeof(new_label),
-		     /* This string will display as a tooltip over the status frame
-		      when the computer is using AC power.*/
-		     _("System is running on AC power"));
-	 }
-	 gtk_tooltips_set_tip (battstat->ac_tip,
-			       battstat->eventstatus,
-			       new_label,
-			       NULL);
 #ifdef FIXME
 	 gtk_widget_set_usize(battstat->framestatus, 20, 24);
-	 if(battstat->showbattery == 1 && battstat->showpercent == 1) {
+	 if(battstat->showbattery == 1 && (battstat->showpercent == 1 || battstat->showtime == 1)) {
 	   /*	    width=gdk_string_width((battstat->percentstyle)->font,"100%")+46+3;*/
 	    gtk_widget_set_usize(battstat->framebattery, width, 24);
-	 } else if(battstat->showbattery == 0 && battstat->showpercent == 1) {
+	 } else if(battstat->showbattery == 0 && (battstat->showpercent == 1 || battstat->showtime == 1)) {
 	   /*	    width=gdk_string_width((battstat->percentstyle)->font,"100%")+6;*/
 	    gtk_widget_set_usize(battstat->framebattery, width, 24);
-	 } else if(battstat->showbattery == 1 && battstat->showpercent == 0) {
+	 } else if(battstat->showbattery == 1 && (battstat->showpercent == 0 && battstat->showtime == 0)) {
 	    gtk_widget_set_usize(battstat->framebattery, 46, 24);	
 	 }
 #endif
-      }
    } else {
       /* Square mode */
      /*      width=gdk_string_width((battstat->percentstyle)->font,"100%")+6;*/
@@ -1012,14 +1008,16 @@
 	gtk_widget_hide (battstat->statuspixmapwid);
       battstat->showpercent ?
 	gtk_widget_show (battstat->statuspercent):gtk_widget_hide (battstat->statuspercent);
+      battstat->showtime ?
+	gtk_widget_show (battstat->statustime):gtk_widget_hide (battstat->statustime);
       battstat->showbattery ?
 	gtk_widget_show (battstat->frameybattery):gtk_widget_hide (battstat->frameybattery);
 #ifdef FIXME
-      battstat->showpercent ?
+      battstat->showpercent || battstat->showtime ?
 	gtk_widget_set_usize(battstat->framestatus,width,24):
       gtk_widget_set_usize(battstat->framestatus, 20, 24);
 #endif      
-      if(battstat->showstatus == 0 && battstat->showpercent == 1) {
+      if(battstat->showstatus == 0 && (battstat->showpercent == 1 || battstat->showtime == 1)) {
 	 gtk_widget_show (battstat->framestatus);
 	 gtk_widget_hide (battstat->statuspixmapwid);
 #ifdef FIXME
@@ -1027,59 +1025,18 @@
 #endif
       }
 #ifdef FIXME
-      if(battstat->showstatus == 1 && battstat->showpercent == 0) {
+      if(battstat->showstatus == 1 && (battstat->showpercent == 0 && battstat->showtime == 0)) {
 	 gtk_widget_set_usize(battstat->framestatus, 20, 24);
       }
-      if(battstat->showstatus == 1 && battstat->showpercent == 1) {
+      if(battstat->showstatus == 1 && (battstat->showpercent == 1 || battstat->showtime == 1)) {
 	 gtk_widget_set_usize(battstat->framestatus, width, 46);
       }
       if(battstat->showstatus == 1) {
 	 gtk_widget_show (battstat->statuspixmapwid);      
       }
 #endif
-      if(battstat->showbattery == 0 && battstat->showpercent == 0) {
-	 if(acline_status == 0) {
-	    /* 0 = Battery power */
-	    snprintf(new_label, sizeof(new_label),
-		     /* This string will display as a tooltip over the status frame
-		      when the computer is using battery power and the battery meter
-		      and percent meter is hidden by the user.*/
-		     _("System is running on battery power\nBattery: %d%% (%s)"),
-		     batt_life, _(status[batt_state]));
-	 } else {
-	    /* 1 = AC power. I should really test it explicitly here. */
-	    snprintf(new_label, sizeof(new_label),
-		     /* This string will display as a tooltip over the status frame
-		      when the computer is using AC power and the battery meter
-		      and percent meter is hidden by the user.*/
-		     _("System is running on AC power\nBattery: %d%% (%s)"),
-		     batt_life, _(status[batt_state]));
-	 }
-	 gtk_tooltips_set_tip (battstat->ac_tip,
-			       battstat->eventstatus,
-			       new_label,
-			       NULL);
-      } else {
-	 if(acline_status == 0) {
-	    /* 0 = Battery power */
-	    snprintf(new_label, sizeof(new_label),
-		     /* This string will display as a tooltip over the status frame
-		      when the computer is using battery power.*/
-		     _("System is running on battery power"));
-	 } else {
-	    /* 1 = AC power. I should really test it explicitly here. */
-	    snprintf(new_label, sizeof(new_label),
-		     /* This string will display as a tooltip over the status frame
-		      when the computer is using AC power.*/
-		     _("System is running on AC power"));
-	 }
-	 gtk_tooltips_set_tip (battstat->ac_tip,
-			       battstat->eventstatus,
-			       new_label,
-			       NULL);
-      }
    }
-   
+
    return;
 }
 
@@ -1271,6 +1228,7 @@
   battstat->showstatus = panel_applet_gconf_get_bool (applet, GCONF_PATH "show_status", NULL);
   battstat->showbattery = panel_applet_gconf_get_bool (applet, GCONF_PATH "show_battery", NULL);
   battstat->showpercent = panel_applet_gconf_get_bool (applet, GCONF_PATH "show_percent", NULL);
+  battstat->showtime = panel_applet_gconf_get_bool (applet, GCONF_PATH "show_time", NULL);
   battstat->suspend_cmd = panel_applet_gconf_get_string (applet, GCONF_PATH "suspend_command", NULL);
   
 }
@@ -1365,6 +1323,10 @@
    gtk_widget_show(battstat->percent);
    gtk_box_pack_start (GTK_BOX(battstat->hbox), battstat->percent, FALSE, TRUE, 0);
    
+   battstat->time = gtk_label_new ("0:01");
+   gtk_widget_show(battstat->time);
+   gtk_box_pack_start (GTK_BOX(battstat->hbox), battstat->time, FALSE, TRUE, 0);
+
    statusimage[BATTERY] = gdk_pixmap_create_from_xpm_d( battstat->applet->window,
 							&statusmask[BATTERY],
 							&battstat->style->bg[GTK_STATE_NORMAL],
@@ -1391,6 +1353,10 @@
    battstat->statuspercent = gtk_label_new("100%");
    gtk_box_pack_start (GTK_BOX (battstat->statusvbox), battstat->statuspercent, FALSE, TRUE, 0);
    gtk_widget_show (battstat->statuspercent);
+
+   battstat->statustime = gtk_label_new("1:23");
+   gtk_box_pack_start (GTK_BOX (battstat->statusvbox), battstat->statustime, FALSE, TRUE, 0);
+   gtk_widget_show (battstat->statustime);
  
    /* Alloc battery colors */
    for(i=0; orange[i].pixel!=-1; i++) {
@@ -1481,6 +1447,7 @@
 
   battstat->flash = FALSE;
   battstat->last_batt_life = 1000;
+  battstat->last_batt_time = -1000;
   battstat->last_acline_status = 1000;
   battstat->last_batt_state = 1000;
   battstat->last_pixmap_index = 1000;
diff -u -r gnome-applets-2.4.1.orig/battstat/battstat_applet.glade gnome-applets-2.4.1/battstat/battstat_applet.glade
--- gnome-applets-2.4.1.orig/battstat/battstat_applet.glade	2003-07-21 19:19:07.000000000 -0400
+++ gnome-applets-2.4.1/battstat/battstat_applet.glade	2003-10-26 20:25:55.000000000 -0500
@@ -785,7 +785,25 @@
 			      </child>
 
 			      <child>
-				<widget class="GtkCheckButton" id="show_percent_toggle">
+				<widget class="GtkRadioButton" id="show_time_radio">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">Show _remaining battery or charge time</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioButton" id="show_percent_radio">
 				  <property name="visible">True</property>
 				  <property name="can_focus">True</property>
 				  <property name="label" translatable="yes">Sho_w battery charge percentages</property>
@@ -794,6 +812,7 @@
 				  <property name="active">False</property>
 				  <property name="inconsistent">False</property>
 				  <property name="draw_indicator">True</property>
+				  <property name="group">show_time_radio</property>
 				</widget>
 				<packing>
 				  <property name="padding">0</property>
@@ -801,6 +820,26 @@
 				  <property name="fill">False</property>
 				</packing>
 			      </child>
+
+			      <child>
+				<widget class="GtkRadioButton" id="no_text_label_radio">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">_No text label</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				  <property name="group">show_time_radio</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
 			    </widget>
 			    <packing>
 			      <property name="padding">0</property>
diff -u -r gnome-applets-2.4.1.orig/battstat/battstat.h gnome-applets-2.4.1/battstat/battstat.h
--- gnome-applets-2.4.1.orig/battstat/battstat.h	2003-07-23 22:02:45.000000000 -0400
+++ gnome-applets-2.4.1/battstat/battstat.h	2003-10-27 04:06:31.000000000 -0500
@@ -58,6 +58,8 @@
   GtkWidget *radio_lay_batt_on;
   GtkWidget *radio_lay_status_on;
   GtkWidget *radio_lay_percent_on;
+  GtkWidget *radio_lay_time_on;
+  GtkWidget *radio_lay_no_label_on;
   GdkPixmap *pixbuffer;
   GdkBitmap *pixmask;
   GdkPixmap *pixbuffery;
@@ -80,6 +82,7 @@
   GtkWidget *framebattery;
   GtkWidget *frameybattery;
   GtkWidget *percent;
+  GtkWidget *time;
   GtkWidget *eventbattery;
   GtkWidget *eventybattery;
   GtkWidget *eventstatus;
@@ -89,6 +92,7 @@
   GtkWidget *statuspixmapwid;
   GtkWidget *statusvbox;
   GtkWidget *statuspercent;
+  GtkWidget *statustime;
   GtkWidget *fontpicker;
   GtkStyle *percentstyle;
   gboolean font_changed;
@@ -102,6 +106,7 @@
   gboolean showstatus;
   gboolean showbattery;
   gboolean showpercent;
+  gboolean showtime;
   gboolean suspend;
   GtkWidget *suspend_entry;
   gchar *suspend_cmd;
@@ -136,10 +141,12 @@
   /* last_* for the benefit of the timeout functions */
   guint flash;
   guint last_batt_life;
+  guint last_batt_time;
   guint last_acline_status;
   guint last_batt_state;
   guint last_pixmap_index;
   guint last_charging;
+  guint conf_changed;
 } ProgressData;
 
 enum statusimagename {BATTERY,AC,FLASH,WARNING};
diff -u -r gnome-applets-2.4.1.orig/battstat/ChangeLog gnome-applets-2.4.1/battstat/ChangeLog
--- gnome-applets-2.4.1.orig/battstat/ChangeLog	2003-09-04 07:35:11.000000000 -0400
+++ gnome-applets-2.4.1/battstat/ChangeLog	2003-10-27 04:26:29.000000000 -0500
@@ -1,3 +1,10 @@
+2003-10-27  Behdad Esfahbod  <gnomeapplets@behdad.org>
+
+	* acpi-linux.c: Linearly estimate remaining charging/battery time.
+	* battstat_applet.c, properties.c, battstat_applet.h, battstat_applet.glade:
+	Added an Show remaining time option, utilizing the above change.  Some code
+	cleanup and removed duplicated code.
+
 2003-09-04  Stanislav Brabec  <sbrabec@suse.cz>
 
 	* sounds/Makefile.am: Added battstat_applet.soundlist.in to
diff -u -r gnome-applets-2.4.1.orig/battstat/properties.c gnome-applets-2.4.1/battstat/properties.c
--- gnome-applets-2.4.1.orig/battstat/properties.c	2003-07-23 22:02:45.000000000 -0400
+++ gnome-applets-2.4.1/battstat/properties.c	2003-10-27 04:08:38.000000000 -0500
@@ -118,10 +118,12 @@
   ProgressData   *battstat = data;
   PanelApplet *applet = PANEL_APPLET (battstat->applet);
   gboolean toggled;
+
+  battstat->conf_changed = 1;
   
   toggled = gtk_toggle_button_get_active (button);
  
-  if (!( toggled || battstat->showpercent || battstat->showstatus)) {
+  if (!( toggled || battstat->showpercent || battstat->showtime || battstat->showstatus)) {
     gtk_toggle_button_set_active (button, !toggled);
     return;
   }
@@ -145,9 +147,11 @@
   PanelApplet *applet = PANEL_APPLET (battstat->applet);
   gboolean toggled;
   
+  battstat->conf_changed = 1;
+  
   toggled = gtk_toggle_button_get_active (button);
   
-  if (!( toggled || battstat->showpercent || battstat->showbattery)) {
+  if (!( toggled || battstat->showpercent || battstat->showtime || battstat->showbattery)) {
     gtk_toggle_button_set_active (button, !toggled);
     return;
   }
@@ -169,9 +173,11 @@
   PanelApplet *applet = PANEL_APPLET (battstat->applet);
   gboolean toggled;
   
+  battstat->conf_changed = 1;
+  
   toggled = gtk_toggle_button_get_active (button);
   
-  if (!( toggled || battstat->showstatus || battstat->showbattery)) {
+  if (!( toggled || battstat->showtime || battstat->showstatus || battstat->showbattery)) {
     gtk_toggle_button_set_active (button, !toggled);
     return;
   }
@@ -189,12 +195,55 @@
 }
 
 static void
+show_time_toggled (GtkToggleButton *button, gpointer data)
+{
+  ProgressData   *battstat = data;
+  PanelApplet *applet = PANEL_APPLET (battstat->applet);
+  gboolean toggled;
+  
+  battstat->conf_changed = 1;
+  
+  toggled = gtk_toggle_button_get_active (button);
+  
+  if (!( toggled || battstat->showtime || battstat->showstatus || battstat->showbattery)) {
+    gtk_toggle_button_set_active (button, !toggled);
+    return;
+  }
+  
+  battstat->showtime = toggled;
+  if (battstat->horizont) 
+    battstat->showtime ?
+	gtk_widget_show (battstat->time):gtk_widget_hide (battstat->time);
+  else
+    battstat->showtime ?
+	gtk_widget_show (battstat->statustime):gtk_widget_hide (battstat->statustime);
+  panel_applet_gconf_set_bool   (applet, "show_time", 
+  				 battstat->showtime, NULL);
+  				 
+}
+
+static void
+no_text_label_toggled (GtkToggleButton *button, gpointer data)
+{
+  ProgressData   *battstat = data;
+  PanelApplet *applet = PANEL_APPLET (battstat->applet);
+
+  battstat->conf_changed = 1;
+  
+  panel_applet_gconf_set_bool   (applet, "no_text_label", 
+  				 battstat->showtime, NULL);
+  				 
+}
+
+static void
 suspend_changed (GtkEditable *editable, gpointer data)
 {
   ProgressData   *battstat = data;
   PanelApplet *applet = PANEL_APPLET (battstat->applet);
   gchar *cmd;
   
+  battstat->conf_changed = 1;
+  
   cmd = gtk_editable_get_chars (editable, 0, -1);
   if (!cmd)
   	return;
@@ -215,6 +264,8 @@
   ProgressData   *battstat = data;
   PanelApplet *applet = PANEL_APPLET (battstat->applet);
   
+  battstat->conf_changed = 1;
+  
   battstat->lowbattnotification = gtk_toggle_button_get_active (button);
   panel_applet_gconf_set_bool   (applet,"low_battery_notification", 
   				 battstat->lowbattnotification, NULL);  
@@ -230,6 +281,8 @@
   ProgressData   *battstat = data;
   PanelApplet *applet = PANEL_APPLET (battstat->applet);
   
+  battstat->conf_changed = 1;
+  
   battstat->fullbattnot = gtk_toggle_button_get_active (button);
   panel_applet_gconf_set_bool   (applet,"full_battery_notification", 
   				 battstat->fullbattnot, NULL);  
@@ -246,6 +299,8 @@
   ProgressData   *battstat = data;
   PanelApplet *applet = PANEL_APPLET (battstat->applet);
   
+  battstat->conf_changed = 1;
+  
   battstat->beep = gtk_toggle_button_get_active (button);
   panel_applet_gconf_set_bool   (applet,"beep", 
   				 battstat->beep, NULL);  
@@ -257,6 +312,8 @@
   ProgressData   *battstat = data;
   PanelApplet *applet = PANEL_APPLET (battstat->applet);
   
+  battstat->conf_changed = 1;
+  
   battstat->draintop = gtk_toggle_button_get_active (button); 
   panel_applet_gconf_set_bool (applet,"drain_from_top", 
   			       battstat->draintop, NULL); 
@@ -332,6 +389,7 @@
   GtkWidget *preview_hbox;
   GtkWidget *widget;
   guint      percentage;
+  guint      time;
   gboolean   writable;
 
   apm_readinfo (PANEL_APPLET (battstat->applet));
@@ -348,6 +406,7 @@
 #else
   percentage = 100;
 #endif
+  time = apminfo.battery_time;
 
   if (DEBUG) g_print("prop_cb()\n");
 
@@ -522,14 +581,26 @@
     gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (battstat->radio_lay_status_on), TRUE);
   }
 
-  battstat->radio_lay_percent_on = glade_xml_get_widget (glade_xml, "show_percent_toggle");
+  battstat->radio_lay_percent_on = glade_xml_get_widget (glade_xml, "show_percent_radio");
+  battstat->radio_lay_time_on = glade_xml_get_widget (glade_xml, "show_time_radio");
+  battstat->radio_lay_no_label_on = glade_xml_get_widget (glade_xml, "no_text_label_radio");
   g_signal_connect (G_OBJECT (battstat->radio_lay_percent_on), "toggled",
   		    G_CALLBACK (show_percent_toggled), battstat);
+  g_signal_connect (G_OBJECT (battstat->radio_lay_time_on), "toggled",
+  		    G_CALLBACK (show_time_toggled), battstat);
+  g_signal_connect (G_OBJECT (battstat->radio_lay_no_label_on), "toggled",
+  		    G_CALLBACK (no_text_label_toggled), battstat);
   if ( ! key_writable (PANEL_APPLET (battstat->applet), "show_percent"))
 	  hard_set_sensitive (battstat->radio_lay_percent_on, FALSE);
+  if ( ! key_writable (PANEL_APPLET (battstat->applet), "show_time"))
+	  hard_set_sensitive (battstat->radio_lay_time_on, FALSE);
 
   if(battstat->showpercent) {
     gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (battstat->radio_lay_percent_on), TRUE);
+  } else if(battstat->showtime) {
+    gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (battstat->radio_lay_time_on), TRUE);
+  } else {
+    gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (battstat->radio_lay_no_label_on), TRUE);
   }
 
    gtk_dialog_set_default_response (GTK_DIALOG (battstat->prop_win), GTK_RESPONSE_CLOSE);
diff -u -r gnome-applets-2.4.1.orig/battstat/README gnome-applets-2.4.1/battstat/README
--- gnome-applets-2.4.1.orig/battstat/README	2001-03-29 16:32:00.000000000 -0500
+++ gnome-applets-2.4.1/battstat/README	2003-10-27 04:22:48.000000000 -0500
@@ -11,6 +11,8 @@
  o   Displays remaining battery percentage in a progress bar. 
  
  o   Progress bar is color-coded to reflect the current battery charge.
+
+ o   Estimate remaining charge time or remaining battery time.
  
  o   An icon display if laptop is running on AC or battery power. Or if
      it's charging the battery or if the power falls under a preset
