mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-08-03 17:59:07 -04:00
99 lines
2.7 KiB
Plaintext
99 lines
2.7 KiB
Plaintext
$NetBSD: patch-an,v 1.5 2012/03/08 09:07:28 shattered Exp $
|
|
|
|
--- klaptopdaemon/portable.cpp.orig 2008-02-13 09:38:14.000000000 +0000
|
|
+++ klaptopdaemon/portable.cpp
|
|
@@ -2438,10 +2438,14 @@ laptop_portable::software_suspend_set_ma
|
|
#include <sys/ioctl.h>
|
|
#include <sys/stat.h>
|
|
#include <machine/apmvar.h>
|
|
-#include <iostream.h>
|
|
+#include <iostream>
|
|
+#include <qpushbutton.h>
|
|
+#include <qobject.h>
|
|
+#include <kactivelabel.h>
|
|
+#include <kprocess.h>
|
|
|
|
//
|
|
-// klaptopdeamon interface to NetBSD 1.5 apm.
|
|
+// Klaptopdeamon interface to NetBSD 1.5 apm.
|
|
// Scott Presnell, srp@zgi.com, srp@tworoads.net
|
|
// Fri Jun 29 17:21:25 PDT 2001
|
|
// Tested on Dell I4K running NetBSD 1.5R
|
|
@@ -2463,6 +2467,7 @@ laptop_portable::has_power_management()
|
|
}
|
|
|
|
struct apm_power_info info;
|
|
+ memset(&info, 0, sizeof(info));
|
|
ret=ioctl(fd, APM_IOC_GETPOWER, &info);
|
|
::close(fd);
|
|
|
|
@@ -2490,6 +2495,7 @@ int laptop_portable::has_battery_time()
|
|
return 0;
|
|
|
|
struct apm_power_info info;
|
|
+ memset(&info, 0, sizeof(info));
|
|
ret=ioctl(fd, APM_IOC_GETPOWER, &info);
|
|
::close(fd);
|
|
|
|
@@ -2661,6 +2667,15 @@ laptop_portable::apm_set_mask(bool , boo
|
|
|
|
|
|
//
|
|
+// adds extra widgets to the battery panel
|
|
+//
|
|
+void
|
|
+laptop_portable::extra_config(QWidget *parent, KConfig *config, QVBoxLayout *layout)
|
|
+{
|
|
+}
|
|
+
|
|
+
|
|
+//
|
|
// return current battery state
|
|
//
|
|
struct power_result laptop_portable::poll_battery_state()
|
|
@@ -2674,6 +2689,7 @@ struct power_result laptop_portable::pol
|
|
goto bad;
|
|
|
|
struct apm_power_info info;
|
|
+ memset(&info, 0, sizeof(info));
|
|
ret=ioctl(fd, APM_IOC_GETPOWER, &info);
|
|
::close(fd);
|
|
|
|
@@ -2736,7 +2752,16 @@ laptop_portable::get_brightness()
|
|
}
|
|
|
|
bool
|
|
-laptop_portable::get_system_throttling(bool, int ¤t, QStringList &s) // do something to help get system throttling data from places like ACPI
|
|
+laptop_portable::get_system_performance(bool, int ¤t, QStringList &s, bool *&) // do something to help get system profiles from places like ACPI
|
|
+{
|
|
+ // INSERT HERE
|
|
+ current = 0;
|
|
+ s.clear();
|
|
+ return(0); // if no profiles are available
|
|
+}
|
|
+
|
|
+bool
|
|
+laptop_portable::get_system_throttling(bool, int ¤t, QStringList &s, bool *&) // do something to help get system throttling data from places like ACPI
|
|
{
|
|
// INSERT HERE
|
|
current = 0;
|
|
@@ -2794,6 +2819,18 @@ laptop_portable::get_battery_status(int
|
|
values.append(s);
|
|
}
|
|
|
|
+bool
|
|
+laptop_portable::has_software_suspend(int /*type*/)
|
|
+{
|
|
+ return false; // (::has_software_suspend(type));
|
|
+}
|
|
+
|
|
+void
|
|
+laptop_portable::software_suspend_set_mask(bool hibernate)
|
|
+{
|
|
+ // software_suspend_is_preferred = hibernate;
|
|
+}
|
|
+
|
|
#else
|
|
|
|
/*
|