import of xfce4-battery-plugin-0.2.0.

This commit is contained in:
jolan 2004-01-14 05:50:05 +00:00
parent fa59522527
commit 7c9876a43e
6 changed files with 100 additions and 0 deletions

View File

@ -0,0 +1,11 @@
# $OpenBSD: Makefile,v 1.1.1.1 2004/01/14 05:50:05 jolan Exp $
ONLY_FOR_ARCHS= i386 macppc
COMMENT= "battery monitor panel plugin for xfce4"
DISTNAME= xfce4-battery-plugin-0.2.0
MASTER_SITES= ${MASTER_SITE_GOODIES}
HOMEPAGE= ${HOMEPAGE_GOODIES}
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
MD5 (xfce4/xfce4-battery-plugin-0.2.0.tar.gz) = ad6cbb65b356342bf1b474b612beadf4
RMD160 (xfce4/xfce4-battery-plugin-0.2.0.tar.gz) = 17b2c1bc754d3198ce66ae22b96843afdb840393
SHA1 (xfce4/xfce4-battery-plugin-0.2.0.tar.gz) = 186bc6056d644a9830334369c7495fc803dbb495

View File

@ -0,0 +1,37 @@
$OpenBSD: patch-panel-plugin_Makefile_in,v 1.1.1.1 2004/01/14 05:50:05 jolan Exp $
--- panel-plugin/Makefile.in.orig 2003-08-08 21:05:08.000000000 -0500
+++ panel-plugin/Makefile.in 2004-01-13 21:58:23.000000000 -0600
@@ -152,8 +152,6 @@ libbattmon_la_LDFLAGS = \
libbattmon_la_SOURCES = \
apmlib.c \
apm.h \
- libacpi.c \
- libacpi.h \
battmon.c
@@ -173,7 +171,7 @@ LTLIBRARIES = $(plugin_LTLIBRARIES)
libbattmon_la_DEPENDENCIES =
am_libbattmon_la_OBJECTS = libbattmon_la-apmlib.lo \
- libbattmon_la-libacpi.lo libbattmon_la-battmon.lo
+ libbattmon_la-battmon.lo
libbattmon_la_OBJECTS = $(am_libbattmon_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
@@ -181,7 +179,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/libbattmon_la-apmlib.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/libbattmon_la-battmon.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/libbattmon_la-libacpi.Plo
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
@@ -241,7 +238,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbattmon_la-apmlib.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbattmon_la-battmon.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbattmon_la-libacpi.Plo@am__quote@
distclean-depend:
-rm -rf ./$(DEPDIR)

View File

@ -0,0 +1,44 @@
$OpenBSD: patch-panel-plugin_battmon_c,v 1.1.1.1 2004/01/14 05:50:05 jolan Exp $
--- panel-plugin/battmon.c.orig 2003-09-09 08:49:35.000000000 -0500
+++ panel-plugin/battmon.c 2004-01-13 23:28:02.000000000 -0600
@@ -34,8 +34,9 @@
#ifdef __FreeBSD__
#include <machine/apm_bios.h>
#elif __OpenBSD__
-#include <sys/param.h>
+#include <sys/ioctl.h>
#include <machine/apmvar.h>
+#define APMDEVICE "/dev/apm"
#elif __linux__
#include <apm.h>
#endif
@@ -266,7 +267,7 @@ update_apm_status(t_battmon *battmon)
battmon->method = BM_BROKEN;
fd = open(APMDEVICE, O_RDONLY);
if (fd == -1) return TRUE;
- if (ioctl(fd, APM_IOC_GETPOWER, &apminfo) == -1)
+ if (ioctl(fd, APM_IOC_GETPOWER, &apm) == -1)
return TRUE;
close(fd);
charge = apm.battery_life;
@@ -402,8 +403,7 @@ battmon.c:241: for each function it appe
g_snprintf(buffer, sizeof(buffer), _("AC off-line"));
}
add_tooltip(battmon->ebox, buffer);
-
- if(battmon->options.display_power){
+ if(0) {
gtk_widget_show((GtkWidget *)battmon->acfan);
gtk_widget_show((GtkWidget *)battmon->temp);
fan=get_fan_status();
@@ -1177,10 +1177,6 @@ battmon_create_options(Control *ctrl, Gt
gtk_widget_show(dialog->cb_disp_tooltip_time);
gtk_box_pack_start(GTK_BOX(vbox2), dialog->cb_disp_tooltip_time, FALSE, FALSE, 0);
- dialog->cb_disp_power = gtk_check_button_new_with_mnemonic(_("Display power"));
- gtk_widget_show(dialog->cb_disp_power);
- gtk_box_pack_start(GTK_BOX(vbox2), dialog->cb_disp_power, FALSE, FALSE, 0);
-
/* Signal connections should be set after setting tate of toggle buttons...*/
refresh_dialog(dialog);

View File

@ -0,0 +1 @@
xfce4-battery-plugin is a battery monitor panel plugin for xfce4.

View File

@ -0,0 +1,4 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2004/01/14 05:50:05 jolan Exp $
lib/xfce4/panel-plugins/libbattmon.a
lib/xfce4/panel-plugins/libbattmon.la
lib/xfce4/panel-plugins/libbattmon.so