summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Abdallah <ali.slackware@gmail.com>2009-05-20 08:31:38 +0000
committerAli Abdallah <ali.slackware@gmail.com>2009-05-20 08:31:38 +0000
commitf9f8b448f19d627dd5e9e6451e5c94a1579df37e (patch)
tree2187f41b303e8d58a02d112a82d7670a5f0ca41b
parentf8b44b28a37af414dc88e25d8e4f6f913bdf03bc (diff)
downloadixfce4-power-manager-f9f8b448f19d627dd5e9e6451e5c94a1579df37e.tar.gz
* :Correct the makefile of the doc
* :Reduce suspend/hibernate timeout if the user disable screen saver lock (Old svn revision: 7377)
-rw-r--r--ChangeLog4
-rw-r--r--configure.ac.in33
-rw-r--r--doc/C/Makefile.am13
-rw-r--r--doc/C/xfce4-power-manager.html32
-rw-r--r--doc/C/xfce4-power-manager.xml.in (renamed from doc/C/xfce4-power-manager.xml)4
-rw-r--r--doc/Makefile.am7
-rw-r--r--settings/xfpm-settings-main.c6
-rw-r--r--settings/xfpm-settings.c29
-rw-r--r--src/xfpm-engine.c6
-rw-r--r--src/xfpm-main.c23
-rw-r--r--src/xfpm-shutdown.c14
-rw-r--r--src/xfpm-shutdown.h2
-rw-r--r--src/xfpm-tray-icon.c8
13 files changed, 104 insertions, 77 deletions
diff --git a/ChangeLog b/ChangeLog
index fea496f5..8f5138dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-05-20 10:30
+ * :Correct the makefile of the doc
+ * :Reduce suspend/hibernate timeout if the user disable screen saver lock
+
2009-05-19 14:15
* RC2: release
diff --git a/configure.ac.in b/configure.ac.in
index 88df076a..71dc3d06 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -3,7 +3,7 @@ m4_define([xfpm_version_major], [0])
m4_define([xfpm_version_minor], [8])
m4_define([xfpm_version_micro], [0])
m4_define([xfpm_version_build], [])
-m4_define([xfpm_version_tag],[RC2])
+m4_define([xfpm_version_tag],[r@REVISION@])
m4_define([xfpm_version], [xfpm_version_major().xfpm_version_minor().xfpm_version_micro()ifelse(xfpm_version_tag(), [svn], [xfpm_version_tag().xfpm_version_build()], [xfpm_version_tag()])])
AC_INIT([xfce4-power-manager], [xfpm_version], [http://bugzilla.xfce.org/])
@@ -127,13 +127,41 @@ else
fi
AM_CONDITIONAL([BUILD_PANEL_PLUGINS], [test "x$build_panel_plugins" = "xyes"])
+#=======================================================#
+# Generate html doc #
+#=======================================================#
+AC_ARG_ENABLE([xsltproc],
+ [AC_HELP_STRING([--enable-xsltproc],
+ [Use xsltproc to generate HTML documentation @<:@default=no@:>@])],
+ , [enable_xsltproc=no])
+if test "x$enable_xsltproc" = "xyes"; then
+ AC_PATH_PROG([XSLTPROC], [xsltproc], [no])
+ if test "x$XSLTPROC" = "xno"; then
+ AC_MSG_FAILURE([*** xsltproc was requested, but not found.])
+ fi
+fi
+AM_CONDITIONAL([HAVE_XSLTPROC], [test "x$enable_xsltproc" = "xyes"])
+
+#=======================================================#
+# Support for doc translations #
+#=======================================================#
+AC_ARG_ENABLE([xml2po],
+ [AC_HELP_STRING([--enable-xml2po],
+ [Use xml2po to translate documentation @<:@default=no@:>@])],
+ [], [enable_xml2po=no])
+if test "x$enable_xml2po" = "xyes"; then
+ AC_PATH_PROG([XML2PO], [xml2po], [no])
+ if test "x$XML2PO" = "xno"; then
+ AC_MSG_FAILURE([*** xml2po was requested, but not found.])
+ fi
+fi
+AM_CONDITIONAL([ENABLE_XML2PO], [test "x$enable_xml2po" = "xyes"])
#=======================================================#
# Check for debugging support #
#=======================================================#
XDT_FEATURE_DEBUG
-
AC_OUTPUT([
Makefile
libxfpm/Makefile
@@ -148,6 +176,7 @@ data/icons/scalable/status/Makefile
data/icons/scalable/actions/Makefile
doc/Makefile
doc/C/Makefile
+doc/C/xfce4-power-manager.xml
doc/C/images/Makefile
po/Makefile.in
])
diff --git a/doc/C/Makefile.am b/doc/C/Makefile.am
index 996022e8..4fc661b8 100644
--- a/doc/C/Makefile.am
+++ b/doc/C/Makefile.am
@@ -1,5 +1,5 @@
SUBDIRS = \
- images
+ images
noinst_DATA = \
xfce4-power-manager.xml
@@ -11,6 +11,11 @@ doc_DATA= \
EXTRA_DIST = $(noinst_DATA) $(doc_DATA)
-html: $(srcdir)/xfce4-power-manager.xml
- xsltproc $(top_srcdir)/doc/xfce-nochunk.xsl \
- $(srcdir)/xfce4-power-manager.xml
+if MAINTAINER_MODE
+if HAVE_XSLTPROC
+
+xfce4-power-manager.html: $(srcdir)/xfce4-power-manager.xml
+ $(XSLTPROC) $(top_srcdir)/doc/xfce-nochunk.xsl $(srcdir)/xfce4-power-manager.xml
+
+endif
+endif
diff --git a/doc/C/xfce4-power-manager.html b/doc/C/xfce4-power-manager.html
index 2b4797d7..616c8f94 100644
--- a/doc/C/xfce4-power-manager.html
+++ b/doc/C/xfce4-power-manager.html
@@ -1,5 +1,5 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Xfce 4 Power Manager</title><link rel="stylesheet" href="../xfce.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="#xfce4-power-manager" title="Xfce 4 Power Manager"><link rel="next" href="#xfpm-intro" title="Introduction"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="article" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="xfce4-power-manager"></a>Xfce 4 Power Manager</h2></div><div><div class="authorgroup"><div class="author"><h3 class="author"><span class="firstname">Ali</span> <span class="surname">Abdallah</span></h3><div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:aliov@xfce.org">aliov@xfce.org</a>&gt;</code></p></div></div></div></div></div><div><span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="releaseinfo">This manual describes <strong xmlns="" class="application"><code>xfce4-power-manager</code></strong> version 0.6.4
-<br></br></span></div><div><p class="copyright">Copyright © 2008 Ali Abdallah</p></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#xfpm-intro">Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="#xfpm-started">Getting Started</a></span></dt></dl></dd><dt><span class="sect1"><a href="#xfpm-configuration">Power Manager Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="#xfpm-general">General Settings</a></span></dt><dt><span class="sect2"><a href="#xfpm-cpu">CPU Settings</a></span></dt><dt><span class="sect2"><a href="#xfpm-battery">Battery settings</a></span></dt><dt><span class="sect2"><a href="#xfpm-button">Keyboard shortcuts</a></span></dt><dt><span class="sect2"><a href="#xfpm-monitor">Monitor settings</a></span></dt></dl></dd><dt><span class="sect1"><a href="#xfpm-systray-notify">System Tray Icon and Notification</a></span></dt><dt><span class="sect1"><a href="#xfpm-faq">FAQ</a></span></dt><dt><span class="sect1"><a href="#xfpm-about">About <strong class="application"><code>xfce4-power-manager</code></strong></a></span></dt></dl></div><p> </p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xfpm-intro"></a>Introduction</h2></div></div></div>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Xfce 4 Power Manager</title><link rel="stylesheet" href="../xfce.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="#xfce4-power-manager" title="Xfce 4 Power Manager"><link rel="next" href="#xfpm-intro" title="Introduction"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="article" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="xfce4-power-manager"></a>Xfce 4 Power Manager</h2></div><div><div class="authorgroup"><div class="author"><h3 class="author"><span class="firstname">Ali</span> <span class="surname">Abdallah</span></h3><div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:aliov@xfce.org">aliov@xfce.org</a>&gt;</code></p></div></div></div></div></div><div><span xmlns="http://www.w3.org/TR/xhtml1/transitional" class="releaseinfo">This manual describes <strong xmlns="" class="application"><code>xfce4-power-manager</code></strong> version 0.8.0r07351
+<br></br></span></div><div><p class="copyright">Copyright 2008 Ali Abdallah</p></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#xfpm-intro">Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="#xfpm-started">Getting Started</a></span></dt></dl></dd><dt><span class="sect1"><a href="#xfpm-configuration">Power Manager Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="#xfpm-general">General Settings</a></span></dt><dt><span class="sect2"><a href="#xfpm-cpu">CPU Settings</a></span></dt><dt><span class="sect2"><a href="#xfpm-battery">Battery settings</a></span></dt><dt><span class="sect2"><a href="#xfpm-button">Keyboard shortcuts</a></span></dt><dt><span class="sect2"><a href="#xfpm-monitor">Monitor settings</a></span></dt></dl></dd><dt><span class="sect1"><a href="#xfpm-systray-notify">System Tray Icon and Notification</a></span></dt><dt><span class="sect1"><a href="#xfpm-faq">FAQ</a></span></dt><dt><span class="sect1"><a href="#xfpm-about">About <strong class="application"><code>xfce4-power-manager</code></strong></a></span></dt></dl></div><p></p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xfpm-intro"></a>Introduction</h2></div></div></div>
The Xfce4 power manager is a part of the Xfce goodies project and features cpu frequency control,
battery monitoring, monitor DPMS control, LCD brightness control, lid sleep and power buttons controls.
All those features can be controlled from the user interface settings dialog.
@@ -8,19 +8,19 @@
a popup will be displayed to run the power manger if it is not already running.
Once the power manager is launched for the first time, it will place an autostart desktop file in your .config/autostart
in order to be able to be launched automatically each time you log into your Xfce desktop.
- </p></div></div><p> </p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xfpm-configuration"></a>Power Manager Configuration</h2></div></div></div><div class="figure"><a name="id2902531"></a><p class="title"><b>Figure 1. Power Manager settings</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/settings.png" alt="Power Manager settings"></div></div></div></div><p><br class="figure-break"></p><p>
+ </p></div></div><p></p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xfpm-configuration"></a>Power Manager Configuration</h2></div></div></div><div class="figure"><a name="id2551345"></a><p class="title"><b>Figure1.Power Manager settings</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/settings.png" alt="Power Manager settings"></div></div></div></div><p><br class="figure-break"></p><p>
Almost all the <strong class="application"><code>xfce4-power-manager</code></strong> items are configurable from the configuration window, laptop users can set up
- a power profile for two different modes “on battery power” and “on ac power”, desktop users still can change
+ a power profile for two different modes &#8220;on battery power&#8221; and &#8220;on ac power&#8221;, desktop users still can change
DPMS settings and CPU frequency.
</p><p>
The settings dialog differs from one system to another depending on the computer (PC,laptop,...) and on
the available manageabale interfaces.
</p><p>
In this section we will describe the possible configuration for the power manager.
- </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="xfpm-general"></a>General Settings</h3></div></div></div><div class="figure"><a name="id2863889"></a><p class="title"><b>Figure 2. General settings</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/general-settings.png" alt="General settings"></div></div></div></div><p><br class="figure-break"></p><p>
+ </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="xfpm-general"></a>General Settings</h3></div></div></div><div class="figure"><a name="id2512626"></a><p class="title"><b>Figure2.General settings</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/general-settings.png" alt="General settings"></div></div></div></div><p><br class="figure-break"></p><p>
Here you can select the configuration of the system tray icon, enable/disable cpu frequency and DPMS controls.
For example, you would need to disable DPMS control when watching a movie.
- </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="xfpm-cpu"></a>CPU Settings</h3></div></div></div><div class="figure"><a name="id2863934"></a><p class="title"><b>Figure 3. CPU Linux governors</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/cpu-settings.png" alt="CPU Linux governors"></div></div></div></div><p><br class="figure-break"></p><p>
+ </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="xfpm-cpu"></a>CPU Settings</h3></div></div></div><div class="figure"><a name="id2512671"></a><p class="title"><b>Figure3.CPU Linux governors</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/cpu-settings.png" alt="CPU Linux governors"></div></div></div></div><p><br class="figure-break"></p><p>
The linux governors found in the system are listed as radio buttons.
If the acpi_cpufreq module is not loaded in the kernel or the cpu itself does not support frequency
changes these options might not show.
@@ -34,8 +34,8 @@
Same as Ondemand but differs in behaviour in that it gracefully increases and decreases
the CPU speed rather than jumping to max speed the moment there is any load on the CPU.
</p></dd></dl></div><p>
-NOTE:In <strong class="application"><code>xfce4-power-manager</code></strong> version 0.6.4 only Linux is supported for changing the CPU frequency.
-</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="xfpm-battery"></a>Battery settings</h3></div></div></div><div class="figure"><a name="id2864059"></a><p class="title"><b>Figure 4. Battery settings</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/battery-settings.png" alt="Battery settings"></div></div></div></div><p><br class="figure-break"></p><p>
+NOTE:In <strong class="application"><code>xfce4-power-manager</code></strong> version 0.8.0r07351 only Linux is supported for changing the CPU frequency.
+</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="xfpm-battery"></a>Battery settings</h3></div></div></div><div class="figure"><a name="id2517651"></a><p class="title"><b>Figure4.Battery settings</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/battery-settings.png" alt="Battery settings"></div></div></div></div><p><br class="figure-break"></p><p>
The user can select the his critical battery percentage, usually this is for a laptop or
UPS battery, this option is important for a broken battery for example, which lasts only 5 minutes when it
is 10% charged.
@@ -46,11 +46,11 @@ NOTE:In <strong class="application"><code>xfce4-power-manager</code></strong> ve
The battery notification is a way to notify the user when the battery state changes ( ex: battery charge is full )
<p>
- </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="xfpm-button"></a>Keyboard shortcuts</h3></div></div></div><div class="figure"><a name="id2864116"></a><p class="title"><b>Figure 5. button control</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/button-settings.png" alt="button control"></div></div></div></div><p><br class="figure-break"></p>
+ </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="xfpm-button"></a>Keyboard shortcuts</h3></div></div></div><div class="figure"><a name="id2517708"></a><p class="title"><b>Figure5.button control</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/button-settings.png" alt="button control"></div></div></div></div><p><br class="figure-break"></p>
For those buttons you can define an action to be taken by the power manager when pressing to one of them
- for example when you close the laptop screen.
- </div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="xfpm-monitor"></a>Monitor settings</h3></div></div></div><div class="figure"><a name="id2868355"></a><p class="title"><b>Figure 6. Monitor DPMS and LCD brightness</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/monitor-settings.png" alt="Monitor DPMS and LCD brightness"></div></div></div></div><p><br class="figure-break"></p><p>
+ </div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="xfpm-monitor"></a>Monitor settings</h3></div></div></div><div class="figure"><a name="id2517749"></a><p class="title"><b>Figure6.Monitor DPMS and LCD brightness</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/monitor-settings.png" alt="Monitor DPMS and LCD brightness"></div></div></div></div><p><br class="figure-break"></p><p>
DPMS is an old X extension that allows standby/suspend/turn off options of the monitor, usually the timeouts
have to be consecutive, so standby timeout is less than suspend timeout and so on, but any option can always
be disabled.
@@ -58,8 +58,8 @@ NOTE:In <strong class="application"><code>xfce4-power-manager</code></strong> ve
For laptop users, clicking on the checkbox allows the power manager to reduce the screen luminosity when
it detects that system in running on battery power and increase it again when the system is running
on AC power.
- </p></div></div><p> </p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xfpm-systray-notify"></a>System Tray Icon and Notification</h2></div></div></div><p>
-</p><div class="figure"><a name="id2868417"></a><p class="title"><b>Figure 7. Battery icon in the system tray</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/battery.png" alt="Battery icon in the system tray"></div></div></div></div><p><br class="figure-break"></p><p>
+ </p></div></div><p></p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xfpm-systray-notify"></a>System Tray Icon and Notification</h2></div></div></div><p>
+</p><div class="figure"><a name="id2512977"></a><p class="title"><b>Figure7.Battery icon in the system tray</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/battery.png" alt="Battery icon in the system tray"></div></div></div></div><p><br class="figure-break"></p><p>
The "system tray" is an application running on a given X screen that can display small icons
provided by running applications. In Xfce, it is a panel plugin that catches the icon and resizes it
@@ -68,11 +68,11 @@ tray icon, for example pidgin places an icon in the system tray as well as many
</p><p>
<strong class="application"><code>xfce4-power-manager</code></strong> uses GtkStatusIcon to display the different kinds of batteries found in the system.
</p><p>
-</p><div class="figure"><a name="id2868466"></a><p class="title"><b>Figure 8. Battery Notification</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/battery-discharging.png" alt="Battery Notification"></div></div></div></div><p><br class="figure-break"></p><p>
+</p><div class="figure"><a name="id2513026"></a><p class="title"><b>Figure8.Battery Notification</b></p><div class="figure-contents"><div class="screenshot"><div class="mediaobject"><img src="images/battery-discharging.png" alt="Battery Notification"></div></div></div></div><p><br class="figure-break"></p><p>
To notify the user about the status of the battery, serious errors occured, the notification daemon is used
to display such messages.
-</p></div><p> </p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xfpm-faq"></a>FAQ</h2></div></div></div><div class="variablelist"><dl><dt><span class="term">Q: Why the icons look very similar to the icon of gnome power manager?</span></dt><dd><p>A: No, they are not similar, they are the same, just there is no point of re-drawing icons,
+</p></div><p></p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xfpm-faq"></a>FAQ</h2></div></div></div><div class="variablelist"><dl><dt><span class="term">Q: Why the icons look very similar to the icon of gnome power manager?</span></dt><dd><p>A: No, they are not similar, they are the same, just there is no point of re-drawing icons,
gnome power manager icons are good enough. Not all of them are used.
</p></dd><dt><span class="term">Q: What is the difference between suspend and hibernate?</span></dt><dd><p>A: Suspend is a power save feature. When suspending, the computer is still using power,
since the running applications are kept in the memory, but it is the lowest power level that the computer
@@ -88,7 +88,7 @@ to display such messages.
In the best cases, it will display a warning popup with different options.
</p></dd><dt><span class="term">Q: I select the option of the LCD brightness control but I do not see the brightness changing when I switch
from AC adapter to battery power?</span></dt><dd><p>A: Your kernel does not have the right driver, or the driver is not loaded.
- </p></dd></dl></div></div><p> </p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xfpm-about"></a>About <strong class="application"><code>xfce4-power-manager</code></strong></h2></div></div></div><p>
+ </p></dd></dl></div></div><p></p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xfpm-about"></a>About <strong class="application"><code>xfce4-power-manager</code></strong></h2></div></div></div><p>
This power manager was written following the philosophy of Xfce, having light weight application that does
what the user is expecting from it.
</p><p>To report a bug or make a suggestion regarding this application or
@@ -97,7 +97,7 @@ to display such messages.
please ask on the <a class="ulink" href="http://lunar-linux.org/mailman/listinfo/xfce" target="_top">xfce</a> mailing list. Development discussion takes
place on the <a class="ulink" href="http://lunar-linux.org/mailman/listinfo/xfce4-dev" target="_top">xfce4-dev</a> mailing list
or on <a class="ulink" href="http://lunar-linux.org/mailman/listinfo/xfce4-goodies-dev" target="_top">xfce4-goodies-dev</a> mailing list.
- </p></div><p> </p><p> This program is distributed under the terms of the
+ </p></div><p></p><p> This program is distributed under the terms of the
GNU General Public License as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
</p><p>You should have received a copy of the GNU General Public License
diff --git a/doc/C/xfce4-power-manager.xml b/doc/C/xfce4-power-manager.xml.in
index 7a76fc54..c9aee917 100644
--- a/doc/C/xfce4-power-manager.xml
+++ b/doc/C/xfce4-power-manager.xml.in
@@ -2,8 +2,8 @@
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY date "October 2008">
- <!ENTITY appversion "0.6.4">
- <!ENTITY app "<application>xfce4-power-manager</application>">
+ <!ENTITY appversion "@PACKAGE_VERSION@">
+ <!ENTITY app "<application>@PACKAGE_NAME@</application>">
]>
<article id="xfce4-power-manager" lang="en">
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 94da695a..b951679a 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,10 +1,7 @@
SUBDIRS = \
C
-
+
noinst_DATA = \
xfce-nochunk.xsl
-EXTRA_DIST = $(noinst_DATA)
-
-html: Makefile
- make -C C html \ No newline at end of file
+EXTRA_DIST = $(noinst_DATA) \ No newline at end of file
diff --git a/settings/xfpm-settings-main.c b/settings/xfpm-settings-main.c
index 3574d61a..f0ecedfc 100644
--- a/settings/xfpm-settings-main.c
+++ b/settings/xfpm-settings-main.c
@@ -75,7 +75,7 @@ int main(int argc, char **argv)
xfce_textdomain(GETTEXT_PACKAGE, LOCALEDIR, "UTF-8");
- if( !gtk_init_with_args (&argc, &argv, "", option_entries, PACKAGE, &error))
+ if( !gtk_init_with_args (&argc, &argv, (gchar *)"", option_entries, (gchar *)PACKAGE, &error))
{
if( error)
{
@@ -95,9 +95,7 @@ int main(int argc, char **argv)
if ( error )
{
- g_error("%s\n",error->message);
- g_error_free(error);
- return EXIT_FAILURE;
+ g_error ("%s\n",error->message);
}
if ( xfpm_dbus_name_has_owner(dbus_g_connection_get_connection(bus), "org.xfce.PowerManager") )
diff --git a/settings/xfpm-settings.c b/settings/xfpm-settings.c
index 6bec6c30..5d5db294 100644
--- a/settings/xfpm-settings.c
+++ b/settings/xfpm-settings.c
@@ -387,22 +387,19 @@ format_inactivity_value_cb (GtkScale *scale, gdouble value)
return g_strdup_printf ("%d %s", (gint)value, _("Minutes"));
else if ( (gint)value == 60)
return g_strdup (_("One hour"));
- else if ( (gint)value > 60 )
- {
- h = (gint)value/60;
- min = (gint)value%60;
-
- if ( h <= 1 )
- if ( min == 0 ) return g_strdup_printf ("%s", _("One hour"));
- else if ( min == 1 ) return g_strdup_printf ("%s %s", _("One hour"), _("one minute"));
- else return g_strdup_printf ("%s %d %s", _("One hour"), min, _("minutes"));
- else
- if ( min == 0 ) return g_strdup_printf ("%d %s", h, _("hours"));
- else if ( min == 1 ) return g_strdup_printf ("%d %s %s", h, _("hours"), _("one minute"));
- else return g_strdup_printf ("%d %s %d %s", h, _("hours"), min, _("minutes"));
- }
-
- return g_strdup_printf ("%d %s", (int)value, _("Minutes"));
+
+ /* value > 60 */
+ h = (gint)value/60;
+ min = (gint)value%60;
+
+ if ( h <= 1 )
+ if ( min == 0 ) return g_strdup_printf ("%s", _("One hour"));
+ else if ( min == 1 ) return g_strdup_printf ("%s %s", _("One hour"), _("one minute"));
+ else return g_strdup_printf ("%s %d %s", _("One hour"), min, _("minutes"));
+ else
+ if ( min == 0 ) return g_strdup_printf ("%d %s", h, _("hours"));
+ else if ( min == 1 ) return g_strdup_printf ("%d %s %s", h, _("hours"), _("one minute"));
+ else return g_strdup_printf ("%d %s %d %s", h, _("hours"), min, _("minutes"));
}
/*
diff --git a/src/xfpm-engine.c b/src/xfpm-engine.c
index be426086..43dbffd9 100644
--- a/src/xfpm-engine.c
+++ b/src/xfpm-engine.c
@@ -177,19 +177,17 @@ xfpm_engine_shutdown_request (XfpmEngine * engine,
{
xfpm_shutdown_add_callback (engine->priv->shutdown,
(GSourceFunc) xfpm_engine_do_hibernate,
- 2,
+ lock_screen,
engine);
}
else if (shutdown == XFPM_DO_SUSPEND)
{
xfpm_shutdown_add_callback (engine->priv->shutdown,
(GSourceFunc) xfpm_engine_do_suspend,
- 2,
+ lock_screen,
engine);
}
- if (lock_screen)
- xfpm_lock_screen ();
}
}
diff --git a/src/xfpm-main.c b/src/xfpm-main.c
index 7fea6ef6..99456294 100644
--- a/src/xfpm-main.c
+++ b/src/xfpm-main.c
@@ -82,8 +82,8 @@ xfpm_start (DBusGConnection *bus)
manager = xfpm_manager_new (bus);
- if ( xfce_posix_signal_handler_init (&error))
- {
+ if ( xfce_posix_signal_handler_init (&error))
+ {
xfce_posix_signal_handler_set_handler(SIGHUP,
xfpm_quit_signal,
manager, NULL);
@@ -102,11 +102,6 @@ xfpm_start (DBusGConnection *bus)
g_error_free(error);
}
- if ( no_daemon == FALSE && daemon(0,0) )
- {
- g_critical ("Could not daemonize");
- }
-
xfpm_manager_start (manager);
gtk_main ();
@@ -141,7 +136,7 @@ int main(int argc, char **argv)
xfce_textdomain (GETTEXT_PACKAGE, LOCALEDIR, "UTF-8");
- if (!gtk_init_with_args (&argc, &argv, "", option_entries, PACKAGE, &error))
+ if (!gtk_init_with_args (&argc, &argv, (gchar *)"", option_entries, (gchar *)PACKAGE, &error))
{
if(G_LIKELY(error))
{
@@ -177,6 +172,11 @@ int main(int argc, char **argv)
dbus_g_thread_init ();
+ if ( no_daemon == FALSE && daemon(0,0) )
+ {
+ g_critical ("Could not daemonize");
+ }
+
bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
if ( error )
@@ -187,12 +187,7 @@ int main(int argc, char **argv)
xfpm_error (_("Xfce Power Manager"),
message );
- g_error("%s: \n",message);
- g_print("\n");
- g_error_free(error);
- g_free(message);
-
- return EXIT_FAILURE;
+ g_error ("%s: \n", message);
}
if ( quit )
diff --git a/src/xfpm-shutdown.c b/src/xfpm-shutdown.c
index a920d170..0e39a676 100644
--- a/src/xfpm-shutdown.c
+++ b/src/xfpm-shutdown.c
@@ -39,6 +39,7 @@
#include "libxfpm/hal-monitor.h"
#include "libxfpm/xfpm-string.h"
+#include "libxfpm/xfpm-common.h"
#include "xfpm-shutdown.h"
#include "xfpm-session.h"
@@ -378,16 +379,23 @@ xfpm_shutdown_new(void)
gboolean xfpm_shutdown_add_callback (XfpmShutdown *shutdown,
GSourceFunc func,
- guint timeout,
+ gboolean lock_screen,
gpointer data)
{
g_return_val_if_fail (XFPM_IS_SHUTDOWN (shutdown), FALSE);
if (shutdown->priv->block_shutdown)
return FALSE;
-
+
xfpm_send_message_to_network_manager ("sleep");
- g_timeout_add_seconds (timeout, func, data);
+ if ( lock_screen )
+ xfpm_lock_screen ();
+
+ if ( lock_screen )
+ g_timeout_add_seconds (2 , func, data);
+ else
+ g_timeout_add (100, func, data);
+
shutdown->priv->block_shutdown = TRUE;
return TRUE;
}
diff --git a/src/xfpm-shutdown.h b/src/xfpm-shutdown.h
index 2be841fd..102ec43a 100644
--- a/src/xfpm-shutdown.h
+++ b/src/xfpm-shutdown.h
@@ -58,7 +58,7 @@ XfpmShutdown *xfpm_shutdown_new (void);
gboolean xfpm_shutdown_add_callback (XfpmShutdown *shutdown,
GSourceFunc func,
- guint timeout,
+ gboolean lock_screen,
gpointer data);
diff --git a/src/xfpm-tray-icon.c b/src/xfpm-tray-icon.c
index b94c5dff..9a6b65c1 100644
--- a/src/xfpm-tray-icon.c
+++ b/src/xfpm-tray-icon.c
@@ -172,12 +172,10 @@ xfpm_tray_icon_hibernate_cb (GtkWidget *w, XfpmTrayIcon *tray)
if ( ret )
{
lock_screen = xfpm_xfconf_get_property_bool (tray->priv->conf, LOCK_SCREEN_ON_SLEEP);
- if ( lock_screen )
- xfpm_lock_screen ();
xfpm_shutdown_add_callback (tray->priv->shutdown,
(GSourceFunc) xfpm_tray_icon_do_hibernate,
- 2,
+ lock_screen,
tray);
}
}
@@ -203,12 +201,10 @@ xfpm_tray_icon_suspend_cb (GtkWidget *w, XfpmTrayIcon *tray)
if ( ret )
{
lock_screen = xfpm_xfconf_get_property_bool (tray->priv->conf, LOCK_SCREEN_ON_SLEEP);
- if ( lock_screen )
- xfpm_lock_screen ();
xfpm_shutdown_add_callback (tray->priv->shutdown,
(GSourceFunc) xfpm_tray_icon_do_suspend,
- 2,
+ lock_screen,
tray);
}