[Goodies-commits] r3002 - in xfce4-battery-plugin/trunk: . panel-plugin

Nick Schermer nick at xfce.org
Fri Aug 17 20:38:04 CEST 2007


Author: nick
Date: 2007-08-17 18:38:04 +0000 (Fri, 17 Aug 2007)
New Revision: 3002

Modified:
   xfce4-battery-plugin/trunk/ChangeLog
   xfce4-battery-plugin/trunk/configure.in.in
   xfce4-battery-plugin/trunk/panel-plugin/battery.c
   xfce4-battery-plugin/trunk/panel-plugin/libacpi.c
Log:
	* Apply patch to fix compilation with kfreebsd (Bug #2040).
	* Apply patch to make the plugin work with newer kernels (Bug #3190).

Modified: xfce4-battery-plugin/trunk/ChangeLog
===================================================================
--- xfce4-battery-plugin/trunk/ChangeLog	2007-08-15 17:04:40 UTC (rev 3001)
+++ xfce4-battery-plugin/trunk/ChangeLog	2007-08-17 18:38:04 UTC (rev 3002)
@@ -1,3 +1,8 @@
+2007-08-17	Nick Schermer <nick at xfce.org>
+
+	* Apply patch to fix compilation with kfreebsd (Bug #2040).
+	* Apply patch to make the plugin work with newer kernels (Bug #3190).
+
 2007-01-17	Nick Schermer <nick at xfce.org>
 
 	* Remove the inline icon and add Tango icons.

Modified: xfce4-battery-plugin/trunk/configure.in.in
===================================================================
--- xfce4-battery-plugin/trunk/configure.in.in	2007-08-15 17:04:40 UTC (rev 3001)
+++ xfce4-battery-plugin/trunk/configure.in.in	2007-08-17 18:38:04 UTC (rev 3002)
@@ -11,7 +11,7 @@
 dnl ***************************
 m4_define([battery_version_major], [0])
 m4_define([battery_version_minor], [5])
-m4_define([battery_version_micro], [0])
+m4_define([battery_version_micro], [1])
 m4_define([battery_version_build], [r at REVISION@])
 m4_define([battery_version_tag], [svn])
 m4_define([battery_version], [battery_version_major().battery_version_minor().battery_version_micro()ifelse(battery_version_tag(), [svn], [battery_version_tag()-battery_version_build()], [battery_version_tag()])])

Modified: xfce4-battery-plugin/trunk/panel-plugin/battery.c
===================================================================
--- xfce4-battery-plugin/trunk/panel-plugin/battery.c	2007-08-15 17:04:40 UTC (rev 3001)
+++ xfce4-battery-plugin/trunk/panel-plugin/battery.c	2007-08-17 18:38:04 UTC (rev 3002)
@@ -25,7 +25,7 @@
 #include <config.h>
 #endif
 
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 #include <machine/apm_bios.h>
 #elif __OpenBSD__
 #include <sys/param.h>
@@ -259,7 +259,7 @@
     GtkRequisition widget_size;
     gtk_widget_size_request( GTK_WIDGET(battmon->plugin), &widget_size );
     plugin_size = widget_size.height;
-    
+
     labels_size = 0;
     gtk_widget_size_request( GTK_WIDGET(battmon->charge), &widget_size );
     labels_size += widget_size.height;
@@ -377,7 +377,7 @@
           lcapacity = last_lcapacity;
           rate = last_rate;
         }
-        
+
         charge = (((float)ccapacity)/((float)lcapacity))*100;
 
         if ( last_acline )
@@ -387,10 +387,10 @@
 
         if ( time_remaining < 0 )
             time_remaining = 0;
-        
+
         last_acline = acline;
 
-    }    
+    }
 #ifdef __linux__
     else {
         DBG ("Trying apm_read()...");
@@ -398,7 +398,7 @@
         charge = apm.battery_percentage;
         time_remaining = apm.battery_time;
         acline = apm.ac_line_status ? TRUE : FALSE;
-        
+
     }
 #elif __FreeBSD__
     else {
@@ -680,10 +680,10 @@
 
       battmon->rtime = (GtkLabel *)gtk_label_new("01:00");
     gtk_box_pack_start(GTK_BOX(vbox),GTK_WIDGET(battmon->rtime),TRUE, TRUE, 0);
-    
+
     vbox=gtk_vbox_new(FALSE, 0);
     gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(vbox), FALSE, FALSE, 0);
-    
+
     battmon->alt_rtime = (GtkLabel *)gtk_label_new("01:00");
     gtk_box_pack_start(GTK_BOX(vbox),GTK_WIDGET(battmon->alt_rtime),TRUE, TRUE, 0);
 
@@ -871,7 +871,7 @@
     xfce_rc_write_int_entry (rc, "action_on_low", battmon->options.action_on_low);
 
     xfce_rc_write_int_entry (rc, "action_on_critical", battmon->options.action_on_critical);
-    
+
     xfce_rc_write_int_entry (rc, "hide_when_full", battmon->options.hide_when_full );
 
     xfce_rc_write_entry (rc, "command_on_low", battmon->options.command_on_low ? battmon->options.command_on_low : "");
@@ -1144,7 +1144,7 @@
 battmon_dialog_response (GtkWidget *dlg, int response, t_battmon *battmon)
 {
     gboolean result;
-    
+
     if (response == GTK_RESPONSE_HELP)
     {
         /* show help */
@@ -1242,8 +1242,8 @@
         gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
      mi = gtk_menu_item_new_with_label(_("Run command in terminal"));
         gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
-        
 
+
     dialog->om_action_low = gtk_option_menu_new();
     gtk_option_menu_set_menu(GTK_OPTION_MENU(dialog->om_action_low), menu);
     gtk_box_pack_start(GTK_BOX(hbox), dialog->om_action_low, FALSE, FALSE, 0);
@@ -1327,7 +1327,7 @@
 
     dialog->cb_hide_when_full = gtk_check_button_new_with_mnemonic(_("Hide time/percentage when full"));
     gtk_box_pack_start(GTK_BOX(vbox2), dialog->cb_hide_when_full, FALSE, FALSE, 0);
-    
+
     dialog->cb_disp_tooltip_percentage = gtk_check_button_new_with_mnemonic(_("Display percentage in tooltip"));
     gtk_box_pack_start(GTK_BOX(vbox2), dialog->cb_disp_tooltip_percentage, FALSE, FALSE, 0);
 

Modified: xfce4-battery-plugin/trunk/panel-plugin/libacpi.c
===================================================================
--- xfce4-battery-plugin/trunk/panel-plugin/libacpi.c	2007-08-15 17:04:40 UTC (rev 3001)
+++ xfce4-battery-plugin/trunk/panel-plugin/libacpi.c	2007-08-17 18:38:04 UTC (rev 3002)
@@ -190,10 +190,12 @@
 #ifdef __linux__
   FILE *acpi;
 
-  if (!(acpi = fopen ("/proc/acpi/info", "r")))
+  if (!(acpi = fopen ("/proc/acpi/info", "r"))
+      && !(acpi = fopen ("/sys/module/acpi/parameters/acpica_version", "r")))
   {
 #ifdef DEBUG
-	  printf("DBG:no acpi: /proc/acpi/info not found!\n");
+	  printf("DBG:no acpi: /proc/acpi/info or "
+             "/sys/module/acpi/parameters/acpica_version not found!\n");
 #endif
     return 1;
   }




More information about the Goodies-commits mailing list