summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--COPYING41
-rw-r--r--applets/brightness/MATE_BrightnessApplet.server.in.in36
-rw-r--r--applets/brightness/MATE_BrightnessApplet.xml8
-rw-r--r--applets/brightness/Makefile.am32
-rw-r--r--applets/brightness/brightness-applet-menu.xml2
-rw-r--r--applets/brightness/brightness-applet.c67
-rw-r--r--applets/brightness/gpm-common.h6
-rw-r--r--applets/brightness/org.mate.BrightnessApplet.mate-panel-applet.in.in16
-rw-r--r--applets/brightness/org.mate.panel.applet.BrightnessAppletFactory.service.in3
-rw-r--r--applets/inhibit/MATE_InhibitApplet.server.in.in36
-rw-r--r--applets/inhibit/MATE_InhibitApplet.xml8
-rw-r--r--applets/inhibit/Makefile.am31
-rw-r--r--applets/inhibit/gpm-common.h6
-rw-r--r--applets/inhibit/inhibit-applet-menu.xml2
-rw-r--r--applets/inhibit/inhibit-applet.c67
-rw-r--r--applets/inhibit/org.mate.InhibitApplet.mate-panel-applet.in.in16
-rw-r--r--applets/inhibit/org.mate.panel.applet.InhibitAppletFactory.service.in3
-rw-r--r--configure.ac32
-rw-r--r--data/Makefile.am33
-rw-r--r--data/mate-power-manager.desktop.in.in2
-rw-r--r--data/mate-power-manager.schemas.in741
-rw-r--r--data/mate-power-preferences.desktop.in.in2
-rw-r--r--data/mate-power-statistics.desktop.in.in4
-rw-r--r--data/org.mate.power-manager.gschema.xml.in369
-rw-r--r--po/POTFILES.in8
-rw-r--r--po/POTFILES.skip4
-rw-r--r--po/ar.po1130
-rw-r--r--po/gnome-copyrights.txt998
-rw-r--r--policy/Makefile.am2
-rw-r--r--src/Makefile.am10
-rw-r--r--src/gpm-backlight.c101
-rw-r--r--src/gpm-common.c108
-rw-r--r--src/gpm-common.h177
-rw-r--r--src/gpm-control.c53
-rw-r--r--src/gpm-dpms.c47
-rw-r--r--src/gpm-dpms.h2
-rw-r--r--src/gpm-engine.c93
-rw-r--r--src/gpm-idle.c1
-rw-r--r--src/gpm-kbd-backlight.c734
-rw-r--r--src/gpm-kbd-backlight.h79
-rw-r--r--src/gpm-manager.c219
-rw-r--r--src/gpm-manager.h3
-rw-r--r--src/gpm-phone.c1
-rw-r--r--src/gpm-prefs-core.c386
-rw-r--r--src/gpm-prefs-server.c138
-rw-r--r--src/gpm-prefs-server.h67
-rw-r--r--src/gpm-screensaver.c123
-rw-r--r--src/gpm-screensaver.h5
-rw-r--r--src/gpm-statistics.c55
-rw-r--r--src/gpm-tray-icon.c30
-rw-r--r--src/org.mate.PowerManager.xml3
52 files changed, 2992 insertions, 3149 deletions
diff --git a/AUTHORS b/AUTHORS
index aab45f4..2ff8a6b 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -2,6 +2,7 @@ MATE:
Perberos <[email protected]>
Steve Zesch <[email protected]>
Stefano Karapetsas <[email protected]>
+Brent Hull <[email protected]>
GNOME:
Richard Hughes <[email protected]>
diff --git a/COPYING b/COPYING
index d60c31a..d159169 100644
--- a/COPYING
+++ b/COPYING
@@ -1,12 +1,12 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
- Preamble
+ Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
+the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
@@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
-
- GNU GENERAL PUBLIC LICENSE
+
+ GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
-
+
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
-
+
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
@@ -225,7 +225,7 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
-
+
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
@@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
- NO WARRANTY
+ NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
@@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
@@ -303,17 +303,16 @@ the "copyright" line and a pointer to where the full notice is found.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
- Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
@@ -336,5 +335,5 @@ necessary. Here is a sample; alter the names:
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
+library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
diff --git a/applets/brightness/MATE_BrightnessApplet.server.in.in b/applets/brightness/MATE_BrightnessApplet.server.in.in
deleted file mode 100644
index fcb60b7..0000000
--- a/applets/brightness/MATE_BrightnessApplet.server.in.in
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0"?>
-
-<oaf_info>
- <oaf_server iid="OAFIID:MATE_BrightnessApplet_Factory" type="exe" location="@LIBEXECDIR@/mate-brightness-applet">
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:MateComponent/GenericFactory:1.0"/>
- <item value="IDL:MateComponent/Unknown:1.0"/>
- </oaf_attribute>
- <oaf_attribute name="name" type="string" _value="Brightness Applet Factory"/>
- <oaf_attribute name="description" type="string" _value="Factory for Brightness Applet"/>
- <oaf_attribute name="bugzilla:bugzilla" type="string" value="MATE"/>
- <oaf_attribute name="bugzilla:product" type="string" value="mate-power-manager"/>
- <oaf_attribute name="bugzilla:component" type="string" value="applets"/>
- <oaf_attribute name="bugzilla:version" type="string" value="@VERSION@"/>
- <oaf_attribute name="bugzilla:other_binaries" type="string" value="mate-brightness-applet"/>
- </oaf_server>
- <oaf_server iid="OAFIID:MATE_BrightnessApplet" type="factory" location="OAFIID:MATE_BrightnessApplet_Factory">
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:MATE/Vertigo/MatePanelAppletShell:1.0"/>
- <item value="IDL:MateComponent/Control:1.0"/>
- <item value="IDL:MateComponent/Unknown:1.0"/>
- </oaf_attribute>
- <oaf_attribute name="panel:category" type="string" value="System &amp; Hardware"/>
- <oaf_attribute name="panel:icon" type="string" value="mate-brightness-applet"/>
- <oaf_attribute name="name" type="string" _value="Brightness Applet"/>
- <oaf_attribute name="description" type="string" _value="Adjusts Laptop panel brightness"/>
- <oaf_attribute name="bugzilla:bugzilla" type="string" value="MATE"/>
- <oaf_attribute name="bugzilla:product" type="string" value="mate-power-manager"/>
- <oaf_attribute name="bugzilla:component" type="string" value="applets"/>
- <oaf_attribute name="bugzilla:version" type="string" value="@VERSION@"/>
- <oaf_attribute name="bugzilla:other_binaries" type="string" value="mate-brightness-applet"/>
- <oaf_attribute name="matecomponent:environment" type="stringv">
- <item value="DBUS_SESSION_BUS_ADDRESS"/>
- </oaf_attribute>
- </oaf_server>
-</oaf_info>
diff --git a/applets/brightness/MATE_BrightnessApplet.xml b/applets/brightness/MATE_BrightnessApplet.xml
deleted file mode 100644
index 83b176f..0000000
--- a/applets/brightness/MATE_BrightnessApplet.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<Root>
- <popups>
- <popup name="button3">
- <menuitem name="Help" verb="Help" _label="_Help" pixtype="stock" pixname="gtk-help"/>
- <menuitem name="About" verb="About" _label="_About" pixtype="stock" pixname="gtk-about" />
- </popup>
- </popups>
-</Root>
diff --git a/applets/brightness/Makefile.am b/applets/brightness/Makefile.am
index c0a6cb6..781a6b0 100644
--- a/applets/brightness/Makefile.am
+++ b/applets/brightness/Makefile.am
@@ -14,6 +14,7 @@ INCLUDES = \
-DLIBDIR=\""$(libdir)"\" \
-DVERSION="\"$(VERSION)\"" \
-DGPM_DATA=\"$(pkgdatadir)\" \
+ -DBRIGHTNESS_MENU_UI_DIR=\""$(uidir)"\" \
-DEGG_LOG_FILE=\""~/mate-power-manager.log"\" \
-DEGG_VERBOSE="\"GPM_VERBOSE\"" \
-DEGG_LOGGING="\"GPM_LOGGING\"" \
@@ -37,19 +38,32 @@ mate_brightness_applet_LDADD = \
$(MATE_LIBS) \
$(PANEL_LIBS)
-serverdir = $(libdir)/matecomponent/servers
-server_in_files = MATE_BrightnessApplet.server.in
-server_DATA = $(server_in_files:.server.in=.server)
-$(server_in_files): $(server_in_files:.server.in=.server.in.in)
- sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" -e "s|\@VERSION\@|$(VERSION)|" $< > $@
+appletdir = $(datadir)/mate-panel/applets
+applet_in_files = org.mate.BrightnessApplet.mate-panel-applet.in
+applet_DATA = $(applet_in_files:.mate-panel-applet.in=.mate-panel-applet)
-@INTLTOOL_SERVER_RULE@
+$(applet_in_files): $(applet_in_files).in Makefile
+ $(AM_V_GEN)sed \
+ -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
+ -e "s|\@VERSION\@|$(PACKAGE_VERSION)|" \
+ $< > $@
+
+%.mate-panel-applet: %.mate-panel-applet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+
+servicedir = $(datadir)/dbus-1/services
+service_in_files = org.mate.panel.applet.BrightnessAppletFactory.service.in
+service_DATA = $(service_in_files:.service.in=.service)
+
+org.mate.panel.applet.BrightnessAppletFactory.service: $(service_in_files)
+ $(AM_V_GEN)sed \
+ -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
+ $< > $@
uidir = $(datadir)/mate-2.0/ui
-ui_DATA = MATE_BrightnessApplet.xml
+ui_DATA = brightness-applet-menu.xml
-EXTRA_DIST = MATE_BrightnessApplet.server.in.in $(ui_DATA)
+EXTRA_DIST = org.mate.BrightnessApplet.mate-panel-applet.in.in $(ui_DATA) $(service_in_files)
DISTCLEANFILES = \
- $(server_DATA) $(server_DATA).in
+ $(applet_DATA) $(applet_DATA).in $(service_DATA)
diff --git a/applets/brightness/brightness-applet-menu.xml b/applets/brightness/brightness-applet-menu.xml
new file mode 100644
index 0000000..52d68e9
--- /dev/null
+++ b/applets/brightness/brightness-applet-menu.xml
@@ -0,0 +1,2 @@
+<menuitem name="Help" action="Help" />
+<menuitem name="About" action="About" />
diff --git a/applets/brightness/brightness-applet.c b/applets/brightness/brightness-applet.c
index 125af49..d516bdc 100644
--- a/applets/brightness/brightness-applet.c
+++ b/applets/brightness/brightness-applet.c
@@ -33,6 +33,7 @@
#include <string.h>
#include <mate-panel-applet.h>
#include <gtk/gtk.h>
+#include <glib/gi18n.h>
#include <gdk/gdkkeysyms.h>
#include <glib-object.h>
#include <dbus/dbus-glib.h>
@@ -97,12 +98,12 @@ static gboolean gpm_applet_scroll_cb (GpmBrightnessApplet *applet,
static gboolean gpm_applet_slide_cb (GtkWidget *w, GpmBrightnessApplet *applet);
static void gpm_applet_create_popup (GpmBrightnessApplet *applet);
static gboolean gpm_applet_popup_cb (GpmBrightnessApplet *applet, GdkEventButton *event);
-static void gpm_applet_dialog_about_cb (MateComponentUIComponent *uic, gpointer data, const gchar *verbname);
-static gboolean gpm_applet_matecomponent_cb (MatePanelApplet *_applet, const gchar *iid, gpointer data);
+static void gpm_applet_dialog_about_cb (GtkAction *action, gpointer data);
+static gboolean gpm_applet_cb (MatePanelApplet *_applet, const gchar *iid, gpointer data);
static void gpm_applet_destroy_cb (GtkObject *object);
-#define GPM_BRIGHTNESS_APPLET_OAFID "OAFIID:MATE_BrightnessApplet"
-#define GPM_BRIGHTNESS_APPLET_FACTORY_OAFID "OAFIID:MATE_BrightnessApplet_Factory"
+#define GPM_BRIGHTNESS_APPLET_ID "BrightnessApplet"
+#define GPM_BRIGHTNESS_APPLET_FACTORY_ID "BrightnessAppletFactory"
#define GPM_BRIGHTNESS_APPLET_ICON "mate-brightness-applet"
#define GPM_BRIGHTNESS_APPLET_ICON_DISABLED "gpm-brightness-lcd-disabled"
#define GPM_BRIGHTNESS_APPLET_ICON_INVALID "gpm-brightness-lcd-invalid"
@@ -731,7 +732,7 @@ gpm_applet_stop_scroll_events_cb (GtkWidget *widget, GdkEvent *event)
* displays about dialog
**/
static void
-gpm_applet_dialog_about_cb (MateComponentUIComponent *uic, gpointer data, const gchar *verbname)
+gpm_applet_dialog_about_cb (GtkAction *action, gpointer data)
{
GtkAboutDialog *about;
@@ -796,7 +797,7 @@ gpm_applet_dialog_about_cb (MateComponentUIComponent *uic, gpointer data, const
* open gpm help
**/
static void
-gpm_applet_help_cb (MateComponentUIComponent *uic, gpointer data, const gchar *verbname)
+gpm_applet_help_cb (GtkAction *action, gpointer data)
{
gpm_help_display ("applets-brightness");
}
@@ -995,44 +996,56 @@ gpm_brightness_applet_init (GpmBrightnessApplet *applet)
}
/**
- * gpm_applet_matecomponent_cb:
- * @_applet: GpmBrightnessApplet instance created by the matecomponent factory
- * @iid: MateComponent id
+ * gpm_applet_cb:
+ * @_applet: GpmBrightnessApplet instance created by the applet factory
+ * @iid: Applet id
*
- * the function called by matecomponent factory after creation
+ * the function called by libmate-panel-applet factory after creation
**/
static gboolean
-gpm_applet_matecomponent_cb (MatePanelApplet *_applet, const gchar *iid, gpointer data)
+gpm_applet_cb (MatePanelApplet *_applet, const gchar *iid, gpointer data)
{
GpmBrightnessApplet *applet = GPM_BRIGHTNESS_APPLET(_applet);
-
- static MateComponentUIVerb verbs [] = {
- MATECOMPONENT_UI_VERB ("About", gpm_applet_dialog_about_cb),
- MATECOMPONENT_UI_VERB ("Help", gpm_applet_help_cb),
- MATECOMPONENT_UI_VERB_END
+ GtkActionGroup *action_group;
+ gchar *ui_path;
+
+ static const GtkActionEntry menu_actions [] = {
+ { "About", GTK_STOCK_ABOUT, N_("_About"),
+ NULL, NULL,
+ G_CALLBACK (gpm_applet_dialog_about_cb) },
+ { "Help", GTK_STOCK_HELP, N_("_Help"),
+ NULL, NULL,
+ G_CALLBACK (gpm_applet_help_cb) }
};
- if (strcmp (iid, GPM_BRIGHTNESS_APPLET_OAFID) != 0) {
+ if (strcmp (iid, GPM_BRIGHTNESS_APPLET_ID) != 0) {
return FALSE;
}
- mate_panel_applet_setup_menu_from_file (MATE_PANEL_APPLET (applet),
- DATADIR,
- "MATE_BrightnessApplet.xml",
- NULL, verbs, applet);
+ action_group = gtk_action_group_new ("Brightness Applet Actions");
+ gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE);
+ gtk_action_group_add_actions (action_group,
+ menu_actions,
+ G_N_ELEMENTS (menu_actions),
+ applet);
+ ui_path = g_build_filename (BRIGHTNESS_MENU_UI_DIR, "brightness-applet-menu.xml", NULL);
+ mate_panel_applet_setup_menu_from_file (MATE_PANEL_APPLET (applet), ui_path, action_group);
+ g_free (ui_path);
+ g_object_unref (action_group);
+
gpm_applet_draw_cb (applet);
return TRUE;
}
/**
- * this generates a main with a matecomponent factory
+ * this generates a main with a applet factory
**/
-MATE_PANEL_APPLET_MATECOMPONENT_FACTORY
+MATE_PANEL_APPLET_OUT_PROCESS_FACTORY
(/* the factory iid */
- GPM_BRIGHTNESS_APPLET_FACTORY_OAFID,
+ GPM_BRIGHTNESS_APPLET_FACTORY_ID,
/* generates brighness applets instead of regular mate applets */
GPM_TYPE_BRIGHTNESS_APPLET,
- /* the applet name and version */
- "BrightnessApplet", VERSION,
+ /* the applet name */
+ "BrightnessApplet",
/* our callback (with no user data) */
- gpm_applet_matecomponent_cb, NULL);
+ gpm_applet_cb, NULL);
diff --git a/applets/brightness/gpm-common.h b/applets/brightness/gpm-common.h
index e2733a8..5a6d516 100644
--- a/applets/brightness/gpm-common.h
+++ b/applets/brightness/gpm-common.h
@@ -37,9 +37,9 @@ G_BEGIN_DECLS
#define GPM_DESCRIPTION _("Power Manager for the MATE desktop")
/* help location */
-#define GPM_HOMEPAGE_URL "http://www.mate.org/projects/mate-power-manager/"
-#define GPM_BUGZILLA_URL "http://bugzilla.mate.org/buglist.cgi?product=mate-power-manager"
-#define GPM_FAQ_URL "http://live.mate.org/MatePowerManager/Faq"
+#define GPM_HOMEPAGE_URL "http://www.mate-desktop.org/"
+#define GPM_BUGZILLA_URL "https://github.com/mate-desktop/mate-power-manager/issues"
+#define GPM_FAQ_URL "http://wiki.mate-desktop.org/"
/* change general/installed_schema whenever adding or moving keys */
#define GPM_CONF_SCHEMA_ID 3
diff --git a/applets/brightness/org.mate.BrightnessApplet.mate-panel-applet.in.in b/applets/brightness/org.mate.BrightnessApplet.mate-panel-applet.in.in
new file mode 100644
index 0000000..3a3a0a8
--- /dev/null
+++ b/applets/brightness/org.mate.BrightnessApplet.mate-panel-applet.in.in
@@ -0,0 +1,16 @@
+[Applet Factory]
+Id=BrightnessAppletFactory
+Location=@LIBEXECDIR@/mate-brightness-applet
+_Name=Brightness Applet Factory
+_Description=Factory for Brightness Applet
+
+[BrightnessApplet]
+_Name=Brightness Applet
+_Description=Adjusts Laptop panel brightness
+Icon=mate-brightness-applet
+MateComponentId=OAFIID:MATE_BrightnessApplet
+X-MATE-Bugzilla-Bugzilla=MATE
+X-MATE-Bugzilla-Product=mate-power-manager
+X-MATE-Bugzilla-Component=applets
+X-MATE-Bugzilla-Version=@VERSION@
+X-MATE-Bugzilla-OtherBinaries=mate-brightness-applet
diff --git a/applets/brightness/org.mate.panel.applet.BrightnessAppletFactory.service.in b/applets/brightness/org.mate.panel.applet.BrightnessAppletFactory.service.in
new file mode 100644
index 0000000..596a2d6
--- /dev/null
+++ b/applets/brightness/org.mate.panel.applet.BrightnessAppletFactory.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.mate.panel.applet.BrightnessAppletFactory
+Exec=@LIBEXECDIR@/mate-brightness-applet
diff --git a/applets/inhibit/MATE_InhibitApplet.server.in.in b/applets/inhibit/MATE_InhibitApplet.server.in.in
deleted file mode 100644
index d65c077..0000000
--- a/applets/inhibit/MATE_InhibitApplet.server.in.in
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0"?>
-
-<oaf_info>
- <oaf_server iid="OAFIID:MATE_InhibitApplet_Factory" type="exe" location="@LIBEXECDIR@/mate-inhibit-applet">
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:MateComponent/GenericFactory:1.0"/>
- <item value="IDL:MateComponent/Unknown:1.0"/>
- </oaf_attribute>
- <oaf_attribute name="name" type="string" _value="Inhibit Applet Factory"/>
- <oaf_attribute name="description" type="string" _value="Factory for Inhibit Applet"/>
- <oaf_attribute name="bugzilla:bugzilla" type="string" value="MATE"/>
- <oaf_attribute name="bugzilla:product" type="string" value="mate-power-manager"/>
- <oaf_attribute name="bugzilla:component" type="string" value="applets"/>
- <oaf_attribute name="bugzilla:version" type="string" value="@VERSION@"/>
- <oaf_attribute name="bugzilla:other_binaries" type="string" value="mate-inhibit-applet"/>
- <oaf_attribute name="matecomponent:environment" type="stringv">
- <item value="DBUS_SESSION_BUS_ADDRESS"/>
- </oaf_attribute>
- </oaf_server>
- <oaf_server iid="OAFIID:MATE_InhibitApplet" type="factory" location="OAFIID:MATE_InhibitApplet_Factory">
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:MATE/Vertigo/MatePanelAppletShell:1.0"/>
- <item value="IDL:MateComponent/Control:1.0"/>
- <item value="IDL:MateComponent/Unknown:1.0"/>
- </oaf_attribute>
- <oaf_attribute name="panel:category" type="string" value="System &amp; Hardware"/>
- <oaf_attribute name="panel:icon" type="string" value="mate-inhibit-applet"/>
- <oaf_attribute name="name" type="string" _value="Inhibit Applet"/>
- <oaf_attribute name="description" type="string" _value="Allows user to inhibit automatic power saving"/>
- <oaf_attribute name="bugzilla:bugzilla" type="string" value="MATE"/>
- <oaf_attribute name="bugzilla:product" type="string" value="mate-power-manager"/>
- <oaf_attribute name="bugzilla:component" type="string" value="applets"/>
- <oaf_attribute name="bugzilla:version" type="string" value="@VERSION@"/>
- <oaf_attribute name="bugzilla:other_binaries" type="string" value="mate-inhibit-applet"/>
- </oaf_server>
-</oaf_info>
diff --git a/applets/inhibit/MATE_InhibitApplet.xml b/applets/inhibit/MATE_InhibitApplet.xml
deleted file mode 100644
index 83b176f..0000000
--- a/applets/inhibit/MATE_InhibitApplet.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<Root>
- <popups>
- <popup name="button3">
- <menuitem name="Help" verb="Help" _label="_Help" pixtype="stock" pixname="gtk-help"/>
- <menuitem name="About" verb="About" _label="_About" pixtype="stock" pixname="gtk-about" />
- </popup>
- </popups>
-</Root>
diff --git a/applets/inhibit/Makefile.am b/applets/inhibit/Makefile.am
index fb42774..37f5d6c 100644
--- a/applets/inhibit/Makefile.am
+++ b/applets/inhibit/Makefile.am
@@ -14,6 +14,7 @@ INCLUDES = \
-DLIBDIR=\""$(libdir)"\" \
-DVERSION="\"$(VERSION)\"" \
-DGPM_DATA=\"$(pkgdatadir)\" \
+ -DINHIBIT_MENU_UI_DIR=\""$(uidir)"\" \
-DEGG_LOG_FILE=\""~/mate-power-manager.log"\" \
-DEGG_VERBOSE="\"GPM_VERBOSE\"" \
-DEGG_LOGGING="\"GPM_LOGGING\"" \
@@ -37,19 +38,31 @@ mate_inhibit_applet_LDADD = \
$(MATE_LIBS) \
$(PANEL_LIBS)
-serverdir = $(libdir)/matecomponent/servers
-server_in_files = MATE_InhibitApplet.server.in
-server_DATA = $(server_in_files:.server.in=.server)
+appletdir = $(datadir)/mate-panel/applets
+applet_in_files = org.mate.InhibitApplet.mate-panel-applet.in
+applet_DATA = $(applet_in_files:.mate-panel-applet.in=.mate-panel-applet)
-$(server_in_files): $(server_in_files:.server.in=.server.in.in)
- sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" -e "s|\@VERSION\@|$(VERSION)|" $< > $@
+$(applet_in_files): $(applet_in_files).in Makefile
+ $(AM_V_GEN)sed \
+ -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
+ -e "s|\@VERSION\@|$(PACKAGE_VERSION)|" \
+ $< > $@
-@INTLTOOL_SERVER_RULE@
+%.mate-panel-applet: %.mate-panel-applet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+
+servicedir = $(datadir)/dbus-1/services
+service_in_files = org.mate.panel.applet.InhibitAppletFactory.service.in
+service_DATA = $(service_in_files:.service.in=.service)
+
+org.mate.panel.applet.InhibitAppletFactory.service: $(service_in_files)
+ $(AM_V_GEN)sed \
+ -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
+ $< > $@
uidir = $(datadir)/mate-2.0/ui
-ui_DATA = MATE_InhibitApplet.xml
+ui_DATA = inhibit-applet-menu.xml
-EXTRA_DIST = MATE_InhibitApplet.server.in.in $(ui_DATA)
+EXTRA_DIST = org.mate.InhibitApplet.mate-panel-applet.in.in $(ui_DATA) $(service_in_files)
DISTCLEANFILES = \
- $(server_DATA) $(server_DATA).in
+ $(applet_DATA) $(applet_DATA).in $(server_DATA)
diff --git a/applets/inhibit/gpm-common.h b/applets/inhibit/gpm-common.h
index e2733a8..5a6d516 100644
--- a/applets/inhibit/gpm-common.h
+++ b/applets/inhibit/gpm-common.h
@@ -37,9 +37,9 @@ G_BEGIN_DECLS
#define GPM_DESCRIPTION _("Power Manager for the MATE desktop")
/* help location */
-#define GPM_HOMEPAGE_URL "http://www.mate.org/projects/mate-power-manager/"
-#define GPM_BUGZILLA_URL "http://bugzilla.mate.org/buglist.cgi?product=mate-power-manager"
-#define GPM_FAQ_URL "http://live.mate.org/MatePowerManager/Faq"
+#define GPM_HOMEPAGE_URL "http://www.mate-desktop.org/"
+#define GPM_BUGZILLA_URL "https://github.com/mate-desktop/mate-power-manager/issues"
+#define GPM_FAQ_URL "http://wiki.mate-desktop.org/"
/* change general/installed_schema whenever adding or moving keys */
#define GPM_CONF_SCHEMA_ID 3
diff --git a/applets/inhibit/inhibit-applet-menu.xml b/applets/inhibit/inhibit-applet-menu.xml
new file mode 100644
index 0000000..52d68e9
--- /dev/null
+++ b/applets/inhibit/inhibit-applet-menu.xml
@@ -0,0 +1,2 @@
+<menuitem name="Help" action="Help" />
+<menuitem name="About" action="About" />
diff --git a/applets/inhibit/inhibit-applet.c b/applets/inhibit/inhibit-applet.c
index e976c60..3f70ec4 100644
--- a/applets/inhibit/inhibit-applet.c
+++ b/applets/inhibit/inhibit-applet.c
@@ -34,6 +34,7 @@
#include <mate-panel-applet.h>
#include <gtk/gtk.h>
#include <glib-object.h>
+#include <glib/gi18n.h>
#include <dbus/dbus-glib.h>
#include "egg-debug.h"
@@ -83,12 +84,12 @@ static void gpm_applet_check_size (GpmInhibitApplet *applet);
static gboolean gpm_applet_draw_cb (GpmInhibitApplet *applet);
static void gpm_applet_update_tooltip (GpmInhibitApplet *applet);
static gboolean gpm_applet_click_cb (GpmInhibitApplet *applet, GdkEventButton *event);
-static void gpm_applet_dialog_about_cb (MateComponentUIComponent *uic, gpointer data, const gchar *verbname);
-static gboolean gpm_applet_matecomponent_cb (MatePanelApplet *_applet, const gchar *iid, gpointer data);
+static void gpm_applet_dialog_about_cb (GtkAction *action, gpointer data);
+static gboolean gpm_applet_cb (MatePanelApplet *_applet, const gchar *iid, gpointer data);
static void gpm_applet_destroy_cb (GtkObject *object);
-#define GPM_INHIBIT_APPLET_OAFID "OAFIID:MATE_InhibitApplet"
-#define GPM_INHIBIT_APPLET_FACTORY_OAFID "OAFIID:MATE_InhibitApplet_Factory"
+#define GPM_INHIBIT_APPLET_ID "InhibitApplet"
+#define GPM_INHIBIT_APPLET_FACTORY_ID "InhibitAppletFactory"
#define GPM_INHIBIT_APPLET_ICON_INHIBIT "gpm-inhibit"
#define GPM_INHIBIT_APPLET_ICON_INVALID "gpm-inhibit-invalid"
#define GPM_INHIBIT_APPLET_ICON_UNINHIBIT "gpm-hibernate"
@@ -410,7 +411,7 @@ gpm_applet_click_cb (GpmInhibitApplet *applet, GdkEventButton *event)
* displays about dialog
**/
static void
-gpm_applet_dialog_about_cb (MateComponentUIComponent *uic, gpointer data, const gchar *verbname)
+gpm_applet_dialog_about_cb (GtkAction *action, gpointer data)
{
GtkAboutDialog *about;
@@ -475,7 +476,7 @@ gpm_applet_dialog_about_cb (MateComponentUIComponent *uic, gpointer data, const
* open gpm help
**/
static void
-gpm_applet_help_cb (MateComponentUIComponent *uic, gpointer data, const gchar *verbname)
+gpm_applet_help_cb (GtkAction *action, gpointer data)
{
gpm_help_display ("applets-inhibit");
}
@@ -645,44 +646,56 @@ gpm_inhibit_applet_init (GpmInhibitApplet *applet)
}
/**
- * gpm_applet_matecomponent_cb:
- * @_applet: GpmInhibitApplet instance created by the matecomponent factory
- * @iid: MateComponent id
+ * gpm_applet_cb:
+ * @_applet: GpmInhibitApplet instance created by the applet factory
+ * @iid: Applet id
*
- * the function called by matecomponent factory after creation
+ * the function called by libmate-panel-applet factory after creation
**/
static gboolean
-gpm_applet_matecomponent_cb (MatePanelApplet *_applet, const gchar *iid, gpointer data)
+gpm_applet_cb (MatePanelApplet *_applet, const gchar *iid, gpointer data)
{
GpmInhibitApplet *applet = GPM_INHIBIT_APPLET(_applet);
-
- static MateComponentUIVerb verbs [] = {
- MATECOMPONENT_UI_VERB ("About", gpm_applet_dialog_about_cb),
- MATECOMPONENT_UI_VERB ("Help", gpm_applet_help_cb),
- MATECOMPONENT_UI_VERB_END
+ GtkActionGroup *action_group;
+ gchar *ui_path;
+
+ static const GtkActionEntry menu_actions [] = {
+ { "About", GTK_STOCK_ABOUT, N_("_About"),
+ NULL, NULL,
+ G_CALLBACK (gpm_applet_dialog_about_cb) },
+ { "Help", GTK_STOCK_HELP, N_("_Help"),
+ NULL, NULL,
+ G_CALLBACK (gpm_applet_help_cb) }
};
- if (strcmp (iid, GPM_INHIBIT_APPLET_OAFID) != 0) {
+ if (strcmp (iid, GPM_INHIBIT_APPLET_ID) != 0) {
return FALSE;
}
- mate_panel_applet_setup_menu_from_file (MATE_PANEL_APPLET (applet),
- DATADIR,
- "MATE_InhibitApplet.xml",
- NULL, verbs, applet);
+ action_group = gtk_action_group_new ("Inhibit Applet Actions");
+ gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE);
+ gtk_action_group_add_actions (action_group,
+ menu_actions,
+ G_N_ELEMENTS (menu_actions),
+ applet);
+ ui_path = g_build_filename (INHIBIT_MENU_UI_DIR, "inhibit-applet-menu.xml", NULL);
+ mate_panel_applet_setup_menu_from_file (MATE_PANEL_APPLET (applet), ui_path, action_group);
+ g_free (ui_path);
+ g_object_unref (action_group);
+
gpm_applet_draw_cb (applet);
return TRUE;
}
/**
- * this generates a main with a matecomponent factory
+ * this generates a main with a applet factory
**/
-MATE_PANEL_APPLET_MATECOMPONENT_FACTORY
+MATE_PANEL_APPLET_OUT_PROCESS_FACTORY
(/* the factory iid */
- GPM_INHIBIT_APPLET_FACTORY_OAFID,
+ GPM_INHIBIT_APPLET_FACTORY_ID,
/* generates brighness applets instead of regular mate applets */
GPM_TYPE_INHIBIT_APPLET,
- /* the applet name and version */
- "InhibitApplet", VERSION,
+ /* the applet name */
+ "InhibitApplet",
/* our callback (with no user data) */
- gpm_applet_matecomponent_cb, NULL);
+ gpm_applet_cb, NULL)
diff --git a/applets/inhibit/org.mate.InhibitApplet.mate-panel-applet.in.in b/applets/inhibit/org.mate.InhibitApplet.mate-panel-applet.in.in
new file mode 100644
index 0000000..d65060b
--- /dev/null
+++ b/applets/inhibit/org.mate.InhibitApplet.mate-panel-applet.in.in
@@ -0,0 +1,16 @@
+[Applet Factory]
+Id=InhibitAppletFactory
+Location=@LIBEXECDIR@/mate-inhibit-applet
+_Name=Inhibit Applet Factory
+_Description=Factory for Inhibit Applet
+
+[InhibitApplet]
+_Name=Inhibit Applet
+_Description=Allows user to inhibit automatic power saving
+Icon=mate-inhibit-applet
+MateComponentId=OAFIID:MATE_InhibitApplet
+X-MATE-Bugzilla-Bugzilla=MATE
+X-MATE-Bugzilla-Product=mate-power-manager
+X-MATE-Bugzilla-Component=applets
+X-MATE-Bugzilla-Version=@VERSION@
+X-MATE-Bugzilla-OtherBinaries=mate-inhibit-applet
diff --git a/applets/inhibit/org.mate.panel.applet.InhibitAppletFactory.service.in b/applets/inhibit/org.mate.panel.applet.InhibitAppletFactory.service.in
new file mode 100644
index 0000000..5fd8ccb
--- /dev/null
+++ b/applets/inhibit/org.mate.panel.applet.InhibitAppletFactory.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.mate.panel.applet.InhibitAppletFactory
+Exec=@LIBEXECDIR@/mate-inhibit-applet
diff --git a/configure.ac b/configure.ac
index 265ffdc..312f220 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
AC_PREREQ(2.63)
-AC_INIT([mate-power-manager], [1.2.1], [http://www.mate-desktop.org/])
+AC_INIT([mate-power-manager], [1.5.0], [http://www.mate-desktop.org/])
AC_CONFIG_SRCDIR(src)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_INIT_AUTOMAKE([foreign])
@@ -93,22 +93,23 @@ AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE(GETTEXT_PACKAGE, "AC_PACKAGE_NAME", [foo])
AM_GLIB_GNU_GETTEXT
+GLIB_GSETTINGS
dnl ----------------------------------------------------------------------------
dnl - Library dependencies
dnl ----------------------------------------------------------------------------
GTK_API_VERSION=2.0
GLIB_REQUIRED=2.13.0
+GIO_REQUIRED=2.25.0
GTK_REQUIRED=2.17.7
GDK_REQUIRED=2.11.0
-MATECONF_REQUIRED=1.1.0
MATE_KEYRING_REQUIRED=1.1.0
DBUS_REQUIRED=1.0
DBUS_GLIB_REQUIRED=0.70
LIBMATENOTIFY_REQUIRED=1.1.0
CAIRO_REQUIRED=1.0.0
UNIQUE_REQUIRED=0.9.4
-LIBPANEL_REQUIRED=1.1.0
+LIBPANEL_REQUIRED=1.5.0
XRANDR_REQUIRED=1.2.0
CANBERRA_REQUIRED=0.10
UPOWER_REQUIRED=0.9.1
@@ -139,7 +140,7 @@ esac
dnl ---------------------------------------------------------------------------
dnl - Check library dependencies
dnl ---------------------------------------------------------------------------
-PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0)
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 gio-2.0 >= $GIO_REQUIRED)
PKG_CHECK_MODULES(CANBERRA, libcanberra-gtk >= $CANBERRA_REQUIRED)
@@ -150,7 +151,6 @@ PKG_CHECK_MODULES(DBUS,[
PKG_CHECK_MODULES(MATE, [
gtk+-2.0 >= $GTK_REQUIRED
- mateconf-2.0 >= $MATECONF_REQUIRED
mate-keyring-1 >= $MATE_KEYRING_REQUIRED
cairo >= $CAIRO_REQUIRED])
@@ -201,9 +201,6 @@ fi
PKG_CHECK_MODULES(UPOWER, upower-glib >= $UPOWER_REQUIRED)
-AC_PATH_PROG(MATECONFTOOL, mateconftool-2)
-AM_MATECONF_SOURCE_2
-
dnl ---------------------------------------------------------------------------
dnl - Check XF86XK_Keys
dnl ---------------------------------------------------------------------------
@@ -254,21 +251,6 @@ fi
AM_CONDITIONAL([HAVE_TESTS], [test $have_tests = yes])
dnl ---------------------------------------------------------------------------
-dnl - Build mateconf default button?
-dnl ---------------------------------------------------------------------------
-AC_ARG_ENABLE(mateconf-defaults,
- AS_HELP_STRING([--disable-mateconf-defaults],
- [Allow setting mateconf default settings]),
- have_mateconfdefaults=$enableval,have_mateconfdefaults=yes)
-
-AC_MSG_CHECKING([whether to support mateconf defaults])
-if test x$have_mateconfdefaults = xyes ; then
- AC_DEFINE(HAVE_MATECONF_DEFAULTS, 1, [Define if have mateconf defaults])
-fi
-AC_MSG_RESULT([$have_mateconfdefaults])
-AM_CONDITIONAL([HAVE_MATECONF_DEFAULTS], [test $have_mateconfdefaults = yes])
-
-dnl ---------------------------------------------------------------------------
dnl - Build applets
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(applets,
@@ -281,7 +263,7 @@ have_applets=no
if test x$enable_applets = xyes ; then
have_applets=yes
- PKG_CHECK_MODULES(PANEL, [libmatepanelapplet-2.0 >= $LIBPANEL_REQUIRED])
+ PKG_CHECK_MODULES(PANEL, [libmatepanelapplet-4.0 >= $LIBPANEL_REQUIRED])
AC_DEFINE(HAVE_APPLETS, 1, [Define if we are building applets])
fi
AC_MSG_RESULT([$have_applets])
@@ -399,12 +381,10 @@ echo "
cflags: ${CFLAGS}
Building extra applets: ${enable_applets}
Self test support: ${have_tests}
- MateConf default support: ${have_mateconfdefaults}
Use libunique: ${enable_libunique}
Docbook support: ${enable_docbook_docs}
documentation dir: $DOCDIR
dbus-1 services dir: $DBUS_SERVICES_DIR
- mateconf-schema dir: $MATECONF_SCHEMA_FILE_DIR
"
if [[ "${prefix}" != "/usr" ]] ; then
echo '
diff --git a/data/Makefile.am b/data/Makefile.am
index 80b8a49..06aab6e 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,9 +1,5 @@
SUBDIRS = icons
-@INTLTOOL_SCHEMAS_RULE@
-schemadir = $(sysconfdir)/mateconf/schemas
-schema_in_files = mate-power-manager.schemas.in
-schema_DATA = $(schema_in_files:.schemas.in=.schemas)
@INTLTOOL_DESKTOP_RULE@
desktopdir = $(datadir)/applications
@@ -23,6 +19,11 @@ service_DATA = $(service_in_files:.service.in=.service)
$(service_DATA): $(service_in_files) Makefile
@sed -e "s|\@servicedir\@|$(bindir)|" $< > $@
+@GSETTINGS_RULES@
+@INTLTOOL_XML_NOMERGE_RULE@
+gsettings_schemas_in_files = org.mate.power-manager.gschema.xml.in
+gsettings_SCHEMAS = $(gsettings_schemas_in_files:.gschema.xml.in=.gschema.xml)
+
pkgdata_DATA = \
gpm-statistics.ui \
gpm-statistics-deprecated.ui \
@@ -32,25 +33,13 @@ pkgdata_DATA = \
acme.ui
EXTRA_DIST = \
- mate-power-manager.schemas.in \
- $(schema_in_files) \
- $(desktop_in_files) \
- $(autostart_in_files) \
+ $(gsettings_SCHEMAS) \
$(service_in_files) \
+ $(autostart_in_files) \
+ $(desktop_in_files) \
+ $(gsettings_schemas_in_files) \
$(pkgdata_DATA)
-if MATECONF_SCHEMAS_INSTALL
-install-data-local:
- -MATECONF_CONFIG_SOURCE=$(MATECONF_SCHEMA_CONFIG_SOURCE) \
- $(MATECONFTOOL) --makefile-install-rule $(schema_DATA)
-endif
-
-if MATECONF_SCHEMAS_INSTALL
-uninstall-local:
- -MATECONF_CONFIG_SOURCE=$(MATECONF_SCHEMA_CONFIG_SOURCE) \
- $(MATECONFTOOL) --makefile-uninstall-rule $(schema_DATA)
-endif
-
clean-local :
rm -f *~
@@ -58,5 +47,5 @@ DISTCLEANFILES = \
mate-power-manager.desktop \
mate-power-preferences.desktop \
mate-power-statistics.desktop \
- mate-power-manager.schemas \
- mate-power-manager.service
+ mate-power-manager.service \
+ org.mate.power-manager.gschema.xml
diff --git a/data/mate-power-manager.desktop.in.in b/data/mate-power-manager.desktop.in.in
index e6599c6..1a27be8 100644
--- a/data/mate-power-manager.desktop.in.in
+++ b/data/mate-power-manager.desktop.in.in
@@ -6,7 +6,7 @@ Exec=mate-power-manager
Terminal=false
Type=Application
Categories=
-OnlyShowIn=MATE;XFCE;
+OnlyShowIn=MATE;
X-MATE-Bugzilla-Bugzilla=MATE
X-MATE-Bugzilla-Product=mate-power-manager
X-MATE-Bugzilla-Component=mate-power-manager
diff --git a/data/mate-power-manager.schemas.in b/data/mate-power-manager.schemas.in
deleted file mode 100644
index 4845738..0000000
--- a/data/mate-power-manager.schemas.in
+++ /dev/null
@@ -1,741 +0,0 @@
-<mateconfschemafile>
- <schemalist>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/actions/sleep_type_battery</key>
- <applyto>/apps/mate-power-manager/actions/sleep_type_battery</applyto>
- <type>string</type>
- <default>hibernate</default>
- <locale name="C">
- <short>Whether to hibernate, suspend or do nothing when inactive</short>
- <long>The type of sleeping that should be performed when the computer is inactive. Possible values are "hibernate", "suspend" and "nothing".</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/actions/critical_battery</key>
- <applyto>/apps/mate-power-manager/actions/critical_battery</applyto>
- <type>string</type>
- <default>hibernate</default>
- <locale name="C">
- <short>Battery critical low action</short>
- <long>The action to take when the battery is critically low. Possible values are "hibernate", "suspend", "shutdown" and "nothing".</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/actions/event_when_closed_battery</key>
- <applyto>/apps/mate-power-manager/actions/event_when_closed_battery</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>If the battery event should occur when the lid is shut and the power disconnected</short>
- <long>If the battery lid close event should occur (for example 'Suspend when lid closed on battery') when the lid is previously shut and the AC power disconnected at a later time.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/actions/sleep_type_ac</key>
- <applyto>/apps/mate-power-manager/actions/sleep_type_ac</applyto>
- <type>string</type>
- <default>suspend</default>
- <locale name="C">
- <short>Whether to hibernate, suspend or do nothing when inactive</short>
- <long>The type of sleeping that should be performed when the computer is inactive. Possible values are "hibernate", "suspend" and "nothing".</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/actions/critical_ups</key>
- <applyto>/apps/mate-power-manager/actions/critical_ups</applyto>
- <type>string</type>
- <default>shutdown</default>
- <locale name="C">
- <short>UPS critical low action</short>
- <long>The action to take when the UPS is critically low. Possible values are "hibernate", "suspend", "shutdown" and "nothing".</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/actions/low_ups</key>
- <applyto>/apps/mate-power-manager/actions/low_ups</applyto>
- <type>string</type>
- <default>hibernate</default>
- <locale name="C">
- <short>UPS low power action</short>
- <long>The action to take when the UPS is low. Possible values are "hibernate", "suspend", "shutdown" and "nothing".</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/backlight/enable</key>
- <applyto>/apps/mate-power-manager/backlight/enable</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Allow backlight brightness adjustment</short>
- <long>If the screen brightness should be changed when switching between AC and battery power.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/backlight/battery_reduce</key>
- <applyto>/apps/mate-power-manager/backlight/battery_reduce</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Reduce the backlight brightness when on battery power</short>
- <long>If the screen should be reduced in brightness when the computer is on battery power.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/backlight/idle_brightness</key>
- <applyto>/apps/mate-power-manager/backlight/idle_brightness</applyto>
- <owner>mate-power-manager</owner>
- <type>int</type>
- <default>30</default>
- <locale name="C">
- <short>The brightness of the screen when idle</short>
- <long>This is the laptop panel screen brightness used when the session is idle. Only valid when use_time_for_policy is true.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/backlight/idle_dim_battery</key>
- <applyto>/apps/mate-power-manager/backlight/idle_dim_battery</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Dim the screen after a period of inactivity when on battery power</short>
- <long>If the screen should be dimmed to save power when the computer is idle when on battery power.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/backlight/idle_dim_time</key>
- <applyto>/apps/mate-power-manager/backlight/idle_dim_time</applyto>
- <owner>mate-power-manager</owner>
- <type>int</type>
- <default>10</default>
- <locale name="C">
- <short>The default amount of time to dim the screen after idle</short>
- <long>The default amount of time to dim the screen after idle.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/backlight/brightness_dim_battery</key>
- <applyto>/apps/mate-power-manager/backlight/brightness_dim_battery</applyto>
- <type>int</type>
- <default>50</default>
- <locale name="C">
- <short>LCD dimming amount when on battery</short>
- <long>The amount to dim the brightness of the display when on battery power. Possible values are between 0 and 100.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/backlight/idle_dim_ac</key>
- <applyto>/apps/mate-power-manager/backlight/idle_dim_ac</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Dim the screen after a period of inactivity when on AC power</short>
- <long>If the screen should be dimmed to save power when the computer is idle when on AC power.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/backlight/dpms_method_ac</key>
- <applyto>/apps/mate-power-manager/backlight/dpms_method_ac</applyto>
- <type>string</type>
- <default>off</default>
- <locale name="C">
- <short>Method used to blank screen on AC</short>
- <long>The DPMS method used to blank the screen when on AC power. Possible values are "standby", "suspend" and "off".</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/backlight/dpms_method_battery</key>
- <applyto>/apps/mate-power-manager/backlight/dpms_method_battery</applyto>
- <type>string</type>
- <default>off</default>
- <locale name="C">
- <short>Method used to blank screen on battery</short>
- <long>The DPMS method used to blank the screen when on battery power. Possible values are "standby", "suspend" and "off".</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/backlight/brightness_ac</key>
- <applyto>/apps/mate-power-manager/backlight/brightness_ac</applyto>
- <type>int</type>
- <default>100</default>
- <locale name="C">
- <short>LCD brightness when on AC</short>
- <long>The brightness of the display when on AC power. Possible values are between 0 and 100.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/buttons/suspend</key>
- <applyto>/apps/mate-power-manager/buttons/suspend</applyto>
- <type>string</type>
- <default>suspend</default>
- <locale name="C">
- <short>Suspend button action</short>
- <long>The action to take when the system suspend button is pressed. Possible values are "suspend", "hibernate", "interactive", "shutdown" and "nothing".</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/buttons/hibernate</key>
- <applyto>/apps/mate-power-manager/buttons/hibernate</applyto>
- <type>string</type>
- <default>hibernate</default>
- <locale name="C">
- <short>Hibernate button action</short>
- <long>The action to take when the system hibernate button is pressed. Possible values are "suspend", "hibernate", "interactive", "shutdown" and "nothing".</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/buttons/power</key>
- <applyto>/apps/mate-power-manager/buttons/power</applyto>
- <type>string</type>
- <default>interactive</default>
- <locale name="C">
- <short>Power button action</short>
- <long>The action to take when the system power button is pressed. Possible values are "suspend", "hibernate", "interactive", "shutdown" and "nothing".</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/buttons/lid_battery</key>
- <applyto>/apps/mate-power-manager/buttons/lid_battery</applyto>
- <type>string</type>
- <default>suspend</default>
- <locale name="C">
- <short>Laptop lid close action on battery</short>
- <long>The action to take when the laptop lid is closed and the laptop is on battery power. Possible values are "suspend", "hibernate", "blank", and "nothing".</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/buttons/lid_ac</key>
- <applyto>/apps/mate-power-manager/buttons/lid_ac</applyto>
- <type>string</type>
- <default>suspend</default>
- <locale name="C">
- <short>Laptop lid close action when on AC</short>
- <long>The action to take when the laptop lid is closed and the laptop is on AC power. Possible values are "suspend", "hibernate", "blank" and "nothing".</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/general/installed_schema</key>
- <applyto>/apps/mate-power-manager/general/installed_schema</applyto>
- <owner>mate-power-manager</owner>
- <type>int</type>
- <default>3</default>
- <locale name="C">
- <short>The default configuration version</short>
- <long>The version of the installed version of the schema. Do not edit this value, it is used so that configure changes between versions can be detected.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/general/use_profile_time</key>
- <applyto>/apps/mate-power-manager/general/use_profile_time</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>If the learnt profile should be used to calculate the time remaining</short>
- <long>If the learnt profile should be used to calculate the time remaining. Only turn this off for debugging.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/general/use_time_for_policy</key>
- <applyto>/apps/mate-power-manager/general/use_time_for_policy</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Whether to use time-based notifications</short>
- <long>If time based notifications should be used. If set to false, then the percentage change is used instead, which may fix a broken ACPI BIOS.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/general/check_type_cpu</key>
- <applyto>/apps/mate-power-manager/general/check_type_cpu</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Check CPU load before sleeping</short>
- <long>If the CPU load should be checked before doing the idle action.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/general/network_sleep</key>
- <applyto>/apps/mate-power-manager/general/network_sleep</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Whether NetworkManager should be connected and disconnected on sleep</short>
- <long>Whether NetworkManager should disconnect before suspending or hibernating and connect on resume.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/lock/use_screensaver_settings</key>
- <applyto>/apps/mate-power-manager/lock/use_screensaver_settings</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Use mate-screensaver lock setting</short>
- <long>Whether to use the screen lock setting of mate-screensaver to decide if the screen is locked after a hibernate, suspend or blank screen.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/lock/blank_screen</key>
- <applyto>/apps/mate-power-manager/lock/blank_screen</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Lock screen when blanked</short>
- <long>Whether the screen is locked when the screen is turned off. Only used if lock_use_screensaver_settings is false.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/lock/suspend</key>
- <applyto>/apps/mate-power-manager/lock/suspend</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Lock screen on suspend</short>
- <long>Whether the screen is locked when the computer wakes up from a suspend. Only used if lock_use_screensaver_settings is false.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/lock/hibernate</key>
- <applyto>/apps/mate-power-manager/lock/hibernate</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Lock screen on hibernate</short>
- <long>Whether the screen is locked when the computer wakes up from a hibernate. Only used if lock_use_screensaver_settings is false.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/lock/mate_keyring_suspend</key>
- <applyto>/apps/mate-power-manager/lock/mate_keyring_suspend</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Lock MATE keyring on sleep</short>
- <long>Whether the MATE keyring is locked before the computer enters suspend. This means the keyring will have to be unlocked on resume.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/lock/mate_keyring_hibernate</key>
- <applyto>/apps/mate-power-manager/lock/mate_keyring_hibernate</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Lock MATE keyring on sleep</short>
- <long>Whether the MATE keyring is locked before the computer enters hibernate. This means the keyring will have to be unlocked on resume.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/disks/spindown_enable_ac</key>
- <applyto>/apps/mate-power-manager/disks/spindown_enable_ac</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>If the low-power mode should be enabled when on AC</short>
- <long>If the system low-power mode should be enabled when on AC power.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/disks/spindown_enable_battery</key>
- <applyto>/apps/mate-power-manager/disks/spindown_enable_battery</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>If the low-power mode should be enabled when on battery</short>
- <long>If the system low-power mode should be enabled when on laptop battery power.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/disks/spindown_timeout_ac</key>
- <applyto>/apps/mate-power-manager/disks/spindown_timeout_ac</applyto>
- <owner>mate-power-manager</owner>
- <type>int</type>
- <default>600</default>
- <locale name="C">
- <short>Seconds of inactivity to spin down when on AC</short>
- <long>The number of seconds of inactivity to spin down the disks when on AC power.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/disks/spindown_timeout_battery</key>
- <applyto>/apps/mate-power-manager/disks/spindown_timeout_battery</applyto>
- <owner>mate-power-manager</owner>
- <type>int</type>
- <default>60</default>
- <locale name="C">
- <short>Seconds of inactivity to spin down when on battery</short>
- <long>The number of seconds of inactivity to spin down the disks when on battery power.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/notify/perhaps_recall</key>
- <applyto>/apps/mate-power-manager/notify/perhaps_recall</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>If we should show the recalled battery warning for a broken battery</short>
- <long>If we should show the recalled battery warning for a broken battery. Set this to false only if you know your battery is okay.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/notify/low_capacity</key>
- <applyto>/apps/mate-power-manager/notify/low_capacity</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>If we should show the low capacity warning for a broken battery</short>
- <long>If we should show the low capacity warning for a broken battery.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/notify/discharging</key>
- <applyto>/apps/mate-power-manager/notify/discharging</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Notify when AC adapter is disconnected</short>
- <long>If the user should be notified when the AC adapter is disconnected.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/notify/fully_charged</key>
- <applyto>/apps/mate-power-manager/notify/fully_charged</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Notify when fully charged</short>
- <long>If a notification message should be displayed when the battery is fully charged.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/notify/sleep_failed</key>
- <applyto>/apps/mate-power-manager/notify/sleep_failed</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Notify on a sleep failure</short>
- <long>If a notification message should be displayed after suspend or hibernate failed.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/notify/sleep_failed_uri</key>
- <applyto>/apps/mate-power-manager/notify/sleep_failed_uri</applyto>
- <owner>mate-power-manager</owner>
- <type>string</type>
- <default></default>
- <locale name="C">
- <short>The URI to show to the user on sleep failure</short>
- <long>When sleep fails we can show the user a button to help fix the situation. Leave this blank if the button should not be shown.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/notify/low_power</key>
- <applyto>/apps/mate-power-manager/notify/low_power</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Notify on a low power</short>
- <long>If a notification message should be displayed when the battery is getting low.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/statistics/show_axis_labels</key>
- <applyto>/apps/mate-power-manager/statistics/show_axis_labels</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Whether we should show the axis labels in the statistics window</short>
- <long>Whether we should show the axis labels in the statistics window.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/statistics/show_events</key>
- <applyto>/apps/mate-power-manager/statistics/show_events</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Whether we should show the events in the statistics window</short>
- <long>Whether we should show the events in the statistics window.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/statistics/smooth_data</key>
- <applyto>/apps/mate-power-manager/statistics/smooth_data</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Whether we should smooth the data in the graph</short>
- <long>Whether we should smooth the data in the graph.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/statistics/graph_type</key>
- <applyto>/apps/mate-power-manager/statistics/graph_type</applyto>
- <owner>mate-power-manager</owner>
- <type>string</type>
- <default>power</default>
- <locale name="C">
- <short>The default graph type to show in the statistics window</short>
- <long>The default graph type to show in the statistics window.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/statistics/data_max_time</key>
- <applyto>/apps/mate-power-manager/statistics/data_max_time</applyto>
- <owner>mate-power-manager</owner>
- <type>int</type>
- <default>21600</default>
- <locale name="C">
- <short>The maximum time displayed on the graph</short>
- <long>The maximum duration of time displayed on the x-axis of the graph.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/thresholds/percentage_low</key>
- <applyto>/apps/mate-power-manager/thresholds/percentage_low</applyto>
- <owner>mate-power-manager</owner>
- <type>int</type>
- <default>10</default>
- <locale name="C">
- <short>Percentage considered low</short>
- <long>The percentage of the battery when it is considered low. Only valid when use_time_for_policy is false.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/thresholds/percentage_critical</key>
- <applyto>/apps/mate-power-manager/thresholds/percentage_critical</applyto>
- <owner>mate-power-manager</owner>
- <type>int</type>
- <default>3</default>
- <locale name="C">
- <short>Percentage considered critical</short>
- <long>The percentage of the battery when it is considered critical. Only valid when use_time_for_policy is false.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/thresholds/percentage_action</key>
- <applyto>/apps/mate-power-manager/thresholds/percentage_action</applyto>
- <owner>mate-power-manager</owner>
- <type>int</type>
- <default>2</default>
- <locale name="C">
- <short>Percentage action is taken</short>
- <long>The percentage of the battery when the critical action is performed. Only valid when use_time_for_policy is false.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/thresholds/time_low</key>
- <applyto>/apps/mate-power-manager/thresholds/time_low</applyto>
- <owner>mate-power-manager</owner>
- <type>int</type>
- <default>1200</default>
- <locale name="C">
- <short>The time remaining when low</short>
- <long>The time remaining in seconds of the battery when it is considered low. Only valid when use_time_for_policy is true.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/thresholds/time_critical</key>
- <applyto>/apps/mate-power-manager/thresholds/time_critical</applyto>
- <owner>mate-power-manager</owner>
- <type>int</type>
- <default>300</default>
- <locale name="C">
- <short>The time remaining when critical</short>
- <long>The time remaining in seconds of the battery when it is considered critical. Only valid when use_time_for_policy is true.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/thresholds/time_action</key>
- <applyto>/apps/mate-power-manager/thresholds/time_action</applyto>
- <owner>mate-power-manager</owner>
- <type>int</type>
- <default>120</default>
- <locale name="C">
- <short>The time remaining when action is taken</short>
- <long>The time remaining in seconds of the battery when critical action is taken. Only valid when use_time_for_policy is true.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/timeout/sleep_computer_battery</key>
- <applyto>/apps/mate-power-manager/timeout/sleep_computer_battery</applyto>
- <type>int</type>
- <default>0</default>
- <locale name="C">
- <short>Sleep timeout computer when on battery</short>
- <long>The amount of time in seconds the computer on battery power needs to be inactive before it goes to sleep.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/timeout/sleep_computer_ac</key>
- <applyto>/apps/mate-power-manager/timeout/sleep_computer_ac</applyto>
- <type>int</type>
- <default>0</default>
- <locale name="C">
- <short>Sleep timeout computer when on AC</short>
- <long>The amount of time in seconds the computer on AC power needs to be inactive before it goes to sleep.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/timeout/sleep_computer_ups</key>
- <applyto>/apps/mate-power-manager/timeout/sleep_computer_ups</applyto>
- <type>int</type>
- <default>0</default>
- <locale name="C">
- <short>Sleep timeout computer when on UPS</short>
- <long>The amount of time in seconds the computer on UPS power needs to be inactive before it goes to sleep.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/timeout/sleep_display_ac</key>
- <applyto>/apps/mate-power-manager/timeout/sleep_display_ac</applyto>
- <type>int</type>
- <default>1800</default>
- <locale name="C">
- <short>Sleep timeout display when on AC</short>
- <long>The amount of time in seconds before the display goes to sleep when the computer is on AC power.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/timeout/sleep_display_battery</key>
- <applyto>/apps/mate-power-manager/timeout/sleep_display_battery</applyto>
- <type>int</type>
- <default>600</default>
- <locale name="C">
- <short>Sleep timeout display when on battery</short>
- <long>The amount of time in seconds the computer on battery power needs to be inactive before the display goes to sleep.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/timeout/sleep_display_ups</key>
- <applyto>/apps/mate-power-manager/timeout/sleep_display_ups</applyto>
- <type>int</type>
- <default>600</default>
- <locale name="C">
- <short>Sleep timeout display when on UPS</short>
- <long>The amount of time in seconds the computer on UPS power needs to be inactive before the display goes to sleep.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/ui/enable_sound</key>
- <applyto>/apps/mate-power-manager/ui/enable_sound</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>If sounds should be used</short>
- <long>If sounds should be used when the power is critically low, or inhibit requests have stopped the policy action.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/ui/show_actions</key>
- <applyto>/apps/mate-power-manager/ui/show_actions</applyto>
- <owner>mate-power-manager</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>If preferences and statistics items should be shown in the context menu</short>
- <long></long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/mate-power-manager/ui/icon_policy</key>
- <applyto>/apps/mate-power-manager/ui/icon_policy</applyto>
- <owner>mate-power-manager</owner>
- <type>string</type>
- <default>present</default>
- <locale name="C">
- <short>When to show the notification icon</short>
- <long>Display options for the notification icon. Valid options are "never", "low", "critical", "charge", "present" and "always".</long>
- </locale>
- </schema>
-
- </schemalist>
-</mateconfschemafile>
diff --git a/data/mate-power-preferences.desktop.in.in b/data/mate-power-preferences.desktop.in.in
index 46dc24a..2a49af7 100644
--- a/data/mate-power-preferences.desktop.in.in
+++ b/data/mate-power-preferences.desktop.in.in
@@ -6,7 +6,7 @@ Exec=mate-power-preferences
Terminal=false
Type=Application
Categories=Settings;HardwareSettings;
-OnlyShowIn=MATE;XFCE;
+OnlyShowIn=MATE;
StartupNotify=true
X-MATE-Bugzilla-Bugzilla=MATE
X-MATE-Bugzilla-Product=mate-power-manager
diff --git a/data/mate-power-statistics.desktop.in.in b/data/mate-power-statistics.desktop.in.in
index 25aae9d..6803ad5 100644
--- a/data/mate-power-statistics.desktop.in.in
+++ b/data/mate-power-statistics.desktop.in.in
@@ -5,8 +5,8 @@ Icon=mate-power-statistics
Exec=mate-power-statistics
Terminal=false
Type=Application
-Categories=MATE;GTK;System;Monitor;
-OnlyShowIn=MATE;XFCE;
+Categories=GTK;System;Monitor;
+OnlyShowIn=MATE;
NoDisplay=true
StartupNotify=true
X-MATE-Bugzilla-Bugzilla=MATE
diff --git a/data/org.mate.power-manager.gschema.xml.in b/data/org.mate.power-manager.gschema.xml.in
new file mode 100644
index 0000000..dcd2cd4
--- /dev/null
+++ b/data/org.mate.power-manager.gschema.xml.in
@@ -0,0 +1,369 @@
+<schemalist>
+ <enum id="org.mate.power-manager.ActionType">
+ <value nick="blank" value="0"/>
+ <value nick="suspend" value="1"/>
+ <value nick="shutdown" value="2"/>
+ <value nick="hibernate" value="3"/>
+ <value nick="interactive" value="4"/>
+ <value nick="nothing" value="5"/>
+ </enum>
+ <enum id="org.mate.power-manager.IconPolicy">
+ <value nick="always" value="0"/>
+ <value nick="present" value="1"/>
+ <value nick="charge" value="2"/>
+ <value nick="low" value="3"/>
+ <value nick="critical" value="4"/>
+ <value nick="never" value="5"/>
+ </enum>
+ <enum id="org.mate.power-manager.DpmsMethod">
+ <value nick="standby" value="1"/>
+ <value nick="suspend" value="2"/>
+ <value nick="off" value="3"/>
+ </enum>
+ <schema id="org.mate.power-manager" path="/org/mate/power-manager/">
+ <key name="action-sleep-type-battery" enum="org.mate.power-manager.ActionType">
+ <default>'hibernate'</default>
+ <_summary>Whether to hibernate, suspend or do nothing when inactive</_summary>
+ <_description>The type of sleeping that should be performed when the computer is inactive.</_description>
+ </key>
+ <key name="action-critical-battery" enum="org.mate.power-manager.ActionType">
+ <default>'hibernate'</default>
+ <_summary>Battery critical low action</_summary>
+ <_description>The action to take when the battery is critically low.</_description>
+ </key>
+ <key name="event-when-closed-battery" type="b">
+ <default>true</default>
+ <_summary>If the battery event should occur when the lid is shut and the power disconnected</_summary>
+ <_description>If the battery lid close event should occur (for example 'Suspend when lid closed on battery') when the lid is previously shut and the AC power disconnected at a later time.</_description>
+ </key>
+ <key name="action-sleep-type-ac" enum="org.mate.power-manager.ActionType">
+ <default>'suspend'</default>
+ <_summary>Whether to hibernate, suspend or do nothing when inactive</_summary>
+ <_description>The type of sleeping that should be performed when the computer is inactive.</_description>
+ </key>
+ <key name="action-critical-ups" enum="org.mate.power-manager.ActionType">
+ <default>'shutdown'</default>
+ <_summary>UPS critical low action</_summary>
+ <_description>The action to take when the UPS is critically low.</_description>
+ </key>
+ <key name="action-low-ups" enum="org.mate.power-manager.ActionType">
+ <default>'hibernate'</default>
+ <_summary>UPS low power action</_summary>
+ <_description>The action to take when the UPS is low.</_description>
+ </key>
+ <key name="backlight-enable" type="b">
+ <default>true</default>
+ <_summary>Allow backlight brightness adjustment</_summary>
+ <_description>If the screen brightness should be changed when switching between AC and battery power.</_description>
+ </key>
+ <key name="backlight-battery-reduce" type="b">
+ <default>true</default>
+ <_summary>Reduce the backlight brightness when on battery power</_summary>
+ <_description>If the screen should be reduced in brightness when the computer is on battery power.</_description>
+ </key>
+ <key name="kbd-backlight-battery-reduce" type="b">
+ <default>true</default>
+ <summary>Reduce the keyboard backlight when on battery power</summary>
+ <description>If the keyboard backlight brightness should be reduced when the computer is on battery power</description>
+ </key>
+ <key name="kbd-brightness-on-ac" type="i">
+ <default>100</default>
+ <summary>Keyboard backlight brightness when on AC power.</summary>
+ <description>Percent brightness to set keyboard backlight at when on AC power. Legal values are between 0 and 100.</description>
+ </key>
+ <key name="kbd-brightness-dim-by-on-battery" type="i">
+ <default>50</default>
+ <summary>Percent to reduce keyboard backlight by when on battery power.</summary>
+ <description>The percentage to reduce the keyboard backlight by when on battery power. For example, if set to '60', the backlight will be cut by 40% on battery power. Legal values are between 0 and 100.</description>
+ </key>
+ <key name="kbd-brightness-dim-by-on-idle" type="i">
+ <default>75</default>
+ <summary>Percent to reduce keyboard backlight by when idle.</summary>
+ <description>The percentage to reduce the keyboard backlight by when idle. For example, if set to '60', the backlight will be cut by 40% when idle. Legal values are between 0 and 100.</description>
+ </key>
+ <key name="idle-brightness" type="i">
+ <default>30</default>
+ <_summary>The brightness of the screen when idle</_summary>
+ <_description>This is the laptop panel screen brightness used when the session is idle. Only valid when use-time-for-policy is true.</_description>
+ </key>
+ <key name="idle-dim-battery" type="b">
+ <default>true</default>
+ <_summary>Dim the screen after a period of inactivity when on battery power</_summary>
+ <_description>If the screen should be dimmed to save power when the computer is idle when on battery power.</_description>
+ </key>
+ <key name="idle-dim-time" type="i">
+ <default>10</default>
+ <_summary>The default amount of time to dim the screen after idle</_summary>
+ <_description>The default amount of time to dim the screen after idle.</_description>
+ </key>
+ <key name="brightness-dim-battery" type="i">
+ <default>50</default>
+ <_summary>LCD dimming amount when on battery</_summary>
+ <_description>The amount to dim the brightness of the display when on battery power. Possible values are between 0 and 100.</_description>
+ </key>
+ <key name="idle-dim-ac" type="b">
+ <default>false</default>
+ <_summary>Dim the screen after a period of inactivity when on AC power</_summary>
+ <_description>If the screen should be dimmed to save power when the computer is idle when on AC power.</_description>
+ </key>
+ <key name="dpms-method-ac" enum="org.mate.power-manager.DpmsMethod">
+ <default>'off'</default>
+ <_summary>Method used to blank screen on AC</_summary>
+ <_description>The DPMS method used to blank the screen when on AC power.</_description>
+ </key>
+ <key name="dpms-method-battery" enum="org.mate.power-manager.DpmsMethod">
+ <default>'off'</default>
+ <_summary>Method used to blank screen on battery</_summary>
+ <_description>The DPMS method used to blank the screen when on battery power.</_description>
+ </key>
+ <key name="brightness-ac" type="d">
+ <default>100.0</default>
+ <_summary>LCD brightness when on AC</_summary>
+ <_description>The brightness of the display when on AC power. Possible values are between 0.0 and 100.0.</_description>
+ </key>
+ <key name="button-suspend" enum="org.mate.power-manager.ActionType">
+ <default>'suspend'</default>
+ <_summary>Suspend button action</_summary>
+ <_description>The action to take when the system suspend button is pressed.</_description>
+ </key>
+ <key name="button-hibernate" enum="org.mate.power-manager.ActionType">
+ <default>'hibernate'</default>
+ <_summary>Hibernate button action</_summary>
+ <_description>The action to take when the system hibernate button is pressed.</_description>
+ </key>
+ <key name="button-power" enum="org.mate.power-manager.ActionType">
+ <default>'interactive'</default>
+ <_summary>Power button action</_summary>
+ <_description>The action to take when the system power button is pressed.</_description>
+ </key>
+ <key name="button-lid-battery" enum="org.mate.power-manager.ActionType">
+ <default>'suspend'</default>
+ <_summary>Laptop lid close action on battery</_summary>
+ <_description>The action to take when the laptop lid is closed and the laptop is on battery power.</_description>
+ </key>
+ <key name="button-lid-ac" enum="org.mate.power-manager.ActionType">
+ <default>'suspend'</default>
+ <_summary>Laptop lid close action when on AC</_summary>
+ <_description>The action to take when the laptop lid is closed and the laptop is on AC power.</_description>
+ </key>
+ <key name="use-time-for-policy" type="b">
+ <default>true</default>
+ <_summary>Whether to use time-based notifications</_summary>
+ <_description>If time based notifications should be used. If set to false, then the percentage change is used instead, which may fix a broken ACPI BIOS.</_description>
+ </key>
+ <key name="check-type-cpu" type="b">
+ <default>false</default>
+ <_summary>Check CPU load before sleeping</_summary>
+ <_description>If the CPU load should be checked before doing the idle action.</_description>
+ </key>
+ <key name="network-sleep" type="b">
+ <default>false</default>
+ <_summary>Whether NetworkManager should be connected and disconnected on sleep.</_summary>
+ <_description>Whether NetworkManager should disconnect before suspending or hibernating and connect on resume.</_description>
+ </key>
+ <key name="lock-use-screensaver" type="b">
+ <default>true</default>
+ <_summary>Use mate-screensaver lock setting</_summary>
+ <_description>Whether to use the screen lock setting of mate-screensaver to decide if the screen is locked after a hibernate, suspend or blank screen.</_description>
+ </key>
+ <key name="lock-blank-screen" type="b">
+ <default>true</default>
+ <_summary>Lock screen when blanked</_summary>
+ <_description>Whether the screen is locked when the screen is turned off. Only used if lock-use-screensaver is false.</_description>
+ </key>
+ <key name="lock-suspend" type="b">
+ <default>true</default>
+ <_summary>Lock screen on suspend</_summary>
+ <_description>Whether the screen is locked when the computer wakes up from a suspend. Only used if lock-use-screensaver is false.</_description>
+ </key>
+ <key name="lock-hibernate" type="b">
+ <default>true</default>
+ <_summary>Lock screen on hibernate</_summary>
+ <_description>Whether the screen is locked when the computer wakes up from a hibernate. Only used if lock-use-screensaver is false.</_description>
+ </key>
+ <key name="lock-keyring-suspend" type="b">
+ <default>false</default>
+ <_summary>Lock MATE keyring on sleep</_summary>
+ <_description>Whether the MATE keyring is locked before the computer enters suspend. This means the keyring will have to be unlocked on resume.</_description>
+ </key>
+ <key name="lock-keyring-hibernate" type="b">
+ <default>true</default>
+ <_summary>Lock MATE keyring on sleep</_summary>
+ <_description>Whether the MATE keyring is locked before the computer enters hibernate. This means the keyring will have to be unlocked on resume.</_description>
+ </key>
+ <key name="spindown-enable-ac" type="b">
+ <default>false</default>
+ <_summary>If the low-power mode should be enabled when on AC</_summary>
+ <_description>If the system low-power mode should be enabled when on AC power.</_description>
+ </key>
+ <key name="spindown-enable-battery" type="b">
+ <default>true</default>
+ <_summary>If the low-power mode should be enabled when on battery</_summary>
+ <_description>If the system low-power mode should be enabled when on laptop battery power.</_description>
+ </key>
+ <key name="spindown-timeout-ac" type="i">
+ <default>600</default>
+ <_summary>Seconds of inactivity to spin down when on AC</_summary>
+ <_description>The number of seconds of inactivity to spin down the disks when on AC power.</_description>
+ </key>
+ <key name="spindown-timeout-battery" type="i">
+ <default>60</default>
+ <_summary>Seconds of inactivity to spin down when on battery</_summary>
+ <_description>The number of seconds of inactivity to spin down the disks when on battery power.</_description>
+ </key>
+ <key name="notify-perhaps-recall" type="b">
+ <default>true</default>
+ <_summary>If we should show the recalled battery warning for a broken battery</_summary>
+ <_description>If we should show the recalled battery warning for a broken battery. Set this to false only if you know your battery is okay.</_description>
+ </key>
+ <key name="notify-low-capacity" type="b">
+ <default>true</default>
+ <_summary>If we should show the low capacity warning for a broken battery</_summary>
+ <_description>If we should show the low capacity warning for a broken battery.</_description>
+ </key>
+ <key name="notify-discharging" type="b">
+ <default>true</default>
+ <_summary>Notify when AC adapter is disconnected</_summary>
+ <_description>If the user should be notified when the AC adapter is disconnected.</_description>
+ </key>
+ <key name="notify-fully-charged" type="b">
+ <default>false</default>
+ <_summary>Notify when fully charged</_summary>
+ <_description>If a notification message should be displayed when the battery is fully charged.</_description>
+ </key>
+ <key name="notify-sleep-failed" type="b">
+ <default>true</default>
+ <_summary>Notify on a sleep failure</_summary>
+ <_description>If a notification message should be displayed after suspend or hibernate failed.</_description>
+ </key>
+ <key name="notify-sleep-failed-uri" type="s">
+ <default>''</default>
+ <_summary>The URI to show to the user on sleep failure</_summary>
+ <_description>When sleep fails we can show the user a button to help fix the situation. Leave this blank if the button should not be shown.</_description>
+ </key>
+ <key name="notify-low-power" type="b">
+ <default>true</default>
+ <_summary>Notify on a low power</_summary>
+ <_description>If a notification message should be displayed when the battery is getting low.</_description>
+ </key>
+ <key name="info-history-graph-points" type="b">
+ <default>true</default>
+ <_summary>Whether we should show the history data points</_summary>
+ <_description>Whether we should show the history data points in the statistics window.</_description>
+ </key>
+ <key name="info-history-graph-smooth" type="b">
+ <default>true</default>
+ <_summary>Whether we should smooth the history data</_summary>
+ <_description>Whether we should smooth the history data in the graph.</_description>
+ </key>
+ <key name="info-history-type" type="s">
+ <default>'power'</default>
+ <_summary>The default graph type to show for history</_summary>
+ <_description>The default graph type to show in the history window.</_description>
+ </key>
+ <key name="info-history-time" type="i">
+ <default>21600</default>
+ <_summary>The maximum time displayed for history</_summary>
+ <_description>The maximum duration of time displayed on the x-axis of the history graph.</_description>
+ </key>
+ <key name="info-stats-graph-points" type="b">
+ <default>true</default>
+ <_summary>Whether we should show the stats data points</_summary>
+ <_description>Whether we should show the stats data points in the statistics window.</_description>
+ </key>
+ <key name="info-stats-graph-smooth" type="b">
+ <default>true</default>
+ <_summary>Whether we should smooth the stats data</_summary>
+ <_description>Whether we should smooth the stats data in the graph.</_description>
+ </key>
+ <key name="info-stats-type" type="s">
+ <default>'power'</default>
+ <_summary>The default graph type to show for stats</_summary>
+ <_description>The default graph type to show in the stats window.</_description>
+ </key>
+ <key name="info-page-number" type="i">
+ <default>0</default>
+ <_summary>The index of the page number to show by default</_summary>
+ <_description>The index of the page number to show by default which is used to return focus to the correct page.</_description>
+ </key>
+ <key name="info-last-device" type="s">
+ <default>''</default>
+ <_summary>The ID of the last device selected</_summary>
+ <_description>The identifier of the last device which is used to return focus to the correct device.</_description>
+ </key>
+ <key name="percentage-low" type="i">
+ <default>10</default>
+ <_summary>Percentage considered low</_summary>
+ <_description>The percentage of the battery when it is considered low. Only valid when use-time-for-policy is false.</_description>
+ </key>
+ <key name="percentage-critical" type="i">
+ <default>3</default>
+ <_summary>Percentage considered critical</_summary>
+ <_description>The percentage of the battery when it is considered critical. Only valid when use-time-for-policy is false.</_description>
+ </key>
+ <key name="percentage-action" type="i">
+ <default>2</default>
+ <_summary>Percentage action is taken</_summary>
+ <_description>The percentage of the battery when the critical action is performed. Only valid when use-time-for-policy is false.</_description>
+ </key>
+ <key name="time-low" type="i">
+ <default>1200</default>
+ <_summary>The time remaining when low</_summary>
+ <_description>The time remaining in seconds of the battery when it is considered low. Only valid when use-time-for-policy is true.</_description>
+ </key>
+ <key name="time-critical" type="i">
+ <default>300</default>
+ <_summary>The time remaining when critical</_summary>
+ <_description>The time remaining in seconds of the battery when it is considered critical. Only valid when use-time-for-policy is true.</_description>
+ </key>
+ <key name="time-action" type="i">
+ <default>120</default>
+ <_summary>The time remaining when action is taken</_summary>
+ <_description>The time remaining in seconds of the battery when critical action is taken. Only valid when use-time-for-policy is true.</_description>
+ </key>
+ <key name="sleep-computer-battery" type="i">
+ <default>0</default>
+ <_summary>Sleep timeout computer when on battery</_summary>
+ <_description>The amount of time in seconds the computer on battery power needs to be inactive before it goes to sleep.</_description>
+ </key>
+ <key name="sleep-computer-ac" type="i">
+ <default>0</default>
+ <_summary>Sleep timeout computer when on AC</_summary>
+ <_description>The amount of time in seconds the computer on AC power needs to be inactive before it goes to sleep.</_description>
+ </key>
+ <key name="sleep-computer-ups" type="i">
+ <default>0</default>
+ <_summary>Sleep timeout computer when on UPS</_summary>
+ <_description>The amount of time in seconds the computer on UPS power needs to be inactive before it goes to sleep.</_description>
+ </key>
+ <key name="sleep-display-ac" type="i">
+ <default>1800</default>
+ <_summary>Sleep timeout display when on AC</_summary>
+ <_description>The amount of time in seconds before the display goes to sleep when the computer is on AC power.</_description>
+ </key>
+ <key name="sleep-display-battery" type="i">
+ <default>600</default>
+ <_summary>Sleep timeout display when on battery</_summary>
+ <_description>The amount of time in seconds the computer on battery power needs to be inactive before the display goes to sleep.</_description>
+ </key>
+ <key name="sleep-display-ups" type="i">
+ <default>600</default>
+ <_summary>Sleep timeout display when on UPS</_summary>
+ <_description>The amount of time in seconds the computer on UPS power needs to be inactive before the display goes to sleep.</_description>
+ </key>
+ <key name="enable-sound" type="b">
+ <default>true</default>
+ <_summary>If sounds should be used</_summary>
+ <_description>If sounds should be used when the power is critically low, or inhibit requests have stopped the policy action.</_description>
+ </key>
+ <key name="show-actions" type="b">
+ <default>true</default>
+ <_summary>If preferences and statistics items should be shown in the context menu</_summary>
+ </key>
+ <key name="icon-policy" enum="org.mate.power-manager.IconPolicy">
+ <default>'present'</default>
+ <_summary>When to show the notification icon</_summary>
+ <_description>Display options for the notification icon.</_description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index e26d395..deef684 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -2,11 +2,11 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
applets/brightness/brightness-applet.c
-applets/brightness/MATE_BrightnessApplet.server.in.in
+[type: gettext/ini]applets/brightness/org.mate.BrightnessApplet.mate-panel-applet.in.in
applets/inhibit/inhibit-applet.c
-applets/inhibit/MATE_InhibitApplet.server.in.in
+[type: gettext/ini]applets/inhibit/org.mate.InhibitApplet.mate-panel-applet.in.in
data/mate-power-manager.desktop.in.in
-data/mate-power-manager.schemas.in
+data/org.mate.power-manager.gschema.xml.in
data/mate-power-preferences.desktop.in.in
data/mate-power-statistics.desktop.in.in
[type: gettext/glade]data/gpm-feedback-widget.ui
@@ -34,5 +34,3 @@ src/gpm-screensaver.c
src/gpm-statistics.c
src/gpm-tray-icon.c
src/gpm-upower.c
-applets/brightness/MATE_BrightnessApplet.xml
-applets/inhibit/MATE_InhibitApplet.xml
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index ec82b10..4f534b9 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,5 +1,5 @@
-applets/brightness/MATE_BrightnessApplet.server.in
-applets/inhibit/MATE_InhibitApplet.server.in
+applets/brightness/org.mate.BrightnessApplet.mate-panel-applet.in
+applets/inhibit/org.mate.InhibitApplet.mate-panel-applet.in
data/mate-power-manager.desktop.in
data/mate-power-preferences.desktop.in
data/mate-power-statistics.desktop.in
diff --git a/po/ar.po b/po/ar.po
index 1014d53..15477d4 100644
--- a/po/ar.po
+++ b/po/ar.po
@@ -1,26 +1,22 @@
-# translation of mate-power-manager.HEAD.po to Arabic
-# Yousef Raffah <[email protected]>, 2006.
-# Djihed Afifi <[email protected]>, 2006.
-# Khaled Hosny <[email protected]>, 2006, 2007, 2008, 2009, 2010.
-# Mohamed Magdy <[email protected]>, 2007.
-# Youssef Chahibi <[email protected]>, 2007.
-# Anas Husseini <[email protected]>, 2007.
-# Abdelmonam Kouka <[email protected]>, 2008.
-msgid ""
-msgstr ""
-"Project-Id-Version: mate-power-manager.HEAD\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-09-23 14:29+0300\n"
-"PO-Revision-Date: 2010-09-23 14:28+0300\n"
-"Last-Translator: Khaled Hosny <[email protected]>\n"
-"Language-Team: Arabic <[email protected]>\n"
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Translators:
+# <[email protected]>, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: MATE Desktop Environment\n"
+"Report-Msgid-Bugs-To: https://github.com/mate-desktop/\n"
+"POT-Creation-Date: 2012-01-01 13:42+0100\n"
+"PO-Revision-Date: 2012-04-28 01:35+0000\n"
+"Last-Translator: noureddin <[email protected]>\n"
+"Language-Team: Arabic (http://www.transifex.com/projects/p/MATE/language/ar/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ar\n"
-"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
-"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n"
-"X-Generator: Virtaal 0.6.1\n"
+"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5\n"
#: ../applets/brightness/brightness-applet.c:109
msgid "Power Manager Brightness Applet"
@@ -56,11 +52,7 @@ msgid ""
"modify it under the terms of the GNU General Public License\n"
"as published by the Free Software Foundation; either version 2\n"
"of the License, or (at your option) any later version."
-msgstr ""
-"مدير الطاقة برمجية حرة؛ بامكانك إعادة توزيعه و/أو تعديله تحت شروط الرخصة "
-"العمومية\n"
-"العامة لجنو والتي نشرتها منظمة البرمجيات الحرة؛ سواء الإصدارة 2 من الرخصة أو "
-"أي إصدارة بعدها حسب رغبتك."
+msgstr "مدير الطاقة برمجية حرة؛ بامكانك إعادة توزيعه و/أو تعديله تحت شروط الرخصة العمومية\nالعامة لجنو والتي نشرتها منظمة البرمجيات الحرة؛ سواء الإصدارة 2 من الرخصة أو أي إصدارة بعدها حسب رغبتك."
#: ../applets/brightness/brightness-applet.c:757
#: ../applets/inhibit/inhibit-applet.c:436
@@ -69,10 +61,7 @@ msgid ""
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
"GNU General Public License for more details."
-msgstr ""
-"يوزّع مدير على أمل أن يكون مفيدًا لمن يستخدمه دون أدنى مسؤولية؛ ولا حتى \n"
-"أي ضمان يضمن صلاحية العرض في السوق أو توافقه مع أي استخدام محدد. يمكنك \n"
-"مراجعةالرخصة العمومية العامة لجنو لمزيد من التفاصيل."
+msgstr "يوزّع مدير على أمل أن يكون مفيدًا لمن يستخدمه دون أدنى مسؤولية؛ ولا حتى \nأي ضمان يضمن صلاحية العرض في السوق أو توافقه مع أي استخدام محدد. يمكنك \nمراجعةالرخصة العمومية العامة لجنو لمزيد من التفاصيل."
#: ../applets/brightness/brightness-applet.c:761
#: ../applets/inhibit/inhibit-applet.c:440
@@ -81,12 +70,7 @@ msgid ""
"along with this program; if not, write to the Free Software\n"
"Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA\n"
"02110-1301, USA."
-msgstr ""
-"من المفترض أن تكون قد استلمت نسخة من رخصة جنو العامة\n"
-"مع هذا البرنامج؛ في حال عدم استلامك لذلك\n"
-"، يمكنك مكاتبة:\n"
-"Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA "
-"02110-1301, USA"
+msgstr "من المفترض أن تكون قد استلمت نسخة من رخصة جنو العامة\nمع هذا البرنامج؛ في حال عدم استلامك لذلك\n، يمكنك مكاتبة:\nFree Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA"
#: ../applets/brightness/brightness-applet.c:775
msgid "Copyright © 2006 Benjamin Canou"
@@ -170,22 +154,17 @@ msgstr "راجع حِمْل المعالج قبل النوم"
#: ../data/mate-power-manager.schemas.in.h:4
msgid "Dim the screen after a period of inactivity when on AC power"
-msgstr ""
-"أخفت إضاءة الشاشة بعد انقضاء مدة من عدم النشاط أثناء استعمال الطاقة "
-"الاعتيادية"
+msgstr "أخفت إضاءة الشاشة بعد انقضاء مدة من عدم النشاط أثناء استعمال الطاقة الاعتيادية"
#: ../data/mate-power-manager.schemas.in.h:5
msgid "Dim the screen after a period of inactivity when on battery power"
-msgstr ""
-"أخفت إضاءة الشاشة بعد انقضاء مدة من عدم النشاط أثناء استعمال طاقة البطارية"
+msgstr "أخفت إضاءة الشاشة بعد انقضاء مدة من عدم النشاط أثناء استعمال طاقة البطارية"
#: ../data/mate-power-manager.schemas.in.h:6
msgid ""
-"Display options for the notification icon. Valid options are \"never\", \"low"
-"\", \"critical\", \"charge\", \"present\" and \"always\"."
-msgstr ""
-"خيارات العرض لأيقونة التنبيه. الخيارات الصالحة هي \n"
-"\"never\"، \"low\"، \"critical\"، \"charge\"، \"present\" و \"always\"."
+"Display options for the notification icon. Valid options are \"never\", "
+"\"low\", \"critical\", \"charge\", \"present\" and \"always\"."
+msgstr "خيارات العرض لأيقونة التنبيه. الخيارات الصالحة هي \n\"never\"، \"low\"، \"critical\"، \"charge\"، \"present\" و \"always\"."
#: ../data/mate-power-manager.schemas.in.h:7
msgid "Hibernate button action"
@@ -210,7 +189,8 @@ msgid ""
msgstr "نبّهني إذا كانت البطارية ضعيفة الشحن."
#: ../data/mate-power-manager.schemas.in.h:11
-msgid "If preferences and statistics items should be shown in the context menu"
+msgid ""
+"If preferences and statistics items should be shown in the context menu"
msgstr "إذا ما كان يتعين عرض عنصر التفضيلات والإحصائيات في قائمة السياق"
#: ../data/mate-power-manager.schemas.in.h:12
@@ -221,9 +201,7 @@ msgstr "إن كانت الأصوات ستُستخدم"
msgid ""
"If sounds should be used when the power is critically low, or inhibit "
"requests have stopped the policy action."
-msgstr ""
-"استعمل الأصوات إذا كانت الطاقة ضعيفة جدا أو أن طلبات التثبيط أوقفت عمل "
-"السياسة."
+msgstr "استعمل الأصوات إذا كانت الطاقة ضعيفة جدا أو أن طلبات التثبيط أوقفت عمل السياسة."
#: ../data/mate-power-manager.schemas.in.h:14
msgid "If the CPU load should be checked before doing the idle action."
@@ -240,10 +218,7 @@ msgid ""
"If the battery lid close event should occur (for example 'Suspend when lid "
"closed on battery') when the lid is previously shut and the AC power "
"disconnected at a later time."
-msgstr ""
-"إن كان يفترض حدوث حدث إغلاق غطاء البطارية (على سبيل المثال تعليق الجهاز حين "
-"إغلاق الجهاز على البطارية) في حالة كان الغطاء مغلق مسبقا و من ثم تم فصل طاقة "
-"التيار المتردد لاحقا"
+msgstr "إن كان يفترض حدوث حدث إغلاق غطاء البطارية (على سبيل المثال تعليق الجهاز حين إغلاق الجهاز على البطارية) في حالة كان الغطاء مغلق مسبقا و من ثم تم فصل طاقة التيار المتردد لاحقا"
#: ../data/mate-power-manager.schemas.in.h:17
msgid "If the learnt profile should be used to calculate the time remaining"
@@ -253,9 +228,7 @@ msgstr "إن كان يُفترض أن يُستخدم ملف تعريف التع�
msgid ""
"If the learnt profile should be used to calculate the time remaining. Only "
"turn this off for debugging."
-msgstr ""
-"إن كان يُفترض أن يُستخدم ملف تعريف التعلم لحساب الوقت المتبقي. أطفئ هذا فقط في "
-"حالة التنقيح."
+msgstr "إن كان يُفترض أن يُستخدم ملف تعريف التعلم لحساب الوقت المتبقي. أطفئ هذا فقط في حالة التنقيح."
#: ../data/mate-power-manager.schemas.in.h:19
msgid "If the low-power mode should be enabled when on AC"
@@ -269,46 +242,34 @@ msgstr "إذا يفترض تفعيل نمط الطاقة-المنخفضة أثن
msgid ""
"If the screen brightness should be changed when switching between AC and "
"battery power."
-msgstr ""
-"إن كان يمكن تغيير سطوع الشاشة عند التحويل بين الطاقة المتناوبة وطاقة "
-"البطارية."
+msgstr "إن كان يمكن تغيير سطوع الشاشة عند التحويل بين الطاقة المتناوبة وطاقة البطارية."
#: ../data/mate-power-manager.schemas.in.h:22
msgid ""
"If the screen should be dimmed to save power when the computer is idle when "
"on AC power."
-msgstr ""
-"إن كان يفترض خفض إضاءة الشاشة لحفظ الطاقة إذا كان الحاسوب في حالة خامدة "
-"أثناء استعمال الطاقة الاعتيادية"
+msgstr "إن كان يفترض خفض إضاءة الشاشة لحفظ الطاقة إذا كان الحاسوب في حالة خامدة أثناء استعمال الطاقة الاعتيادية"
#: ../data/mate-power-manager.schemas.in.h:23
msgid ""
"If the screen should be dimmed to save power when the computer is idle when "
"on battery power."
-msgstr ""
-"إن كان يفترض خفض إضاءة الشاشة لحفظ الطاقة إذا كان الحاسوب في حالة خامدة "
-"أثناء استعمال طاقة البطارية."
+msgstr "إن كان يفترض خفض إضاءة الشاشة لحفظ الطاقة إذا كان الحاسوب في حالة خامدة أثناء استعمال طاقة البطارية."
#: ../data/mate-power-manager.schemas.in.h:24
msgid ""
"If the screen should be reduced in brightness when the computer is on "
"battery power."
-msgstr ""
-"إن كان يفترض خفض إضاءة الشاشة لحفظ الطاقة إذا كان الحاسوب في حالة خامدة "
-"أثناء استعمال طاقة البطارية."
+msgstr "إن كان يفترض خفض إضاءة الشاشة لحفظ الطاقة إذا كان الحاسوب في حالة خامدة أثناء استعمال طاقة البطارية."
#: ../data/mate-power-manager.schemas.in.h:25
msgid "If the system low-power mode should be enabled when on AC power."
-msgstr ""
-"إن كان يفترض تفعيل وضع الطاقة المنخفضة للنظام في حال كون الجهاز يعمل على "
-"التيار المتردد"
+msgstr "إن كان يفترض تفعيل وضع الطاقة المنخفضة للنظام في حال كون الجهاز يعمل على التيار المتردد"
#: ../data/mate-power-manager.schemas.in.h:26
msgid ""
"If the system low-power mode should be enabled when on laptop battery power."
-msgstr ""
-"إن كان يفترض تفعيل وضع الطاقة المنخفضة للنظام في حال كون الجهاز يعمل على "
-"البطارية"
+msgstr "إن كان يفترض تفعيل وضع الطاقة المنخفضة للنظام في حال كون الجهاز يعمل على البطارية"
#: ../data/mate-power-manager.schemas.in.h:27
msgid "If the user should be notified when the AC adapter is disconnected."
@@ -318,9 +279,7 @@ msgstr "إذا يفترض إعلام المستخدم في حال إنقطاع �
msgid ""
"If time based notifications should be used. If set to false, then the "
"percentage change is used instead, which may fix a broken ACPI BIOS."
-msgstr ""
-"إن كان يفترض استعمال تنبيهات وقتية. إذا لم يتم تفعيل هذا الخيار, سيتم "
-"استعمال تغير النسبة المئوية."
+msgstr "إن كان يفترض استعمال تنبيهات وقتية. إذا لم يتم تفعيل هذا الخيار, سيتم استعمال تغير النسبة المئوية."
#: ../data/mate-power-manager.schemas.in.h:29
msgid "If we should show the low capacity warning for a broken battery"
@@ -338,9 +297,7 @@ msgstr "إن كان سيُظهر تنبيه البطارية المعاد إذا
msgid ""
"If we should show the recalled battery warning for a broken battery. Set "
"this to false only if you know your battery is okay."
-msgstr ""
-"أظهر تنبيه إفراغ البطارية إذا كانت البطارية فاسدة. اختر FALSE إذا كانت "
-"البطارية في حالة جيدة."
+msgstr "أظهر تنبيه إفراغ البطارية إذا كانت البطارية فاسدة. اختر FALSE إذا كانت البطارية في حالة جيدة."
#: ../data/mate-power-manager.schemas.in.h:33
msgid "LCD brightness when on AC"
@@ -356,8 +313,7 @@ msgstr "الإجراء اللازم عند إغلاق غطاء الجهاز ال
#: ../data/mate-power-manager.schemas.in.h:36
msgid "Laptop lid close action when on AC"
-msgstr ""
-"الإجراء اللازم عند إغلاق غطاء الجهاز المحمول أثناء استخدام التيار المتردد"
+msgstr "الإجراء اللازم عند إغلاق غطاء الجهاز المحمول أثناء استخدام التيار المتردد"
#: ../data/mate-power-manager.schemas.in.h:37
msgid "Lock MATE keyring on sleep"
@@ -432,9 +388,8 @@ msgid "Sleep timeout computer when on AC"
msgstr "جعل الحاسوب ينام بعد فترة الإستراحة عندما يكون على التيار"
#: ../data/mate-power-manager.schemas.in.h:55
-#, fuzzy
msgid "Sleep timeout computer when on UPS"
-msgstr "جعل الحاسوب ينام بعد فترة الإستراحة عندما يكون على التيار"
+msgstr ""
#: ../data/mate-power-manager.schemas.in.h:56
msgid "Sleep timeout computer when on battery"
@@ -445,9 +400,8 @@ msgid "Sleep timeout display when on AC"
msgstr "جعل الشاشة تنام بعد فترة الإستراحة عندما يكون على التيار"
#: ../data/mate-power-manager.schemas.in.h:58
-#, fuzzy
msgid "Sleep timeout display when on UPS"
-msgstr "جعل الشاشة تنام بعد فترة الإستراحة عندما يكون على التيار"
+msgstr ""
#: ../data/mate-power-manager.schemas.in.h:59
msgid "Sleep timeout display when on battery"
@@ -458,22 +412,16 @@ msgid "Suspend button action"
msgstr "إجراء زر التعليق"
#: ../data/mate-power-manager.schemas.in.h:61
-#, fuzzy
msgid ""
"The DPMS method used to blank the screen when on AC power. Possible values "
"are \"standby\", \"suspend\" and \"off\"."
msgstr ""
-"طريقة DPMS المستعملة لإطفاء الشاشة عند العمل على التيار. الخيارات الممكنة "
-"هي: \"افتراضي\", \"ساكن\", \"موقف\" و \"مُطفأ\"."
#: ../data/mate-power-manager.schemas.in.h:62
-#, fuzzy
msgid ""
"The DPMS method used to blank the screen when on battery power. Possible "
"values are \"standby\", \"suspend\" and \"off\"."
msgstr ""
-"طريقة DPMS المستعملة لإطفاء الشاشة عند العمل على البطارية. الخيارات الممكنة "
-"هي: \"افتراضي\", \"ساكن\", \"موقف\" و \"مُطفأ\"."
#: ../data/mate-power-manager.schemas.in.h:63
msgid "The URI to show to the user on sleep failure"
@@ -483,70 +431,54 @@ msgstr ""
msgid ""
"The action to take when the UPS is critically low. Possible values are "
"\"hibernate\", \"suspend\", \"shutdown\" and \"nothing\"."
-msgstr ""
-"الاجراء الواجب اتخاذه عندما تكون بطارية UPS في مستوى متدن جدا. القيم الممكنة "
-"هي \"سبات\", \"توقيف\", \"إطفاء\" و \"لا شيء\"."
+msgstr "الاجراء الواجب اتخاذه عندما تكون بطارية UPS في مستوى متدن جدا. القيم الممكنة هي \"سبات\", \"توقيف\", \"إطفاء\" و \"لا شيء\"."
#: ../data/mate-power-manager.schemas.in.h:65
msgid ""
"The action to take when the UPS is low. Possible values are \"hibernate\", "
"\"suspend\", \"shutdown\" and \"nothing\"."
-msgstr ""
-"التصرف الذي ينفذ عندما طاقة ال UPS منخفضة. القيم الممكنة هى \"سبت\", \"علـّق"
-"\", \"أطفئ\" و \"لا شيء\"."
+msgstr "التصرف الذي ينفذ عندما طاقة ال UPS منخفضة. القيم الممكنة هى \"سبت\", \"علـّق\", \"أطفئ\" و \"لا شيء\"."
#: ../data/mate-power-manager.schemas.in.h:66
msgid ""
"The action to take when the battery is critically low. Possible values are "
"\"hibernate\", \"suspend\", \"shutdown\" and \"nothing\"."
-msgstr ""
-"الاجراء الواجب اتخاذه عندما تكون البطارية في مستوى متدن جدا. القيم الممكنة "
-"هي \"سبات\", \"توقيف\", \"إطفاء\" و \"لا شيء\"."
+msgstr "الاجراء الواجب اتخاذه عندما تكون البطارية في مستوى متدن جدا. القيم الممكنة هي \"سبات\", \"توقيف\", \"إطفاء\" و \"لا شيء\"."
#: ../data/mate-power-manager.schemas.in.h:67
msgid ""
"The action to take when the laptop lid is closed and the laptop is on AC "
"power. Possible values are \"suspend\", \"hibernate\", \"blank\" and "
"\"nothing\"."
-msgstr ""
-"الاجراء الواجب اتخاذه عند غلق غطاء الحاسوب المحمول و هو موصول بالتيار. القيم "
-"الممكنة هي \"توقيف\", \"سبات\", \"فراغ\" و \"لا شيء\"."
+msgstr "الاجراء الواجب اتخاذه عند غلق غطاء الحاسوب المحمول و هو موصول بالتيار. القيم الممكنة هي \"توقيف\", \"سبات\", \"فراغ\" و \"لا شيء\"."
#: ../data/mate-power-manager.schemas.in.h:68
msgid ""
"The action to take when the laptop lid is closed and the laptop is on "
"battery power. Possible values are \"suspend\", \"hibernate\", \"blank\", "
"and \"nothing\"."
-msgstr ""
-"االاجراء الواجب اتخاذه عند غلق غطاء الحاسوب المحمول و هو يعمل على البطارية. "
-"القيم الممكنة هي \"توقيف\", \"سبات\", \"فراغ\" و \"لا شيء\"."
+msgstr "االاجراء الواجب اتخاذه عند غلق غطاء الحاسوب المحمول و هو يعمل على البطارية. القيم الممكنة هي \"توقيف\", \"سبات\", \"فراغ\" و \"لا شيء\"."
#: ../data/mate-power-manager.schemas.in.h:69
msgid ""
"The action to take when the system hibernate button is pressed. Possible "
"values are \"suspend\", \"hibernate\", \"interactive\", \"shutdown\" and "
"\"nothing\"."
-msgstr ""
-"االاجراء الواجب اتخاذه عند ضغط زر السبات للجهاز. القيم الممكنة هي \"توقيف\", "
-"\"سبات\", \"السؤال\", \"إطفاء\" و \"لا شيء\"."
+msgstr "االاجراء الواجب اتخاذه عند ضغط زر السبات للجهاز. القيم الممكنة هي \"توقيف\", \"سبات\", \"السؤال\", \"إطفاء\" و \"لا شيء\"."
#: ../data/mate-power-manager.schemas.in.h:70
msgid ""
"The action to take when the system power button is pressed. Possible values "
-"are \"suspend\", \"hibernate\", \"interactive\", \"shutdown\" and \"nothing"
-"\"."
-msgstr ""
-"االاجراء الواجب اتخاذه عند ضغط زر الغلق للجهاز. القيم الممكنة هي \"توقيف\", "
-"\"سبات\", \"السؤال\", \"إطفاء\" و \"لا شيء\"."
+"are \"suspend\", \"hibernate\", \"interactive\", \"shutdown\" and "
+"\"nothing\"."
+msgstr "االاجراء الواجب اتخاذه عند ضغط زر الغلق للجهاز. القيم الممكنة هي \"توقيف\", \"سبات\", \"السؤال\", \"إطفاء\" و \"لا شيء\"."
#: ../data/mate-power-manager.schemas.in.h:71
msgid ""
"The action to take when the system suspend button is pressed. Possible "
"values are \"suspend\", \"hibernate\", \"interactive\", \"shutdown\" and "
"\"nothing\"."
-msgstr ""
-"االاجراء الواجب اتخاذه عند ضغط زر التوقيف للجهاز. القيم الممكنة هي \"توقيف"
-"\", \"سبات\", \"السؤال\", \"إطفاء\" و \"لا شيء\"."
+msgstr "االاجراء الواجب اتخاذه عند ضغط زر التوقيف للجهاز. القيم الممكنة هي \"توقيف\", \"سبات\", \"السؤال\", \"إطفاء\" و \"لا شيء\"."
#: ../data/mate-power-manager.schemas.in.h:72
msgid ""
@@ -558,50 +490,37 @@ msgstr "مقدار الوقت بالثانية قبل نوم الشاشة عند
msgid ""
"The amount of time in seconds the computer on AC power needs to be inactive "
"before it goes to sleep."
-msgstr ""
-"مقدار الوقت بالثانية بعد عدم استعمال الحاسوب على التيار قبل جعل الحاسوب في "
-"حالة نوم. "
+msgstr "مقدار الوقت بالثانية بعد عدم استعمال الحاسوب على التيار قبل جعل الحاسوب في حالة نوم. "
#: ../data/mate-power-manager.schemas.in.h:74
-#, fuzzy
msgid ""
-"The amount of time in seconds the computer on UPS power needs to be inactive "
-"before it goes to sleep."
+"The amount of time in seconds the computer on UPS power needs to be inactive"
+" before it goes to sleep."
msgstr ""
-"مقدار الوقت بالثانية بعد عدم استعمال الحاسوب على التيار قبل جعل الحاسوب في "
-"حالة نوم. "
#: ../data/mate-power-manager.schemas.in.h:75
-#, fuzzy
msgid ""
-"The amount of time in seconds the computer on UPS power needs to be inactive "
-"before the display goes to sleep."
+"The amount of time in seconds the computer on UPS power needs to be inactive"
+" before the display goes to sleep."
msgstr ""
-"مقدار الوقت بالثانية بعد عدم استعمال الحاسوب على البطاريه و غير نشط قبل جعل "
-"الشاشة في حالة نوم. "
#: ../data/mate-power-manager.schemas.in.h:76
msgid ""
"The amount of time in seconds the computer on battery power needs to be "
"inactive before it goes to sleep."
-msgstr ""
-"مقدار الوقت بالثانية بعد عدم استعمال الحاسوب على البطاريه قبل جعل الحاسوب في "
-"حالة نوم. "
+msgstr "مقدار الوقت بالثانية بعد عدم استعمال الحاسوب على البطاريه قبل جعل الحاسوب في حالة نوم. "
#: ../data/mate-power-manager.schemas.in.h:77
msgid ""
"The amount of time in seconds the computer on battery power needs to be "
"inactive before the display goes to sleep."
-msgstr ""
-"مقدار الوقت بالثانية بعد عدم استعمال الحاسوب على البطاريه و غير نشط قبل جعل "
-"الشاشة في حالة نوم. "
+msgstr "مقدار الوقت بالثانية بعد عدم استعمال الحاسوب على البطاريه و غير نشط قبل جعل الشاشة في حالة نوم. "
#: ../data/mate-power-manager.schemas.in.h:78
-#, fuzzy
msgid ""
"The amount to dim the brightness of the display when on battery power. "
"Possible values are between 0 and 100."
-msgstr "توهج الشاشة عند استعمال البطارية. القيم الممكنة بين 0 و 100. "
+msgstr ""
#: ../data/mate-power-manager.schemas.in.h:79
msgid ""
@@ -622,9 +541,8 @@ msgid "The default amount of time to dim the screen after idle."
msgstr "وقت الخمول الافتراضي الذي ستُعتّم الشاشة بعده."
#: ../data/mate-power-manager.schemas.in.h:83
-#, fuzzy
msgid "The default configuration version"
-msgstr "نسخة الإعدادات الافتراضية."
+msgstr "إصدار الإعدادات المبدئية"
#: ../data/mate-power-manager.schemas.in.h:84
msgid "The default graph type to show in the statistics window"
@@ -643,68 +561,51 @@ msgid "The maximum time displayed on the graph"
msgstr "أقصى ظهور للوقت على الرسم البياني"
#: ../data/mate-power-manager.schemas.in.h:88
-#, fuzzy
msgid ""
"The number of seconds of inactivity to spin down the disks when on AC power."
msgstr ""
-"أخفت إضاءة الشاشة بعد انقضاء مدة من عدم النشاط أثناء استعمال الطاقة "
-"الاعتيادية"
#: ../data/mate-power-manager.schemas.in.h:89
-#, fuzzy
msgid ""
"The number of seconds of inactivity to spin down the disks when on battery "
"power."
msgstr ""
-"أخفت إضاءة الشاشة بعد انقضاء مدة من عدم النشاط أثناء استعمال طاقة البطارية"
#: ../data/mate-power-manager.schemas.in.h:90
msgid ""
"The percentage of the battery when it is considered critical. Only valid "
"when use_time_for_policy is false."
-msgstr ""
-"نسبة البطارية التي تعتبر حاسمة. فقط صحيحة عندما يكون use_time_for_policy غير "
-"صحيح. "
+msgstr "نسبة البطارية التي تعتبر حاسمة. فقط صحيحة عندما يكون use_time_for_policy غير صحيح. "
#: ../data/mate-power-manager.schemas.in.h:91
msgid ""
"The percentage of the battery when it is considered low. Only valid when "
"use_time_for_policy is false."
-msgstr ""
-"نسبة البطارية التي تعتبر منخفضة. فقط صحيحة عندما يكون use_time_for_policy "
-"غير صحيح. "
+msgstr "نسبة البطارية التي تعتبر منخفضة. فقط صحيحة عندما يكون use_time_for_policy غير صحيح. "
#: ../data/mate-power-manager.schemas.in.h:92
msgid ""
"The percentage of the battery when the critical action is performed. Only "
"valid when use_time_for_policy is false."
-msgstr ""
-"نسبة البطارية عند انجاز الإجراء الحاسم. فقط صحيحة عندما يكون "
-"use_time_for_policy غير صحيح. "
+msgstr "نسبة البطارية عند انجاز الإجراء الحاسم. فقط صحيحة عندما يكون use_time_for_policy غير صحيح. "
#: ../data/mate-power-manager.schemas.in.h:93
msgid ""
"The time remaining in seconds of the battery when critical action is taken. "
"Only valid when use_time_for_policy is true."
-msgstr ""
-"الوقت المتبقي للبطارية بالثواني عند انجاز الاجراء الحاسم. فقط صحيحة عندما "
-"يكون use_time_for_policy صحيح."
+msgstr "الوقت المتبقي للبطارية بالثواني عند انجاز الاجراء الحاسم. فقط صحيحة عندما يكون use_time_for_policy صحيح."
#: ../data/mate-power-manager.schemas.in.h:94
msgid ""
-"The time remaining in seconds of the battery when it is considered critical. "
-"Only valid when use_time_for_policy is true."
-msgstr ""
-"الوقت المتبقي للبطارية بالثواني عند اعتبارها حاسمة. فقط صحيحة عندما يكون "
-"use_time_for_policy صحيح."
+"The time remaining in seconds of the battery when it is considered critical."
+" Only valid when use_time_for_policy is true."
+msgstr "الوقت المتبقي للبطارية بالثواني عند اعتبارها حاسمة. فقط صحيحة عندما يكون use_time_for_policy صحيح."
#: ../data/mate-power-manager.schemas.in.h:95
msgid ""
-"The time remaining in seconds of the battery when it is considered low. Only "
-"valid when use_time_for_policy is true."
-msgstr ""
-"الوقت المتبقي للبطارية بالثواني عند اعتبارها منخفضة. فقط صحيحة عندما يكون "
-"use_time_for_policy صحيح."
+"The time remaining in seconds of the battery when it is considered low. Only"
+" valid when use_time_for_policy is true."
+msgstr "الوقت المتبقي للبطارية بالثواني عند اعتبارها منخفضة. فقط صحيحة عندما يكون use_time_for_policy صحيح."
#: ../data/mate-power-manager.schemas.in.h:96
msgid "The time remaining when action is taken"
@@ -720,27 +621,21 @@ msgstr "الوقت المتبقي في الحالة المنخفضة"
#: ../data/mate-power-manager.schemas.in.h:99
msgid ""
-"The type of sleeping that should be performed when the computer is inactive. "
-"Possible values are \"hibernate\", \"suspend\" and \"nothing\"."
-msgstr ""
-"نوع النوم الذي ينبغي ان يقوم فيه الحاسوب بعد عدم النشاط. القيم الممكنة هي "
-"\"سبات\", \"توقيف\" و \"لا شيء\"."
+"The type of sleeping that should be performed when the computer is inactive."
+" Possible values are \"hibernate\", \"suspend\" and \"nothing\"."
+msgstr "نوع النوم الذي ينبغي ان يقوم فيه الحاسوب بعد عدم النشاط. القيم الممكنة هي \"سبات\", \"توقيف\" و \"لا شيء\"."
#: ../data/mate-power-manager.schemas.in.h:100
msgid ""
"The version of the installed version of the schema. Do not edit this value, "
"it is used so that configure changes between versions can be detected."
-msgstr ""
-"رقم النسخة المثبتة من المخطط. لا تحرّر هذه القيمة، إنها تُتسخدم لكي يتمكن "
-"الإعداد من التفريق بين النُسخ."
+msgstr "رقم النسخة المثبتة من المخطط. لا تحرّر هذه القيمة، إنها تُتسخدم لكي يتمكن الإعداد من التفريق بين النُسخ."
#: ../data/mate-power-manager.schemas.in.h:101
msgid ""
"This is the laptop panel screen brightness used when the session is idle. "
"Only valid when use_time_for_policy is true."
-msgstr ""
-"التوهج المستعمل لشاشة الحاسوب النقال عندما تكون الجلسة غير نشطة. تستعمل فقط "
-"عندما تكون use_time_for_policy صحيح. "
+msgstr "التوهج المستعمل لشاشة الحاسوب النقال عندما تكون الجلسة غير نشطة. تستعمل فقط عندما تكون use_time_for_policy صحيح. "
#: ../data/mate-power-manager.schemas.in.h:102
msgid "UPS critical low action"
@@ -765,9 +660,8 @@ msgid "When to show the notification icon"
msgstr "متى يتم عرض ايقونة التنبيه"
#: ../data/mate-power-manager.schemas.in.h:107
-#, fuzzy
msgid "Whether NetworkManager should be connected and disconnected on sleep"
-msgstr "اتصال أو فك اتصال مدير الشبكة عند النوم."
+msgstr ""
#: ../data/mate-power-manager.schemas.in.h:108
msgid ""
@@ -779,41 +673,31 @@ msgstr "فك اتصال مدير الشبكة عند التعليق أو الإ�
msgid ""
"Whether the MATE keyring is locked before the computer enters hibernate. "
"This means the keyring will have to be unlocked on resume."
-msgstr ""
-"إن كانت حلقة مفاتيح جنوم مقفلة قبل دخول الحاسوب لحالة الإسبات. هذا يعني أن "
-"حلقة المفاتيح ستُفتح عند المتابعة."
+msgstr "إن كانت حلقة مفاتيح جنوم مقفلة قبل دخول الحاسوب لحالة الإسبات. هذا يعني أن حلقة المفاتيح ستُفتح عند المتابعة."
#: ../data/mate-power-manager.schemas.in.h:110
msgid ""
"Whether the MATE keyring is locked before the computer enters suspend. This "
"means the keyring will have to be unlocked on resume."
-msgstr ""
-"إن كانت حلقة مفاتيح جنوم مقفلة قبل دخول الحاسوب لحالة التعليق. هذا يعني أن "
-"حلقة المفاتيح ستُفتح عند المتابعة."
+msgstr "إن كانت حلقة مفاتيح جنوم مقفلة قبل دخول الحاسوب لحالة التعليق. هذا يعني أن حلقة المفاتيح ستُفتح عند المتابعة."
#: ../data/mate-power-manager.schemas.in.h:111
msgid ""
"Whether the screen is locked when the computer wakes up from a hibernate. "
"Only used if lock_use_screensaver_settings is false."
-msgstr ""
-"إن كان يفترض قفل الشاشة عند إيقاظ الحاسوب من السبات. يتم استعمالها فقط إذا "
-"كان lock_use_screensaver_settings محددا ب false."
+msgstr "إن كان يفترض قفل الشاشة عند إيقاظ الحاسوب من السبات. يتم استعمالها فقط إذا كان lock_use_screensaver_settings محددا ب false."
#: ../data/mate-power-manager.schemas.in.h:112
msgid ""
-"Whether the screen is locked when the computer wakes up from a suspend. Only "
-"used if lock_use_screensaver_settings is false."
-msgstr ""
-"إن كان يفترض قفل الشاشة عند إيقاظ الحاسوب من التوقيف. يتم استعمالها فقط إذا "
-"كان lock_use_screensaver_settings محددًا ب false."
+"Whether the screen is locked when the computer wakes up from a suspend. Only"
+" used if lock_use_screensaver_settings is false."
+msgstr "إن كان يفترض قفل الشاشة عند إيقاظ الحاسوب من التوقيف. يتم استعمالها فقط إذا كان lock_use_screensaver_settings محددًا ب false."
#: ../data/mate-power-manager.schemas.in.h:113
msgid ""
"Whether the screen is locked when the screen is turned off. Only used if "
"lock_use_screensaver_settings is false."
-msgstr ""
-"إن كانت الشاشة مقفلة أثناء إغلاق الشاشة. تستخدم فقط إن كان "
-"lock_use_screensaver_settings محددًا ب false."
+msgstr "إن كانت الشاشة مقفلة أثناء إغلاق الشاشة. تستخدم فقط إن كان lock_use_screensaver_settings محددًا ب false."
#: ../data/mate-power-manager.schemas.in.h:114
msgid "Whether to hibernate, suspend or do nothing when inactive"
@@ -823,9 +707,7 @@ msgstr "ما إذا يتم سبات, توقيف أو فعل لا شيء عند �
msgid ""
"Whether to use the screen lock setting of mate-screensaver to decide if the "
"screen is locked after a hibernate, suspend or blank screen."
-msgstr ""
-"إن كانت ستُستخدم خيارات القفل ل mate-screensaver لتحديد هل يتم قفل الشاشة "
-"بعد السبات أو التوقيف أو فراغ الشاشة."
+msgstr "إن كانت ستُستخدم خيارات القفل ل mate-screensaver لتحديد هل يتم قفل الشاشة بعد السبات أو التوقيف أو فراغ الشاشة."
#: ../data/mate-power-manager.schemas.in.h:116
msgid "Whether to use time-based notifications"
@@ -871,7 +753,7 @@ msgstr "راجع إدارة الطاقة"
#. TRANSLATORS: the program name
#: ../data/mate-power-statistics.desktop.in.in.h:2
#: ../data/gpm-statistics.ui.h:6 ../src/gpm-statistics.c:1092
-#: ../src/gpm-statistics.c:1567
+#: ../src/gpm-statistics.c:1579
msgid "Power Statistics"
msgstr "إحصاءات الطاقة"
@@ -1042,17 +924,17 @@ msgstr "أ_خفض سطوع الضوء الخلفي"
#. command line argument
#: ../src/gpm-backlight-helper.c:161
msgid "Set the current brightness"
-msgstr ""
+msgstr "ضبط السطوع الحالي"
#. command line argument
#: ../src/gpm-backlight-helper.c:164
msgid "Get the current brightness"
-msgstr ""
+msgstr "احصل على السطوع الحالي"
#. command line argument
#: ../src/gpm-backlight-helper.c:167
msgid "Get the number of brightness levels supported"
-msgstr ""
+msgstr "احصل على عدد مستويات السطوع المدعومة"
#. TRANSLATORS: tool that is used when copying profiles system-wide
#: ../src/gpm-backlight-helper.c:182
@@ -1062,28 +944,27 @@ msgstr "مساعد الإضاءة الخلفية لمدير طاقة جنوم"
#. TRANSLATORS: user did not specify valid options
#: ../src/gpm-backlight-helper.c:190
msgid "No valid option was specified"
-msgstr ""
+msgstr "لم تحدد خيار صالح"
#. TRANSLATORS: no backlights found
#: ../src/gpm-backlight-helper.c:199
msgid "No backlights were found on your system"
-msgstr ""
+msgstr "لا توجد إضاءة خلفية في جهازك"
#. TRANSLATORS: failed to access backlight file
#: ../src/gpm-backlight-helper.c:210
msgid "Could not get the value of the backlight"
-msgstr ""
+msgstr "تعذَر الحصول على قيمة الإضاءة الخلفية"
#. TRANSLATORS: failed to access backlight file
#: ../src/gpm-backlight-helper.c:228
msgid "Could not get the maximum value of the backlight"
-msgstr ""
+msgstr "تعذّر الحصول على القيمة العظمى للإضاءة الخلفية"
#. TRANSLATORS: only able to install profiles as root
#: ../src/gpm-backlight-helper.c:245
-#, fuzzy
msgid "This program can only be used by the root user"
-msgstr "تضبط هذه السياسة ليستخدمها كل المستخدمين"
+msgstr "هذا البرنامج لا يستطيع استخدامه إلا الجذر"
#. TRANSLATORS: the program must never be directly run
#: ../src/gpm-backlight-helper.c:254
@@ -1093,7 +974,7 @@ msgstr ""
#. TRANSLATORS: failed to access backlight file
#: ../src/gpm-backlight-helper.c:265
msgid "Could not set the value of the backlight"
-msgstr ""
+msgstr "تعذّر ضبط قيمة الإضاءة الخلفية"
#: ../src/gpm-common.c:53
msgid "Unknown time"
@@ -1209,7 +1090,7 @@ msgid "%.1fV"
msgstr "%I.1fف"
#. TRANSLATORS: show verbose debugging
-#: ../src/gpm-main.c:171 ../src/gpm-prefs.c:90 ../src/gpm-statistics.c:1547
+#: ../src/gpm-main.c:171 ../src/gpm-prefs.c:90 ../src/gpm-statistics.c:1559
msgid "Show extra debugging information"
msgstr "اعرض معلومات تنقيح أكثر"
@@ -1335,14 +1216,10 @@ msgstr "قد أُعيد نداء البطاريّة"
#: ../src/gpm-manager.c:1192
#, c-format
msgid ""
-"A battery in your computer may have been recalled by %s and you may be at "
-"risk.\n"
+"A battery in your computer may have been recalled by %s and you may be at risk.\n"
"\n"
"For more information visit the battery recall website."
-msgstr ""
-"ربما طلب %s استرجاع بطارية حاسوبك وقد تكون في خطر.\n"
-"\n"
-"لمعلومات أكثر زُر موقع استرجاع البطارية."
+msgstr "ربما طلب %s استرجاع بطارية حاسوبك وقد تكون في خطر.\n\nلمعلومات أكثر زُر موقع استرجاع البطارية."
#. TRANSLATORS: button text, visit the manufacturers recall website
#: ../src/gpm-manager.c:1202
@@ -1362,14 +1239,14 @@ msgstr "لا تُظهر هذا لي مجددًا"
msgid "Battery may be broken"
msgstr "ربما البطاريّة معطوبة"
-#. TRANSLATORS: notify the user that that battery is broken as the capacity is very low
+#. TRANSLATORS: notify the user that that battery is broken as the capacity is
+#. very low
#: ../src/gpm-manager.c:1293
#, c-format
msgid ""
-"Battery has a very low capacity (%1.1f%%), which means that it may be old or "
-"broken."
-msgstr ""
-"سعة البطارية منخفضة جدًا (%1.1f%%)، مما يعني أنها قد تكون قديمة أو معطوبة."
+"Battery has a very low capacity (%1.1f%%), which means that it may be old or"
+" broken."
+msgstr "سعة البطارية منخفضة جدًا (%1.1f%%)، مما يعني أنها قد تكون قديمة أو معطوبة."
#. TRANSLATORS: show the charged notification
#: ../src/gpm-manager.c:1342
@@ -1521,18 +1398,21 @@ msgstr "بطارية الحاسوب المتصل منخفضة"
msgid "Attached computer is low in power (%.0f%%)"
msgstr "طاقة الحاسوب المُوصَّل منخفضة (%.1f%%)"
-#. TRANSLATORS: laptop battery critically low, and only have one kind of battery
+#. TRANSLATORS: laptop battery critically low, and only have one kind of
+#. battery
#: ../src/gpm-manager.c:1605
msgid "Battery critically low"
msgstr "البطارية منخفضة جدًا"
-#. TRANSLATORS: laptop battery critically low, and we have more than one type of battery
+#. TRANSLATORS: laptop battery critically low, and we have more than one type
+#. of battery
#. TRANSLATORS: laptop battery is really, really, low
#: ../src/gpm-manager.c:1608 ../src/gpm-manager.c:1765
msgid "Laptop battery critically low"
msgstr "بطارية الحاسوب المحمول منخفضة جدًا"
-#. TRANSLATORS: tell the use to insert the plug, as we're not going to do anything
+#. TRANSLATORS: tell the use to insert the plug, as we're not going to do
+#. anything
#: ../src/gpm-manager.c:1618
msgid "Plug in your AC adapter to avoid losing data."
msgstr "وصّل محوّل التيار لتتجنب فقدان البيانات."
@@ -1565,11 +1445,9 @@ msgstr "طاقة UPS منخفضة جدًا"
#: ../src/gpm-manager.c:1642
#, c-format
msgid ""
-"Approximately <b>%s</b> of remaining UPS power (%.0f%%). Restore AC power to "
-"your computer to avoid losing data."
-msgstr ""
-"لديك تقريبًا <b>%s</b> متبقية من شحنة UPS‏ (%.0f%%). أرجع التيار للحاسوب "
-"لتتجنب ضياع البيانات."
+"Approximately <b>%s</b> of remaining UPS power (%.0f%%). Restore AC power to"
+" your computer to avoid losing data."
+msgstr "لديك تقريبًا <b>%s</b> متبقية من شحنة UPS‏ (%.0f%%). أرجع التيار للحاسوب لتتجنب ضياع البيانات."
#. TRANSLATORS: the device is just going to stop working
#: ../src/gpm-manager.c:1651
@@ -1577,9 +1455,7 @@ msgstr ""
msgid ""
"Wireless mouse is very low in power (%.0f%%). This device will soon stop "
"functioning if not charged."
-msgstr ""
-"الفأرة اللاسلكية الموصولة بهذا الحاسوب طاقتها ضعيفة (%.0f%%). ستتوقف بعد "
-"قليل إن لم تُشحن."
+msgstr "الفأرة اللاسلكية الموصولة بهذا الحاسوب طاقتها ضعيفة (%.0f%%). ستتوقف بعد قليل إن لم تُشحن."
#. TRANSLATORS: the device is just going to stop working
#: ../src/gpm-manager.c:1659
@@ -1587,19 +1463,15 @@ msgstr ""
msgid ""
"Wireless keyboard is very low in power (%.0f%%). This device will soon stop "
"functioning if not charged."
-msgstr ""
-"لوحة المفاتيح اللاسلكية الموصولة بهذا الحاسوب طاقتها ضعيفة (%.0f%%). ستتوقف "
-"بعد قليل إن لم تُشحن."
+msgstr "لوحة المفاتيح اللاسلكية الموصولة بهذا الحاسوب طاقتها ضعيفة (%.0f%%). ستتوقف بعد قليل إن لم تُشحن."
#. TRANSLATORS: the device is just going to stop working
#: ../src/gpm-manager.c:1668
#, c-format
msgid ""
-"PDA is very low in power (%.0f%%). This device will soon stop functioning if "
-"not charged."
-msgstr ""
-"المساعد الرقمي الموصول بهذا الحاسوب طاقته ضعيفة (%.0f%%). سيتوقف بعد قليل إن "
-"لم يُشحن."
+"PDA is very low in power (%.0f%%). This device will soon stop functioning if"
+" not charged."
+msgstr "المساعد الرقمي الموصول بهذا الحاسوب طاقته ضعيفة (%.0f%%). سيتوقف بعد قليل إن لم يُشحن."
#. TRANSLATORS: the device is just going to stop working
#: ../src/gpm-manager.c:1678
@@ -1607,9 +1479,7 @@ msgstr ""
msgid ""
"Cell phone is very low in power (%.0f%%). This device will soon stop "
"functioning if not charged."
-msgstr ""
-"الهاتف المحمول الموصول بهذا الحاسوب طاقته ضعيفة (%.0f%%). سيتوقف بعد قليل إن "
-"لم يُشحن."
+msgstr "الهاتف المحمول الموصول بهذا الحاسوب طاقته ضعيفة (%.0f%%). سيتوقف بعد قليل إن لم يُشحن."
#. TRANSLATORS: the device is just going to stop working
#: ../src/gpm-manager.c:1689
@@ -1617,16 +1487,14 @@ msgstr ""
msgid ""
"Media player is very low in power (%.0f%%). This device will soon stop "
"functioning if not charged."
-msgstr ""
-"مشغل الوسائط الموصول بهذا الحاسوب طاقته ضعيفة (%.0f%%). سيتوقف بعد قليل إن "
-"لم يُشحن."
+msgstr "مشغل الوسائط الموصول بهذا الحاسوب طاقته ضعيفة (%.0f%%). سيتوقف بعد قليل إن لم يُشحن."
#. TRANSLATORS: the device is just going to stop working
#: ../src/gpm-manager.c:1698
#, c-format
msgid ""
-"Tablet is very low in power (%.0f%%). This device will soon stop functioning "
-"if not charged."
+"Tablet is very low in power (%.0f%%). This device will soon stop functioning"
+" if not charged."
msgstr "طاقة اللوح ضعيفة جدا (%.0f%%). سيتوقف بعد قليل إن لم يُشحن."
#. TRANSLATORS: the device is just going to stop working
@@ -1640,11 +1508,9 @@ msgstr "طاقة الحاسوب الموصول ضعيفة جدا (%.0f%%). سي�
#. TRANSLATORS: computer will shutdown without saving data
#: ../src/gpm-manager.c:1774
msgid ""
-"The battery is below the critical level and this computer will <b>power-off</"
-"b> when the battery becomes completely empty."
-msgstr ""
-"طاقة البطارية تحت المستوى الحرج، <b>سيتوقف</b> هذا الحاسوب عند فراغ "
-"البطارية. "
+"The battery is below the critical level and this computer will <b>power-"
+"off</b> when the battery becomes completely empty."
+msgstr "طاقة البطارية تحت المستوى الحرج، <b>سيتوقف</b> هذا الحاسوب عند فراغ البطارية. "
#. TRANSLATORS: computer will suspend
#: ../src/gpm-manager.c:1780
@@ -1652,9 +1518,7 @@ msgid ""
"The battery is below the critical level and this computer is about to "
"suspend.<br><b>NOTE:</b> A small amount of power is required to keep your "
"computer in a suspended state."
-msgstr ""
-"طاقة البطاريه تحت المستوى الحرج و الحاسوب على وشك الدخول في حالة الاستعداد."
-"<br><b>ملاحظة:</b> تتطلب حالة الاستعداد كمية صغيرة من الطاقة."
+msgstr "طاقة البطاريه تحت المستوى الحرج و الحاسوب على وشك الدخول في حالة الاستعداد.<br><b>ملاحظة:</b> تتطلب حالة الاستعداد كمية صغيرة من الطاقة."
#. TRANSLATORS: computer will hibernate
#: ../src/gpm-manager.c:1787
@@ -1697,42 +1561,39 @@ msgstr "مشكلة في التثبيتب!"
#. TRANSLATORS: the MateConf schema was not installed properly
#: ../src/gpm-manager.c:1963
msgid ""
-"The configuration defaults for MATE Power Manager have not been installed "
-"correctly.\n"
+"The configuration defaults for MATE Power Manager have not been installed correctly.\n"
"Please contact your computer administrator."
-msgstr ""
-"الإعدادات المبدئية لمدير طاقة جنوم لم تُعدّ بشكل صحيح.\n"
-"رجاءً راجع مدير حاسوبك."
+msgstr "الإعدادات المبدئية لمدير طاقة جنوم لم تُعدّ بشكل صحيح.\nرجاءً راجع مدير حاسوبك."
#: ../src/gpm-prefs.c:94
msgid "MATE Power Preferences"
msgstr "تفضيلات الطّاقة لجنوم"
-#: ../src/gpm-prefs-core.c:363
+#: ../src/gpm-prefs-core.c:364 ../src/gpm-prefs-core.c:367
msgid "Shutdown"
msgstr "أطفئ"
-#: ../src/gpm-prefs-core.c:370
+#: ../src/gpm-prefs-core.c:376 ../src/gpm-prefs-core.c:379
msgid "Suspend"
msgstr "علّق"
-#: ../src/gpm-prefs-core.c:373
+#: ../src/gpm-prefs-core.c:384 ../src/gpm-prefs-core.c:387
msgid "Hibernate"
msgstr "أسبِت"
-#: ../src/gpm-prefs-core.c:376
+#: ../src/gpm-prefs-core.c:392 ../src/gpm-prefs-core.c:395
msgid "Blank screen"
msgstr "صفّر الشاشة"
-#: ../src/gpm-prefs-core.c:379
+#: ../src/gpm-prefs-core.c:400 ../src/gpm-prefs-core.c:403
msgid "Ask me"
msgstr "اسألني"
-#: ../src/gpm-prefs-core.c:384
+#: ../src/gpm-prefs-core.c:410 ../src/gpm-prefs-core.c:413
msgid "Do nothing"
msgstr "لا تفعل أي شيء"
-#: ../src/gpm-prefs-core.c:448
+#: ../src/gpm-prefs-core.c:483 ../src/gpm-prefs-core.c:485
msgid "Never"
msgstr "أبدًا"
@@ -1782,7 +1643,8 @@ msgstr "لاحة الشحن"
msgid "Discharge profile"
msgstr "لاحة التفريغ"
-#. TRANSLATORS: how accurately we can predict the time remaining of the battery
+#. TRANSLATORS: how accurately we can predict the time remaining of the
+#. battery
#: ../src/gpm-statistics.c:106
msgid "Charge accuracy"
msgstr "دقة الشحن"
@@ -1898,7 +1760,8 @@ msgid "Serial number"
msgstr "الرقم التسلسلي"
#. TRANSLATORS: a boolean attribute that means if the device is supplying the
-#. * main power for the computer. For instance, an AC adapter or laptop battery
+#. * main power for the computer. For instance, an AC adapter or laptop
+#. battery
#. * would be TRUE, but a mobile phone or mouse taking power is FALSE
#: ../src/gpm-statistics.c:418
msgid "Supply"
@@ -2041,7 +1904,8 @@ msgstr "محول لاسلكي إنتل"
msgid "Timer %s"
msgstr "مؤقت %s"
-#. TRANSLATORS: the parameter is the name of task that's woken up from sleeping.
+#. TRANSLATORS: the parameter is the name of task that's woken up from
+#. sleeping.
#. * This is shown when the task wakes up.
#: ../src/gpm-statistics.c:943
#, c-format
@@ -2117,46 +1981,46 @@ msgid "Processor Wakeups"
msgstr "استيقاظات المعالج"
#. TRANSLATORS: this is the X axis on the graph
-#: ../src/gpm-statistics.c:1294 ../src/gpm-statistics.c:1300
-#: ../src/gpm-statistics.c:1306 ../src/gpm-statistics.c:1312
+#: ../src/gpm-statistics.c:1298 ../src/gpm-statistics.c:1304
+#: ../src/gpm-statistics.c:1310 ../src/gpm-statistics.c:1316
msgid "Time elapsed"
msgstr "الوقت المنقضي"
#. TRANSLATORS: this is the Y axis on the graph
-#: ../src/gpm-statistics.c:1296
+#: ../src/gpm-statistics.c:1300
msgid "Power"
msgstr "الطاقة"
#. TRANSLATORS: this is the Y axis on the graph for the whole battery device
#. TRANSLATORS: this is the X axis on the graph for the whole battery device
-#: ../src/gpm-statistics.c:1302 ../src/gpm-statistics.c:1345
-#: ../src/gpm-statistics.c:1351 ../src/gpm-statistics.c:1357
-#: ../src/gpm-statistics.c:1363
+#: ../src/gpm-statistics.c:1306 ../src/gpm-statistics.c:1353
+#: ../src/gpm-statistics.c:1359 ../src/gpm-statistics.c:1365
+#: ../src/gpm-statistics.c:1371
msgid "Cell charge"
msgstr "شحنة البطارية"
#. TRANSLATORS: this is the Y axis on the graph
-#: ../src/gpm-statistics.c:1308 ../src/gpm-statistics.c:1314
+#: ../src/gpm-statistics.c:1312 ../src/gpm-statistics.c:1318
msgid "Predicted time"
msgstr "الزمن المتوقع"
#. TRANSLATORS: this is the Y axis on the graph
-#: ../src/gpm-statistics.c:1347 ../src/gpm-statistics.c:1359
+#: ../src/gpm-statistics.c:1355 ../src/gpm-statistics.c:1367
msgid "Correction factor"
msgstr "عامل التصحيح"
#. TRANSLATORS: this is the Y axis on the graph
-#: ../src/gpm-statistics.c:1353 ../src/gpm-statistics.c:1365
+#: ../src/gpm-statistics.c:1361 ../src/gpm-statistics.c:1373
msgid "Prediction accuracy"
msgstr "دقة التوقع"
#. TRANSLATORS: show a device by default
-#: ../src/gpm-statistics.c:1550
+#: ../src/gpm-statistics.c:1562
msgid "Select this device at startup"
msgstr "اختر هذا الجهاز عند بدأ التشغيل"
#. TRANSLATORS: the icon for the CPU
-#: ../src/gpm-statistics.c:1798
+#: ../src/gpm-statistics.c:1832
msgid "Processor"
msgstr "المعالج"
@@ -2178,9 +2042,7 @@ msgstr "‏%s يشحن (%.1f%%)"
msgid ""
"Battery is fully charged.\n"
"Provides %s laptop runtime"
-msgstr ""
-"البطارية مشحونة بالكامل\n"
-"يعطي %s من تشغيل الحاسوب"
+msgstr "البطارية مشحونة بالكامل\nيعطي %s من تشغيل الحاسوب"
#. TRANSLATORS: the device is fully charged
#: ../src/gpm-upower.c:241
@@ -2206,11 +2068,10 @@ msgstr "‏%s تُفرّغ (%.1f%%)"
msgid ""
"%s %s until charged (%.1f%%)\n"
"Provides %s battery runtime"
-msgstr ""
-"‏%s %s حتى تشحن (%.1f%%)\n"
-"يعطي %s من تشغيل البطارية"
+msgstr "‏%s %s حتى تشحن (%.1f%%)\nيعطي %s من تشغيل البطارية"
-#. TRANSLATORS: device is charging, and we have a time to full and a percentage
+#. TRANSLATORS: device is charging, and we have a time to full and a
+#. percentage
#: ../src/gpm-upower.c:279
#, c-format
msgid "%s %s until charged (%.1f%%)"
@@ -2296,7 +2157,8 @@ msgstr "وقت الشحن:"
msgid "Discharge time:"
msgstr "وقت التفريغ:"
-#. TRANSLATORS: Excellent, Good, Fair and Poor are all related to battery Capacity
+#. TRANSLATORS: Excellent, Good, Fair and Poor are all related to battery
+#. Capacity
#: ../src/gpm-upower.c:410
msgid "Excellent"
msgstr "ممتاز"
@@ -2513,687 +2375,3 @@ msgstr "_عن"
#: ../applets/inhibit/MATE_InhibitApplet.xml.h:2
msgid "_Help"
msgstr "م_ساعدة"
-
-#~ msgid ""
-#~ "The wireless mouse attached to this computer is very low in power (%.1f%"
-#~ "%). This device will soon stop functioning if not charged."
-#~ msgstr ""
-#~ "الفأرة اللاسلكية الموصولة بهذا الحاسوب طاقتها ضعيفة (%.1f%%). ستتوقف بعد "
-#~ "قليل إن لم تُشحن."
-
-#~ msgid ""
-#~ "The wireless keyboard attached to this computer is very low in power (%.1f"
-#~ "%%). This device will soon stop functioning if not charged."
-#~ msgstr ""
-#~ "لوحة المفاتيح اللاسلكية الموصولة بهذا الحاسوب طاقتها ضعيفة (%.1f%%). "
-#~ "ستتوقف بعد قليل إن لم تُشحن."
-
-#~ msgid "Wireless mouse"
-#~ msgid_plural "Wireless mice"
-#~ msgstr[0] "فأرة لاسلكية"
-#~ msgstr[1] "فأرة لاسلكية"
-#~ msgstr[2] "فأرتين لاسلكيتين"
-#~ msgstr[3] "فأرات لاسلكية"
-#~ msgstr[4] "فأرات لاسلكية"
-#~ msgstr[5] "فأرات لاسلكية"
-
-#~ msgid "Wireless keyboard"
-#~ msgid_plural "Wireless keyboards"
-#~ msgstr[0] "لوحة مفاتيح لاسلكية"
-#~ msgstr[1] "لوحة مفاتيح لاسلكية"
-#~ msgstr[2] "لوحتي مفاتيح لاسلكيتين"
-#~ msgstr[3] "لوحات مفاتيح لاسلكية"
-#~ msgstr[4] "لوحات مفاتيح لاسلكية"
-#~ msgstr[5] "لوحات مفاتيح لاسلكية"
-
-#~ msgid "Please see %s for more information."
-#~ msgstr "طالع %s لمزيد من المعلومات"
-
-#~ msgid "Session idle"
-#~ msgstr "الجلسة خاملة"
-
-#~ msgid "Session active"
-#~ msgstr "الجلسة نشطة"
-
-#~ msgid "idle inhibited"
-#~ msgstr "ثُبّط الخمول"
-
-#~ msgid "idle not inhibited"
-#~ msgstr "لم يُثبّط الخمول"
-
-#~ msgid "suspend inhibited"
-#~ msgstr "ثُبّط التعليق"
-
-#~ msgid "suspend not inhibited"
-#~ msgstr "لم يُثبّط التعليق"
-
-#~ msgid "screen idle"
-#~ msgstr "الشاشة خاملة"
-
-#~ msgid "screen awake"
-#~ msgstr "الشاشة نشطة"
-
-#~ msgid "Allow Suspend and Hibernate in the menu"
-#~ msgstr "اسمح بالتعليق والإسبات في القائمة"
-
-#~ msgid "Hibernate enabled"
-#~ msgstr "السبات مفعّل"
-
-#~ msgid "If preferences should be shown"
-#~ msgstr "إن كانت التفضيلات ستُظهر"
-
-#~ msgid ""
-#~ "If the Suspend and Hibernate options should be allowed in the "
-#~ "notification area drop down menu."
-#~ msgstr ""
-#~ "إن كان لابد من السماح لخيارات التعليق و السبات في منطقة التنبيه من "
-#~ "القائمة المنسدلة."
-
-#~ msgid "If the user is authorized to hibernate the computer."
-#~ msgstr "إن كان للمستخدم صلاحية في أن يجعل الحاسوب يبدأ في عملية السبات"
-
-#~ msgid "If the user is authorized to suspend the computer."
-#~ msgstr "إن كان للمستخدم صلاحية في أن يجعل الحاسوب يبدأ في عملية التعليق"
-
-#~ msgid "Suspend enabled"
-#~ msgstr "تفعيل التعليق"
-
-#~ msgid "Action disallowed"
-#~ msgstr "الإجراء غير مسموح"
-
-#~ msgid ""
-#~ "Suspend support has been disabled. Contact your administrator for more "
-#~ "details."
-#~ msgstr "دعم التعليق قد عُطّل. تواصل مع مديرك لمزيد من التفاصيل."
-
-#~ msgid ""
-#~ "Hibernate support has been disabled. Contact your administrator for more "
-#~ "details."
-#~ msgstr "دعم الإسبات قد عُطّل. تواصل مع مديرك لمزيد من التفاصيل."
-
-#, fuzzy
-#~ msgid "Sleep problem"
-#~ msgstr "مشكلة نوم"
-
-#, fuzzy
-#~ msgid "Check the help file for common problems."
-#~ msgstr ""
-#~ "لقد فشل حاسوبك في التعليق.\n"
-#~ "تحقق من ملف المساعدة للمشاكل الشائعة."
-
-#~ msgid "Device information"
-#~ msgstr "معلومات الجهاز"
-
-#~ msgid "There is no detailed information for this device"
-#~ msgstr "لا معلومات تفصيلية عن هذا الجهاز"
-
-#~ msgid "translator-credits"
-#~ msgstr ""
-#~ "فريق عربآيز للترجمة http://www.arabeyes.org :\n"
-#~ "يوسف رفة\t<[email protected]>\n"
-#~ "جهاد عفيفي\t<[email protected]>\n"
-#~ "خالد حسني\t<[email protected]>\n"
-#~ "عبد المنعم كوكة\t<[email protected]>"
-
-#~ msgid "Power _History"
-#~ msgstr "تأريخ الطاقة"
-
-#~ msgid "_Suspend"
-#~ msgstr "_علّق"
-
-#~ msgid "Hi_bernate"
-#~ msgstr "أ_سبِت"
-
-#~ msgid ""
-#~ "After resume, mate-power-manager will suppress policy actions for a "
-#~ "number of seconds to allow messages to settle and HAL to refresh. "
-#~ "Commonly five seconds is enough while not being so long that the user "
-#~ "gets confused."
-#~ msgstr ""
-#~ "بعد الاستكمال، سيثبّط مدير طاقة جنوم إجراءات السياسة لعدد من الثواني ليسمح "
-#~ "للرسائل بالتمكن ول HAL بالإنتعاش. عادة خمس ثوان تكفي وهي ليست طويلة "
-#~ "بالدرجة التي تربك المستخدم."
-
-#~ msgid "Change the brightness automatically using the ambient light sensors"
-#~ msgstr "غيّر السطوع آليًا باستخدام أجهزة استشعار الضوء المحيطة"
-
-#~ msgid "If DBUS inhibit requests should be ignored from other programs."
-#~ msgstr "إن كان يفترض تجاهل طلبات تثبيط DBUS من البرامج الأخرى."
-
-#~ msgid "If DBUS inhibit requests should be ignored."
-#~ msgstr "إن كان يفترض تجاهل طلبات تثبيط DBUS."
-
-#~ msgid ""
-#~ "If a notification message should be displayed when the profile data is "
-#~ "guessed."
-#~ msgstr "إن كان يفترض إظهار رسالة تنبيهية في حال تخمين بيانات ملف التعريف."
-
-#~ msgid "If extra debugging messages should be used"
-#~ msgstr "إن كانت رسائل التنقيح ستُستخدم"
-
-#~ msgid ""
-#~ "If extra debugging messages should be used. Only turn this on for "
-#~ "debugging."
-#~ msgstr "إن كانت رسائل التنقيح ستُستخدم. شغّل هذا فقط في حالة التنقيح."
-
-#~ msgid "If the low-power mode should be enabled when on UPS"
-#~ msgstr ""
-#~ "إذا يفترض تفعيل نمط الطاقة-المنخفضة أثناء العمل على مزود الطاقة غير "
-#~ "المنقطع UPS"
-
-#~ msgid ""
-#~ "If the screen brightness should be changed automatically using the "
-#~ "ambient light sensors."
-#~ msgstr "غيّر سطوع الشاشة آليا باستعمال مستشعرات الإضاءة."
-
-#~ msgid ""
-#~ "If the screen brightness should be changed automatically using the "
-#~ "ambient light sensors. Valid is 'none', 'light' and 'dark'"
-#~ msgstr ""
-#~ "إن كان سطوع الشاشة سيُغيّر آليًا باستعمال مستشعرات الضوء المحيطة. القيم "
-#~ "الصالحة هي 'لا شيء' و'ضوء' و'ظلام'"
-
-#~ msgid "If the system low-power mode should be enabled when on UPS power."
-#~ msgstr ""
-#~ "إن كان يفترض تفعيل وضع الطاقة المنخفضة للنظام في حال كون الجهاز يعمل على "
-#~ "مزود الطاقة غير المنقطع UPS"
-
-#~ msgid ""
-#~ "If we should show the warning when we have a valid inhibit and configured "
-#~ "to sleep on lid close"
-#~ msgstr ""
-#~ "إن كان يُفترض إظهار تنبيه إذا كان لدينا تثبيط صالح معدّ على النوم عند إغلاق "
-#~ "الغطاء"
-
-#~ msgid ""
-#~ "If we should show the warning when we have a valid inhibit and configured "
-#~ "to sleep on lid close."
-#~ msgstr ""
-#~ "إن كان يُفترض إظهار تنبيه إذا كان لدينا تثبيط صالح معدّ على النوم عند إغلاق "
-#~ "الغطاء."
-
-#~ msgid "Keyboard brightness when on AC"
-#~ msgstr "سطوع لوحة المفاتيح أثناء استعمال الطاقة الاعتيادية"
-
-#~ msgid "Keyboard brightness when on battery"
-#~ msgstr "سطوع لوحة المفاتيح أثناء استعمال طاقة البطارية"
-
-#~ msgid "Notify when the profile data is guessed"
-#~ msgstr "التبليغ عند تخمين بيانات ملف التعريف"
-
-#~ msgid "Number of seconds to suppress policy after resume"
-#~ msgstr "عدد الثواني لسياسة القمع بعد متابعة العمل"
-
-#~ msgid "The amount the light sensors should contribute to the brightness"
-#~ msgstr "المقدار الذي تساهم به المستشعرات الضوئية في السطوع"
-
-#~ msgid "The amount the light sensors should contribute to the brightness."
-#~ msgstr "المقدار الذي تساهم به المستشعرات الضوئية في السطوع."
-
-#~ msgid ""
-#~ "The brightness of the keyboard when on AC power. Possible values are "
-#~ "between 0 and 100."
-#~ msgstr ""
-#~ " سطوع لوحة المفاتيح أثناء استعمال الطاقة الاعتيادية. القيم الممكنة تتراوح "
-#~ "ما بين 0 و 100."
-
-#~ msgid ""
-#~ "The brightness of the keyboard when on battery power. Possible values are "
-#~ "between 0 and 100."
-#~ msgstr ""
-#~ "سطوع لوحة المفاتيح أثناء استعمال طاقة البطارية. القيم الممكنة تتراوح ما "
-#~ "بين 0 و 100."
-
-#~ msgid ""
-#~ "The calibration of the light sensors so that the screen is bright enough"
-#~ msgstr "ضبط المستشعرات الضوئية لتصبح الشاشة ساطعة كفاية"
-
-#~ msgid ""
-#~ "The calibration of the light sensors so that the screen is bright enough, "
-#~ "in percent."
-#~ msgstr "ضبط المستشعرات الضوئية لتصبح الشاشة ساطعة كفاية، بالنسبة المئوية."
-
-#~ msgid "The interval the ambient light sensors should be polled"
-#~ msgstr "الوقت الذي ستُستطلع المستشعرات الضوئية المحيطة بعده"
-
-#~ msgid "The interval the ambient light sensors should be polled in seconds."
-#~ msgstr "الوقت الذي ستُستطلع المستشعرات الضوئية المحيطة بعده بالثواني."
-
-#~ msgid "The invalid timeout for power actions"
-#~ msgstr "المهلة غير الصالحة لتصرفات الطاقة"
-
-#~ msgid ""
-#~ "The invalid timeout in ms for power actions. Set this longer if you get "
-#~ "'battery critical' messages when you unplug."
-#~ msgstr ""
-#~ "انتهاء المهلة غير السموح به بالميليثانية. حدد مدة طويلة إذا كنت تتلقى "
-#~ "رسالة \"بطارية حرجة\" عند الفك."
-
-#~ msgid "Add related _events"
-#~ msgstr "أضف الأحداث _ذات العلاقة"
-
-#~ msgid "Cell Voltage"
-#~ msgstr "فلطية الخلية"
-
-#~ msgid "Time since startup"
-#~ msgstr "الوقت منذ البداية"
-
-#~ msgid "Application:"
-#~ msgstr "التطبيق:"
-
-#~ msgid "Burning DVD, titled \"My Photos\""
-#~ msgstr "حرق DVD، بعنوان \"My Photos\""
-
-#~ msgid "Inhibit Tester"
-#~ msgstr "ثبّط الفاحص"
-
-#~ msgid "Reason:"
-#~ msgstr "السبب: "
-
-#~ msgid "UnInhibit"
-#~ msgstr "ألغ التثبيط"
-
-#~ msgid "Vendor Acme Foo"
-#~ msgstr "المُنتِج الفلاني"
-
-#~ msgid "<b>Extras</b>"
-#~ msgstr "<b>الإضافات</b>"
-
-#~ msgid "Always sleep when the lid is _closed"
-#~ msgstr "دائمًا _نم عندما يكون الغطاء مغلقًا"
-
-#~ msgid "Enable UPS discharge _alarm"
-#~ msgstr "فعّل منب_ه تفريغ الUPS"
-
-#~ msgid "Turn on keyboard light when light level is low"
-#~ msgstr "أضئ لوحة المفاتيح عندما يكون مستوى الضوء منخفضًا"
-
-#~ msgid "Use _ambient light to adjust LCD brightness"
-#~ msgstr "ا_ستعمل الإضاءة المحيطة لضبط سطوع إل سي دي"
-
-#~ msgid "Use _sound to notify in event of an error"
-#~ msgstr "استعمل _صوتا للتبليغ في حالة وجود خطأ"
-
-#~ msgid "The message was not sent due to DBUS security rules"
-#~ msgstr "لم ترسَل الرسالة بسبب قواعد أمن DBUS"
-
-#~ msgid "General failure"
-#~ msgstr "فشل عام"
-
-#~ msgid "Power Manager for the MATE desktop"
-#~ msgstr "مدير طاقة لسطح المكتب جنوم"
-
-#~ msgid "Computer is running on backup power\n"
-#~ msgstr "يعمل النظام على الطاقة الاحتياطية\n"
-
-#~ msgid "Computer is running on AC power\n"
-#~ msgstr "يعمل النظام على التيار الكهربائي\n"
-
-#~ msgid "Computer is running on battery power\n"
-#~ msgstr "يعمل النظام على طاقة البطارية\n"
-
-#~ msgid "Battery discharge time is currently unknown\n"
-#~ msgstr "وقت تفريغ البطارية غير معروف\n"
-
-#~ msgid "Battery charge time is currently unknown\n"
-#~ msgstr "وقت شحن البطارية غير معروف\n"
-
-#~ msgid "Battery discharge time is estimated\n"
-#~ msgstr "وقت تفريغ البطارية مُقدّر\n"
-
-#~ msgid "Battery charge time is estimated\n"
-#~ msgstr "وقت شحن البطارية مُقدّر\n"
-
-#~ msgid "Unable to get data..."
-#~ msgstr "تعذر الحصول على البيانات..."
-
-#~ msgid "Reason: %s"
-#~ msgstr "السبب: %s"
-
-#~ msgid "On AC"
-#~ msgstr "على التيار"
-
-#~ msgid "On battery"
-#~ msgstr "على البطارية"
-
-#~ msgid "Session powersave"
-#~ msgstr "الجلسة في جفظ الطاقة"
-
-#~ msgid "label shown on graph|Suspend"
-#~ msgstr "تعليق"
-
-#~ msgid "label shown on graph|Resume"
-#~ msgstr "استئناف"
-
-#~ msgid "label shown on graph|Hibernate"
-#~ msgstr "إسبت"
-
-#~ msgid "Notification"
-#~ msgstr "إشعار"
-
-#~ msgid "DPMS On"
-#~ msgstr "DPMS مشغلة"
-
-#~ msgid "DPMS Standby"
-#~ msgstr "DPMS مستعدة"
-
-#~ msgid "DPMS Suspend"
-#~ msgstr "DPMS معلقة"
-
-#~ msgid "DPMS Off"
-#~ msgstr "DPMS مطفأة"
-
-#~ msgid "Battery percentage"
-#~ msgstr "نسبة الشحن"
-
-#~ msgid "Battery Voltage"
-#~ msgstr "فلطية البطارية"
-
-#~ msgid "Accuracy of reading"
-#~ msgstr "دقة القراءة"
-
-#~ msgid "Valid data"
-#~ msgstr "بيانات صالحة"
-
-#~ msgid "Extrapolated data"
-#~ msgstr "البيانات المستنبطة"
-
-#~ msgid "Stop point"
-#~ msgstr "نقطة التوقف"
-
-#~ msgid "AC adapter inserted"
-#~ msgstr "وُضِع مقبس الطاقة"
-
-#~ msgid "The laptop lid has been closed"
-#~ msgstr "أُغلق غطاء الحاسوب المحمول"
-
-#~ msgid "The laptop lid has been re-opened"
-#~ msgstr "أُعيد فتح غطاء الحاسوب المحمول"
-
-#~ msgid "idle mode ended"
-#~ msgstr "انتهى وضع الخمول"
-
-#~ msgid "idle mode started"
-#~ msgstr "بدأ وضع الخمول"
-
-#~ msgid "powersave mode started"
-#~ msgstr "بدأ وضع حفظ الطاقة"
-
-#~ msgid "dpms on"
-#~ msgstr "dpms تعمل"
-
-#~ msgid "dpms standby"
-#~ msgstr "dpms مستعدة"
-
-#~ msgid "dpms suspend"
-#~ msgstr "dpms تعليق"
-
-#~ msgid "dpms off"
-#~ msgstr "dpms لاتعمل"
-
-#~ msgid "Resuming computer"
-#~ msgstr "استئناف الحاسوب"
-
-#~ msgid "Hibernate Problem"
-#~ msgstr "مشكلة في الإسبات"
-
-#~ msgid "Suspend Problem"
-#~ msgstr "مشكلة في تعليق"
-
-#~ msgid "%s has stopped the suspend from taking place: %s."
-#~ msgstr "%s منع التعليق من الحدوث: %s."
-
-#~ msgid "%s has stopped the hibernate from taking place: %s."
-#~ msgstr "%s منع السبات من الحدوث: %s."
-
-#~ msgid "%s has stopped the policy action from taking place: %s."
-#~ msgstr "%s منع إجراءات السياسة من الحدوث: %s."
-
-#~ msgid "%s has stopped the reboot from taking place: %s."
-#~ msgstr "%s منع إعادة الإقلاع من الحدوث: %s."
-
-#~ msgid "%s has stopped the shutdown from taking place: %s."
-#~ msgstr "%s منع إيقاف التشغيل من الحدوث: %s."
-
-#~ msgid "%s has stopped the timeout action from taking place: %s."
-#~ msgstr "%s منع إجراءات انتهاء المهلة من الحدوث: %s."
-
-#~ msgid "Multiple applications have stopped the suspend from taking place."
-#~ msgstr "تطبيقات عديدة منعت التعليق من الحدوث."
-
-#~ msgid "Multiple applications have stopped the hibernate from taking place."
-#~ msgstr "تطبيقات عديدة منعت السبات من الحدوث."
-
-#~ msgid ""
-#~ "Multiple applications have stopped the policy action from taking place."
-#~ msgstr "تطبيقات عديدة منعت إجراءات السياسة من الحدوث."
-
-#~ msgid "Multiple applications have stopped the reboot from taking place."
-#~ msgstr "تطبيقات عديدة منعت إعادة الإقلاع من الحدوث."
-
-#~ msgid "Multiple applications have stopped the shutdown from taking place."
-#~ msgstr "تطبيقات عديدة منعت إيقاف التشغيل من الحدوث."
-
-#~ msgid "Do not daemonize"
-#~ msgstr "لا تجعله جنيا"
-
-#~ msgid "Request to do policy action"
-#~ msgstr "طلب القيام بإجراء سياسة"
-
-#~ msgid "Request to reboot"
-#~ msgstr "طلب إعادة إقلاع"
-
-#~ msgid "Request to shutdown"
-#~ msgstr "طلب إيقاف التشغيل"
-
-#~ msgid "Request to do timeout action"
-#~ msgstr "طلب القيام بإجراء انتهاء المهلة"
-
-#~ msgid "Perform action anyway"
-#~ msgstr "قم بالإجراء على أية حال"
-
-#~ msgid "Action forbidden"
-#~ msgstr "الإجراء ممنوع"
-
-#~ msgid "Suspend is not available on this computer."
-#~ msgstr "التعليق غير متاح على هذا الحاسوب"
-
-#~ msgid "Suspending computer."
-#~ msgstr "تعليق الحاسوب."
-
-#~ msgid "Hibernate is not available on this computer."
-#~ msgstr "الإسبات غير متاح على هذا الحاسوب."
-
-#~ msgid "Hibernating computer."
-#~ msgstr "إسبات الحاسوب."
-
-#~ msgid "Doing nothing."
-#~ msgstr "لا تفعل أي شيء."
-
-#~ msgid "Shutting down computer."
-#~ msgstr "إطفاء الحاسوب."
-
-#~ msgid "MATE interactive logout."
-#~ msgstr "خروج تفاعلي من جنوم."
-
-#~ msgid "System idle."
-#~ msgstr "النظام خامد."
-
-#~ msgid "The power button has been pressed."
-#~ msgstr "ضُغِط زر الطاقة."
-
-#~ msgid "The suspend button has been pressed."
-#~ msgstr "ضُغِط زر التعليق."
-
-#~ msgid "The hibernate button has been pressed."
-#~ msgstr "ضُغِط زر الإسبات."
-
-#~ msgid "The lid has been closed on ac power."
-#~ msgstr "أغلِق الغطاء والجهاز موصول على التيار."
-
-#~ msgid "The lid has been closed on battery power."
-#~ msgstr "أُغلِق الغطاء و الجهاز على البطارية."
-
-#~ msgid ""
-#~ "The lid has been closed, and the ac adapter removed (and mateconf is okay)."
-#~ msgstr "أُغلِق الغطاء, و نُزع التيار (و mateconf سليم)"
-
-#~ msgid "User clicked on tray"
-#~ msgstr "نقر المستخدم على لوحة النظام"
-
-#~ msgid "a short time"
-#~ msgstr "وقت قصير"
-
-#, fuzzy
-#~ msgid ""
-#~ "You have approximately <b>%s</b> of remaining battery life (%.1f%%). %s"
-#~ msgstr "لديك تقريبًا <b>%s</b> متبقية من عمر البطارية (%Id%%). %s"
-
-#~ msgid "Sleep warning"
-#~ msgstr "تحذير النوم"
-
-#~ msgid ""
-#~ "Your laptop will not sleep if you shut the lid as a running program has "
-#~ "prevented this.\n"
-#~ "Some laptops can overheat if they do not sleep when the lid is closed."
-#~ msgstr ""
-#~ "حاسوبك المحمول لن ينام إن أغلقت غطاءه بسبب عمل برنامج يحول دون ذلك.\n"
-#~ "بعض الحواسيب المحمولة قد ترتفع حرارتها إن لم تُنم بينما الغطاء مغلق."
-
-#~ msgid "Your laptop battery is now fully charged"
-#~ msgstr "لقد شُحنت بطارية حاسوبك المحمول تمامًا"
-
-#~ msgid ""
-#~ "The AC power has been unplugged. The system is now using battery power."
-#~ msgstr "نُزِع مقبس التيار. يعمل النظام الآن على البطارية."
-
-#~ msgid ""
-#~ "The AC power has been unplugged. The system is now using backup power."
-#~ msgstr "نُزِع مقبس التيار. يعمل النظام الآن على الطاقة الاحتياطية."
-
-#~ msgid "Visit quirk website"
-#~ msgstr "زُر موقع quirk"
-
-#~ msgid "Battery state could not be read at this time\n"
-#~ msgstr "تعذّر قراءة حالة البطارية في هذا الوقت\n"
-
-#~ msgid "<b>Product:</b> %s\n"
-#~ msgstr "<b>المنتَج:</b> %s\n"
-
-#, fuzzy
-#~ msgid "<b>Status:</b> %s\n"
-#~ msgstr "<b>الحالة:</b> مفقود\n"
-
-#, fuzzy
-#~ msgid "<b>Percentage charge:</b> %.1f%%\n"
-#~ msgstr "<b>نسبة الشحن:</b> %Ii%%\n"
-
-#, fuzzy
-#~ msgid "<b>Vendor:</b> %s\n"
-#~ msgstr "<b>المنتَج:</b> %s\n"
-
-#, fuzzy
-#~ msgid "<b>Technology:</b> %s\n"
-#~ msgstr "<b>المنتَج:</b> %s\n"
-
-#, fuzzy
-#~ msgid "<b>Model:</b> %s\n"
-#~ msgstr "<b>المنتَج:</b> %s\n"
-
-#, fuzzy
-#~ msgid "<b>Charge time:</b> %s\n"
-#~ msgstr "<b>المنتَج:</b> %s\n"
-
-#, fuzzy
-#~ msgid "<b>Discharge time:</b> %s\n"
-#~ msgstr "وقت التفريغ:"
-
-#, fuzzy
-#~ msgid "<b>Capacity:</b> %i%% (%s)\n"
-#~ msgstr "<b>المنتَج:</b> %s\n"
-
-#, fuzzy
-#~ msgid "<b>Current charge:</b> %.1f Wh\n"
-#~ msgstr "<b>نسبة الشحن:</b> %Ii%%\n"
-
-#, fuzzy
-#~ msgid "<b>Design charge:</b> %.1f Wh\n"
-#~ msgstr "<b>نسبة الشحن:</b> %Ii%%\n"
-
-#, fuzzy
-#~ msgid "<b>Current charge:</b> %i/7\n"
-#~ msgstr "<b>نسبة الشحن:</b> %Ii%%\n"
-
-#, fuzzy
-#~ msgid "<b>Design charge:</b> %i/7\n"
-#~ msgstr "<b>نسبة الشحن:</b> %Ii%%\n"
-
-#~ msgid "Laptop batteries"
-#~ msgstr "بطاريات الحاسوب المحمول"
-
-#~ msgid "UPSs"
-#~ msgstr "UPS"
-
-#~ msgid "Wireless mice"
-#~ msgstr "فأرة لاسلكية"
-
-#~ msgid "Wireless keyboards"
-#~ msgstr "لوحات مفاتيح لاسلكية"
-
-#~ msgid "PDAs"
-#~ msgstr "مساعد رقمي"
-
-#~ msgid "Cell phones"
-#~ msgstr "هواتف محمولة"
-
-#~ msgid "MATE Power Statistics"
-#~ msgstr "إحصاءات طاقة جنوم"
-
-#~ msgid "Charge history"
-#~ msgstr "تأريخ الشّحن"
-
-#~ msgid "Power history"
-#~ msgstr "تأريخ الطاقة"
-
-#~ msgid "Voltage history"
-#~ msgstr "تأريخ الفلطية"
-
-#~ msgid "Estimated time history"
-#~ msgstr "تأريخ الزمن المقدر"
-
-#~ msgid "Could not connect to MATE Power Manager."
-#~ msgstr "تعذّر الاتصال بمدير طاقة جنوم"
-
-#~ msgid ""
-#~ "The device name for the v4l device used as a brightness sensor backup"
-#~ msgstr "اسم جهاز ال v4l المستخدم كمستشعر ضوئي احتياطي"
-
-#~ msgid ""
-#~ "The device name for the v4l device used as a brightness sensor backup. A "
-#~ "value of 'default' uses the first discovered sensor, or devices can be "
-#~ "specified, e.g. '/dev/video0'"
-#~ msgstr ""
-#~ "اسم جهاز ال v4l المستخدم كمستشعر ضوئي احتياطي. قيمة 'default' تستخدم أول "
-#~ "مستشعر يُكتشف، أو يمكن تحديد الأجهزة، مثل '/dev/video0'"
-
-#~ msgid ""
-#~ "Policy timeout is not valid. Please wait a few seconds and try again."
-#~ msgstr "وقت انتهاء السياسة غير صالح. انتظر بضع ثوان رجاءً ثمّ حاول ثانية."
-
-#~ msgid "<b>Status:</b> Charged\n"
-#~ msgstr "<b>الحالة:</b> مشحونة\n"
-
-#~ msgid "<b>Status:</b> Charging\n"
-#~ msgstr "<b>الحالة:</b> تشحن\n"
-
-#~ msgid "<b>Status:</b> Discharging\n"
-#~ msgstr "<b>الحالة:</b> تفرّغ\n"
-
-#~ msgid "If we should show the CPU frequency scaling in the UI"
-#~ msgstr "اذا توجب اظهار مقايسة تردد المعالج في واجهة المستخدم "
-
-#~ msgid ""
-#~ "If we should show the CPU frequency scaling in the UI. Some people need "
-#~ "to configure this for specific systems."
-#~ msgstr ""
-#~ "أظهر تردد المعالج في الواجهة. يحتاج البعض إلى أعداد هذا لأنظمة معينة."
diff --git a/po/gnome-copyrights.txt b/po/gnome-copyrights.txt
new file mode 100644
index 0000000..db1716a
--- /dev/null
+++ b/po/gnome-copyrights.txt
@@ -0,0 +1,998 @@
+========== ar.po ==========
+# translation of gnome-power-manager.HEAD.po to Arabic
+# Yousef Raffah <[email protected]>, 2006.
+# Djihed Afifi <[email protected]>, 2006.
+# Khaled Hosny <[email protected]>, 2006, 2007, 2008, 2009, 2010.
+# Mohamed Magdy <[email protected]>, 2007.
+# Youssef Chahibi <[email protected]>, 2007.
+# Anas Husseini <[email protected]>, 2007.
+# Abdelmonam Kouka <[email protected]>, 2008.
+
+
+
+
+========== as.po ==========
+# translation of as.po to Assamese
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Amitakhya Phukan <[email protected]>, 2008.
+# Amitakhya Phukan <[email protected]>, 2008.
+# Amitakhya Phukan <[email protected]>, 2009.
+
+
+
+
+========== ast.po ==========
+# translation of gnome-power-manager.po to Asturian
+# Asturian translation for gnome-power-manager
+# Copyright (c) 2007 Rosetta Contributors and Canonical Ltd 2007
+# This file is distributed under the same license as the gnome-power-manager package.
+#
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2007.
+# Xose S. Puente <[email protected]>, 2007.
+
+
+
+
+========== be.po ==========
+# Belarusian translation for gnome-power-manager
+# Copyright (c) (c) 2006 Canonical Ltd, and Rosetta Contributors 2006
+# This file is distributed under the same license as the gnome-power-manager package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2006.
+#
+# Alexander Nyakhaychyk <[email protected]>, 2009.
+
+
+
+
+========== [email protected] ==========
+# Biełaruski pierakład gnome-power-manager.
+# Copyright (C) 2008 Ihar Hrachyshka
+# This file is distributed under the same license as the gnome-power-manager package.
+# Ihar Hrachyshka <[email protected]>, 2008.
+#
+
+
+
+
+========== bg.po ==========
+# Bulgarian translation for gnome-power-manager po-file.
+# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the gnome-power-manager package.
+# Alexander Shopov <[email protected]>, 2005, 2006, 2007, 2008, 2009, 2010.
+# Yavor Doganov <[email protected]>, 2008.
+# Damyan Ivanov <[email protected]>, 2010.
+#
+
+
+
+
+========== bn.po ==========
+# Bengali translation for gnome-power-manager
+# This file is distributed under the same license as the gnome-power-manager package.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
+#
+# Khandakar Mujahidul Islam <[email protected]>, 2006.
+# Runa Bhattacharjee <[email protected]>, 2006.
+# Runa Bhattacharjee <[email protected]>, 2009.
+# Maruf Ovee <[email protected]>, 2009.
+# Sadia Afroz <[email protected]>, 2010.
+# Israt Jahan <[email protected]>, 2010.
+#
+
+
+
+
+========== bn_IN.po ==========
+# translation of bn_IN.po to Bengali INDIA
+# Bengali india translation for gnome-power-manager
+# This file is distributed under the same license as the gnome-power-manager package.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
+#
+# Khandakar Mujahidul Islam <[email protected]>, 2006.
+# Runa Bhattacharjee <[email protected]>, 2006.
+# Runa Bhattacharjee <[email protected]>, 2009.
+
+
+
+
+========== ca.po ==========
+# Catalan translations for gnome-power-manager package
+# Traduccions al català del paquet «gnome-power-manager».
+# Copyright © 2005, 2006, 2007 The Free Software Foundation, Inc.
+# This file is distributed under the same license as the
+# gnome-power-manager package.
+# Josep Puigdemont <[email protected]>, 2005, 2006.
+# Esteve Blanch <[email protected]>, 2006.
+# David Planella <[email protected]>, 2007, 2008, 2009, 2010.
+#
+# Sleep: mode de baix consum
+# - Hibernation: hibernació
+# - Suspend: aturada temporal
+#
+# Resume: reprendre
+# Shutdown, power off: aturar
+# Standby: en espera
+# Idle: inactiu / inactiva
+# Off: apagat / apagada
+# Power button: botó d'arrencada
+# Suspend button: botó d'aturada temporal
+# Hibernate button: botó d'hibernació
+# Policy action: acció de directiva (de gestió de l'energia)
+# Timeout action: acció de temporització
+#
+# Per a més informació, consulteu els llocs web següents:
+#
+# http://live.gnome.org/MatePowerManager/SleepNames
+# http://svn.gnome.org/viewcvs/*checkout*/gnome-power-manager/docs/sleep-names.html
+
+
+
+
+========== [email protected] ==========
+# Catalan translations for gnome-power-manager package
+# Traduccions al català del paquet «gnome-power-manager».
+# Copyright © 2005, 2006, 2007 The Free Software Foundation, Inc.
+# This file is distributed under the same license as the
+# gnome-power-manager package.
+# Josep Puigdemont <[email protected]>, 2005, 2006.
+# Esteve Blanch <[email protected]>, 2006.
+# David Planella <[email protected]>, 2007, 2008, 2009, 2010.
+#
+# Sleep: mode de baix consum
+# - Hibernation: hibernació
+# - Suspend: aturada temporal
+#
+# Resume: reprendre
+# Shutdown, power off: aturar
+# Standby: en espera
+# Idle: inactiu / inactiva
+# Off: apagat / apagada
+# Power button: botó d'arrencada
+# Suspend button: botó d'aturada temporal
+# Hibernate button: botó d'hibernació
+# Policy action: acció de directiva (de gestió de l'energia)
+# Timeout action: acció de temporització
+#
+# Per a més informació, consulteu els llocs web següents:
+#
+# http://live.gnome.org/MatePowerManager/SleepNames
+# http://svn.gnome.org/viewcvs/*checkout*/gnome-power-manager/docs/sleep-names.html
+
+
+
+
+========== cs.po ==========
+# Czech translation of gnome-power-manager.
+# Copyright (C) 2008, 2009, 2010 the author(s) of gnome-power-manager.
+# Copyright (C) 2008 Pavel Šefránek <[email protected]>.
+# This file is distributed under the same license as the gnome-power-manager package.
+#
+# Tomas Kyjovsky <[email protected]>, 2006.
+# Jakub Friedl <[email protected]>, 2006, 2007.
+# Pavel Šefránek <[email protected]>, 2008.
+# Petr Kovar <[email protected]>, 2008, 2009.
+# Lucas Lommer <[email protected]>, 2009.
+# Petr Pulc <[email protected]>, 2009
+# Marek Černocký <[email protected]>, 2009, 2010.
+#
+
+
+
+
+========== cy.po ==========
+# GNOME Power Manager in Welsh.
+# This file is distributed under the same license as GNOME Power Manager.
+# Rhys Jones <[email protected]>, 2006-2008.
+# Iestyn Pryce <[email protected]>, 2007, 2009.
+
+
+
+
+========== da.po ==========
+# Danish translation of gnome-power-manager.
+# Copyright (C) 2007-2010
+# This file is distributed under the same license as the gnome-power-manager package.
+# Ask Hjorth Larsen <[email protected]>, 2007, 08, 09, 10.
+# Kenneth Nielsen <[email protected]>, 2008.
+#
+# ------------
+# Konventioner
+# ------------
+#
+# sleep -> sove(tilstand)
+# sleep mode kan sættes til suspend, hibernate eller blank screen
+#
+# idle, inactivity -> tomgang, inaktivitet
+#
+# Tilsyneladende skelnes der mellem to ting, som kan oversættes:
+# tomgang hvis computeren intet laver (nedsæt processorfrekvens, stop harddisk, etc.)
+# inaktivitet hvis brugeren intet laver (screensaver, blank skærm etc.)
+# (gloserne bruges så vidt jeg kan se ikke konsekvent på engelsk, så det må skønnes i hvert tilfælde hvilken oversættelse der er korrekt)
+#
+# AC power -> (oftest) ekstern strømforsyning
+#
+# hibernate -> (gå i) dvale
+# suspend -> hvile
+# resume -> genoptag(e)
+#
+# inhibit -> hindre
+# (f.eks. hindring af strømstyringsfunktionerne)
+#
+
+
+
+
+========== de.po ==========
+# German translation of gnome-power-manager.
+# Copyright (C) 2005 THE gnome-power'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the gnome-power package.
+# Hendrik Brandt <[email protected]>, 2005, 2006.
+# Hendrik Richter <[email protected]>, 2006, 2007, 2008.
+# Johannes Schmid <[email protected]>, 2006.
+# Tobias Wolf <[email protected]>, 2006.
+# Thomas Gier <[email protected]>, 2007.
+# Nathan-J. Hirschauer <[email protected]>, 2009.
+# Mario Blättermann <[email protected]>, 2009.
+# Wolfgang Stöggl <[email protected]>, 2009, 2010.
+# Christian Kirbach <[email protected]>, 2009, 2010.
+#
+
+
+
+
+========== dz.po ==========
+# SOME DESCRIPTIVE TITLE.
+# Copyright @ 2006 Free software foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# Sonam Pelden , 2006.
+#
+
+
+
+
+========== el.po ==========
+# translation of el.po to Greek
+# gnome-power-manager Greek translation.
+# Copyright (C) Free Software Foundation. 2005
+# This file is distributed under the same license as the gnome-power-manager package.
+#
+# Nikos Charonitakis <[email protected]>, 2006.
+# Kostas Papadimas <[email protected]>, 2006.
+# Simos Xenitellis <[email protected]>, 2008, 2009.
+# Jennie Petoumenou <[email protected]>, 2010.
+
+
+
+
+========== [email protected] ==========
+# Shavian translation for gnome-power-manager.
+# Copyright (C) 2009 The Mate Foundation.
+# Thomas Thurman <[email protected]>, 2009.
+
+
+
+
+========== en_CA.po ==========
+# Canadian English translation for gnome-power-manager
+# Copyright (C) 2005-2006 Adam Weinberger <[email protected]>
+# This file is distributed under the same licence as the gnome-power-manager package.
+# Adam Weinberger <[email protected]>, 2005, 2006.
+#
+#
+
+
+
+
+========== en_GB.po ==========
+# British English translation of GNOME Power Manager.
+# Copyright (C) 2005 Free Software Foundation, Inc.
+# Richard Hughes <[email protected]>, 2005.
+# Bruce Cowan <[email protected]>, 2009, 2010.
+
+
+
+
+========== es.po ==========
+# translation of gnome-power-manager.master.po to Español
+# Translation of gnome-power-manager to Spanish
+# Copyright (C) 2005 Mate Foundation
+# This file is distributed under the same license as the gnome-power-manager package.
+#
+# Francisco Javier F. Serrador <[email protected]>, 2005, 2006.
+# Jorge González <[email protected]>, 2007, 2008, 2009, 2010.
+#
+
+
+
+
+========== et.po ==========
+# GNOME'i vooluhalduri eesti keele tõlge.
+# Estonian translation of GNOME Power Manager.
+#
+# Copyright (C) 2006–2010 The Mate Project.
+# This file is distributed under the same license as the gnome-power-manager
+# package.
+#
+# Priit Laes <plaes plaes org>, 2006, 2010.
+# Ivar Smolin <okul at linux ee>, 2006–2010.
+# Mattias Põldaru <mahfiaz gmail com>, 2009–2010.
+#
+
+
+
+
+========== eu.po ==========
+# translation of eu.po to Basque
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Iñaki Larrañaga Murgoitio <[email protected]>, 2006, 2007, 2008, 2009, 2010.
+# Iñaki Larrañaga Murgoitio <[email protected]>, 2007.
+
+
+
+
+========== fa.po ==========
+# Persian translation of gnome-power-manager.
+# Copyright (C) 2006 Sharif FarsiWeb, Inc.
+# This file is distributed under the same license as the gnome-power-manager package.
+# Meelad Zakaria <[email protected]>, 2006.
+# Elnaz Sarbar <[email protected]>, 2006.
+# Farzaneh Sarafraz <[email protected]>, 2006.
+#
+
+
+
+
+========== fi.po ==========
+# Finnish messages for gnome-power-manager
+# Copyright (C) 2002-2009 Free Software Foundation, Inc.
+# This file is distributed under the same license as the gnome-power-manager
+# package.
+# Ilkka Tuohela <[email protected]>, 2005-2009.
+# Timo Jyrinki <[email protected]>, 2008.
+# Tommi Vainikainen <[email protected]>, 2009-2010.
+#
+# suspend = valmiustila (poikkeuksena lokalisointi.org:iin)
+# hibernate = lepotila
+# sleep = virransäästötila (kattotermi kahdelle edelliselle)
+#
+
+
+
+
+========== fr.po ==========
+# French translation of gnome-power-manager.
+# Copyright (C) 2005-2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the gnome-power-manager package.
+#
+# See http://wiki.traduc.org/gnomefr/NomenclatureGestionEnergie.
+# NOT USED YET.
+#
+# Yann Simon <[email protected]>, 2005.
+# Christophe Merlet <[email protected]>, 2005.
+# Guillaume Savary <[email protected]>, 2005.
+# Julien Valroff <[email protected]>, 2006.
+# Elrik <[email protected]>, 2006.
+# Robert-André Mauchin <[email protected]>, 2006-2008.
+# Mathieu Gaspard <[email protected]>, 2006.
+# Stéphane Raimbault <[email protected]>, 2006-2008.
+# Claude Paroz <[email protected]>, 2008-2010.
+# Bruno Brouard <[email protected]>, 2009.
+# Nicolas Repentin <[email protected]>, 2010.
+# Milan Bouchet-Valat <[email protected]>, 2010.
+# Laurent Coudeur <[email protected]>, 2009, 2010.
+#
+
+
+
+
+========== ga.po ==========
+# Irish translations for gnome-power-manager package.
+# Copyright (C) 2007-2009 Free Software Foundation, Inc.
+# This file is distributed under the same license as the gnome-power-manager package.
+# Seán de Búrca <[email protected]>, 2007, 2008, 2009.
+#
+
+
+
+
+========== gl.po ==========
+# translation of gnome-power-manager-master-po-gl-71586.merged.po to Galician
+# translation of gnome-power-manager.gl.po to
+# This file is distributed under the same license as the PACKAGE package.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER, 2005.
+#
+# Ignacio Casal Quinteiro <[email protected]>, 2005, 2006.
+# Ignacio Casal Quinteiro <[email protected]>, 2008.
+# Mancomún - Centro de Referencia e Servizos de Software Libre <[email protected]>, 2009.
+# Antón Méixome <[email protected]>, 2009.
+# Antón Méixome <[email protected]>, 2010.
+# Fran Diéguez <[email protected]>, 2009, 2010.
+# Fran Dieguez <[email protected]>, 2010.
+#
+
+
+
+
+========== gu.po ==========
+# translation of gnome-power-manager.master.gu.po to Gujarati
+# This file is distributed under the same license as the PACKAGE package.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
+#
+# Ankit Patel <[email protected]>, 2005, 2006.
+# Ankit Patel <[email protected]>, 2007, 2009.
+# Sweta Kothari <[email protected]>, 2009.
+
+
+
+
+========== he.po ==========
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# Yair Hershkovitz <[email protected]>
+# Yaron Shahrabani <[email protected]>
+#
+
+
+
+
+========== hi.po ==========
+# translation of gnome-power-manager.master.po to Hindi
+# This file is distributed under the same license as the PACKAGE package.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
+#
+# Rajesh Ranjan <[email protected]>, 2006, 2007, 2009.
+# Rajesh Ranjan <[email protected]>, 2009.
+
+
+
+
+========== hr.po ==========
+# Croatian translation for gnome-power-manager
+# Copyright (c) (c) 2006 Canonical Ltd, and Rosetta Contributors 2006
+# This file is distributed under the same license as the gnome-power-manager package.
+# Translators:
+#
+
+
+
+
+========== hu.po ==========
+# Hungarian translation of gnome-power-manager
+# This file is distributed under the same license as the gnome-power-manager package.
+# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, Free Software Foundation, Inc.
+#
+# Gabor Kelemen <kelemeng at gnome dot hu>, 2005, 2006, 2007, 2008, 2009, 2010.
+# Szabolcs Varga <shirokuma at shirokuma dot hu>, 2006.
+# Kováts Dóra <dorcssa at gmail dot com>, 2008.
+
+
+
+
+========== id.po ==========
+# Indonesian translation for gnome-power-manager
+# Copyright (c) (c) 2006 Canonical Ltd, and Rosetta Contributors 2006
+# This file is distributed under the same license as the gnome-power-manager package.
+# Andy Apdhani <[email protected]>, 2006.
+#
+#
+
+
+
+
+========== is.po ==========
+# Icelandic translation of Mate.
+# Icelandic translation of The GIMP. This is a compendium.
+# Copyright (C) 2008 Free Software Foundation, Inc.
+# Anna Jonna Ármannsdóttir <[email protected]>, 2008.
+#
+
+
+
+
+========== it.po ==========
+# Italian translation of GNOME Power Manager.
+# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the gnome-power-manager package.
+# Paolo Insogna <[email protected]>, 2006.
+# Daniele Medri <[email protected]>, 2006.
+# Richard Hughes <[email protected]>, 2006.
+#
+# GNOME Power Manager -> Gestore alimentazione GNOME
+# Power Manager -> Gestore alimentazione
+# Inhibit -> inibire, ma anche con sinonimi come disabilitare o impedire
+# Sleep -> Pausa
+# Hibernate -> Ibernare
+# Suspend -> Sospendere
+# Shutdown -> Arresto
+#
+# Le varie modalità di DPMS sono state lasciate non tradotte:
+# http://www.pluto.it/files/ildp/HOWTO/Battery-Powered/displaytypes.html
+#
+# to dim -> oscurare
+#
+# AC Power -> alimentazione dalla rete elettrica
+# Battery power -> alimentazione dalla batteria
+#
+# light sensor o ambient light sensor -> sensore di luce ambientale
+#
+#
+# Milo Casagrande <[email protected]>, 2005, 2006, 2007, 2008, 2009, 2010.
+
+
+
+
+========== ja.po ==========
+# ja.po for gnome-power-manager.
+# Copyright (C) 2005-2009 Richard Hughes <richard @ hughsie.com>
+# This file is distributed under the same license as the gnome-power-manager package.
+# Satoru SATOH <ss @ gnome.gr.jp>, 2005-2006.
+# Takeshi AIHANA <[email protected]>, 2006-2009.
+#
+
+
+
+
+========== ka.po ==========
+# translation of ka.po to Georgian
+# Georgian translation for Mate Power Manager.
+# This file is distributed under the same license as the gnome-power-manager package.
+#
+# David Managadze <[email protected]>, 2006, 2007.
+
+
+
+
+========== kn.po ==========
+# translation of gnome-power-manager.master.kn.po to Kannada
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Shankar Prasad <[email protected]>, 2008, 2009, 2010.
+
+
+
+
+========== ko.po ==========
+# gnome-power-manager Korean translation
+# This file is distributed under the same license as the gnome-power-manager package.
+#
+# Imported from Launchpad Rosetta:
+# Copyright (c) 2006 Canonical Ltd, and Rosetta Contributors 2006
+#
+# Updated:
+# Changwoo Ryu <[email protected]>, 2006, 2007, 2008, 2009, 2010.
+#
+#
+# 새로 번역하신 분은 아래 "translator-credits"에 추가하세요.
+#
+
+
+
+
+========== ku.po ==========
+# Kurdish translation for gnome-power-manager
+# Copyright (c) (c) 2006 Canonical Ltd, and Rosetta Contributors 2006
+# This file is distributed under the same license as the gnome-power-manager package.
+# ElîxanLoran <[email protected]>, 2006.
+#
+
+
+
+
+========== lt.po ==========
+# Lithuanian translation of gnome-power-manager.
+# Copyright © 2005-2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the gnome-power-manager package.
+# Žygimantas Beručka <[email protected]>, 2005-2007, 2009, 2010.
+# Gintautas Miliauskas <[email protected]>, 2006-2009.
+# Aurimas Černius <[email protected]>, 2010.
+
+
+
+
+========== lv.po ==========
+# translation of lv.po to Latvian
+# translation of pan.HEAD.lv.po to
+# pan for Latvian.
+# Copyright (C) 2002 Charles Kerr
+# This file is distributed under the same license as the pan package.
+#
+# Raivis Dejus <[email protected]>, 2006, 2007, 2009.
+# Rūdolfs Mazurs <[email protected]>, 2010.
+
+
+
+
+========== mai.po ==========
+# translation of gnome-power-manager.HEAD.po to Maithili
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Sangeeta Kumari <[email protected]>, 2009.
+
+
+
+
+========== mg.po ==========
+# MALAGASY TRANSLATION OF GNOME-POWER-MANAGER.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# Thierry Randrianiriana <[email protected]>, 2006.
+
+
+
+
+========== mk.po ==========
+# translation of mk.po to Macedonian
+# English translation of gnome-power-manager.
+# Copyright (C) 2005 THE gnome-power-manager'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the gnome-power-manager package.
+#
+# Арангел Ангов <[email protected]>, 2005.
+# Jovan Naumovski <[email protected]>, 2006, 2007.
+# Arangel Angov <[email protected]>, 2006, 2008.
+
+
+
+
+========== ml.po ==========
+# translation of gnome-power-manager.master.ml.po to
+# This file is distributed under the same license as the gnome-power-manager package.
+# Copyright (C) 2006-2009 gnome-power-manager'S COPYRIGHT HOLDER.
+# Ani Peter <[email protected]>, 2006.
+# Praveen|പ്രവീണ്‍ A|എ <[email protected]>, 2007, 2008, 2009, 2010.
+# Reviewed by Manilal K M <[email protected]>, Santhosh Thottingal <[email protected]>, Anivar Aravind <[email protected]>, 2007.
+
+
+
+
+========== mr.po ==========
+# translation of mr.po to Marathi
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# sandeep shedmake <[email protected]>, 2008.
+# Sandeep Shedmake <[email protected]>, 2009.
+# Sandeep Shedmake <[email protected]>, 2009.
+
+
+
+
+========== nb.po ==========
+# Translation of gnome-power-manager to Norwegian Bokmål
+# This file is distributed under the same license as the gnome-power-manager package.
+# Copyright (C) Free Software Foundation, Inc, 2005.
+# Terance Edward Sola <[email protected]>, 2005.
+# Kjartan Maraas <[email protected]>, 2005-2010.
+# Øivind Hoel <[email protected]>, 2006
+#
+
+
+
+
+========== nl.po ==========
+# Dutch translation for gnome-power-manager
+#
+# This file is distributed under the same license as the gnome-power-manager package.
+#
+# Theetjuh <[email protected]>, 2005.
+# Tino Meinen <[email protected]>, 2005, 2006, 2009.
+# Rinse de Vries <[email protected]>, 2007.
+# Reinout van Schouwen <[email protected]>, 2008, 2009.
+# Wouter Bolsterlee <[email protected]>, 2006–2010.
+#
+# AC - netstroom
+# battery - accu/accustroom
+# hibernate - slaapstand
+# lid - scherm (vrij vertaald, want deksel en klep zijn erg lelijk)
+# suspend - pauzestand
+# suspend button - pauzeerknop
+# backlight - achtergrondverlichting / backlight
+#
+
+
+
+
+========== nn.po ==========
+# Translation of gnome-power-manager to Norwegian nynorsk
+# This file is distributed under the same license as the gnome-power-manager package.
+# Copyright (C) Free Software Foundation, Inc, 2005.
+#
+#
+#
+# Terance Edward Sola <[email protected]>, 2005.
+# Kjartan Maraas <[email protected]>, 2005-2007.
+# Øivind Hoel <[email protected]>, 2006.
+# Eskild Hustvedt <[email protected]>, 2008.
+# Torstein Adolf Winterseth <[email protected]>, 2009.
+
+
+
+
+========== oc.po ==========
+# Translation of oc.po to Occitan
+# Occitan translation of gnome-power-manager.
+# Copyright (C) 2005-2007 Free Software Foundation, Inc.
+# This file is distributed under the same license as the gnome-power-manager package.
+#
+# Yannig Marchegay (Kokoyaya) <[email protected]>, 2006-2008.
+
+
+
+
+========== or.po ==========
+# translation of gnome-power-manager-2-30.or.po to Oriya
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Subhransu Behera <[email protected]>, 2007.
+# Manoj Kumar Giri <[email protected]>, 2009, 2010.
+
+
+
+
+========== pa.po ==========
+# translation of gnome-power-manager.HEAD.po to Punjabi
+# This file is distributed under the same license as the PACKAGE package.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
+#
+# Amanpreet Singh Alam <[email protected]>, 2005.
+# A S Alam <[email protected]>, 2006, 2007, 2009, 2010.
+# Amanpreet Singh Alam <[email protected]>, 2008, 2009.
+
+
+
+
+========== pl.po ==========
+# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+# Aviary.pl
+# Jeśli masz jakiekolwiek uwagi odnoszące się do tłumaczenia lub chcesz
+# pomóc w jego rozwijaniu i pielęgnowaniu, napisz do nas:
+# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+
+
+
+========== pt.po ==========
+# gnome-power-manager's Portuguese translation.
+# Copyright © 2006, 2007, 2008, 2009, 2010 gnome-power-manager
+# This file is distributed under the same license as the gnome-power-manager package.
+# Duarte Loreto <[email protected]>, 2006, 2007, 2008, 2009, 2010.
+#
+
+
+
+
+========== pt_BR.po ==========
+# Brazilian Portuguese translation of gnome-power-manager.
+# Copyright (C) 2004-2009 Free Software Foundation, Inc.
+# This file is distributed under the same license as the gnome-power-manager package.
+# Raphael Higino <In Memoriam>, 2004-2005.
+# Licio Fernando <[email protected]>, 2005.
+# Leonardo Ferreira Fontenelle <[email protected]>, 2006-2008.
+# Og Maciel <[email protected]>, 2007.
+# Fábio Nogueira <[email protected]>, 2008.
+# Enrico Nicoletto <[email protected]>, 2009.
+# Djavan Fagundes <[email protected]>, 2009.
+# André gondim <[email protected]>, 2010.
+# Antonio Fernandes C. Neto <[email protected]>, 2010.
+
+
+
+
+========== ro.po ==========
+# Romanian translation of gnome-power-manager.
+# Copyright (C) 2007 gnome-power-manager
+# This file is distributed under the same license as the gnome-power-manager package.
+# Alexandru Szasz <[email protected]>, 2007.
+# Adi Roiban https://launchpad.net/~adiroiban, 2008, 2009
+# Lucian Adrian Grijincu <[email protected]>, 2009, 2010.
+
+
+
+
+========== ru.po ==========
+# translation of gnome-power-manager.master.ru.po to Russian
+# translation of gnome-power-manager to Russian
+#
+# Copyright (C) 2005-2009, 2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the gnome-power-manager package.
+#
+# Leonid Kanter <[email protected]>, 2006, 2010.
+# Nickolay V. Shmyrev <[email protected]>, 2007.
+# Yuri Kozlov <[email protected]>, 2008.
+# Yuriy Penkin <[email protected]>, 2008.
+# Yuri Kozlov <[email protected]>, 2010.
+# Alexander Saprykin <[email protected]>, 2010.
+
+
+
+
+========== si.po ==========
+# translation of si.po to Sinhala
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Danishka Navin <[email protected]>, 2007.
+
+
+
+
+========== sk.po ==========
+# Slovak translation for gnome-power-manager.
+# Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the gnome-power-manager package.
+# Marcel Telka <[email protected]>, 2005.
+# Peter Tuharsky <[email protected]>, 2007.
+# Pavol Šimo <[email protected]>, 2009, 2010.
+#
+
+
+
+
+========== sl.po ==========
+# Slovenian translation of gnome-power-manager.
+# Copyright (C) 2005-2006 Free Software Foundation, Inc.
+# This file is distributed under the same license as the gnome-power-manager package.
+#
+# Matjaž Horvat <[email protected]>, 2006.
+# Matej Urbančič <[email protected]>, 2007 - 2010.
+#
+
+
+
+
+========== sr.po ==========
+# Serbian translation of gnome-power-manager
+# Courtesy of Prevod.org team (http://prevod.org/) -- 2006 - 2009.
+#
+# This file is distributed under the same license as the gnome-power-manager package.
+#
+# Maintainer: Милош Поповић <[email protected]>
+# Prevous maintainer: Slobodan D. Sredojevic <[email protected]>
+# Милош Поповић <[email protected]>, 2010.
+#
+
+
+
+
+========== [email protected] ==========
+# Serbian translation of gnome-power-manager
+# Courtesy of Prevod.org team (http://prevod.org/) -- 2006 - 2009.
+#
+# This file is distributed under the same license as the gnome-power-manager package.
+#
+# Maintainer: Miloš Popović <[email protected]>
+# Prevous maintainer: Slobodan D. Sredojevic <[email protected]>
+# Miloš Popović <[email protected]>, 2010.
+#
+
+
+
+
+========== sv.po ==========
+# Swedish messages for gnome-power-manager.
+# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# Christian Rose <[email protected]>, 2005.
+# Daniel Nylander <[email protected]>, 2006, 2007, 2008, 2009, 2010.
+#
+
+
+
+
+========== ta.po ==========
+# translation of gnome-power-manager.master.ta.po to Tamil
+# translation of gnome-power-manager.HEAD.ta.po to
+# translation of ta.po to
+# This file is distributed under the same license as the PACKAGE package.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
+#
+# Felix <[email protected]>, 2006.
+# Dr.T.Vasudevan <[email protected]>, 2007, 2009.
+# Dr.T.vasudevan <[email protected]>, 2009.
+# I. Felix <[email protected]>, 2009.
+# Dr,T,Vasudevan <[email protected]>, 2010.
+
+
+
+
+========== te.po ==========
+# translation of gnome-power-manager.master.te.po to Telugu
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Krishna Babu K <[email protected]>, 2009.
+
+
+
+
+========== th.po ==========
+# Thai translation of gnome-power-manager.
+# Copyright (C) 2005-2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the gnome-power-manager package.
+# Theppitak Karoonboonyanan <[email protected]>, 2005-2010.
+# Roys Hengwatanakul <[email protected]>, 2006.
+#
+#
+
+
+
+
+========== tr.po ==========
+# Turkish translation of Mate Power Manager.
+# Copyright (C) 2007 THE Mate Power Manager'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the Mate Power Manager package.
+#
+# Volkan Güney <[email protected]>, 2007.
+# Baris Cicek <[email protected]>, 2008, 2009.
+
+
+
+
+========== uk.po ==========
+# Ukrainian translation of gnome-power-manager
+# Copyright (C) 2005 Free Software Foundation, Inc.
+# Maxim Dziumanenko <[email protected]>, 2005-2010
+# wanderlust <[email protected]>, 2009.
+
+
+
+
+========== vi.po ==========
+# Vietnamese translation for GNOME Power Manager.
+# Copyright © 2009 GNOME i18n Project for Vietnamese.
+# Clytie Siddall <[email protected]>, 2005-2009.
+# Nguyễn Thái Ngọc Duy <[email protected]>, 2009.
+#
+
+
+
+
+========== zh_CN.po ==========
+# Simplified Chinese translation of gnome-power-manager.
+# Copyright (C) 2009 Free Software Foundation, Inc.
+# This file is distributed under the same license as the gnome-power-manager package.
+#
+# Funda Wang <[email protected]>, 2005, 2006.
+# Yang Zhang <[email protected]>, 2007
+# 甘露(Gan Lu) <[email protected]>, 2009.
+# Deng Xiyue <[email protected]>, 2009.
+# chainet <[email protected]>, 2009.
+# 陈醒(Chen Xing) <[email protected]>, 2010.
+#
+
+
+
+
+========== zh_HK.po ==========
+# Chinese (Hong Kong) translation for gnome-power-manager.
+# Copyright (C) 2006 Free Software Foundation, Inc.
+# Chao-Hsiung Liao <[email protected]>, 2006-2007
+# Woodman Tuen <[email protected]>, 2006
+# Hialan Liu <[email protected]>, 2008
+# Kevin_Wei_2 <[email protected]>, 2010.
+#
+#
+
+
+
+
+========== zh_TW.po ==========
+# Chinese (Taiwan) translation for gnome-power-manager.
+# Copyright (C) 2006 Free Software Foundation, Inc.
+# Chao-Hsiung Liao <[email protected]>, 2006-2007
+# Woodman Tuen <[email protected]>, 2006
+# Hialan Liu <[email protected]>, 2008
+# Kevin_Wei_2 <[email protected]>, 2010.
+#
+#
+
+
+
+
diff --git a/policy/Makefile.am b/policy/Makefile.am
index 1e239ba..4bab7f4 100644
--- a/policy/Makefile.am
+++ b/policy/Makefile.am
@@ -3,7 +3,7 @@ polkit_policy_DATA = \
org.mate.power.policy
# You will need a recent intltool or the patch from this bug
-# http://bugzilla.mate.org/show_bug.cgi?id=462312
+# http://bugzilla.gnome.org/show_bug.cgi?id=462312
@INTLTOOL_POLICY_RULE@
.in2.in:
diff --git a/src/Makefile.am b/src/Makefile.am
index 9aa8cdc..6393bbd 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -77,6 +77,8 @@ libgpmshared_a_SOURCES = \
egg-console-kit.c \
gpm-common.h \
gpm-common.c \
+ gpm-brightness.h \
+ gpm-brightness.c \
gpm-marshal.h \
gpm-marshal.c \
gpm-upower.c \
@@ -146,8 +148,6 @@ mate_power_manager_SOURCES = \
gpm-phone.c \
gpm-backlight.h \
gpm-backlight.c \
- gpm-prefs-server.h \
- gpm-prefs-server.c \
gpm-idle.h \
gpm-idle.c \
gpm-load.h \
@@ -158,8 +158,8 @@ mate_power_manager_SOURCES = \
gpm-control.c \
gpm-button.h \
gpm-button.c \
- gpm-brightness.h \
- gpm-brightness.c \
+ gpm-kbd-backlight.h \
+ gpm-kbd-backlight.c \
gpm-main.c \
gpm-manager.h \
gpm-manager.c \
@@ -218,8 +218,6 @@ mate_power_self_test_SOURCES = \
egg-array-float.c \
egg-console-kit.h \
egg-console-kit.c \
- gpm-prefs-server.h \
- gpm-prefs-server.c \
gpm-control.h \
gpm-control.c \
gpm-networkmanager.h \
diff --git a/src/gpm-backlight.c b/src/gpm-backlight.c
index c0479fd..573778a 100644
--- a/src/gpm-backlight.c
+++ b/src/gpm-backlight.c
@@ -39,7 +39,6 @@
#include <glib/gi18n.h>
#include <dbus/dbus-glib.h>
-#include <mateconf/mateconf-client.h>
#include <libupower-glib/upower.h>
#include "gpm-button.h"
@@ -53,7 +52,6 @@
#include "gpm-idle.h"
#include "gpm-marshal.h"
#include "gpm-stock-icons.h"
-#include "gpm-prefs-server.h"
#include "egg-console-kit.h"
#define GPM_BACKLIGHT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPM_TYPE_BACKLIGHT, GpmBacklightPrivate))
@@ -63,7 +61,7 @@ struct GpmBacklightPrivate
UpClient *client;
GpmBrightness *brightness;
GpmButton *button;
- MateConfClient *conf;
+ GSettings *settings;
GtkWidget *popup;
GpmControl *control;
GpmDpms *dpms;
@@ -289,7 +287,7 @@ gpm_backlight_brightness_evaluate_and_set (GpmBacklight *backlight, gboolean int
return FALSE;
}
- do_laptop_lcd = mateconf_client_get_bool (backlight->priv->conf, GPM_CONF_BACKLIGHT_ENABLE, NULL);
+ do_laptop_lcd = g_settings_get_boolean (backlight->priv->settings, GPM_SETTINGS_BACKLIGHT_ENABLE);
if (do_laptop_lcd == FALSE) {
egg_warning ("policy is no dimming");
return FALSE;
@@ -305,9 +303,9 @@ gpm_backlight_brightness_evaluate_and_set (GpmBacklight *backlight, gboolean int
NULL);
/* reduce if on battery power if we should */
- battery_reduce = mateconf_client_get_bool (backlight->priv->conf, GPM_CONF_BACKLIGHT_BATTERY_REDUCE, NULL);
+ battery_reduce = g_settings_get_boolean (backlight->priv->settings, GPM_SETTINGS_BACKLIGHT_BATTERY_REDUCE);
if (on_battery && battery_reduce) {
- value = mateconf_client_get_int (backlight->priv->conf, GPM_CONF_BACKLIGHT_BRIGHTNESS_DIM_BATT, NULL);
+ value = g_settings_get_int (backlight->priv->settings, GPM_SETTINGS_BRIGHTNESS_DIM_BATT);
if (value > 100) {
egg_warning ("cannot use battery brightness value %i, correcting to 50", value);
value = 50;
@@ -321,11 +319,11 @@ gpm_backlight_brightness_evaluate_and_set (GpmBacklight *backlight, gboolean int
/* reduce if system is momentarily idle */
if (!on_battery)
- enable_action = mateconf_client_get_bool (backlight->priv->conf, GPM_CONF_BACKLIGHT_IDLE_DIM_AC, NULL);
+ enable_action = g_settings_get_boolean (backlight->priv->settings, GPM_SETTINGS_IDLE_DIM_AC);
else
- enable_action = mateconf_client_get_bool (backlight->priv->conf, GPM_CONF_BACKLIGHT_IDLE_DIM_BATT, NULL);
+ enable_action = g_settings_get_boolean (backlight->priv->settings, GPM_SETTINGS_IDLE_DIM_BATT);
if (enable_action && backlight->priv->system_is_idle) {
- value = mateconf_client_get_int (backlight->priv->conf, GPM_CONF_BACKLIGHT_IDLE_BRIGHTNESS, NULL);
+ value = g_settings_get_int (backlight->priv->settings, GPM_SETTINGS_IDLE_BRIGHTNESS);
if (value > 100) {
egg_warning ("cannot use idle brightness value %i, correcting to 50", value);
value = 50;
@@ -365,44 +363,39 @@ gpm_backlight_brightness_evaluate_and_set (GpmBacklight *backlight, gboolean int
}
/**
- * gpm_conf_mateconf_key_changed_cb:
+ * gpm_settings_key_changed_cb:
*
- * We might have to do things when the mateconf keys change; do them here.
+ * We might have to do things when the keys change; do them here.
**/
static void
-gpm_conf_mateconf_key_changed_cb (MateConfClient *client, guint cnxn_id, MateConfEntry *entry, GpmBacklight *backlight)
+gpm_settings_key_changed_cb (GSettings *settings, const gchar *key, GpmBacklight *backlight)
{
- MateConfValue *value;
gboolean on_battery;
- value = mateconf_entry_get_value (entry);
- if (value == NULL)
- return;
-
/* get battery status */
g_object_get (backlight->priv->client,
"on-battery", &on_battery,
NULL);
- if (!on_battery && strcmp (entry->key, GPM_CONF_BACKLIGHT_BRIGHTNESS_AC) == 0) {
- backlight->priv->master_percentage = mateconf_value_get_int (value);
+ if (!on_battery && g_strcmp0 (key, GPM_SETTINGS_BRIGHTNESS_AC) == 0) {
+ backlight->priv->master_percentage = g_settings_get_double (settings, key);
gpm_backlight_brightness_evaluate_and_set (backlight, FALSE);
- } else if (on_battery && strcmp (entry->key, GPM_CONF_BACKLIGHT_BRIGHTNESS_DIM_BATT) == 0) {
+ } else if (on_battery && g_strcmp0 (key, GPM_SETTINGS_BRIGHTNESS_DIM_BATT) == 0) {
gpm_backlight_brightness_evaluate_and_set (backlight, FALSE);
- } else if (strcmp (entry->key, GPM_CONF_BACKLIGHT_IDLE_DIM_AC) == 0 ||
- strcmp (entry->key, GPM_CONF_BACKLIGHT_ENABLE) == 0 ||
- strcmp (entry->key, GPM_CONF_TIMEOUT_SLEEP_DISPLAY_BATT) == 0 ||
- strcmp (entry->key, GPM_CONF_BACKLIGHT_BATTERY_REDUCE) == 0 ||
- strcmp (entry->key, GPM_CONF_BACKLIGHT_IDLE_BRIGHTNESS) == 0) {
+ } else if (g_strcmp0 (key, GPM_SETTINGS_IDLE_DIM_AC) == 0 ||
+ g_strcmp0 (key, GPM_SETTINGS_BACKLIGHT_ENABLE) == 0 ||
+ g_strcmp0 (key, GPM_SETTINGS_SLEEP_DISPLAY_BATT) == 0 ||
+ g_strcmp0 (key, GPM_SETTINGS_BACKLIGHT_BATTERY_REDUCE) == 0 ||
+ g_strcmp0 (key, GPM_SETTINGS_IDLE_BRIGHTNESS) == 0) {
gpm_backlight_brightness_evaluate_and_set (backlight, FALSE);
- } else if (strcmp (entry->key, GPM_CONF_BACKLIGHT_IDLE_DIM_TIME) == 0) {
- backlight->priv->idle_dim_timeout = mateconf_value_get_int (value);
+ } else if (g_strcmp0 (key, GPM_SETTINGS_IDLE_DIM_TIME) == 0) {
+ backlight->priv->idle_dim_timeout = g_settings_get_int (settings, key);
gpm_idle_set_timeout_dim (backlight->priv->idle, backlight->priv->idle_dim_timeout);
} else {
- egg_debug ("unknown key %s", entry->key);
+ egg_debug ("unknown key %s", key);
}
}
@@ -435,7 +428,7 @@ gpm_backlight_button_pressed_cb (GpmButton *button, const gchar *type, GpmBackli
gboolean hw_changed;
egg_debug ("Button press event type=%s", type);
- if (strcmp (type, GPM_BUTTON_BRIGHT_UP) == 0) {
+ if (g_strcmp0 (type, GPM_BUTTON_BRIGHT_UP) == 0) {
/* go up one step */
ret = gpm_brightness_up (backlight->priv->brightness, &hw_changed);
@@ -454,7 +447,7 @@ gpm_backlight_button_pressed_cb (GpmButton *button, const gchar *type, GpmBackli
egg_debug ("emitting brightness-changed : %i", percentage);
g_signal_emit (backlight, signals [BRIGHTNESS_CHANGED], 0, percentage);
}
- } else if (strcmp (type, GPM_BUTTON_BRIGHT_DOWN) == 0) {
+ } else if (g_strcmp0 (type, GPM_BUTTON_BRIGHT_DOWN) == 0) {
/* go up down step */
ret = gpm_brightness_down (backlight->priv->brightness, &hw_changed);
@@ -473,7 +466,7 @@ gpm_backlight_button_pressed_cb (GpmButton *button, const gchar *type, GpmBackli
egg_debug ("emitting brightness-changed : %i", percentage);
g_signal_emit (backlight, signals [BRIGHTNESS_CHANGED], 0, percentage);
}
- } else if (strcmp (type, GPM_BUTTON_LID_OPEN) == 0) {
+ } else if (g_strcmp0 (type, GPM_BUTTON_LID_OPEN) == 0) {
/* make sure we undim when we lift the lid */
gpm_backlight_brightness_evaluate_and_set (backlight, FALSE);
@@ -521,8 +514,8 @@ gpm_backlight_notify_system_idle_changed (GpmBacklight *backlight, gboolean is_i
if (elapsed > 2*60) {
/* reset back to our default dimming */
backlight->priv->idle_dim_timeout =
- mateconf_client_get_int (backlight->priv->conf,
- GPM_CONF_BACKLIGHT_IDLE_DIM_TIME, NULL);
+ g_settings_get_int (backlight->priv->settings,
+ GPM_SETTINGS_IDLE_DIM_TIME);
egg_debug ("resetting idle dim time to %is", backlight->priv->idle_dim_timeout);
gpm_idle_set_timeout_dim (backlight->priv->idle, backlight->priv->idle_dim_timeout);
}
@@ -552,7 +545,6 @@ idle_changed_cb (GpmIdle *idle, GpmIdleMode mode, GpmBacklight *backlight)
gboolean ret;
GError *error = NULL;
gboolean on_battery;
- gchar *dpms_method;
GpmDpmsMode dpms_mode;
/* don't dim or undim the screen when the lid is closed */
@@ -601,16 +593,13 @@ idle_changed_cb (GpmIdle *idle, GpmIdleMode mode, GpmBacklight *backlight)
"on-battery", &on_battery,
NULL);
if (!on_battery)
- dpms_method = mateconf_client_get_string (backlight->priv->conf, GPM_CONF_BACKLIGHT_DPMS_METHOD_AC, NULL);
+ dpms_mode = g_settings_get_enum (backlight->priv->settings, GPM_SETTINGS_DPMS_METHOD_AC);
else
- dpms_method = mateconf_client_get_string (backlight->priv->conf, GPM_CONF_BACKLIGHT_DPMS_METHOD_BATT, NULL);
-
- /* convert the string types to standard types */
- dpms_mode = gpm_dpms_mode_from_string (dpms_method);
+ dpms_mode = g_settings_get_enum (backlight->priv->settings, GPM_SETTINGS_DPMS_METHOD_BATT);
/* check if method is valid */
if (dpms_mode == GPM_DPMS_MODE_UNKNOWN || dpms_mode == GPM_DPMS_MODE_ON) {
- egg_warning ("BACKLIGHT method %s unknown. Using OFF.", dpms_method);
+ egg_warning ("BACKLIGHT method %i unknown. Using OFF.", dpms_mode);
dpms_mode = GPM_DPMS_MODE_OFF;
}
@@ -621,7 +610,6 @@ idle_changed_cb (GpmIdle *idle, GpmIdleMode mode, GpmBacklight *backlight)
g_error_free (error);
}
- g_free (dpms_method);
}
}
@@ -681,7 +669,7 @@ gpm_backlight_finalize (GObject *object)
g_object_unref (backlight->priv->dpms);
g_object_unref (backlight->priv->control);
- g_object_unref (backlight->priv->conf);
+ g_object_unref (backlight->priv->settings);
g_object_unref (backlight->priv->client);
g_object_unref (backlight->priv->button);
g_object_unref (backlight->priv->idle);
@@ -724,9 +712,6 @@ gpm_backlight_class_init (GpmBacklightClass *klass)
static void
gpm_backlight_init (GpmBacklight *backlight)
{
- gboolean lid_is_present = TRUE;
- GpmPrefsServer *prefs_server;
-
backlight->priv = GPM_BACKLIGHT_GET_PRIVATE (backlight);
/* record our idle time */
@@ -745,31 +730,13 @@ gpm_backlight_init (GpmBacklight *backlight)
/* gets caps */
backlight->priv->can_dim = gpm_brightness_has_hw (backlight->priv->brightness);
- /* we use UPower to see if we should show the lid UI */
- g_object_get (backlight->priv->client,
- "lid-is-present", &lid_is_present,
- NULL);
-
- /* expose ui in prefs program */
- prefs_server = gpm_prefs_server_new ();
- if (lid_is_present)
- gpm_prefs_server_set_capability (prefs_server, GPM_PREFS_SERVER_LID);
- if (backlight->priv->can_dim)
- gpm_prefs_server_set_capability (prefs_server, GPM_PREFS_SERVER_BACKLIGHT);
- g_object_unref (prefs_server);
-
/* watch for dim value changes */
- backlight->priv->conf = mateconf_client_get_default ();
-
- /* watch mate-power-manager keys */
- mateconf_client_add_dir (backlight->priv->conf, GPM_CONF_DIR, MATECONF_CLIENT_PRELOAD_RECURSIVE, NULL);
- mateconf_client_notify_add (backlight->priv->conf, GPM_CONF_DIR,
- (MateConfClientNotifyFunc) gpm_conf_mateconf_key_changed_cb,
- backlight, NULL, NULL);
+ backlight->priv->settings = g_settings_new (GPM_SETTINGS_SCHEMA);
+ g_signal_connect (backlight->priv->settings, "changed", G_CALLBACK (gpm_settings_key_changed_cb), backlight);
/* set the main brightness, this is designed to be updated if the user changes the
* brightness so we can undim to the 'correct' value */
- backlight->priv->master_percentage = mateconf_client_get_int (backlight->priv->conf, GPM_CONF_BACKLIGHT_BRIGHTNESS_AC, NULL);
+ backlight->priv->master_percentage = g_settings_get_double (backlight->priv->settings, GPM_SETTINGS_BRIGHTNESS_AC);
/* watch for brightness up and down buttons and also check lid state */
backlight->priv->button = gpm_button_new ();
@@ -783,7 +750,7 @@ gpm_backlight_init (GpmBacklight *backlight)
/* assumption */
backlight->priv->system_is_idle = FALSE;
- backlight->priv->idle_dim_timeout = mateconf_client_get_int (backlight->priv->conf, GPM_CONF_BACKLIGHT_IDLE_DIM_TIME, NULL);
+ backlight->priv->idle_dim_timeout = g_settings_get_int (backlight->priv->settings, GPM_SETTINGS_IDLE_DIM_TIME);
gpm_idle_set_timeout_dim (backlight->priv->idle, backlight->priv->idle_dim_timeout);
/* use a visual widget */
diff --git a/src/gpm-common.c b/src/gpm-common.c
index 0d0e536..e7d1d66 100644
--- a/src/gpm-common.c
+++ b/src/gpm-common.c
@@ -79,88 +79,50 @@ gpm_get_timestring (guint time_secs)
}
/**
- * gpm_icon_policy_from_string:
- **/
-GpmIconPolicy
-gpm_icon_policy_from_string (const gchar *policy)
-{
- if (policy == NULL)
- return GPM_ICON_POLICY_NEVER;
- if (g_strcmp0 (policy, "always") == 0)
- return GPM_ICON_POLICY_ALWAYS;
- if (g_strcmp0 (policy, "present") == 0)
- return GPM_ICON_POLICY_PRESENT;
- if (g_strcmp0 (policy, "charge") == 0)
- return GPM_ICON_POLICY_CHARGE;
- if (g_strcmp0 (policy, "low") == 0)
- return GPM_ICON_POLICY_LOW;
- if (g_strcmp0 (policy, "critical") == 0)
- return GPM_ICON_POLICY_CRITICAL;
- if (g_strcmp0 (policy, "never") == 0)
- return GPM_ICON_POLICY_NEVER;
- return GPM_ICON_POLICY_NEVER;
-}
-
-/**
- * gpm_icon_policy_to_string:
+ * gpm_discrete_from_percent:
+ * @percentage: The percentage to convert
+ * @levels: The number of discrete levels
+ *
+ * We have to be carefull when converting from %->discrete as precision is very
+ * important if we want the highest value.
+ *
+ * Return value: The discrete value for this percentage.
**/
-const gchar *
-gpm_icon_policy_to_string (GpmIconPolicy policy)
+guint
+gpm_discrete_from_percent (guint percentage, guint levels)
{
- if (policy == GPM_ICON_POLICY_ALWAYS)
- return "always";
- if (policy == GPM_ICON_POLICY_PRESENT)
- return "present";
- if (policy == GPM_ICON_POLICY_CHARGE)
- return "charge";
- if (policy == GPM_ICON_POLICY_LOW)
- return "low";
- if (policy == GPM_ICON_POLICY_CRITICAL)
- return "critical";
- if (policy == GPM_ICON_POLICY_NEVER)
- return "never";
- return "never";
+ /* check we are in range */
+ if (percentage > 100)
+ return levels;
+ if (levels == 0) {
+ g_warning ("levels is 0!");
+ return 0;
+ }
+ return (guint) ((((gfloat) percentage * (gfloat) (levels - 1)) / 100.0f) + 0.5f);
}
/**
- * gpm_action_policy_from_string:
+ * gpm_discrete_to_percent:
+ * @hw: The discrete level
+ * @levels: The number of discrete levels
+ *
+ * We have to be carefull when converting from discrete->%.
+ *
+ * Return value: The percentage for this discrete value.
**/
-GpmActionPolicy
-gpm_action_policy_from_string (const gchar *policy)
+guint
+gpm_discrete_to_percent (guint discrete, guint levels)
{
- if (policy == NULL)
- return GPM_ACTION_POLICY_NOTHING;
- if (g_strcmp0 (policy, "blank") == 0)
- return GPM_ACTION_POLICY_BLANK;
- if (g_strcmp0 (policy, "shutdown") == 0)
- return GPM_ACTION_POLICY_SHUTDOWN;
- if (g_strcmp0 (policy, "suspend") == 0)
- return GPM_ACTION_POLICY_SUSPEND;
- if (g_strcmp0 (policy, "hibernate") == 0)
- return GPM_ACTION_POLICY_HIBERNATE;
- if (g_strcmp0 (policy, "interactive") == 0)
- return GPM_ACTION_POLICY_INTERACTIVE;
- return GPM_ACTION_POLICY_NOTHING;
+ /* check we are in range */
+ if (discrete > levels)
+ return 100;
+ if (levels == 0) {
+ g_warning ("levels is 0!");
+ return 0;
+ }
+ return (guint) (((gfloat) discrete * (100.0f / (gfloat) (levels - 1))) + 0.5f);
}
-/**
- * gpm_action_policy_to_string:
- **/
-const gchar *
-gpm_action_policy_to_string (GpmActionPolicy policy)
-{
- if (policy == GPM_ACTION_POLICY_BLANK)
- return "blank";
- if (policy == GPM_ACTION_POLICY_SHUTDOWN)
- return "shutdown";
- if (policy == GPM_ACTION_POLICY_SUSPEND)
- return "suspend";
- if (policy == GPM_ACTION_POLICY_HIBERNATE)
- return "hibernate";
- if (policy == GPM_ACTION_POLICY_INTERACTIVE)
- return "interactive";
- return "nothing";
-}
/**
* gpm_help_display:
diff --git a/src/gpm-common.h b/src/gpm-common.h
index e2733a8..ca4762c 100644
--- a/src/gpm-common.h
+++ b/src/gpm-common.h
@@ -31,124 +31,111 @@ G_BEGIN_DECLS
#define GPM_DBUS_INTERFACE_BACKLIGHT "org.mate.PowerManager.Backlight"
#define GPM_DBUS_PATH "/org/mate/PowerManager"
#define GPM_DBUS_PATH_BACKLIGHT "/org/mate/PowerManager/Backlight"
+#define GPM_DBUS_PATH_KBD_BACKLIGHT "/org/mate/PowerManager/KbdBacklight"
/* common descriptions of this program */
#define GPM_NAME _("Power Manager")
#define GPM_DESCRIPTION _("Power Manager for the MATE desktop")
-/* help location */
-#define GPM_HOMEPAGE_URL "http://www.mate.org/projects/mate-power-manager/"
-#define GPM_BUGZILLA_URL "http://bugzilla.mate.org/buglist.cgi?product=mate-power-manager"
-#define GPM_FAQ_URL "http://live.mate.org/MatePowerManager/Faq"
-
-/* change general/installed_schema whenever adding or moving keys */
-#define GPM_CONF_SCHEMA_ID 3
-
-#define GPM_CONF_DIR "/apps/mate-power-manager"
+/* schema location */
+#define GPM_SETTINGS_SCHEMA "org.mate.power-manager"
/* actions */
-#define GPM_CONF_ACTIONS_CRITICAL_UPS GPM_CONF_DIR "/actions/critical_ups"
-#define GPM_CONF_ACTIONS_CRITICAL_BATT GPM_CONF_DIR "/actions/critical_battery"
-#define GPM_CONF_ACTIONS_LOW_UPS GPM_CONF_DIR "/actions/low_ups"
-#define GPM_CONF_ACTIONS_SLEEP_TYPE_AC GPM_CONF_DIR "/actions/sleep_type_ac"
-#define GPM_CONF_ACTIONS_SLEEP_TYPE_BATT GPM_CONF_DIR "/actions/sleep_type_battery"
-#define GPM_CONF_ACTIONS_SLEEP_WHEN_CLOSED GPM_CONF_DIR "/actions/event_when_closed_battery"
+#define GPM_SETTINGS_ACTION_CRITICAL_UPS "action-critical-ups"
+#define GPM_SETTINGS_ACTION_CRITICAL_BATT "action-critical-battery"
+#define GPM_SETTINGS_ACTION_LOW_UPS "action-low-ups"
+#define GPM_SETTINGS_ACTION_SLEEP_TYPE_AC "action-sleep-type-ac"
+#define GPM_SETTINGS_ACTION_SLEEP_TYPE_BATT "action-sleep-type-battery"
+#define GPM_SETTINGS_SLEEP_WHEN_CLOSED "event-when-closed-battery"
/* backlight stuff */
-#define GPM_CONF_BACKLIGHT_ENABLE GPM_CONF_DIR "/backlight/enable"
-#define GPM_CONF_BACKLIGHT_BATTERY_REDUCE GPM_CONF_DIR "/backlight/battery_reduce"
-#define GPM_CONF_BACKLIGHT_DPMS_METHOD_AC GPM_CONF_DIR "/backlight/dpms_method_ac"
-#define GPM_CONF_BACKLIGHT_DPMS_METHOD_BATT GPM_CONF_DIR "/backlight/dpms_method_battery"
-#define GPM_CONF_BACKLIGHT_IDLE_BRIGHTNESS GPM_CONF_DIR "/backlight/idle_brightness"
-#define GPM_CONF_BACKLIGHT_IDLE_DIM_AC GPM_CONF_DIR "/backlight/idle_dim_ac"
-#define GPM_CONF_BACKLIGHT_IDLE_DIM_BATT GPM_CONF_DIR "/backlight/idle_dim_battery"
-#define GPM_CONF_BACKLIGHT_IDLE_DIM_TIME GPM_CONF_DIR "/backlight/idle_dim_time"
-#define GPM_CONF_BACKLIGHT_BRIGHTNESS_AC GPM_CONF_DIR "/backlight/brightness_ac"
-#define GPM_CONF_BACKLIGHT_BRIGHTNESS_DIM_BATT GPM_CONF_DIR "/backlight/brightness_dim_battery"
+#define GPM_SETTINGS_BACKLIGHT_ENABLE "backlight-enable"
+#define GPM_SETTINGS_BACKLIGHT_BATTERY_REDUCE "backlight-battery-reduce"
+#define GPM_SETTINGS_DPMS_METHOD_AC "dpms-method-ac"
+#define GPM_SETTINGS_DPMS_METHOD_BATT "dpms-method-battery"
+#define GPM_SETTINGS_IDLE_BRIGHTNESS "idle-brightness"
+#define GPM_SETTINGS_IDLE_DIM_AC "idle-dim-ac"
+#define GPM_SETTINGS_IDLE_DIM_BATT "idle-dim-battery"
+#define GPM_SETTINGS_IDLE_DIM_TIME "idle-dim-time"
+#define GPM_SETTINGS_BRIGHTNESS_AC "brightness-ac"
+#define GPM_SETTINGS_BRIGHTNESS_DIM_BATT "brightness-dim-battery"
+
+/* keyboard backlight */
+#define GPM_SETTINGS_KBD_BACKLIGHT_BATT_REDUCE "kbd-backlight-battery-reduce"
+#define GPM_SETTINGS_KBD_BRIGHTNESS_ON_AC "kbd-brightness-on-ac"
+#define GPM_SETTINGS_KBD_BRIGHTNESS_DIM_BY_ON_BATT "kbd-brightness-dim-by-on-battery"
+#define GPM_SETTINGS_KBD_BRIGHTNESS_DIM_BY_ON_IDLE "kbd-brightness-dim-by-on-idle"
/* buttons */
-#define GPM_CONF_BUTTON_LID_AC GPM_CONF_DIR "/buttons/lid_ac"
-#define GPM_CONF_BUTTON_LID_BATT GPM_CONF_DIR "/buttons/lid_battery"
-#define GPM_CONF_BUTTON_SUSPEND GPM_CONF_DIR "/buttons/suspend"
-#define GPM_CONF_BUTTON_HIBERNATE GPM_CONF_DIR "/buttons/hibernate"
-#define GPM_CONF_BUTTON_POWER GPM_CONF_DIR "/buttons/power"
+#define GPM_SETTINGS_BUTTON_LID_AC "button-lid-ac"
+#define GPM_SETTINGS_BUTTON_LID_BATT "button-lid-battery"
+#define GPM_SETTINGS_BUTTON_SUSPEND "button-suspend"
+#define GPM_SETTINGS_BUTTON_HIBERNATE "button-hibernate"
+#define GPM_SETTINGS_BUTTON_POWER "button-power"
/* general */
-#define GPM_CONF_SCHEMA_VERSION GPM_CONF_DIR "/general/installed_schema"
-#define GPM_CONF_USE_TIME_POLICY GPM_CONF_DIR "/general/use_time_for_policy"
-#define GPM_CONF_USE_PROFILE_TIME GPM_CONF_DIR "/general/use_profile_time"
-#define GPM_CONF_NETWORKMANAGER_SLEEP GPM_CONF_DIR "/general/network_sleep"
-#define GPM_CONF_IDLE_CHECK_CPU GPM_CONF_DIR "/general/check_type_cpu"
-#define GPM_CONF_LAPTOP_USES_EXT_MON GPM_CONF_DIR "/general/using_external_monitor"
+#define GPM_SETTINGS_USE_TIME_POLICY "use-time-for-policy"
+#define GPM_SETTINGS_NETWORKMANAGER_SLEEP "network-sleep"
+#define GPM_SETTINGS_IDLE_CHECK_CPU "check-type-cpu"
/* lock */
-#define GPM_CONF_LOCK_USE_SCREENSAVER GPM_CONF_DIR "/lock/use_screensaver_settings"
-#define GPM_CONF_LOCK_ON_BLANK_SCREEN GPM_CONF_DIR "/lock/blank_screen"
-#define GPM_CONF_LOCK_ON_SUSPEND GPM_CONF_DIR "/lock/suspend"
-#define GPM_CONF_LOCK_ON_HIBERNATE GPM_CONF_DIR "/lock/hibernate"
-#define GPM_CONF_LOCK_MATE_KEYRING_SUSPEND GPM_CONF_DIR "/lock/mate_keyring_suspend"
-#define GPM_CONF_LOCK_MATE_KEYRING_HIBERNATE GPM_CONF_DIR "/lock/mate_keyring_hibernate"
+#define GPM_SETTINGS_LOCK_USE_SCREENSAVER "lock-use-screensaver"
+#define GPM_SETTINGS_LOCK_ON_BLANK_SCREEN "lock-blank-screen"
+#define GPM_SETTINGS_LOCK_ON_SUSPEND "lock-suspend"
+#define GPM_SETTINGS_LOCK_ON_HIBERNATE "lock-hibernate"
+#define GPM_SETTINGS_LOCK_KEYRING_SUSPEND "lock-keyring-suspend"
+#define GPM_SETTINGS_LOCK_KEYRING_HIBERNATE "lock-keyring-hibernate"
/* disks */
-#define GPM_CONF_DISKS_SPINDOWN_ENABLE_AC GPM_CONF_DIR "/disks/spindown_enable_ac"
-#define GPM_CONF_DISKS_SPINDOWN_ENABLE_BATT GPM_CONF_DIR "/disks/spindown_enable_battery"
-#define GPM_CONF_DISKS_SPINDOWN_TIMEOUT_AC GPM_CONF_DIR "/disks/spindown_timeout_ac"
-#define GPM_CONF_DISKS_SPINDOWN_TIMEOUT_BATT GPM_CONF_DIR "/disks/spindown_timeout_battery"
+#define GPM_SETTINGS_SPINDOWN_ENABLE_AC "spindown-enable-ac"
+#define GPM_SETTINGS_SPINDOWN_ENABLE_BATT "spindown-enable-battery"
+#define GPM_SETTINGS_SPINDOWN_TIMEOUT_AC "spindown-timeout-ac"
+#define GPM_SETTINGS_SPINDOWN_TIMEOUT_BATT "spindown-timeout-battery"
/* notify */
-#define GPM_CONF_NOTIFY_PERHAPS_RECALL GPM_CONF_DIR "/notify/perhaps_recall"
-#define GPM_CONF_NOTIFY_LOW_CAPACITY GPM_CONF_DIR "/notify/low_capacity"
-#define GPM_CONF_NOTIFY_DISCHARGING GPM_CONF_DIR "/notify/discharging"
-#define GPM_CONF_NOTIFY_FULLY_CHARGED GPM_CONF_DIR "/notify/fully_charged"
-#define GPM_CONF_NOTIFY_SLEEP_FAILED GPM_CONF_DIR "/notify/sleep_failed"
-#define GPM_CONF_NOTIFY_SLEEP_FAILED_URI GPM_CONF_DIR "/notify/sleep_failed_uri"
-#define GPM_CONF_NOTIFY_LOW_POWER GPM_CONF_DIR "/notify/low_power"
-
-/* statistics */
-#define GPM_CONF_STATS_SHOW_AXIS_LABELS GPM_CONF_DIR "/statistics/show_axis_labels"
-#define GPM_CONF_STATS_SHOW_EVENTS GPM_CONF_DIR "/statistics/show_events"
-#define GPM_CONF_STATS_SMOOTH_DATA GPM_CONF_DIR "/statistics/smooth_data"
-#define GPM_CONF_STATS_GRAPH_TYPE GPM_CONF_DIR "/statistics/graph_type"
-#define GPM_CONF_STATS_MAX_TIME GPM_CONF_DIR "/statistics/data_max_time"
+#define GPM_SETTINGS_NOTIFY_PERHAPS_RECALL "notify-perhaps-recall"
+#define GPM_SETTINGS_NOTIFY_LOW_CAPACITY "notify-low-capacity"
+#define GPM_SETTINGS_NOTIFY_DISCHARGING "notify-discharging"
+#define GPM_SETTINGS_NOTIFY_FULLY_CHARGED "notify-fully-charged"
+#define GPM_SETTINGS_NOTIFY_SLEEP_FAILED "notify-sleep-failed"
+#define GPM_SETTINGS_NOTIFY_SLEEP_FAILED_URI "notify-sleep-failed-uri"
+#define GPM_SETTINGS_NOTIFY_LOW_POWER "notify-low-power"
/* thresholds */
-#define GPM_CONF_THRESH_PERCENTAGE_LOW GPM_CONF_DIR "/thresholds/percentage_low"
-#define GPM_CONF_THRESH_PERCENTAGE_CRITICAL GPM_CONF_DIR "/thresholds/percentage_critical"
-#define GPM_CONF_THRESH_PERCENTAGE_ACTION GPM_CONF_DIR "/thresholds/percentage_action"
-#define GPM_CONF_THRESH_TIME_LOW GPM_CONF_DIR "/thresholds/time_low"
-#define GPM_CONF_THRESH_TIME_CRITICAL GPM_CONF_DIR "/thresholds/time_critical"
-#define GPM_CONF_THRESH_TIME_ACTION GPM_CONF_DIR "/thresholds/time_action"
+#define GPM_SETTINGS_PERCENTAGE_LOW "percentage-low"
+#define GPM_SETTINGS_PERCENTAGE_CRITICAL "percentage-critical"
+#define GPM_SETTINGS_PERCENTAGE_ACTION "percentage-action"
+#define GPM_SETTINGS_TIME_LOW "time-low"
+#define GPM_SETTINGS_TIME_CRITICAL "time-critical"
+#define GPM_SETTINGS_TIME_ACTION "time-action"
/* timeout */
-#define GPM_CONF_TIMEOUT_SLEEP_COMPUTER_AC GPM_CONF_DIR "/timeout/sleep_computer_ac"
-#define GPM_CONF_TIMEOUT_SLEEP_COMPUTER_BATT GPM_CONF_DIR "/timeout/sleep_computer_battery"
-#define GPM_CONF_TIMEOUT_SLEEP_COMPUTER_UPS GPM_CONF_DIR "/timeout/sleep_computer_ups"
-#define GPM_CONF_TIMEOUT_SLEEP_DISPLAY_AC GPM_CONF_DIR "/timeout/sleep_display_ac"
-#define GPM_CONF_TIMEOUT_SLEEP_DISPLAY_BATT GPM_CONF_DIR "/timeout/sleep_display_battery"
-#define GPM_CONF_TIMEOUT_SLEEP_DISPLAY_UPS GPM_CONF_DIR "/timeout/sleep_display_ups"
+#define GPM_SETTINGS_SLEEP_COMPUTER_AC "sleep-computer-ac"
+#define GPM_SETTINGS_SLEEP_COMPUTER_BATT "sleep-computer-battery"
+#define GPM_SETTINGS_SLEEP_COMPUTER_UPS "sleep-computer-ups"
+#define GPM_SETTINGS_SLEEP_DISPLAY_AC "sleep-display-ac"
+#define GPM_SETTINGS_SLEEP_DISPLAY_BATT "sleep-display-battery"
+#define GPM_SETTINGS_SLEEP_DISPLAY_UPS "sleep-display-ups"
/* ui */
-#define GPM_CONF_UI_ICON_POLICY GPM_CONF_DIR "/ui/icon_policy"
-#define GPM_CONF_UI_ENABLE_SOUND GPM_CONF_DIR "/ui/enable_sound"
-#define GPM_CONF_UI_SHOW_ACTIONS GPM_CONF_DIR "/ui/show_actions"
-
-/* new info binary */
-#define GPM_CONF_INFO_HISTORY_TIME "/apps/mate-power-manager/info/history_time"
-#define GPM_CONF_INFO_HISTORY_TYPE "/apps/mate-power-manager/info/history_type"
-#define GPM_CONF_INFO_HISTORY_GRAPH_SMOOTH "/apps/mate-power-manager/info/history_graph_smooth"
-#define GPM_CONF_INFO_HISTORY_GRAPH_POINTS "/apps/mate-power-manager/info/history_graph_points"
-#define GPM_CONF_INFO_STATS_TYPE "/apps/mate-power-manager/info/stats_type"
-#define GPM_CONF_INFO_STATS_GRAPH_SMOOTH "/apps/mate-power-manager/info/stats_graph_smooth"
-#define GPM_CONF_INFO_STATS_GRAPH_POINTS "/apps/mate-power-manager/info/stats_graph_points"
-#define GPM_CONF_INFO_PAGE_NUMBER "/apps/mate-power-manager/info/page_number"
-#define GPM_CONF_INFO_LAST_DEVICE "/apps/mate-power-manager/info/last_device"
+#define GPM_SETTINGS_ICON_POLICY "icon-policy"
+#define GPM_SETTINGS_ENABLE_SOUND "enable-sound"
+#define GPM_SETTINGS_SHOW_ACTIONS "show-actions"
-/* mate-screensaver */
-#define GS_CONF_DIR "/apps/mate-screensaver"
-#define GS_PREF_LOCK_ENABLED GS_CONF_DIR "/lock_enabled"
+/* statistics */
+#define GPM_SETTINGS_INFO_HISTORY_TIME "info-history-time"
+#define GPM_SETTINGS_INFO_HISTORY_TYPE "info-history-type"
+#define GPM_SETTINGS_INFO_HISTORY_GRAPH_SMOOTH "info-history-graph-smooth"
+#define GPM_SETTINGS_INFO_HISTORY_GRAPH_POINTS "info-history-graph-points"
+#define GPM_SETTINGS_INFO_STATS_TYPE "info-stats-type"
+#define GPM_SETTINGS_INFO_STATS_GRAPH_SMOOTH "info-stats-graph-smooth"
+#define GPM_SETTINGS_INFO_STATS_GRAPH_POINTS "info-stats-graph-points"
+#define GPM_SETTINGS_INFO_PAGE_NUMBER "info-page-number"
+#define GPM_SETTINGS_INFO_LAST_DEVICE "info-last-device"
-/* mate-session */
-#define GPM_CONF_IDLE_DELAY "/desktop/mate/session/idle_delay"
+/* mate-screensaver */
+#define GS_SETTINGS_SCHEMA "org.mate.screensaver"
+#define GS_SETTINGS_PREF_LOCK_ENABLED "lock-enabled"
typedef enum {
GPM_ICON_POLICY_ALWAYS,
@@ -169,10 +156,10 @@ typedef enum {
} GpmActionPolicy;
gchar *gpm_get_timestring (guint time);
-GpmIconPolicy gpm_icon_policy_from_string (const gchar *policy);
-const gchar *gpm_icon_policy_to_string (GpmIconPolicy policy);
-GpmActionPolicy gpm_action_policy_from_string (const gchar *policy);
-const gchar *gpm_action_policy_to_string (GpmActionPolicy policy);
+guint gpm_discrete_from_percent (guint percentage,
+ guint levels);
+guint gpm_discrete_to_percent (guint discrete,
+ guint levels);
void gpm_help_display (const gchar *link_id);
#ifdef EGG_TEST
void gpm_common_test (gpointer data);
diff --git a/src/gpm-control.c b/src/gpm-control.c
index 50212b8..4b6c959 100644
--- a/src/gpm-control.c
+++ b/src/gpm-control.c
@@ -40,7 +40,6 @@
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
#include <mate-keyring.h>
-#include <mateconf/mateconf-client.h>
#include <libupower-glib/upower.h>
#include "egg-debug.h"
@@ -55,7 +54,7 @@
struct GpmControlPrivate
{
- MateConfClient *conf;
+ GSettings *settings;
UpClient *client;
};
@@ -103,7 +102,7 @@ gpm_control_shutdown (GpmControl *control, GError **error)
/**
* gpm_control_get_lock_policy:
* @control: This class instance
- * @policy: The policy mateconf string.
+ * @policy: The policy string.
*
* This function finds out if we should lock the screen when we do an
* action. It is required as we can either use the mate-screensaver policy
@@ -116,15 +115,33 @@ gpm_control_get_lock_policy (GpmControl *control, const gchar *policy)
{
gboolean do_lock;
gboolean use_ss_setting;
- /* This allows us to over-ride the custom lock settings set in mateconf
+ const char * const *schemas;
+ gboolean schema_exists;
+ gint i;
+
+ /* Check if the mate-screensaver schema exists before trying to read
+ the lock setting to prevent crashing. See GNOME bug #651225. */
+ schemas = g_settings_list_schemas ();
+ schema_exists = FALSE;
+ for (i = 0; schemas[i] != NULL; i++) {
+ if (g_strcmp0 (schemas[i], GS_SETTINGS_SCHEMA) == 0) {
+ schema_exists = TRUE;
+ break;
+ }
+ }
+
+ /* This allows us to over-ride the custom lock settings set
with a system default set in mate-screensaver.
See bug #331164 for all the juicy details. :-) */
- use_ss_setting = mateconf_client_get_bool (control->priv->conf, GPM_CONF_LOCK_USE_SCREENSAVER, NULL);
- if (use_ss_setting) {
- do_lock = mateconf_client_get_bool (control->priv->conf, GS_PREF_LOCK_ENABLED, NULL);
+ use_ss_setting = g_settings_get_boolean (control->priv->settings, GPM_SETTINGS_LOCK_USE_SCREENSAVER);
+ if (use_ss_setting && schema_exists) {
+ GSettings *settings_ss;
+ settings_ss = g_settings_new (GS_SETTINGS_SCHEMA);
+ do_lock = g_settings_get_boolean (settings_ss, GS_SETTINGS_PREF_LOCK_ENABLED);
egg_debug ("Using ScreenSaver settings (%i)", do_lock);
+ g_object_unref (settings_ss);
} else {
- do_lock = mateconf_client_get_bool (control->priv->conf, policy, NULL);
+ do_lock = g_settings_get_boolean (control->priv->settings, policy);
egg_debug ("Using custom locking settings (%i)", do_lock);
}
return do_lock;
@@ -157,20 +174,20 @@ gpm_control_suspend (GpmControl *control, GError **error)
}
/* we should perhaps lock keyrings when sleeping #375681 */
- lock_mate_keyring = mateconf_client_get_bool (control->priv->conf, GPM_CONF_LOCK_MATE_KEYRING_SUSPEND, NULL);
+ lock_mate_keyring = g_settings_get_boolean (control->priv->settings, GPM_SETTINGS_LOCK_KEYRING_SUSPEND);
if (lock_mate_keyring) {
keyres = mate_keyring_lock_all_sync ();
if (keyres != MATE_KEYRING_RESULT_OK)
egg_warning ("could not lock keyring");
}
- do_lock = gpm_control_get_lock_policy (control, GPM_CONF_LOCK_ON_SUSPEND);
+ do_lock = gpm_control_get_lock_policy (control, GPM_SETTINGS_LOCK_ON_SUSPEND);
if (do_lock) {
throttle_cookie = gpm_screensaver_add_throttle (screensaver, "suspend");
gpm_screensaver_lock (screensaver);
}
- nm_sleep = mateconf_client_get_bool (control->priv->conf, GPM_CONF_NETWORKMANAGER_SLEEP, NULL);
+ nm_sleep = g_settings_get_boolean (control->priv->settings, GPM_SETTINGS_NETWORKMANAGER_SLEEP);
if (nm_sleep)
gpm_networkmanager_sleep ();
@@ -189,7 +206,7 @@ gpm_control_suspend (GpmControl *control, GError **error)
gpm_screensaver_remove_throttle (screensaver, throttle_cookie);
}
- nm_sleep = mateconf_client_get_bool (control->priv->conf, GPM_CONF_NETWORKMANAGER_SLEEP, NULL);
+ nm_sleep = g_settings_get_boolean (control->priv->settings, GPM_SETTINGS_NETWORKMANAGER_SLEEP);
if (nm_sleep)
gpm_networkmanager_wake ();
@@ -225,7 +242,7 @@ gpm_control_hibernate (GpmControl *control, GError **error)
}
/* we should perhaps lock keyrings when sleeping #375681 */
- lock_mate_keyring = mateconf_client_get_bool (control->priv->conf, GPM_CONF_LOCK_MATE_KEYRING_HIBERNATE, NULL);
+ lock_mate_keyring = g_settings_get_boolean (control->priv->settings, GPM_SETTINGS_LOCK_KEYRING_HIBERNATE);
if (lock_mate_keyring) {
keyres = mate_keyring_lock_all_sync ();
if (keyres != MATE_KEYRING_RESULT_OK) {
@@ -233,13 +250,13 @@ gpm_control_hibernate (GpmControl *control, GError **error)
}
}
- do_lock = gpm_control_get_lock_policy (control, GPM_CONF_LOCK_ON_HIBERNATE);
+ do_lock = gpm_control_get_lock_policy (control, GPM_SETTINGS_LOCK_ON_HIBERNATE);
if (do_lock) {
throttle_cookie = gpm_screensaver_add_throttle (screensaver, "hibernate");
gpm_screensaver_lock (screensaver);
}
- nm_sleep = mateconf_client_get_bool (control->priv->conf, GPM_CONF_NETWORKMANAGER_SLEEP, NULL);
+ nm_sleep = g_settings_get_boolean (control->priv->settings, GPM_SETTINGS_NETWORKMANAGER_SLEEP);
if (nm_sleep)
gpm_networkmanager_sleep ();
@@ -257,7 +274,7 @@ gpm_control_hibernate (GpmControl *control, GError **error)
gpm_screensaver_remove_throttle (screensaver, throttle_cookie);
}
- nm_sleep = mateconf_client_get_bool (control->priv->conf, GPM_CONF_NETWORKMANAGER_SLEEP, NULL);
+ nm_sleep = g_settings_get_boolean (control->priv->settings, GPM_SETTINGS_NETWORKMANAGER_SLEEP);
if (nm_sleep)
gpm_networkmanager_wake ();
@@ -278,7 +295,7 @@ gpm_control_finalize (GObject *object)
g_return_if_fail (GPM_IS_CONTROL (object));
control = GPM_CONTROL (object);
- g_object_unref (control->priv->conf);
+ g_object_unref (control->priv->settings);
g_object_unref (control->priv->client);
g_return_if_fail (control->priv != NULL);
@@ -326,7 +343,7 @@ gpm_control_init (GpmControl *control)
control->priv = GPM_CONTROL_GET_PRIVATE (control);
control->priv->client = up_client_new ();
- control->priv->conf = mateconf_client_get_default ();
+ control->priv->settings = g_settings_new (GPM_SETTINGS_SCHEMA);
}
/**
diff --git a/src/gpm-dpms.c b/src/gpm-dpms.c
index 13928f9..8eaf704 100644
--- a/src/gpm-dpms.c
+++ b/src/gpm-dpms.c
@@ -190,53 +190,6 @@ gpm_dpms_x11_set_mode (GpmDpms *dpms, GpmDpmsMode mode, GError **error)
}
/**
- * gpm_dpms_mode_from_string:
- **/
-GpmDpmsMode
-gpm_dpms_mode_from_string (const gchar *str)
-{
- if (str == NULL)
- return GPM_DPMS_MODE_UNKNOWN;
- if (strcmp (str, "on") == 0)
- return GPM_DPMS_MODE_ON;
- if (strcmp (str, "standby") == 0)
- return GPM_DPMS_MODE_STANDBY;
- if (strcmp (str, "suspend") == 0)
- return GPM_DPMS_MODE_SUSPEND;
- if (strcmp (str, "off") == 0)
- return GPM_DPMS_MODE_OFF;
- return GPM_DPMS_MODE_UNKNOWN;
-}
-
-/**
- * gpm_dpms_mode_to_string:
- **/
-const gchar *
-gpm_dpms_mode_to_string (GpmDpmsMode mode)
-{
- const gchar *str = NULL;
-
- switch (mode) {
- case GPM_DPMS_MODE_ON:
- str = "on";
- break;
- case GPM_DPMS_MODE_STANDBY:
- str = "standby";
- break;
- case GPM_DPMS_MODE_SUSPEND:
- str = "suspend";
- break;
- case GPM_DPMS_MODE_OFF:
- str = "off";
- break;
- default:
- str = NULL;
- break;
- }
- return str;
-}
-
-/**
* gpm_dpms_set_mode:
**/
gboolean
diff --git a/src/gpm-dpms.h b/src/gpm-dpms.h
index 95cd226..b6218fc 100644
--- a/src/gpm-dpms.h
+++ b/src/gpm-dpms.h
@@ -71,8 +71,6 @@ gboolean gpm_dpms_get_mode (GpmDpms *dpms,
gboolean gpm_dpms_set_mode (GpmDpms *dpms,
GpmDpmsMode mode,
GError **error);
-const gchar *gpm_dpms_mode_to_string (GpmDpmsMode mode);
-GpmDpmsMode gpm_dpms_mode_from_string (const gchar *mode);
void gpm_dpms_test (gpointer data);
G_END_DECLS
diff --git a/src/gpm-engine.c b/src/gpm-engine.c
index 1ca78b8..0f9d0c1 100644
--- a/src/gpm-engine.c
+++ b/src/gpm-engine.c
@@ -24,7 +24,6 @@
#include <string.h>
#include <glib.h>
#include <glib/gi18n.h>
-#include <mateconf/mateconf-client.h>
#include <libupower-glib/upower.h>
#include "egg-debug.h"
@@ -34,7 +33,6 @@
#include "gpm-marshal.h"
#include "gpm-engine.h"
#include "gpm-stock-icons.h"
-#include "gpm-prefs-server.h"
#include "gpm-phone.h"
static void gpm_engine_finalize (GObject *object);
@@ -45,7 +43,7 @@ static void gpm_engine_finalize (GObject *object);
struct GpmEnginePrivate
{
- MateConfClient *conf;
+ GSettings *settings;
UpClient *client;
UpDevice *battery_composite;
GPtrArray *array;
@@ -510,30 +508,19 @@ gpm_engine_recalculate_state (GpmEngine *engine)
}
/**
- * gpm_engine_conf_key_changed_cb:
+ * gpm_engine_settings_key_changed_cb:
**/
static void
-gpm_engine_conf_key_changed_cb (MateConfClient *conf, guint cnxn_id, MateConfEntry *entry, GpmEngine *engine)
+gpm_engine_settings_key_changed_cb (GSettings *settings, const gchar *key, GpmEngine *engine)
{
- MateConfValue *value;
- gchar *icon_policy;
- if (entry == NULL)
- return;
- value = mateconf_entry_get_value (entry);
- if (value == NULL)
- return;
-
- if (strcmp (entry->key, GPM_CONF_USE_TIME_POLICY) == 0) {
+ if (g_strcmp0 (key, GPM_SETTINGS_USE_TIME_POLICY) == 0) {
+ engine->priv->use_time_primary = g_settings_get_boolean (settings, key);
- engine->priv->use_time_primary = mateconf_value_get_bool (value);
-
- } else if (strcmp (entry->key, GPM_CONF_UI_ICON_POLICY) == 0) {
+ } else if (g_strcmp0 (key, GPM_SETTINGS_ICON_POLICY) == 0) {
/* do we want to display the icon in the tray */
- icon_policy = mateconf_client_get_string (conf, GPM_CONF_UI_ICON_POLICY, NULL);
- engine->priv->icon_policy = gpm_icon_policy_from_string (icon_policy);
- g_free (icon_policy);
+ engine->priv->icon_policy = g_settings_get_enum (settings, key);
/* perhaps change icon */
gpm_engine_recalculate_state_icon (engine);
@@ -568,8 +555,8 @@ gpm_engine_device_check_capacity (GpmEngine *engine, UpDevice *device)
if (capacity < 1.0f)
return FALSE;
- /* only emit this if specified in mateconf */
- ret = mateconf_client_get_bool (engine->priv->conf, GPM_CONF_NOTIFY_LOW_CAPACITY, NULL);
+ /* only emit this if specified in the settings */
+ ret = g_settings_get_boolean (engine->priv->settings, GPM_SETTINGS_NOTIFY_LOW_CAPACITY);
if (ret) {
egg_debug ("** EMIT: low-capacity");
g_signal_emit (engine, signals [LOW_CAPACITY], 0, device);
@@ -816,12 +803,8 @@ static gboolean
gpm_engine_coldplug_idle_cb (GpmEngine *engine)
{
guint i;
- GPtrArray *array;
- gboolean has_battery = FALSE;
- gboolean has_ups = FALSE;
- GpmPrefsServer *prefs_server;
+ GPtrArray *array = NULL;
UpDevice *device;
- UpDeviceKind kind;
gboolean ret;
GError *error = NULL;
@@ -835,31 +818,6 @@ gpm_engine_coldplug_idle_cb (GpmEngine *engine)
g_error_free (error);
goto out;
}
- engine->priv->array = up_client_get_devices (engine->priv->client);
-
- /* do we have specific device types? */
- array = engine->priv->array;
- for (i=0;i<array->len;i++) {
- device = g_ptr_array_index (engine->priv->array, i);
-
- /* get device properties */
- g_object_get (device,
- "kind", &kind,
- NULL);
-
- if (kind == UP_DEVICE_KIND_BATTERY)
- has_battery = TRUE;
- else if (kind == UP_DEVICE_KIND_UPS)
- has_ups = TRUE;
- }
-
- /* only show the battery prefs section if we have batteries */
- prefs_server = gpm_prefs_server_new ();
- if (has_battery)
- gpm_prefs_server_set_capability (prefs_server, GPM_PREFS_SERVER_BATTERY);
- if (has_ups)
- gpm_prefs_server_set_capability (prefs_server, GPM_PREFS_SERVER_UPS);
- g_object_unref (prefs_server);
/* connected mobile phones */
gpm_phone_coldplug (engine->priv->phone);
@@ -867,12 +825,15 @@ gpm_engine_coldplug_idle_cb (GpmEngine *engine)
gpm_engine_recalculate_state (engine);
/* add to database */
+ array = up_client_get_devices (engine->priv->client);
for (i=0;i<array->len;i++) {
- device = g_ptr_array_index (engine->priv->array, i);
+ device = g_ptr_array_index (array, i);
gpm_engine_device_add (engine, device);
gpm_engine_check_recall (engine, device);
}
out:
+ if (array != NULL)
+ g_ptr_array_unref (array);
/* never repeat */
return FALSE;
}
@@ -1081,7 +1042,6 @@ phone_device_refresh_cb (GpmPhone *phone, guint idx, GpmEngine *engine)
static void
gpm_engine_init (GpmEngine *engine)
{
- gchar *icon_policy;
engine->priv = GPM_ENGINE_GET_PRIVATE (engine);
@@ -1094,10 +1054,9 @@ gpm_engine_init (GpmEngine *engine)
g_signal_connect (engine->priv->client, "device-changed",
G_CALLBACK (gpm_engine_device_changed_cb), engine);
- engine->priv->conf = mateconf_client_get_default ();
- mateconf_client_notify_add (engine->priv->conf, GPM_CONF_DIR,
- (MateConfClientNotifyFunc) gpm_engine_conf_key_changed_cb,
- engine, NULL, NULL);
+ engine->priv->settings = g_settings_new (GPM_SETTINGS_SCHEMA);
+ g_signal_connect (engine->priv->settings, "changed",
+ G_CALLBACK (gpm_engine_settings_key_changed_cb), engine);
engine->priv->phone = gpm_phone_new ();
g_signal_connect (engine->priv->phone, "device-added",
@@ -1121,22 +1080,20 @@ gpm_engine_init (GpmEngine *engine)
engine->priv->previous_summary = NULL;
/* do we want to display the icon in the tray */
- icon_policy = mateconf_client_get_string (engine->priv->conf, GPM_CONF_UI_ICON_POLICY, NULL);
- engine->priv->icon_policy = gpm_icon_policy_from_string (icon_policy);
- g_free (icon_policy);
+ engine->priv->icon_policy = g_settings_get_enum (engine->priv->settings, GPM_SETTINGS_ICON_POLICY);
/* get percentage policy */
- engine->priv->low_percentage = mateconf_client_get_int (engine->priv->conf, GPM_CONF_THRESH_PERCENTAGE_LOW, NULL);
- engine->priv->critical_percentage = mateconf_client_get_int (engine->priv->conf, GPM_CONF_THRESH_PERCENTAGE_CRITICAL, NULL);
- engine->priv->action_percentage = mateconf_client_get_int (engine->priv->conf, GPM_CONF_THRESH_PERCENTAGE_ACTION, NULL);
+ engine->priv->low_percentage = g_settings_get_int (engine->priv->settings, GPM_SETTINGS_PERCENTAGE_LOW);
+ engine->priv->critical_percentage = g_settings_get_int (engine->priv->settings, GPM_SETTINGS_PERCENTAGE_CRITICAL);
+ engine->priv->action_percentage = g_settings_get_int (engine->priv->settings, GPM_SETTINGS_PERCENTAGE_ACTION);
/* get time policy */
- engine->priv->low_time = mateconf_client_get_int (engine->priv->conf, GPM_CONF_THRESH_TIME_LOW, NULL);
- engine->priv->critical_time = mateconf_client_get_int (engine->priv->conf, GPM_CONF_THRESH_TIME_CRITICAL, NULL);
- engine->priv->action_time = mateconf_client_get_int (engine->priv->conf, GPM_CONF_THRESH_TIME_ACTION, NULL);
+ engine->priv->low_time = g_settings_get_int (engine->priv->settings, GPM_SETTINGS_TIME_LOW);
+ engine->priv->critical_time = g_settings_get_int (engine->priv->settings, GPM_SETTINGS_TIME_CRITICAL);
+ engine->priv->action_time = g_settings_get_int (engine->priv->settings, GPM_SETTINGS_TIME_ACTION);
/* we can disable this if the time remaining is inaccurate or just plain wrong */
- engine->priv->use_time_primary = mateconf_client_get_bool (engine->priv->conf, GPM_CONF_USE_TIME_POLICY, NULL);
+ engine->priv->use_time_primary = g_settings_get_boolean (engine->priv->settings, GPM_SETTINGS_USE_TIME_POLICY);
if (engine->priv->use_time_primary)
egg_debug ("Using per-time notification policy");
else
diff --git a/src/gpm-idle.c b/src/gpm-idle.c
index 0a7c33c..97e9072 100644
--- a/src/gpm-idle.c
+++ b/src/gpm-idle.c
@@ -352,6 +352,7 @@ static void
gpm_idle_session_idle_changed_cb (GpmSession *session, gboolean is_idle, GpmIdle *idle)
{
egg_debug ("Received mate session idle changed: %i", is_idle);
+ idle->priv->x_idle = TRUE;
gpm_idle_evaluate (idle);
}
diff --git a/src/gpm-kbd-backlight.c b/src/gpm-kbd-backlight.c
new file mode 100644
index 0000000..4ed3fcf
--- /dev/null
+++ b/src/gpm-kbd-backlight.c
@@ -0,0 +1,734 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2010 Alex Launi <alex launi canonical com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include <gio/gio.h>
+#include <glib.h>
+#include <libupower-glib/upower.h>
+
+#include "gpm-button.h"
+#include "gpm-common.h"
+#include "gpm-control.h"
+#include "gpm-idle.h"
+#include "gpm-kbd-backlight.h"
+
+static const gchar *kbd_backlight_introspection = ""
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>""<node name=\"/\">"
+ "<interface name=\"org.mate.PowerManager.Backlight\">"
+ "<method name=\"GetBrightness\">"
+ "<arg type=\"u\" name=\"percentage_brightness\" direction=\"out\"/>"
+ "</method>"
+ "<method name=\"SetBrightness\">"
+ "<arg type=\"u\" name=\"percentage_brightness\" direction=\"in\"/>"
+ "</method>"
+ "<signal name=\"BrightnessChanged\">"
+ "<arg type=\"u\" name=\"percentage_brightness\" direction=\"out\"/>"
+ "</signal>"
+ "</interface>"
+"</node>";
+
+#define GPM_KBD_BACKLIGHT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPM_TYPE_KBD_BACKLIGHT, GpmKbdBacklightPrivate))
+
+struct GpmKbdBacklightPrivate
+{
+ UpClient *client;
+ GpmButton *button;
+ GSettings *settings;
+ GSettings *settings_gsd;
+ GpmControl *control;
+ GpmIdle *idle;
+ gboolean can_dim;
+ gboolean system_is_idle;
+ GTimer *idle_timer;
+ guint idle_dim_timeout;
+ guint master_percentage;
+ guint brightness;
+ guint max_brightness;
+ guint brightness_percent;
+ GDBusProxy *upower_proxy;
+ GDBusConnection *bus_connection;
+ guint bus_object_id;
+};
+
+enum {
+ BRIGHTNESS_CHANGED,
+ LAST_SIGNAL
+};
+
+static guint signals [LAST_SIGNAL] = { 0 };
+
+G_DEFINE_TYPE (GpmKbdBacklight, gpm_kbd_backlight, G_TYPE_OBJECT)
+
+/**
+ * gpm_kbd_backlight_error_quark:
+ * Return value: Our personal error quark.
+ **/
+GQuark
+gpm_kbd_backlight_error_quark (void)
+{
+ static GQuark quark = 0;
+ if (!quark)
+ quark = g_quark_from_static_string ("gpm_kbd_backlight_error");
+ return quark;
+}
+
+/**
+ * gpm_kbd_backlight_get_brightness:
+ * @backlight:
+ * @brightness:
+ * @error:
+ *
+ * Return value:
+ */
+gboolean
+gpm_kbd_backlight_get_brightness (GpmKbdBacklight *backlight,
+ guint *brightness,
+ GError **error)
+{
+ g_return_val_if_fail (backlight != NULL, FALSE);
+ g_return_val_if_fail (GPM_IS_KBD_BACKLIGHT (backlight), FALSE);
+ g_return_val_if_fail (brightness != NULL, FALSE);
+
+ if (backlight->priv->can_dim == FALSE) {
+ g_set_error_literal (error, gpm_kbd_backlight_error_quark (),
+ GPM_KBD_BACKLIGHT_ERROR_HARDWARE_NOT_PRESENT,
+ "Dim capable hardware not present");
+ return FALSE;
+ }
+
+ *brightness = backlight->priv->brightness_percent;
+ return TRUE;
+}
+
+static gboolean
+gpm_kbd_backlight_set (GpmKbdBacklight *backlight,
+ guint percentage)
+{
+ gint scale;
+ guint goal;
+
+ g_return_val_if_fail (GPM_IS_KBD_BACKLIGHT (backlight), FALSE);
+ /* if we're setting the same we are, don't bother */
+ //g_return_val_if_fail (backlight->priv->brightness_percent != percentage, FALSE);
+
+ goal = gpm_discrete_from_percent (percentage, backlight->priv->max_brightness);
+ scale = percentage > backlight->priv->brightness_percent ? 1 : -1;
+
+ /* step loop down by 1 for a dimming effect */
+ while (backlight->priv->brightness != goal) {
+ backlight->priv->brightness += scale;
+ backlight->priv->brightness_percent = gpm_discrete_to_percent (backlight->priv->brightness, backlight->priv->max_brightness);
+
+ g_dbus_proxy_call (backlight->priv->upower_proxy,
+ "SetBrightness",
+ g_variant_new ("(i)", (gint) backlight->priv->brightness),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL,
+ NULL,
+ NULL);
+ }
+
+ return TRUE;
+}
+
+/**
+ * gpm_kbd_backlight_brightness_up:
+ **/
+static gboolean
+gpm_kbd_backlight_brightness_up (GpmKbdBacklight *backlight)
+{
+ guint new;
+
+ new = MIN (backlight->priv->brightness_percent + GPM_KBD_BACKLIGHT_STEP, 100u);
+ return gpm_kbd_backlight_set (backlight, new);
+}
+
+/**
+ * gpm_kbd_backlight_brightness_down:
+ **/
+static gboolean
+gpm_kbd_backlight_brightness_down (GpmKbdBacklight *backlight)
+{
+ guint new;
+
+ // we can possibly go below 0 here, so by converting to a gint we avoid underflow errors.
+ new = MAX ((gint) backlight->priv->brightness_percent - GPM_KBD_BACKLIGHT_STEP, 0);
+ return gpm_kbd_backlight_set (backlight, new);
+}
+
+/**
+ * gpm_kbd_backlight_set_brightness:
+ * @backlight:
+ * @percentage:
+ * @error:
+ *
+ * Return value:
+ **/
+gboolean
+gpm_kbd_backlight_set_brightness (GpmKbdBacklight *backlight,
+ guint percentage,
+ GError **error)
+{
+ gboolean ret;
+
+ g_return_val_if_fail (backlight != NULL, FALSE);
+ g_return_val_if_fail (GPM_IS_KBD_BACKLIGHT (backlight), FALSE);
+
+ if (backlight->priv->can_dim == FALSE) {
+ g_set_error_literal (error, gpm_kbd_backlight_error_quark (),
+ GPM_KBD_BACKLIGHT_ERROR_HARDWARE_NOT_PRESENT,
+ "Dim capable hardware not present");
+ return FALSE;
+ }
+
+ backlight->priv->master_percentage = percentage;
+
+ ret = gpm_kbd_backlight_set (backlight, percentage);
+ if (!ret) {
+ g_set_error_literal (error, gpm_kbd_backlight_error_quark (),
+ GPM_KBD_BACKLIGHT_ERROR_GENERAL,
+ "Cannot set keyboard backlight brightness");
+ }
+
+ return ret;
+}
+
+static void
+gpm_kbd_backlight_on_brightness_changed (GpmKbdBacklight *backlight,
+ guint value)
+{
+ backlight->priv->brightness = value;
+ backlight->priv->brightness_percent = gpm_discrete_to_percent (value, backlight->priv->max_brightness);
+ backlight->priv->master_percentage = backlight->priv->brightness_percent;
+ g_signal_emit (backlight, signals [BRIGHTNESS_CHANGED], 0, backlight->priv->brightness_percent);
+}
+
+/**
+ * gpm_kbd_backlight_on_dbus_signal:
+ **/
+static void
+gpm_kbd_backlight_on_dbus_signal (GDBusProxy *proxy,
+ gchar *sender_name,
+ gchar *signal_name,
+ GVariant *parameters,
+ gpointer user_data)
+{
+ guint value;
+ GpmKbdBacklight *backlight = GPM_KBD_BACKLIGHT (user_data);
+
+ if (g_strcmp0 (signal_name, "BrightnessChanged") == 0) {
+ g_variant_get (parameters, "(i)", &value);
+ gpm_kbd_backlight_on_brightness_changed (backlight, value);
+ return;
+ }
+
+ g_assert_not_reached ();
+}
+
+/**
+ * gpm_kbd_backlight_dbus_method_call:
+ * @connection:
+ * @object_path:
+ * @interface_name:
+ * @method_name:
+ * @parameters:
+ * @invocation:
+ * @user_data:
+ **/
+static void
+gpm_kbd_backlight_dbus_method_call (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *method_name,
+ GVariant *parameters,
+ GDBusMethodInvocation *invocation,
+ gpointer user_data)
+{
+ guint value;
+ gboolean ret;
+ GError *error = NULL;
+ GpmKbdBacklight *backlight = GPM_KBD_BACKLIGHT (user_data);
+
+ if (g_strcmp0 (method_name, "GetBrightness") == 0) {
+ ret = gpm_kbd_backlight_get_brightness (backlight, &value, &error);
+ if (!ret) {
+ g_dbus_method_invocation_return_gerror (invocation, error);
+ g_error_free (error);
+ } else {
+ g_dbus_method_invocation_return_value (invocation, g_variant_new ("(u)", value));
+ }
+ return;
+ }
+
+ if (g_strcmp0 (method_name, "SetBrightness") == 0) {
+ g_variant_get (parameters, "(u)", &value);
+ ret = gpm_kbd_backlight_set_brightness (backlight, value, &error);
+ if (!ret) {
+ g_dbus_method_invocation_return_gerror (invocation, error);
+ g_error_free (error);
+ } else {
+ g_dbus_method_invocation_return_value (invocation, NULL);
+ }
+ return;
+ }
+
+ g_assert_not_reached ();
+}
+
+
+/**
+ * gpm_kbd_backlight_dbus_property_get:
+ * @sender:
+ * @object_path:
+ * @interface_name:
+ * @property_name:
+ * @error:
+ * @user_data:
+ *
+ * Return value:
+ **/
+static GVariant *
+gpm_kbd_backlight_dbus_property_get (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *property_name,
+ GError **error,
+ gpointer user_data)
+{
+ /* Do nothing, we have no props */
+ return NULL;
+}
+
+/**
+ * gpm_kbd_backlight_dbus_property_set:
+ * @connection:
+ * @sender:
+ * @object_path:
+ * @interface_name:
+ * @property_name:
+ *
+ * Return value:
+ **/
+static gboolean
+gpm_kbd_backlight_dbus_property_set (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *property_name,
+ GVariant *value,
+ GError **error,
+ gpointer user_data)
+{
+ /* do nothing, no properties defined */
+ return FALSE;
+}
+
+/**
+ * gpm_kbd_backlight_register_dbus:
+ * @backlight:
+ * @connection:
+ * @error:
+ **/
+void
+gpm_kbd_backlight_register_dbus (GpmKbdBacklight *backlight,
+ GDBusConnection *connection,
+ GError **error)
+{
+ GDBusNodeInfo *node_info;
+ GDBusInterfaceInfo *interface_info;
+ GDBusInterfaceVTable interface_vtable = {
+ gpm_kbd_backlight_dbus_method_call,
+ gpm_kbd_backlight_dbus_property_get,
+ gpm_kbd_backlight_dbus_property_set
+ };
+
+ node_info = g_dbus_node_info_new_for_xml (kbd_backlight_introspection, NULL);
+ interface_info = g_dbus_node_info_lookup_interface (node_info, GPM_DBUS_INTERFACE_BACKLIGHT);
+
+ backlight->priv->bus_connection = g_object_ref (connection);
+ backlight->priv->bus_object_id =
+ g_dbus_connection_register_object (connection,
+ GPM_DBUS_PATH_KBD_BACKLIGHT,
+ interface_info,
+ &interface_vtable,
+ backlight,
+ NULL,
+ error);
+ g_dbus_node_info_unref (node_info);
+}
+
+static gboolean
+gpm_kbd_backlight_evaluate_power_source_and_set (GpmKbdBacklight *backlight)
+{
+ gfloat brightness;
+ gfloat scale;
+ gboolean on_battery;
+ gboolean battery_reduce;
+ guint value;
+ gboolean ret;
+
+ brightness = backlight->priv->master_percentage;
+
+ g_object_get (backlight->priv->client,
+ "on-battery",
+ &on_battery,
+ NULL);
+
+ battery_reduce = g_settings_get_boolean (backlight->priv->settings, GPM_SETTINGS_KBD_BACKLIGHT_BATT_REDUCE);
+
+ if (on_battery && battery_reduce) {
+ value = g_settings_get_int (backlight->priv->settings, GPM_SETTINGS_KBD_BRIGHTNESS_DIM_BY_ON_BATT);
+
+ if (value > 100) {
+ g_warning ("Cannot scale brightness down by more than 100%%. Scaling by 50%%");
+ value = 50;
+ }
+
+ scale = (100 - value) / 100.0f;
+ brightness *= scale;
+
+ value = (guint) brightness;
+
+ } else {
+ value = g_settings_get_int (backlight->priv->settings, GPM_SETTINGS_KBD_BRIGHTNESS_ON_AC);
+ }
+
+ ret = gpm_kbd_backlight_set (backlight, value);
+ return ret;
+}
+
+/**
+ * gpm_kbd_backlight_control_resume_cb:
+ * @control: The control class instance
+ * @backlight: This backlight class instance
+ *
+ * Just make sure that the backlight is back on
+ **/
+static void
+gpm_kbd_backlight_control_resume_cb (GpmControl *control,
+ GpmControlAction action,
+ GpmKbdBacklight *backlight)
+{
+ gboolean ret;
+
+ ret = gpm_kbd_backlight_evaluate_power_source_and_set (backlight);
+ if (!ret)
+ g_warning ("Failed to turn kbd brightness back on after resuming");
+}
+
+/**
+ * gpm_kbd_backlight_client_changed_cb:
+ * @client: The up_client class instance
+ * @backlight: This class instance
+ *
+ * Does the actions when the ac power source is inserted/removed.
+ **/
+static void
+gpm_kbd_backlight_client_changed_cb (UpClient *client,
+ GpmKbdBacklight *backlight)
+{
+ gpm_kbd_backlight_evaluate_power_source_and_set (backlight);
+}
+
+/**
+ * gpm_kbd_backlight_button_pressed_cb:
+ * @power: The power class instance
+ * @type: The button type, but here we only care about keyboard brightness buttons
+ * @backlight: This class instance
+ **/
+static void
+gpm_kbd_backlight_button_pressed_cb (GpmButton *button,
+ const gchar *type,
+ GpmKbdBacklight *backlight)
+{
+ static guint saved_brightness;
+
+ saved_brightness = backlight->priv->master_percentage;
+
+ if (g_strcmp0 (type, GPM_BUTTON_KBD_BRIGHT_UP) == 0) {
+ gpm_kbd_backlight_brightness_up (backlight);
+
+ } else if (g_strcmp0 (type, GPM_BUTTON_KBD_BRIGHT_DOWN) == 0) {
+ gpm_kbd_backlight_brightness_down (backlight);
+
+ } else if (g_strcmp0 (type, GPM_BUTTON_KBD_BRIGHT_TOGGLE) == 0) {
+ if (backlight->priv->master_percentage == 0) {
+ /* backlight is off turn it back on */
+ gpm_kbd_backlight_set (backlight, saved_brightness);
+ } else {
+ /* backlight is on, turn it off and save current value */
+ saved_brightness = backlight->priv->master_percentage;
+ gpm_kbd_backlight_set (backlight, 0);
+ }
+ }
+}
+
+/**
+ * gpm_kbd_backlight_idle_changed_cb:
+ * @idle: The idle class instance
+ * @mode: The idle mode, e.g. GPM_IDLE_MODE_BLANK
+ * @backlight: This class instance
+ *
+ * This callback is called when mate-screensaver detects that the idle state
+ * has changed. GPM_IDLE_MODE_BLANK is when the session has become inactive,
+ * and GPM_IDLE_MODE_SLEEP is where the session has become inactive, AND the
+ * session timeout has elapsed for the idle action.
+ **/
+static void
+gpm_kbd_backlight_idle_changed_cb (GpmIdle *idle,
+ GpmIdleMode mode,
+ GpmKbdBacklight *backlight)
+{
+ gfloat brightness;
+ gfloat scale;
+ guint value;
+ gboolean lid_closed;
+ gboolean on_battery;
+ gboolean enable_action;
+
+ lid_closed = gpm_button_is_lid_closed (backlight->priv->button);
+
+ if (lid_closed)
+ return;
+
+ g_object_get (backlight->priv->client,
+ "on-battery",
+ &on_battery,
+ NULL);
+
+ enable_action = on_battery
+ ? g_settings_get_boolean (backlight->priv->settings_gsd, GPM_SETTINGS_IDLE_DIM_BATT)
+ : g_settings_get_boolean (backlight->priv->settings_gsd, GPM_SETTINGS_IDLE_DIM_AC);
+
+ if (!enable_action)
+ return;
+
+ if (mode == GPM_IDLE_MODE_NORMAL) {
+ backlight->priv->master_percentage = 100;
+ gpm_kbd_backlight_evaluate_power_source_and_set (backlight);
+ } else if (mode == GPM_IDLE_MODE_DIM) {
+ brightness = backlight->priv->master_percentage;
+ value = g_settings_get_int (backlight->priv->settings, GPM_SETTINGS_KBD_BRIGHTNESS_DIM_BY_ON_IDLE);
+
+ if (value > 100) {
+ g_warning ("Cannot scale brightness down by more than 100%%. Scaling by 50%%");
+ value = 50;
+ }
+
+ scale = (100 - value) / 100.0f;
+ brightness *= scale;
+
+ value = (guint) brightness;
+ gpm_kbd_backlight_set (backlight, value);
+ } else if (mode == GPM_IDLE_MODE_BLANK) {
+ gpm_kbd_backlight_set (backlight, 0u);
+ }
+}
+
+/**
+ * gpm_kbd_backlight_finalize:
+ * @object:
+ **/
+static void
+gpm_kbd_backlight_finalize (GObject *object)
+{
+ GpmKbdBacklight *backlight;
+
+ g_return_if_fail (object != NULL);
+ g_return_if_fail (GPM_IS_KBD_BACKLIGHT (object));
+
+ backlight = GPM_KBD_BACKLIGHT (object);
+
+ if (backlight->priv->upower_proxy != NULL) {
+ g_object_unref (backlight->priv->upower_proxy);
+ }
+ if (backlight->priv->bus_connection != NULL) {
+ g_dbus_connection_unregister_object (backlight->priv->bus_connection,
+ backlight->priv->bus_object_id);
+ g_object_unref (backlight->priv->bus_connection);
+ }
+
+ g_timer_destroy (backlight->priv->idle_timer);
+
+ g_object_unref (backlight->priv->control);
+ g_object_unref (backlight->priv->settings);
+ g_object_unref (backlight->priv->settings_gsd);
+ g_object_unref (backlight->priv->client);
+ g_object_unref (backlight->priv->button);
+ g_object_unref (backlight->priv->idle);
+
+ g_return_if_fail (backlight->priv != NULL);
+ G_OBJECT_CLASS (gpm_kbd_backlight_parent_class)->finalize (object);
+}
+
+/**
+ * gpm_kbd_backlight_class_init:
+ * @klass:
+ **/
+static void
+gpm_kbd_backlight_class_init (GpmKbdBacklightClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->finalize = gpm_kbd_backlight_finalize;
+
+ signals [BRIGHTNESS_CHANGED] =
+ g_signal_new ("brightness-changed",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GpmKbdBacklightClass, brightness_changed),
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__UINT,
+ G_TYPE_NONE,
+ 1,
+ G_TYPE_UINT);
+
+ g_type_class_add_private (klass, sizeof (GpmKbdBacklightPrivate));
+}
+
+/**
+ * gpm_kbd_backlight_init:
+ * @backlight: This KbdBacklight class instance
+ *
+ * Initializes the KbdBacklight class.
+ **/
+static void
+gpm_kbd_backlight_init (GpmKbdBacklight *backlight)
+{
+ GVariant *u_brightness;
+ GVariant *u_max_brightness;
+ GError *error = NULL;
+
+ backlight->priv = GPM_KBD_BACKLIGHT_GET_PRIVATE (backlight);
+
+ backlight->priv->upower_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
+ G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
+ NULL,
+ "org.freedesktop.UPower",
+ "/org/freedesktop/UPower/KbdBacklight",
+ "org.freedesktop.UPower.KbdBacklight",
+ NULL,
+ &error);
+ if (backlight->priv->upower_proxy == NULL) {
+ g_printerr ("Could not connect to UPower system bus: %s", error->message);
+ g_error_free (error);
+ goto err;
+ }
+
+ g_signal_connect (backlight->priv->upower_proxy,
+ "g-signal",
+ G_CALLBACK (gpm_kbd_backlight_on_dbus_signal),
+ backlight);
+
+ u_brightness = g_dbus_proxy_call_sync (backlight->priv->upower_proxy,
+ "GetBrightness",
+ NULL,
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL,
+ &error);
+ if (u_brightness == NULL) {
+ g_warning ("Failed to get brightness: %s", error->message);
+ g_error_free (error);
+ goto err;
+ }
+
+ error = NULL;
+ u_max_brightness = g_dbus_proxy_call_sync (backlight->priv->upower_proxy,
+ "GetMaxBrightness",
+ NULL,
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL,
+ &error);
+ if (u_max_brightness == NULL) {
+ g_warning ("Failed to get max brightness: %s", error->message);
+ g_error_free (error);
+ g_variant_unref (u_brightness);
+ goto err;
+ }
+
+ g_variant_get (u_brightness, "(i)", &backlight->priv->brightness);
+ g_variant_get (u_max_brightness, "(i)", &backlight->priv->max_brightness);
+
+ backlight->priv->brightness_percent = gpm_discrete_to_percent (backlight->priv->brightness,
+ backlight->priv->max_brightness);
+
+ g_variant_unref (u_brightness);
+ g_variant_unref (u_max_brightness);
+ goto noerr;
+
+err:
+ backlight->priv->brightness = 0;
+ backlight->priv->brightness_percent = 100;
+ backlight->priv->max_brightness = 0;
+
+noerr:
+ /* Initialize the master to full power. It will get scaled if needed */
+ backlight->priv->master_percentage = 100u;
+
+ backlight->priv->idle_timer = g_timer_new ();
+ backlight->priv->can_dim = backlight->priv->max_brightness > 1;
+
+ /* Use upower for ac changed signal */
+ backlight->priv->client = up_client_new ();
+ g_signal_connect (backlight->priv->client, "changed",
+ G_CALLBACK (gpm_kbd_backlight_client_changed_cb), backlight);
+
+ backlight->priv->settings = g_settings_new (GPM_SETTINGS_SCHEMA);
+ //backlight->priv->settings_gsd = g_settings_new (GSD_SETTINGS_SCHEMA);
+
+ /* watch for kbd brightness up and down button presses */
+ backlight->priv->button = gpm_button_new ();
+ g_signal_connect (backlight->priv->button, "button-pressed",
+ G_CALLBACK (gpm_kbd_backlight_button_pressed_cb), backlight);
+
+ backlight->priv->idle = gpm_idle_new ();
+ g_signal_connect (backlight->priv->idle, "idle-changed",
+ G_CALLBACK (gpm_kbd_backlight_idle_changed_cb), backlight);
+
+ /* since gpm is just starting we can pretty safely assume that we're not idle */
+ backlight->priv->system_is_idle = FALSE;
+ backlight->priv->idle_dim_timeout = g_settings_get_int (backlight->priv->settings_gsd, GPM_SETTINGS_IDLE_DIM_TIME);
+ gpm_idle_set_timeout_dim (backlight->priv->idle, backlight->priv->idle_dim_timeout);
+
+ /* make sure we turn the keyboard backlight back on after resuming */
+ backlight->priv->control = gpm_control_new ();
+ g_signal_connect (backlight->priv->control, "resume",
+ G_CALLBACK (gpm_kbd_backlight_control_resume_cb), backlight);
+
+ /* set initial values for whether we're on AC or battery*/
+ gpm_kbd_backlight_evaluate_power_source_and_set (backlight);
+}
+
+/**
+ * gpm_kbd_backlight_new:
+ * Return value: A new GpmKbdBacklight class instance.
+ **/
+GpmKbdBacklight *
+gpm_kbd_backlight_new (void)
+{
+ GpmKbdBacklight *backlight = g_object_new (GPM_TYPE_KBD_BACKLIGHT, NULL);
+ return backlight;
+}
+
diff --git a/src/gpm-kbd-backlight.h b/src/gpm-kbd-backlight.h
new file mode 100644
index 0000000..78975b5
--- /dev/null
+++ b/src/gpm-kbd-backlight.h
@@ -0,0 +1,79 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2010 Alex Launi <alex launi canonical com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __GPM_KBD_BACKLIGHT_H
+#define __GPM_KBD_BACKLIGHT_H
+
+#include <gio/gio.h>
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define GPM_TYPE_KBD_BACKLIGHT (gpm_kbd_backlight_get_type ())
+#define GPM_KBD_BACKLIGHT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GPM_TYPE_KBD_BACKLIGHT, GpmKbdBacklight))
+#define GPM_KBD_BACKLIGHT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GPM_TYPE_KBD_BACKLIGHT, GpmKbdBacklightClass))
+#define GPM_IS_KBD_BACKLIGHT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GPM_TYPE_KBD_BACKLIGHT))
+#define GPM_IS_KBD_BACKLIGHT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GPM_TYPE_KBD_BACKLIGHT))
+#define GPM_KBD_BACKLIGHT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GPM_TYPE_KBD_BACKLIGHT, GpmKbdBacklightClass))
+
+#define GPM_KBD_BACKLIGHT_DIM_INTERVAL 5 /* ms */
+#define GPM_KBD_BACKLIGHT_STEP 10 /* change by 10% each step */
+
+typedef struct GpmKbdBacklightPrivate GpmKbdBacklightPrivate;
+
+typedef struct
+{
+ GObject parent;
+ GpmKbdBacklightPrivate *priv;
+} GpmKbdBacklight;
+
+typedef struct
+{
+ GObjectClass parent_class;
+ void (* brightness_changed) (GpmKbdBacklight *backlight,
+ gint brightness);
+} GpmKbdBacklightClass;
+
+typedef enum
+{
+ GPM_KBD_BACKLIGHT_ERROR_GENERAL,
+ GPM_KBD_BACKLIGHT_ERROR_DATA_NOT_AVAILABLE,
+ GPM_KBD_BACKLIGHT_ERROR_HARDWARE_NOT_PRESENT
+} GpmKbdBacklightError;
+
+GType gpm_kbd_backlight_get_type (void);
+GQuark gpm_kbd_backlight_error_quark (void);
+GpmKbdBacklight *gpm_kbd_backlight_new (void);
+gboolean gpm_kbd_backlight_get_brightness (GpmKbdBacklight *backlight,
+ guint *brightness,
+ GError **error);
+gboolean gpm_kbd_backlight_set_brightness (GpmKbdBacklight *backlight,
+ guint brightness,
+ GError **error);
+void gpm_kbd_backlight_register_dbus (GpmKbdBacklight *backlight,
+ GDBusConnection *connection,
+ GError **error);
+
+G_END_DECLS
+
+#endif /* __GPM_KBD_BACKLIGHT_H */
+
diff --git a/src/gpm-manager.c b/src/gpm-manager.c
index ec787be..9ee8781 100644
--- a/src/gpm-manager.c
+++ b/src/gpm-manager.c
@@ -38,7 +38,6 @@
#include <gtk/gtk.h>
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
-#include <mateconf/mateconf-client.h>
#include <canberra-gtk.h>
#include <libupower-glib/upower.h>
#include <libmatenotify/notify.h>
@@ -54,9 +53,9 @@
#include "gpm-manager.h"
#include "gpm-screensaver.h"
#include "gpm-backlight.h"
+#include "gpm-kbd-backlight.h"
#include "gpm-session.h"
#include "gpm-stock-icons.h"
-#include "gpm-prefs-server.h"
#include "gpm-tray-icon.h"
#include "gpm-engine.h"
#include "gpm-upower.h"
@@ -77,16 +76,16 @@ static void gpm_manager_finalize (GObject *object);
struct GpmManagerPrivate
{
GpmButton *button;
- MateConfClient *conf;
+ GSettings *settings;
GpmDisks *disks;
GpmDpms *dpms;
GpmIdle *idle;
- GpmPrefsServer *prefs_server;
GpmControl *control;
GpmScreensaver *screensaver;
GpmTrayIcon *tray_icon;
GpmEngine *engine;
GpmBacklight *backlight;
+ GpmKbdBacklight *kbd_backlight;
EggConsoleKit *console;
guint32 screensaver_ac_throttle_id;
guint32 screensaver_dpms_throttle_id;
@@ -200,7 +199,7 @@ gpm_manager_play_loop_start (GpmManager *manager, GpmManagerSound action, gboole
gint retval;
ca_context *context;
- ret = mateconf_client_get_bool (manager->priv->conf, GPM_CONF_UI_ENABLE_SOUND, NULL);
+ ret = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_ENABLE_SOUND);
if (!ret && !force) {
egg_debug ("ignoring sound due to policy");
return FALSE;
@@ -261,7 +260,7 @@ gpm_manager_play (GpmManager *manager, GpmManagerSound action, gboolean force)
gint retval;
ca_context *context;
- ret = mateconf_client_get_bool (manager->priv->conf, GPM_CONF_UI_ENABLE_SOUND, NULL);
+ ret = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_ENABLE_SOUND);
if (!ret && !force) {
egg_debug ("ignoring sound due to policy");
return FALSE;
@@ -356,11 +355,11 @@ gpm_manager_sync_policy_sleep (GpmManager *manager)
guint sleep_computer;
if (!manager->priv->on_battery) {
- sleep_computer = mateconf_client_get_int (manager->priv->conf, GPM_CONF_TIMEOUT_SLEEP_COMPUTER_AC, NULL);
- sleep_display = mateconf_client_get_int (manager->priv->conf, GPM_CONF_TIMEOUT_SLEEP_DISPLAY_AC, NULL);
+ sleep_computer = g_settings_get_int (manager->priv->settings, GPM_SETTINGS_SLEEP_COMPUTER_AC);
+ sleep_display = g_settings_get_int (manager->priv->settings, GPM_SETTINGS_SLEEP_DISPLAY_AC);
} else {
- sleep_computer = mateconf_client_get_int (manager->priv->conf, GPM_CONF_TIMEOUT_SLEEP_COMPUTER_BATT, NULL);
- sleep_display = mateconf_client_get_int (manager->priv->conf, GPM_CONF_TIMEOUT_SLEEP_DISPLAY_BATT, NULL);
+ sleep_computer = g_settings_get_int (manager->priv->settings, GPM_SETTINGS_SLEEP_COMPUTER_BATT);
+ sleep_display = g_settings_get_int (manager->priv->settings, GPM_SETTINGS_SLEEP_DISPLAY_BATT);
}
/* set the new sleep (inactivity) value */
@@ -375,7 +374,7 @@ gpm_manager_sync_policy_sleep (GpmManager *manager)
* Turn off the backlight of the LCD when we shut the lid, and lock
* if required. This is required because some laptops do not turn off the
* LCD backlight when the lid is closed.
- * See http://bugzilla.mate.org/show_bug.cgi?id=321313
+ * See http://bugzilla.gnome.org/show_bug.cgi?id=321313
*
* Return value: Success.
**/
@@ -387,7 +386,7 @@ gpm_manager_blank_screen (GpmManager *manager, GError **noerror)
GError *error = NULL;
do_lock = gpm_control_get_lock_policy (manager->priv->control,
- GPM_CONF_LOCK_ON_BLANK_SCREEN);
+ GPM_SETTINGS_LOCK_ON_BLANK_SCREEN);
if (do_lock) {
if (!gpm_screensaver_lock (manager->priv->screensaver))
egg_debug ("Could not lock screen via mate-screensaver");
@@ -423,7 +422,7 @@ gpm_manager_unblank_screen (GpmManager *manager, GError **noerror)
ret = FALSE;
}
- do_lock = gpm_control_get_lock_policy (manager->priv->control, GPM_CONF_LOCK_ON_BLANK_SCREEN);
+ do_lock = gpm_control_get_lock_policy (manager->priv->control, GPM_SETTINGS_LOCK_ON_BLANK_SCREEN);
if (do_lock)
gpm_screensaver_poke (manager->priv->screensaver);
return ret;
@@ -534,7 +533,7 @@ gpm_manager_sleep_failure_response_cb (GtkDialog *dialog, gint response_id, GpmM
/* user clicked the help button */
if (response_id == GTK_RESPONSE_HELP) {
- uri = mateconf_client_get_string (manager->priv->conf, GPM_CONF_NOTIFY_SLEEP_FAILED_URI, NULL);
+ uri = g_settings_get_string (manager->priv->settings, GPM_SETTINGS_NOTIFY_SLEEP_FAILED_URI);
screen = gdk_screen_get_default();
ret = gtk_show_uri (screen, uri, gtk_get_current_event_time (), &error);
if (!ret) {
@@ -562,13 +561,13 @@ gpm_manager_sleep_failure (GpmManager *manager, gboolean is_suspend, const gchar
const gchar *icon;
GtkWidget *dialog;
- /* only show this if specified in mateconf */
- show_sleep_failed = mateconf_client_get_bool (manager->priv->conf, GPM_CONF_NOTIFY_SLEEP_FAILED, NULL);
+ /* only show this if specified in settings */
+ show_sleep_failed = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_NOTIFY_SLEEP_FAILED);
egg_debug ("sleep failed");
gpm_manager_play (manager, GPM_MANAGER_SOUND_SUSPEND_ERROR, TRUE);
- /* only emit if in MateConf */
+ /* only emit if specified in settings */
if (!show_sleep_failed)
goto out;
@@ -599,7 +598,7 @@ gpm_manager_sleep_failure (GpmManager *manager, gboolean is_suspend, const gchar
gtk_window_set_icon_name (GTK_WINDOW(dialog), icon);
/* show a button? */
- uri = mateconf_client_get_string (manager->priv->conf, GPM_CONF_NOTIFY_SLEEP_FAILED_URI, NULL);
+ uri = g_settings_get_string (manager->priv->settings, GPM_SETTINGS_NOTIFY_SLEEP_FAILED_URI);
if (uri != NULL && uri[0] != '\0') {
/* TRANSLATORS: button text, visit the suspend help website */
gtk_dialog_add_button (GTK_DIALOG (dialog), _("Visit help page"), GTK_RESPONSE_HELP);
@@ -665,21 +664,19 @@ gpm_manager_action_hibernate (GpmManager *manager, const gchar *reason)
* @policy: The policy that we should do, e.g. "suspend"
* @reason: The reason we are performing the policy action, e.g. "battery critical"
*
- * Does one of the policy actions specified in mateconf.
+ * Does one of the policy actions specified in the settings.
**/
static gboolean
gpm_manager_perform_policy (GpmManager *manager, const gchar *policy_key, const gchar *reason)
{
- gchar *action = NULL;
GpmActionPolicy policy;
/* are we inhibited? */
if (gpm_manager_is_inhibit_valid (manager, FALSE, "policy action") == FALSE)
return FALSE;
- action = mateconf_client_get_string (manager->priv->conf, policy_key, NULL);
- egg_debug ("action: %s set to %s (%s)", policy_key, action, reason);
- policy = gpm_action_policy_from_string (action);
+ policy = g_settings_get_enum (manager->priv->settings, policy_key);
+ egg_debug ("action: %s set to %i (%s)", policy_key, policy, reason);
if (policy == GPM_ACTION_POLICY_NOTHING) {
egg_debug ("doing nothing, reason: %s", reason);
@@ -703,44 +700,30 @@ gpm_manager_perform_policy (GpmManager *manager, const gchar *policy_key, const
gpm_session_logout (session);
g_object_unref (session);
} else {
- egg_warning ("unknown action %s", action);
+ egg_warning ("unknown action %i", policy);
}
- g_free (action);
return TRUE;
}
/**
- * gpm_manager_get_preferences_options:
- **/
-gboolean
-gpm_manager_get_preferences_options (GpmManager *manager, gint *capability, GError **error)
-{
- g_return_val_if_fail (manager != NULL, FALSE);
- g_return_val_if_fail (GPM_IS_MANAGER (manager), FALSE);
- return gpm_prefs_server_get_capability (manager->priv->prefs_server, capability);
-}
-
-/**
* gpm_manager_idle_do_sleep:
* @manager: This class instance
*
* This callback is called when we want to sleep. Use the users
- * preference from mateconf, but change it if we can't do the action.
+ * preference from the settings, but change it if we can't do the action.
**/
static void
gpm_manager_idle_do_sleep (GpmManager *manager)
{
- gchar *action = NULL;
gboolean ret;
GError *error = NULL;
GpmActionPolicy policy;
if (!manager->priv->on_battery)
- action = mateconf_client_get_string (manager->priv->conf, GPM_CONF_ACTIONS_SLEEP_TYPE_AC, NULL);
+ policy = g_settings_get_enum (manager->priv->settings, GPM_SETTINGS_ACTION_SLEEP_TYPE_AC);
else
- action = mateconf_client_get_string (manager->priv->conf, GPM_CONF_ACTIONS_SLEEP_TYPE_BATT, NULL);
- policy = gpm_action_policy_from_string (action);
+ policy = g_settings_get_enum (manager->priv->settings, GPM_SETTINGS_ACTION_SLEEP_TYPE_BATT);
if (policy == GPM_ACTION_POLICY_NOTHING) {
egg_debug ("doing nothing as system idle action");
@@ -773,7 +756,6 @@ gpm_manager_idle_do_sleep (GpmManager *manager)
}
}
}
- g_free (action);
}
/**
@@ -837,13 +819,13 @@ gpm_manager_lid_button_pressed (GpmManager *manager, gboolean pressed)
if (!manager->priv->on_battery) {
egg_debug ("Performing AC policy");
- gpm_manager_perform_policy (manager, GPM_CONF_BUTTON_LID_AC,
+ gpm_manager_perform_policy (manager, GPM_SETTINGS_BUTTON_LID_AC,
"The lid has been closed on ac power.");
return;
}
egg_debug ("Performing battery policy");
- gpm_manager_perform_policy (manager, GPM_CONF_BUTTON_LID_BATT,
+ gpm_manager_perform_policy (manager, GPM_SETTINGS_BUTTON_LID_BATT,
"The lid has been closed on battery power.");
}
@@ -926,13 +908,13 @@ gpm_manager_button_pressed_cb (GpmButton *button, const gchar *type, GpmManager
}
if (g_strcmp0 (type, GPM_BUTTON_POWER) == 0) {
- gpm_manager_perform_policy (manager, GPM_CONF_BUTTON_POWER, "The power button has been pressed.");
+ gpm_manager_perform_policy (manager, GPM_SETTINGS_BUTTON_POWER, "The power button has been pressed.");
} else if (g_strcmp0 (type, GPM_BUTTON_SLEEP) == 0) {
- gpm_manager_perform_policy (manager, GPM_CONF_BUTTON_SUSPEND, "The suspend button has been pressed.");
+ gpm_manager_perform_policy (manager, GPM_SETTINGS_BUTTON_SUSPEND, "The suspend button has been pressed.");
} else if (g_strcmp0 (type, GPM_BUTTON_SUSPEND) == 0) {
- gpm_manager_perform_policy (manager, GPM_CONF_BUTTON_SUSPEND, "The suspend button has been pressed.");
+ gpm_manager_perform_policy (manager, GPM_SETTINGS_BUTTON_SUSPEND, "The suspend button has been pressed.");
} else if (g_strcmp0 (type, GPM_BUTTON_HIBERNATE) == 0) {
- gpm_manager_perform_policy (manager, GPM_CONF_BUTTON_HIBERNATE, "The hibernate button has been pressed.");
+ gpm_manager_perform_policy (manager, GPM_SETTINGS_BUTTON_HIBERNATE, "The hibernate button has been pressed.");
} else if (g_strcmp0 (type, GPM_BUTTON_LID_OPEN) == 0) {
gpm_manager_lid_button_pressed (manager, FALSE);
} else if (g_strcmp0 (type, GPM_BUTTON_LID_CLOSED) == 0) {
@@ -971,11 +953,11 @@ gpm_manager_get_spindown_timeout (GpmManager *manager)
/* get policy */
if (!manager->priv->on_battery) {
- enabled = mateconf_client_get_bool (manager->priv->conf, GPM_CONF_DISKS_SPINDOWN_ENABLE_AC, NULL);
- timeout = mateconf_client_get_int (manager->priv->conf, GPM_CONF_DISKS_SPINDOWN_TIMEOUT_AC, NULL);
+ enabled = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_SPINDOWN_ENABLE_AC);
+ timeout = g_settings_get_int (manager->priv->settings, GPM_SETTINGS_SPINDOWN_TIMEOUT_AC);
} else {
- enabled = mateconf_client_get_bool (manager->priv->conf, GPM_CONF_DISKS_SPINDOWN_ENABLE_BATT, NULL);
- timeout = mateconf_client_get_int (manager->priv->conf, GPM_CONF_DISKS_SPINDOWN_TIMEOUT_BATT, NULL);
+ enabled = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_SPINDOWN_ENABLE_BATT);
+ timeout = g_settings_get_int (manager->priv->settings, GPM_SETTINGS_SPINDOWN_TIMEOUT_BATT);
}
if (!enabled)
timeout = 0;
@@ -1046,15 +1028,15 @@ gpm_manager_client_changed_cb (UpClient *client, GpmManager *manager)
/* We do the lid close on battery action if the ac adapter is removed
when the laptop is closed and on battery. Fixes #331655 */
- event_when_closed = mateconf_client_get_bool (manager->priv->conf, GPM_CONF_ACTIONS_SLEEP_WHEN_CLOSED, NULL);
+ event_when_closed = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_SLEEP_WHEN_CLOSED);
/* We keep track of the lid state so we can do the
lid close on battery action if the ac adapter is removed when the laptop
is closed. Fixes #331655 */
if (event_when_closed && on_battery && lid_is_closed) {
- gpm_manager_perform_policy (manager, GPM_CONF_BUTTON_LID_BATT,
+ gpm_manager_perform_policy (manager, GPM_SETTINGS_BUTTON_LID_BATT,
"The lid has been closed, and the ac adapter "
- "removed (and mateconf is okay).");
+ "removed (and GSettings is okay).");
}
}
@@ -1074,7 +1056,7 @@ manager_critical_action_do (GpmManager *manager)
if (manager->priv->critical_alert_timeout_id)
gpm_manager_play_loop_stop (manager);
- gpm_manager_perform_policy (manager, GPM_CONF_ACTIONS_CRITICAL_BATT, "Battery is critically low.");
+ gpm_manager_perform_policy (manager, GPM_SETTINGS_ACTION_CRITICAL_BATT, "Battery is critically low.");
return FALSE;
}
@@ -1091,53 +1073,20 @@ gpm_manager_class_init (GpmManagerClass *klass)
}
/**
- * gpm_conf_mateconf_key_changed_cb:
+ * gpm_manager_settings_changed_cb:
*
- * We might have to do things when the mateconf keys change; do them here.
+ * We might have to do things when the keys change; do them here.
**/
static void
-gpm_conf_mateconf_key_changed_cb (MateConfClient *client, guint cnxn_id, MateConfEntry *entry, GpmManager *manager)
+gpm_manager_settings_changed_cb (GSettings *settings, const gchar *key, GpmManager *manager)
{
- MateConfValue *value;
-
- value = mateconf_entry_get_value (entry);
- if (value == NULL)
- return;
-
- if (g_strcmp0 (entry->key, GPM_CONF_TIMEOUT_SLEEP_COMPUTER_BATT) == 0 ||
- g_strcmp0 (entry->key, GPM_CONF_TIMEOUT_SLEEP_COMPUTER_AC) == 0 ||
- g_strcmp0 (entry->key, GPM_CONF_TIMEOUT_SLEEP_DISPLAY_BATT) == 0 ||
- g_strcmp0 (entry->key, GPM_CONF_TIMEOUT_SLEEP_DISPLAY_AC) == 0)
+ if (g_strcmp0 (key, GPM_SETTINGS_SLEEP_COMPUTER_BATT) == 0 ||
+ g_strcmp0 (key, GPM_SETTINGS_SLEEP_COMPUTER_AC) == 0 ||
+ g_strcmp0 (key, GPM_SETTINGS_SLEEP_DISPLAY_BATT) == 0 ||
+ g_strcmp0 (key, GPM_SETTINGS_SLEEP_DISPLAY_AC) == 0)
gpm_manager_sync_policy_sleep (manager);
}
-#if 0
-/**
- * gpm_manager_screensaver_auth_request_cb:
- * @manager: This manager class instance
- * @auth: If we are trying to authenticate
- *
- * Called when the user is trying or has authenticated
- **/
-static void
-gpm_manager_screensaver_auth_request_cb (GpmScreensaver *screensaver, gboolean auth_begin, GpmManager *manager)
-{
- GError *error = NULL;
-
- if (auth_begin) {
- /* We turn on the monitor unconditionally, as we may be using
- * a smartcard to authenticate and DPMS might still be on.
- * See #350291 for more details */
- gpm_dpms_set_mode (manager->priv->dpms, GPM_DPMS_MODE_ON, &error);
- if (error != NULL) {
- egg_warning ("Failed to turn on DPMS: %s", error->message);
- g_error_free (error);
- error = NULL;
- }
- }
-}
-#endif
-
/**
* gpm_manager_perhaps_recall_response_cb:
*/
@@ -1152,7 +1101,7 @@ gpm_manager_perhaps_recall_response_cb (GtkDialog *dialog, gint response_id, Gpm
/* don't show this again */
if (response_id == GTK_RESPONSE_CANCEL) {
- mateconf_client_set_bool (manager->priv->conf, GPM_CONF_NOTIFY_PERHAPS_RECALL, FALSE, NULL);
+ g_settings_set_boolean (manager->priv->settings, GPM_SETTINGS_NOTIFY_PERHAPS_RECALL, FALSE);
goto out;
}
@@ -1230,9 +1179,9 @@ gpm_manager_engine_perhaps_recall_cb (GpmEngine *engine, UpDevice *device, gchar
}
/* already shown, and dismissed */
- ret = mateconf_client_get_bool (manager->priv->conf, GPM_CONF_NOTIFY_PERHAPS_RECALL, NULL);
+ ret = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_NOTIFY_PERHAPS_RECALL);
if (!ret) {
- egg_debug ("MateConf prevents notification: %s", GPM_CONF_NOTIFY_PERHAPS_RECALL);
+ egg_debug ("Gsettings prevents notification: %s", GPM_SETTINGS_NOTIFY_PERHAPS_RECALL);
return;
}
@@ -1310,8 +1259,8 @@ gpm_manager_engine_fully_charged_cb (GpmEngine *engine, UpDevice *device, GpmMan
guint plural = 1;
const gchar *title;
- /* only action this if specified in mateconf */
- ret = mateconf_client_get_bool (manager->priv->conf, GPM_CONF_NOTIFY_FULLY_CHARGED, NULL);
+ /* only action this if specified in the setings */
+ ret = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_NOTIFY_FULLY_CHARGED);
if (!ret) {
egg_debug ("no notification");
goto out;
@@ -1364,8 +1313,8 @@ gpm_manager_engine_discharging_cb (GpmEngine *engine, UpDevice *device, GpmManag
gchar *icon = NULL;
const gchar *kind_desc;
- /* only action this if specified in mateconf */
- ret = mateconf_client_get_bool (manager->priv->conf, GPM_CONF_NOTIFY_DISCHARGING, NULL);
+ /* only action this if specified in the settings */
+ ret = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_NOTIFY_DISCHARGING);
if (!ret) {
egg_debug ("no notification");
goto out;
@@ -1573,7 +1522,6 @@ gpm_manager_engine_charge_critical_cb (GpmEngine *engine, UpDevice *device, GpmM
{
const gchar *title = NULL;
gchar *message = NULL;
- gchar *action;
gchar *icon = NULL;
UpDeviceKind kind;
gdouble percentage;
@@ -1609,8 +1557,7 @@ gpm_manager_engine_charge_critical_cb (GpmEngine *engine, UpDevice *device, GpmM
}
/* we have to do different warnings depending on the policy */
- action = mateconf_client_get_string (manager->priv->conf, GPM_CONF_ACTIONS_CRITICAL_BATT, NULL);
- policy = gpm_action_policy_from_string (action);
+ policy = g_settings_get_enum (manager->priv->settings, GPM_SETTINGS_ACTION_CRITICAL_BATT);
/* use different text for different actions */
if (policy == GPM_ACTION_POLICY_NOTHING) {
@@ -1630,7 +1577,6 @@ gpm_manager_engine_charge_critical_cb (GpmEngine *engine, UpDevice *device, GpmM
message = g_strdup_printf (_("Computer will shutdown very soon unless it is plugged in."));
}
- g_free (action);
} else if (kind == UP_DEVICE_KIND_UPS) {
gchar *remaining_text;
@@ -1740,7 +1686,6 @@ static void
gpm_manager_engine_charge_action_cb (GpmEngine *engine, UpDevice *device, GpmManager *manager)
{
const gchar *title = NULL;
- gchar *action;
gchar *message = NULL;
gchar *icon = NULL;
UpDeviceKind kind;
@@ -1765,8 +1710,7 @@ gpm_manager_engine_charge_action_cb (GpmEngine *engine, UpDevice *device, GpmMan
title = _("Laptop battery critically low");
/* we have to do different warnings depending on the policy */
- action = mateconf_client_get_string (manager->priv->conf, GPM_CONF_ACTIONS_CRITICAL_BATT, NULL);
- policy = gpm_action_policy_from_string (action);
+ policy = g_settings_get_enum (manager->priv->settings, GPM_SETTINGS_ACTION_CRITICAL_BATT);
/* use different text for different actions */
if (policy == GPM_ACTION_POLICY_NOTHING) {
@@ -1793,8 +1737,6 @@ gpm_manager_engine_charge_action_cb (GpmEngine *engine, UpDevice *device, GpmMan
"this computer is about to shutdown."));
}
- g_free (action);
-
/* wait 20 seconds for user-panic */
g_timeout_add_seconds (20, (GSourceFunc) manager_critical_action_do, manager);
@@ -1803,8 +1745,7 @@ gpm_manager_engine_charge_action_cb (GpmEngine *engine, UpDevice *device, GpmMan
title = _("UPS critically low");
/* we have to do different warnings depending on the policy */
- action = mateconf_client_get_string (manager->priv->conf, GPM_CONF_ACTIONS_CRITICAL_UPS, NULL);
- policy = gpm_action_policy_from_string (action);
+ policy = g_settings_get_enum (manager->priv->settings, GPM_SETTINGS_ACTION_CRITICAL_UPS);
/* use different text for different actions */
if (policy == GPM_ACTION_POLICY_NOTHING) {
@@ -1827,7 +1768,6 @@ gpm_manager_engine_charge_action_cb (GpmEngine *engine, UpDevice *device, GpmMan
/* wait 20 seconds for user-panic */
g_timeout_add_seconds (20, (GSourceFunc) manager_critical_action_do, manager);
- g_free (action);
}
/* not all types have actions */
@@ -1910,11 +1850,12 @@ gpm_manager_init (GpmManager *manager)
gboolean check_type_cpu;
gint timeout;
DBusGConnection *connection;
+ GDBusConnection *g_connection;
GError *error = NULL;
- guint version;
manager->priv = GPM_MANAGER_GET_PRIVATE (manager);
connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
+ g_connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error);
/* init to unthrottled */
manager->priv->screensaver_ac_throttle_id = 0;
@@ -1930,15 +1871,14 @@ gpm_manager_init (GpmManager *manager)
/* don't apply policy when not active, so listen to ConsoleKit */
manager->priv->console = egg_console_kit_new ();
- /* this is a singleton, so we keep a master copy open here */
- manager->priv->prefs_server = gpm_prefs_server_new ();
-
manager->priv->notification_general = NULL;
manager->priv->notification_warning_low = NULL;
manager->priv->notification_discharging = NULL;
manager->priv->notification_fully_charged = NULL;
manager->priv->disks = gpm_disks_new ();
- manager->priv->conf = mateconf_client_get_default ();
+ manager->priv->settings = g_settings_new (GPM_SETTINGS_SCHEMA);
+ g_signal_connect (manager->priv->settings, "changed",
+ G_CALLBACK (gpm_manager_settings_changed_cb), manager);
manager->priv->client = up_client_new ();
g_signal_connect (manager->priv->client, "changed",
G_CALLBACK (gpm_manager_client_changed_cb), manager);
@@ -1946,28 +1886,6 @@ gpm_manager_init (GpmManager *manager)
/* use libmatenotify */
notify_init (GPM_NAME);
- /* watch mate-power-manager keys */
- mateconf_client_add_dir (manager->priv->conf, GPM_CONF_DIR,
- MATECONF_CLIENT_PRELOAD_RECURSIVE, NULL);
- mateconf_client_notify_add (manager->priv->conf, GPM_CONF_DIR,
- (MateConfClientNotifyFunc) gpm_conf_mateconf_key_changed_cb,
- manager, NULL, NULL);
-
- /* check to see if the user has installed the schema properly */
- version = mateconf_client_get_int (manager->priv->conf, GPM_CONF_SCHEMA_VERSION, NULL);
- if (version != GPM_CONF_SCHEMA_ID) {
- gpm_manager_notify (manager, &manager->priv->notification_general,
- /* TRANSLATORS: there was in install problem */
- _("Install problem!"),
- /* TRANSLATORS: the MateConf schema was not installed properly */
- _("The configuration defaults for MATE Power Manager have not been installed correctly.\n"
- "Please contact your computer administrator."),
- GPM_MANAGER_NOTIFY_TIMEOUT_LONG,
- GTK_STOCK_DIALOG_WARNING,
- NOTIFY_URGENCY_NORMAL);
- egg_error ("no mateconf schema installed!");
- }
-
/* coldplug so we are in the correct state at startup */
g_object_get (manager->priv->client,
"on-battery", &manager->priv->on_battery,
@@ -1979,10 +1897,6 @@ gpm_manager_init (GpmManager *manager)
/* try and start an interactive service */
manager->priv->screensaver = gpm_screensaver_new ();
-#if 0
- g_signal_connect (manager->priv->screensaver, "auth-request",
- G_CALLBACK (gpm_manager_screensaver_auth_request_cb), manager);
-#endif
/* try an start an interactive service */
manager->priv->backlight = gpm_backlight_new ();
@@ -1994,12 +1908,19 @@ gpm_manager_init (GpmManager *manager)
G_OBJECT (manager->priv->backlight));
}
+ manager->priv->kbd_backlight = gpm_kbd_backlight_new ();
+ if (manager->priv->kbd_backlight != NULL) {
+ gpm_kbd_backlight_register_dbus (manager->priv->kbd_backlight,
+ g_connection,
+ NULL);
+ }
+
manager->priv->idle = gpm_idle_new ();
g_signal_connect (manager->priv->idle, "idle-changed",
G_CALLBACK (gpm_manager_idle_changed_cb), manager);
/* set up the check_type_cpu, so we can disable the CPU load check */
- check_type_cpu = mateconf_client_get_bool (manager->priv->conf, GPM_CONF_IDLE_CHECK_CPU, NULL);
+ check_type_cpu = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_IDLE_CHECK_CPU);
gpm_idle_set_check_cpu (manager->priv->idle, check_type_cpu);
manager->priv->dpms = gpm_dpms_new ();
@@ -2078,17 +1999,17 @@ gpm_manager_finalize (GObject *object)
if (manager->priv->critical_alert_timeout_id != 0)
g_source_remove (manager->priv->critical_alert_timeout_id);
- g_object_unref (manager->priv->conf);
+ g_object_unref (manager->priv->settings);
g_object_unref (manager->priv->disks);
g_object_unref (manager->priv->dpms);
g_object_unref (manager->priv->idle);
g_object_unref (manager->priv->engine);
g_object_unref (manager->priv->tray_icon);
g_object_unref (manager->priv->screensaver);
- g_object_unref (manager->priv->prefs_server);
g_object_unref (manager->priv->control);
g_object_unref (manager->priv->button);
g_object_unref (manager->priv->backlight);
+ g_object_unref (manager->priv->kbd_backlight);
g_object_unref (manager->priv->console);
g_object_unref (manager->priv->client);
g_object_unref (manager->priv->status_icon);
diff --git a/src/gpm-manager.h b/src/gpm-manager.h
index 1d31b75..a78509a 100644
--- a/src/gpm-manager.h
+++ b/src/gpm-manager.h
@@ -73,9 +73,6 @@ gboolean gpm_manager_can_suspend (GpmManager *manager,
gboolean gpm_manager_can_hibernate (GpmManager *manager,
gboolean *can_hibernate,
GError **error);
-gboolean gpm_manager_get_preferences_options (GpmManager *manager,
- gint *capability,
- GError **error);
G_END_DECLS
diff --git a/src/gpm-phone.c b/src/gpm-phone.c
index e5455f7..0732c91 100644
--- a/src/gpm-phone.c
+++ b/src/gpm-phone.c
@@ -26,7 +26,6 @@
#include <glib/gi18n.h>
#include <dbus/dbus-glib.h>
-#include <mateconf/mateconf-client.h>
#include "gpm-phone.h"
#include "egg-debug.h"
#include "gpm-marshal.h"
diff --git a/src/gpm-prefs-core.c b/src/gpm-prefs-core.c
index a35b268..da985c1 100644
--- a/src/gpm-prefs-core.c
+++ b/src/gpm-prefs-core.c
@@ -30,7 +30,6 @@
#include <dbus/dbus-glib.h>
#include <math.h>
#include <string.h>
-#include <mateconf/mateconf-client.h>
#include <libupower-glib/upower.h>
#include "egg-debug.h"
@@ -40,7 +39,7 @@
#include "gpm-common.h"
#include "gpm-prefs-core.h"
#include "gpm-stock-icons.h"
-#include "gpm-prefs-server.h"
+#include "gpm-brightness.h"
static void gpm_prefs_finalize (GObject *object);
@@ -58,8 +57,7 @@ struct GpmPrefsPrivate
gboolean can_shutdown;
gboolean can_suspend;
gboolean can_hibernate;
- guint idle_delay;
- MateConfClient *conf;
+ GSettings *settings;
EggConsoleKit *console;
};
@@ -119,46 +117,6 @@ gpm_prefs_activate_window (GpmPrefs *prefs)
}
/**
- * gpm_dbus_get_caps:
- * @method: The g-p-m DBUS method name, e.g. "AllowedSuspend"
- **/
-static gint
-gpm_dbus_get_caps (GpmPrefs *prefs)
-{
- DBusGConnection *connection;
- DBusGProxy *proxy = NULL;
- GError *error = NULL;
- gboolean ret;
- gint value = 0;
-
- connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
- if (connection == NULL) {
- egg_warning ("Couldn't connect to g-p-m %s", error->message);
- g_error_free (error);
- goto out;
- }
-
- proxy = dbus_g_proxy_new_for_name (connection,
- GPM_DBUS_SERVICE,
- GPM_DBUS_PATH,
- GPM_DBUS_INTERFACE);
- ret = dbus_g_proxy_call (proxy, "GetPreferencesOptions", &error,
- G_TYPE_INVALID,
- G_TYPE_INT, &value,
- G_TYPE_INVALID);
- if (!ret) {
- /* abort as the DBUS method failed */
- egg_warning ("GetPreferencesOptions failed: %s", error->message);
- g_error_free (error);
- goto out;
- }
-out:
- if (proxy != NULL)
- g_object_unref (proxy);
- return value;
-}
-
-/**
* gpm_prefs_help_cb:
* @widget: The GtkWidget object
* @prefs: This prefs class instance
@@ -177,13 +135,10 @@ gpm_prefs_help_cb (GtkWidget *widget, GpmPrefs *prefs)
static void
gpm_prefs_icon_radio_cb (GtkWidget *widget, GpmPrefs *prefs)
{
- const gchar *str;
gint policy;
policy = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "policy"));
- str = gpm_icon_policy_to_string (policy);
- egg_debug ("Changing %s to %s", GPM_CONF_UI_ICON_POLICY, str);
- mateconf_client_set_string (prefs->priv->conf, GPM_CONF_UI_ICON_POLICY, str, NULL);
+ g_settings_set_enum (prefs->priv->settings, GPM_SETTINGS_ICON_POLICY, policy);
}
/**
@@ -198,58 +153,6 @@ gpm_prefs_format_percentage_cb (GtkScale *scale, gdouble value)
}
/**
- * gpm_prefs_brightness_slider_changed_cb:
- * @range: The GtkRange object
- * @gpm_pref_key: The MateConf key for this preference setting.
- **/
-static void
-gpm_prefs_brightness_slider_changed_cb (GtkRange *range, GpmPrefs *prefs)
-{
- gdouble value;
- gchar *gpm_pref_key;
-
- value = gtk_range_get_value (range);
- gpm_pref_key = (char *) g_object_get_data (G_OBJECT (range), "conf_key");
-
- g_object_set_data (G_OBJECT (range), "conf_key", (gpointer) gpm_pref_key);
- egg_debug ("Changing %s to %i", gpm_pref_key, (int) value);
- mateconf_client_set_int (prefs->priv->conf, gpm_pref_key, (gint) value, NULL);
-}
-
-/**
- * gpm_prefs_setup_brightness_slider:
- * @prefs: This prefs class instance
- * @widget_name: The GtkWidget name
- * @gpm_pref_key: The MateConf key for this preference setting.
- **/
-static GtkWidget *
-gpm_prefs_setup_brightness_slider (GpmPrefs *prefs, const gchar *widget_name, const gchar *gpm_pref_key)
-{
- GtkWidget *widget;
- int value;
- gboolean is_writable;
-
- widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, widget_name));
-
- g_signal_connect (G_OBJECT (widget), "format-value",
- G_CALLBACK (gpm_prefs_format_percentage_cb), NULL);
-
- value = mateconf_client_get_int (prefs->priv->conf, gpm_pref_key, NULL);
- is_writable = mateconf_client_key_is_writable (prefs->priv->conf, gpm_pref_key, NULL);
-
- gtk_widget_set_sensitive (widget, is_writable);
-
- gtk_range_set_value (GTK_RANGE (widget), value);
-
- g_object_set_data (G_OBJECT (widget), "conf_key", (gpointer) gpm_pref_key);
-
- g_signal_connect (G_OBJECT (widget), "value-changed",
- G_CALLBACK (gpm_prefs_brightness_slider_changed_cb),
- prefs);
- return widget;
-}
-
-/**
* gpm_prefs_action_combo_changed_cb:
**/
static void
@@ -258,17 +161,14 @@ gpm_prefs_action_combo_changed_cb (GtkWidget *widget, GpmPrefs *prefs)
GpmActionPolicy policy;
const GpmActionPolicy *actions;
const gchar *gpm_pref_key;
- const gchar *action;
guint active;
actions = (const GpmActionPolicy *) g_object_get_data (G_OBJECT (widget), "actions");
- gpm_pref_key = (const gchar *) g_object_get_data (G_OBJECT (widget), "conf_key");
+ gpm_pref_key = (const gchar *) g_object_get_data (G_OBJECT (widget), "settings_key");
active = gtk_combo_box_get_active (GTK_COMBO_BOX (widget));
policy = actions[active];
- action = gpm_action_policy_to_string (policy);
- egg_debug ("Changing %s to %s", gpm_pref_key, action);
- mateconf_client_set_string (prefs->priv->conf, gpm_pref_key, action, NULL);
+ g_settings_set_enum (prefs->priv->settings, gpm_pref_key, policy);
}
/**
@@ -283,13 +183,13 @@ gpm_prefs_action_time_changed_cb (GtkWidget *widget, GpmPrefs *prefs)
guint active;
values = (const gint *) g_object_get_data (G_OBJECT (widget), "values");
- gpm_pref_key = (const gchar *) g_object_get_data (G_OBJECT (widget), "conf_key");
+ gpm_pref_key = (const gchar *) g_object_get_data (G_OBJECT (widget), "settings_key");
active = gtk_combo_box_get_active (GTK_COMBO_BOX (widget));
value = values[active];
egg_debug ("Changing %s to %i", gpm_pref_key, value);
- mateconf_client_set_int (prefs->priv->conf, gpm_pref_key, value, NULL);
+ g_settings_set_int (prefs->priv->settings, gpm_pref_key, value);
}
/**
@@ -329,14 +229,13 @@ gpm_prefs_actions_destroy_cb (GpmActionPolicy *array)
* gpm_prefs_setup_action_combo:
* @prefs: This prefs class instance
* @widget_name: The GtkWidget name
- * @gpm_pref_key: The MateConf key for this preference setting.
+ * @gpm_pref_key: The settings key for this preference setting.
* @actions: The actions to associate in an array.
**/
static void
gpm_prefs_setup_action_combo (GpmPrefs *prefs, const gchar *widget_name,
const gchar *gpm_pref_key, const GpmActionPolicy *actions)
{
- gchar *value_txt;
gint i;
gboolean is_writable;
GtkWidget *widget;
@@ -348,14 +247,13 @@ gpm_prefs_setup_action_combo (GpmPrefs *prefs, const gchar *widget_name,
widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, widget_name));
gpm_prefs_set_combo_simple_text (widget);
- value_txt = mateconf_client_get_string (prefs->priv->conf, gpm_pref_key, NULL);
- is_writable = mateconf_client_key_is_writable (prefs->priv->conf, gpm_pref_key, NULL);
- value = gpm_action_policy_from_string (value_txt);
+ value = g_settings_get_enum (prefs->priv->settings, gpm_pref_key);
+ is_writable = g_settings_is_writable (prefs->priv->settings, gpm_pref_key);
gtk_widget_set_sensitive (widget, is_writable);
array = g_ptr_array_new ();
- g_object_set_data (G_OBJECT (widget), "conf_key", (gpointer) gpm_pref_key);
+ g_object_set_data (G_OBJECT (widget), "settings_key", (gpointer) gpm_pref_key);
g_signal_connect (G_OBJECT (widget), "changed",
G_CALLBACK (gpm_prefs_action_combo_changed_cb), prefs);
@@ -408,18 +306,15 @@ gpm_prefs_setup_action_combo (GpmPrefs *prefs, const gchar *widget_name,
g_ptr_array_add (array, GINT_TO_POINTER (policy));
#endif
} else if (policy == GPM_ACTION_POLICY_NOTHING) {
- /* we only add do nothing in the GUI if the user has explicitly specified this in MateConf */
- if (value == GPM_ACTION_POLICY_NOTHING) {
- #if GTK_CHECK_VERSION (2, 24, 0)
- gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Do nothing"));
- g_ptr_array_add(array, GINT_TO_POINTER (policy));
- #else
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), _("Do nothing"));
- g_ptr_array_add (array, GINT_TO_POINTER (policy));
- #endif
- }
+ #if GTK_CHECK_VERSION (2, 24, 0)
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Do nothing"));
+ g_ptr_array_add(array, GINT_TO_POINTER (policy));
+ #else
+ gtk_combo_box_append_text (GTK_COMBO_BOX (widget), _("Do nothing"));
+ g_ptr_array_add (array, GINT_TO_POINTER (policy));
+ #endif
} else {
- egg_warning ("Unknown action read from conf: %i", policy);
+ egg_warning ("Unknown action read from settings: %i", policy);
}
}
@@ -431,23 +326,21 @@ gpm_prefs_setup_action_combo (GpmPrefs *prefs, const gchar *widget_name,
g_object_set_data_full (G_OBJECT (widget), "actions", (gpointer) actions_added, (GDestroyNotify) gpm_prefs_actions_destroy_cb);
- /* set what we have in MateConf */
+ /* set what we have in the settings */
for (i=0; actions_added[i] != -1; i++) {
policy = actions_added[i];
- egg_debug ("added: %s", gpm_action_policy_to_string (policy));
if (value == policy)
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), i);
}
g_ptr_array_unref (array);
- g_free (value_txt);
}
/**
* gpm_prefs_setup_time_combo:
* @prefs: This prefs class instance
* @widget_name: The GtkWidget name
- * @gpm_pref_key: The MateConf key for this preference setting.
+ * @gpm_pref_key: The settings key for this preference setting.
* @actions: The actions to associate in an array.
**/
static void
@@ -463,11 +356,11 @@ gpm_prefs_setup_time_combo (GpmPrefs *prefs, const gchar *widget_name,
widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, widget_name));
gpm_prefs_set_combo_simple_text (widget);
- value = mateconf_client_get_int (prefs->priv->conf, gpm_pref_key, NULL);
- is_writable = mateconf_client_key_is_writable (prefs->priv->conf, gpm_pref_key, NULL);
+ value = g_settings_get_int (prefs->priv->settings, gpm_pref_key);
+ is_writable = g_settings_is_writable (prefs->priv->settings, gpm_pref_key);
gtk_widget_set_sensitive (widget, is_writable);
- g_object_set_data (G_OBJECT (widget), "conf_key", (gpointer) gpm_pref_key);
+ g_object_set_data (G_OBJECT (widget), "settings_key", (gpointer) gpm_pref_key);
g_object_set_data (G_OBJECT (widget), "values", (gpointer) values);
/* add each time */
@@ -501,55 +394,6 @@ gpm_prefs_setup_time_combo (GpmPrefs *prefs, const gchar *widget_name,
}
/**
- * gpm_prefs_checkbox_lock_cb:
- * @widget: The GtkWidget object
- * @gpm_pref_key: The MateConf key for this preference setting.
- **/
-static void
-gpm_prefs_checkbox_lock_cb (GtkWidget *widget, GpmPrefs *prefs)
-{
- gboolean checked;
- gchar *gpm_pref_key;
-
- checked = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
-
- gpm_pref_key = (char *) g_object_get_data (G_OBJECT (widget), "conf_key");
- egg_debug ("Changing %s to %i", gpm_pref_key, checked);
- mateconf_client_set_bool (prefs->priv->conf, gpm_pref_key, checked, NULL);
-}
-
-/**
- * gpm_prefs_setup_checkbox:
- * @prefs: This prefs class instance
- * @widget_name: The GtkWidget name
- * @gpm_pref_key: The MateConf key for this preference setting.
- **/
-static GtkWidget *
-gpm_prefs_setup_checkbox (GpmPrefs *prefs, const gchar *widget_name, const gchar *gpm_pref_key)
-{
- gboolean checked;
- GtkWidget *widget;
-
- egg_debug ("Setting up %s", gpm_pref_key);
-
- widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, widget_name));
-
- checked = mateconf_client_get_bool (prefs->priv->conf, gpm_pref_key, NULL);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), checked);
-
- g_object_set_data (G_OBJECT (widget), "conf_key", (gpointer) gpm_pref_key);
-
- /* manually do the callback in case we hide elements in the cb */
- gpm_prefs_checkbox_lock_cb (widget, prefs);
-
- /* setup after set */
- g_signal_connect (widget, "clicked",
- G_CALLBACK (gpm_prefs_checkbox_lock_cb), prefs);
-
- return widget;
-}
-
-/**
* gpm_prefs_close_cb:
* @widget: The GtkWidget object
* @prefs: This prefs class instance
@@ -574,46 +418,10 @@ gpm_prefs_delete_event_cb (GtkWidget *widget, GdkEvent *event, GpmPrefs *prefs)
return FALSE;
}
-/**
- * gpm_conf_mateconf_key_changed_cb:
- *
- * We might have to do things when the mateconf keys change; do them here.
- **/
-static void
-gpm_conf_mateconf_key_changed_cb (MateConfClient *client, guint cnxn_id, MateConfEntry *entry, GpmPrefs *prefs)
-{
- MateConfValue *value;
- gint brightness;
- GtkWidget *widget;
- gboolean enabled;
-
- value = mateconf_entry_get_value (entry);
- if (value == NULL)
- return;
-
- if (g_strcmp0 (entry->key, GPM_CONF_BACKLIGHT_BRIGHTNESS_AC) == 0) {
- widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "hscale_ac_brightness"));
- brightness = mateconf_value_get_int (value);
- gtk_range_set_value (GTK_RANGE (widget), brightness);
- }
-
- if (g_strcmp0 (entry->key, GPM_CONF_DISKS_SPINDOWN_ENABLE_AC) == 0) {
- widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "checkbutton_ac_spindown"));
- enabled = mateconf_value_get_bool (value);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), enabled);
-
- } else if (g_strcmp0 (entry->key, GPM_CONF_DISKS_SPINDOWN_ENABLE_BATT) == 0) {
- widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "checkbutton_battery_spindown"));
- enabled = mateconf_value_get_bool (value);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), enabled);
- }
-}
-
/** setup the notification page */
static void
prefs_setup_notification (GpmPrefs *prefs)
{
- gchar *icon_policy_str;
gint icon_policy;
GtkWidget *radiobutton_icon_always;
GtkWidget *radiobutton_icon_present;
@@ -622,9 +430,7 @@ prefs_setup_notification (GpmPrefs *prefs)
GtkWidget *radiobutton_icon_never;
gboolean is_writable;
- icon_policy_str = mateconf_client_get_string (prefs->priv->conf, GPM_CONF_UI_ICON_POLICY, NULL);
- icon_policy = gpm_icon_policy_from_string (icon_policy_str);
- g_free (icon_policy_str);
+ icon_policy = g_settings_get_enum (prefs->priv->settings, GPM_SETTINGS_ICON_POLICY);
radiobutton_icon_always = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder,
"radiobutton_notification_always"));
@@ -637,7 +443,7 @@ prefs_setup_notification (GpmPrefs *prefs)
radiobutton_icon_never = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder,
"radiobutton_notification_never"));
- is_writable = mateconf_client_key_is_writable (prefs->priv->conf, GPM_CONF_UI_ICON_POLICY, NULL);
+ is_writable = g_settings_is_writable (prefs->priv->settings, GPM_SETTINGS_ICON_POLICY);
gtk_widget_set_sensitive (radiobutton_icon_always, is_writable);
gtk_widget_set_sensitive (radiobutton_icon_present, is_writable);
gtk_widget_set_sensitive (radiobutton_icon_charge, is_writable);
@@ -666,7 +472,7 @@ prefs_setup_notification (GpmPrefs *prefs)
g_object_set_data (G_OBJECT (radiobutton_icon_never), "policy",
GINT_TO_POINTER (GPM_ICON_POLICY_NEVER));
- /* only connect the callbacks after we set the value, else the conf
+ /* only connect the callbacks after we set the value, else the settings
* keys gets written to (for a split second), and the icon flickers. */
g_signal_connect (radiobutton_icon_always, "clicked",
G_CALLBACK (gpm_prefs_icon_radio_cb), prefs);
@@ -709,23 +515,33 @@ prefs_setup_ac (GpmPrefs *prefs)
-1};
gpm_prefs_setup_time_combo (prefs, "combobox_ac_computer",
- GPM_CONF_TIMEOUT_SLEEP_COMPUTER_AC,
+ GPM_SETTINGS_SLEEP_COMPUTER_AC,
computer_times);
gpm_prefs_setup_time_combo (prefs, "combobox_ac_display",
- GPM_CONF_TIMEOUT_SLEEP_DISPLAY_AC,
+ GPM_SETTINGS_SLEEP_DISPLAY_AC,
display_times);
gpm_prefs_setup_action_combo (prefs, "combobox_ac_lid",
- GPM_CONF_BUTTON_LID_AC,
+ GPM_SETTINGS_BUTTON_LID_AC,
button_lid_actions);
- gpm_prefs_setup_brightness_slider (prefs, "hscale_ac_brightness",
- GPM_CONF_BACKLIGHT_BRIGHTNESS_AC);
+ /* setup brightness slider */
+ widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "hscale_ac_brightness"));
+ g_settings_bind (prefs->priv->settings, GPM_SETTINGS_BRIGHTNESS_AC,
+ gtk_range_get_adjustment (GTK_RANGE (widget)), "value",
+ G_SETTINGS_BIND_DEFAULT);
+ g_signal_connect (G_OBJECT (widget), "format-value",
+ G_CALLBACK (gpm_prefs_format_percentage_cb), NULL);
- gpm_prefs_setup_checkbox (prefs, "checkbutton_ac_display_dim",
- GPM_CONF_BACKLIGHT_IDLE_DIM_AC);
- gpm_prefs_setup_checkbox (prefs, "checkbutton_ac_spindown",
- GPM_CONF_DISKS_SPINDOWN_ENABLE_AC);
+ /* set up the checkboxes */
+ widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "checkbutton_ac_display_dim"));
+ g_settings_bind (prefs->priv->settings, GPM_SETTINGS_IDLE_DIM_AC,
+ widget, "active",
+ G_SETTINGS_BIND_DEFAULT);
+ widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "checkbutton_ac_spindown"));
+ g_settings_bind (prefs->priv->settings, GPM_SETTINGS_SPINDOWN_ENABLE_AC,
+ widget, "active",
+ G_SETTINGS_BIND_DEFAULT);
if (prefs->priv->has_button_lid == FALSE) {
widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "hbox_ac_lid"));
@@ -792,10 +608,10 @@ prefs_setup_battery (GpmPrefs *prefs)
-1};
gpm_prefs_setup_time_combo (prefs, "combobox_battery_computer",
- GPM_CONF_TIMEOUT_SLEEP_COMPUTER_BATT,
+ GPM_SETTINGS_SLEEP_COMPUTER_BATT,
computer_times);
gpm_prefs_setup_time_combo (prefs, "combobox_battery_display",
- GPM_CONF_TIMEOUT_SLEEP_DISPLAY_BATT,
+ GPM_SETTINGS_SLEEP_DISPLAY_BATT,
display_times);
if (prefs->priv->has_batteries == FALSE) {
@@ -807,19 +623,25 @@ prefs_setup_battery (GpmPrefs *prefs)
}
gpm_prefs_setup_action_combo (prefs, "combobox_battery_lid",
- GPM_CONF_BUTTON_LID_BATT,
+ GPM_SETTINGS_BUTTON_LID_BATT,
button_lid_actions);
gpm_prefs_setup_action_combo (prefs, "combobox_battery_critical",
- GPM_CONF_ACTIONS_CRITICAL_BATT,
+ GPM_SETTINGS_ACTION_CRITICAL_BATT,
battery_critical_actions);
- /* set up the battery reduce checkbox */
- gpm_prefs_setup_checkbox (prefs, "checkbutton_battery_display_reduce",
- GPM_CONF_BACKLIGHT_BATTERY_REDUCE);
- gpm_prefs_setup_checkbox (prefs, "checkbutton_battery_display_dim",
- GPM_CONF_BACKLIGHT_IDLE_DIM_BATT);
- gpm_prefs_setup_checkbox (prefs, "checkbutton_battery_spindown",
- GPM_CONF_DISKS_SPINDOWN_ENABLE_BATT);
+ /* set up the checkboxes */
+ widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "checkbutton_battery_display_reduce"));
+ g_settings_bind (prefs->priv->settings, GPM_SETTINGS_BACKLIGHT_BATTERY_REDUCE,
+ widget, "active",
+ G_SETTINGS_BIND_DEFAULT);
+ widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "checkbutton_battery_display_dim"));
+ g_settings_bind (prefs->priv->settings, GPM_SETTINGS_IDLE_DIM_BATT,
+ widget, "active",
+ G_SETTINGS_BIND_DEFAULT);
+ widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "checkbutton_battery_spindown"));
+ g_settings_bind (prefs->priv->settings, GPM_SETTINGS_SPINDOWN_ENABLE_BATT,
+ widget, "active",
+ G_SETTINGS_BIND_DEFAULT);
if (prefs->priv->has_button_lid == FALSE) {
widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "hbox_battery_lid"));
@@ -870,10 +692,10 @@ prefs_setup_ups (GpmPrefs *prefs)
-1};
gpm_prefs_setup_time_combo (prefs, "combobox_ups_computer",
- GPM_CONF_TIMEOUT_SLEEP_COMPUTER_UPS,
+ GPM_SETTINGS_SLEEP_COMPUTER_UPS,
computer_times);
gpm_prefs_setup_time_combo (prefs, "combobox_ups_display",
- GPM_CONF_TIMEOUT_SLEEP_DISPLAY_UPS,
+ GPM_SETTINGS_SLEEP_DISPLAY_UPS,
display_times);
if (prefs->priv->has_ups == FALSE) {
@@ -885,10 +707,10 @@ prefs_setup_ups (GpmPrefs *prefs)
}
gpm_prefs_setup_action_combo (prefs, "combobox_ups_low",
- GPM_CONF_ACTIONS_LOW_UPS,
+ GPM_SETTINGS_ACTION_LOW_UPS,
ups_low_actions);
gpm_prefs_setup_action_combo (prefs, "combobox_ups_critical",
- GPM_CONF_ACTIONS_CRITICAL_UPS,
+ GPM_SETTINGS_ACTION_CRITICAL_UPS,
ups_low_actions);
}
@@ -909,10 +731,10 @@ prefs_setup_general (GpmPrefs *prefs)
-1};
gpm_prefs_setup_action_combo (prefs, "combobox_general_power",
- GPM_CONF_BUTTON_POWER,
+ GPM_SETTINGS_BUTTON_POWER,
power_button_actions);
gpm_prefs_setup_action_combo (prefs, "combobox_general_suspend",
- GPM_CONF_BUTTON_SUSPEND,
+ GPM_SETTINGS_BUTTON_SUSPEND,
suspend_button_actions);
if (prefs->priv->has_button_suspend == FALSE) {
@@ -926,6 +748,7 @@ prefs_setup_general (GpmPrefs *prefs)
}
}
+#ifdef HAVE_MATECONF_DEFAULTS
/**
* gpm_prefs_set_defaults_cb:
**/
@@ -970,6 +793,7 @@ gpm_prefs_set_defaults_cb (GtkWidget *widget, GpmPrefs *prefs)
g_object_unref (proxy);
}
+#endif
/**
* gpm_prefs_init:
@@ -980,44 +804,62 @@ gpm_prefs_init (GpmPrefs *prefs)
{
GtkWidget *main_window;
GtkWidget *widget;
- gint caps;
guint retval;
GError *error = NULL;
+ GPtrArray *devices = NULL;
+ UpDevice *device;
+ UpDeviceKind kind;
+ GpmBrightness *brightness;
+ gboolean ret;
+ guint i;
prefs->priv = GPM_PREFS_GET_PRIVATE (prefs);
prefs->priv->client = up_client_new ();
prefs->priv->console = egg_console_kit_new ();
- prefs->priv->conf = mateconf_client_get_default ();
- /* watch mate-power-manager keys */
- mateconf_client_add_dir (prefs->priv->conf, GPM_CONF_DIR,
- MATECONF_CLIENT_PRELOAD_RECURSIVE, NULL);
- mateconf_client_notify_add (prefs->priv->conf, GPM_CONF_DIR,
- (MateConfClientNotifyFunc) gpm_conf_mateconf_key_changed_cb,
- prefs, NULL, NULL);
-
- /* get value of delay in mate-session */
- prefs->priv->idle_delay = mateconf_client_get_int (prefs->priv->conf, GPM_CONF_IDLE_DELAY, NULL);
-
- caps = gpm_dbus_get_caps (prefs);
- egg_debug ("caps=%i", caps);
-
- /* get properties from mate-power-manager */
- prefs->priv->has_batteries = ((caps & GPM_PREFS_SERVER_BATTERY) > 0);
- prefs->priv->has_ups = ((caps & GPM_PREFS_SERVER_UPS) > 0);
- prefs->priv->has_lcd = ((caps & GPM_PREFS_SERVER_BACKLIGHT) > 0);
- prefs->priv->has_button_lid = ((caps & GPM_PREFS_SERVER_LID) > 0);
- prefs->priv->has_button_suspend = TRUE;
+ prefs->priv->settings = g_settings_new (GPM_SETTINGS_SCHEMA);
/* are we allowed to shutdown? */
prefs->priv->can_shutdown = TRUE;
egg_console_kit_can_stop (prefs->priv->console, &prefs->priv->can_shutdown, NULL);
/* get values from UpClient */
+ prefs->priv->can_suspend = up_client_get_can_suspend (prefs->priv->client);
+ prefs->priv->can_hibernate = up_client_get_can_hibernate (prefs->priv->client);
+
+#if UP_CHECK_VERSION(0,9,2)
+ prefs->priv->has_button_lid = up_client_get_lid_is_present (prefs->priv->client);
+#else
g_object_get (prefs->priv->client,
- "can-suspend", &prefs->priv->can_suspend,
- "can-hibernate", &prefs->priv->can_hibernate,
- NULL);
+ "lid-is-present", &prefs->priv->has_button_lid,
+ NULL);
+#endif
+ prefs->priv->has_button_suspend = TRUE;
+
+ /* find if we have brightness hardware */
+ brightness = gpm_brightness_new ();
+ prefs->priv->has_lcd = gpm_brightness_has_hw (brightness);
+ g_object_unref (brightness);
+
+ /* get device list */
+ ret = up_client_enumerate_devices_sync (prefs->priv->client, NULL, &error);
+ if (!ret) {
+ egg_warning ("failed to get device list: %s", error->message);
+ g_error_free (error);
+ }
+
+ devices = up_client_get_devices (prefs->priv->client);
+ for (i=0; i<devices->len; i++) {
+ device = g_ptr_array_index (devices, i);
+ g_object_get (device,
+ "kind", &kind,
+ NULL);
+ if (kind == UP_DEVICE_KIND_BATTERY)
+ prefs->priv->has_batteries = TRUE;
+ if (kind == UP_DEVICE_KIND_UPS)
+ prefs->priv->has_ups = TRUE;
+ }
+ g_ptr_array_unref (devices);
prefs->priv->builder = gtk_builder_new ();
@@ -1083,7 +925,7 @@ gpm_prefs_finalize (GObject *object)
prefs = GPM_PREFS (object);
prefs->priv = GPM_PREFS_GET_PRIVATE (prefs);
- g_object_unref (prefs->priv->conf);
+ g_object_unref (prefs->priv->settings);
g_object_unref (prefs->priv->client);
g_object_unref (prefs->priv->console);
diff --git a/src/gpm-prefs-server.c b/src/gpm-prefs-server.c
deleted file mode 100644
index 2ced9ff..0000000
--- a/src/gpm-prefs-server.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2007 Richard Hughes <[email protected]>
- *
- * Licensed under the GNU General Public License Version 2
- *
- * This program is free software; you can redistribute it and/or modify
- * it 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <time.h>
-#include <errno.h>
-
-#include <string.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-#include <glib/gi18n.h>
-#include <dbus/dbus-glib.h>
-
-#include "gpm-prefs-server.h"
-#include "egg-debug.h"
-
-#define GPM_PREFS_SERVER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPM_TYPE_PREFS_SERVER, GpmPrefsServerPrivate))
-
-struct GpmPrefsServerPrivate
-{
- guint capability;
-};
-
-enum {
- CAPABILITY_CHANGED,
- LAST_SIGNAL
-};
-
-static guint signals [LAST_SIGNAL] = { 0 };
-static gpointer gpm_prefs_server_object = NULL;
-
-G_DEFINE_TYPE (GpmPrefsServer, gpm_prefs_server, G_TYPE_OBJECT)
-
-/**
- * gpm_prefs_server_get_capability:
- **/
-gboolean
-gpm_prefs_server_get_capability (GpmPrefsServer *server,
- gint *capability)
-{
- g_return_val_if_fail (server != NULL, FALSE);
- g_return_val_if_fail (GPM_IS_PREFS_SERVER (server), FALSE);
- *capability = server->priv->capability;
- return TRUE;
-}
-
-/**
- * gpm_prefs_server_set_capability:
- **/
-gboolean
-gpm_prefs_server_set_capability (GpmPrefsServer *server,
- gint capability)
-{
- g_return_val_if_fail (server != NULL, FALSE);
- g_return_val_if_fail (GPM_IS_PREFS_SERVER (server), FALSE);
- server->priv->capability = server->priv->capability + capability;
- egg_debug ("capability now %i", server->priv->capability);
- return TRUE;
-}
-
-/**
- * gpm_prefs_server_class_init:
- * @klass: This prefs class instance
- **/
-static void
-gpm_prefs_server_class_init (GpmPrefsServerClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GpmPrefsServerPrivate));
- signals [CAPABILITY_CHANGED] =
- g_signal_new ("capability-changed",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GpmPrefsServerClass, capability_changed),
- NULL,
- NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-}
-
-/**
- * gpm_prefs_server_init:
- * @server: This server class instance
- *
- * initialises the server class. NOTE: We expect prefs_server objects
- * to *NOT* be removed or added during the session.
- * We only control the first prefs_server object if there are more than one.
- **/
-static void
-gpm_prefs_server_init (GpmPrefsServer *server)
-{
- server->priv = GPM_PREFS_SERVER_GET_PRIVATE (server);
- server->priv->capability = 0;
-}
-
-/**
- * gpm_prefs_server_new:
- * Return value: A new server class instance.
- * Can return NULL if no suitable hardware is found.
- **/
-GpmPrefsServer *
-gpm_prefs_server_new (void)
-{
- if (gpm_prefs_server_object != NULL) {
- g_object_ref (gpm_prefs_server_object);
- } else {
- gpm_prefs_server_object = g_object_new (GPM_TYPE_PREFS_SERVER, NULL);
- g_object_add_weak_pointer (gpm_prefs_server_object, &gpm_prefs_server_object);
- }
- return GPM_PREFS_SERVER (gpm_prefs_server_object);
-}
diff --git a/src/gpm-prefs-server.h b/src/gpm-prefs-server.h
deleted file mode 100644
index 62cadb6..0000000
--- a/src/gpm-prefs-server.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2007 Richard Hughes <[email protected]>
- *
- * Licensed under the GNU General Public License Version 2
- *
- * This program is free software; you can redistribute it and/or modify
- * it 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef __GPM_PREFS_SERVER_H
-#define __GPM_PREFS_SERVER_H
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-#define GPM_TYPE_PREFS_SERVER (gpm_prefs_server_get_type ())
-#define GPM_PREFS_SERVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GPM_TYPE_PREFS_SERVER, GpmPrefsServer))
-#define GPM_PREFS_SERVER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GPM_TYPE_PREFS_SERVER, GpmPrefsServerClass))
-#define GPM_IS_PREFS_SERVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GPM_TYPE_PREFS_SERVER))
-#define GPM_IS_PREFS_SERVER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GPM_TYPE_PREFS_SERVER))
-#define GPM_PREFS_SERVER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GPM_TYPE_PREFS_SERVER, GpmPrefsServerClass))
-
-#define GPM_PREFS_SERVER_BACKLIGHT 1
-#define GPM_PREFS_SERVER_LID 4
-#define GPM_PREFS_SERVER_BATTERY 8
-#define GPM_PREFS_SERVER_UPS 16
-#define GPM_PREFS_SERVER_KEYLIGHT 32
-
-typedef struct GpmPrefsServerPrivate GpmPrefsServerPrivate;
-
-typedef struct
-{
- GObject parent;
- GpmPrefsServerPrivate *priv;
-} GpmPrefsServer;
-
-typedef struct
-{
- GObjectClass parent_class;
- void (* capability_changed) (GpmPrefsServer *server,
- gint capability);
-} GpmPrefsServerClass;
-
-GType gpm_prefs_server_get_type (void);
-GpmPrefsServer *gpm_prefs_server_new (void);
-
-gboolean gpm_prefs_server_get_capability (GpmPrefsServer *server,
- gint *capability);
-gboolean gpm_prefs_server_set_capability (GpmPrefsServer *server,
- gint capability);
-
-G_END_DECLS
-
-#endif /* __GPM_PREFS_SERVER_H */
diff --git a/src/gpm-screensaver.c b/src/gpm-screensaver.c
index b4f9ad7..26e72e7 100644
--- a/src/gpm-screensaver.c
+++ b/src/gpm-screensaver.c
@@ -25,7 +25,6 @@
#include <glib.h>
#include <glib/gi18n.h>
#include <dbus/dbus-glib.h>
-#include <mateconf/mateconf-client.h>
#include "gpm-screensaver.h"
#include "gpm-common.h"
@@ -42,105 +41,13 @@ static void gpm_screensaver_finalize (GObject *object);
struct GpmScreensaverPrivate
{
DBusGProxy *proxy;
- MateConfClient *conf;
};
-enum {
- AUTH_REQUEST,
- LAST_SIGNAL
-};
-#if 0
-static guint signals [LAST_SIGNAL] = { 0 };
-#endif
static gpointer gpm_screensaver_object = NULL;
G_DEFINE_TYPE (GpmScreensaver, gpm_screensaver, G_TYPE_OBJECT)
-#if 0
-
-/** Invoked when we get the AuthenticationRequestBegin from g-s when the user
- * has moved their mouse and we are showing the authentication box.
- */
-static void
-gpm_screensaver_auth_begin (DBusGProxy *proxy,
- GpmScreensaver *screensaver)
-{
- egg_debug ("emitting auth-request : (%i)", TRUE);
- g_signal_emit (screensaver, signals [AUTH_REQUEST], 0, TRUE);
-}
-
-/** Invoked when we get the AuthenticationRequestEnd from g-s when the user
- * has entered a valid password or re-authenticated.
- */
-static void
-gpm_screensaver_auth_end (DBusGProxy *proxy,
- GpmScreensaver *screensaver)
-{
- egg_debug ("emitting auth-request : (%i)", FALSE);
- g_signal_emit (screensaver, signals [AUTH_REQUEST], 0, FALSE);
-}
-
-/**
- * gpm_screensaver_proxy_connect_more:
- * @screensaver: This class instance
- **/
-static gboolean
-gpm_screensaver_proxy_connect_more (GpmScreensaver *screensaver)
-{
- g_return_val_if_fail (GPM_IS_SCREENSAVER (screensaver), FALSE);
-
- if (screensaver->priv->proxy == NULL) {
- egg_warning ("not connected");
- return FALSE;
- }
-
- /* get AuthenticationRequestBegin */
- dbus_g_proxy_add_signal (screensaver->priv->proxy,
- "AuthenticationRequestBegin", G_TYPE_INVALID);
- dbus_g_proxy_connect_signal (screensaver->priv->proxy,
- "AuthenticationRequestBegin",
- G_CALLBACK (gpm_screensaver_auth_begin),
- screensaver, NULL);
-
- /* get AuthenticationRequestEnd */
- dbus_g_proxy_add_signal (screensaver->priv->proxy,
- "AuthenticationRequestEnd", G_TYPE_INVALID);
- dbus_g_proxy_connect_signal (screensaver->priv->proxy,
- "AuthenticationRequestEnd",
- G_CALLBACK (gpm_screensaver_auth_end),
- screensaver, NULL);
-
- return TRUE;
-}
-
-/**
- * gpm_screensaver_proxy_disconnect_more:
- * @screensaver: This class instance
- **/
-static gboolean
-gpm_screensaver_proxy_disconnect_more (GpmScreensaver *screensaver)
-{
- g_return_val_if_fail (GPM_IS_SCREENSAVER (screensaver), FALSE);
- egg_debug ("mate-screensaver disconnected from the session DBUS");
- return TRUE;
-}
-#endif
-
-/**
- * gpm_screensaver_lock_enabled:
- * @screensaver: This class instance
- * Return value: If mate-screensaver is set to lock the screen on screensave
- **/
-gboolean
-gpm_screensaver_lock_enabled (GpmScreensaver *screensaver)
-{
- gboolean enabled;
- g_return_val_if_fail (GPM_IS_SCREENSAVER (screensaver), FALSE);
- enabled = mateconf_client_get_bool (screensaver->priv->conf, GS_PREF_LOCK_ENABLED, NULL);
- return enabled;
-}
-
/**
* gpm_screensaver_lock
* @screensaver: This class instance
@@ -328,17 +235,6 @@ gpm_screensaver_class_init (GpmScreensaverClass *klass)
object_class->finalize = gpm_screensaver_finalize;
g_type_class_add_private (klass, sizeof (GpmScreensaverPrivate));
-#if 0
- signals [AUTH_REQUEST] =
- g_signal_new ("auth-request",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GpmScreensaverClass, auth_request),
- NULL,
- NULL,
- g_cclosure_marshal_VOID__BOOLEAN,
- G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
-#endif
}
/**
@@ -357,7 +253,6 @@ gpm_screensaver_init (GpmScreensaver *screensaver)
GS_LISTENER_SERVICE,
GS_LISTENER_PATH,
GS_LISTENER_INTERFACE);
- screensaver->priv->conf = mateconf_client_get_default ();
}
/**
@@ -374,7 +269,6 @@ gpm_screensaver_finalize (GObject *object)
screensaver = GPM_SCREENSAVER (object);
screensaver->priv = GPM_SCREENSAVER_GET_PRIVATE (screensaver);
- g_object_unref (screensaver->priv->conf);
g_object_unref (screensaver->priv->proxy);
G_OBJECT_CLASS (gpm_screensaver_parent_class)->finalize (object);
@@ -401,18 +295,6 @@ gpm_screensaver_new (void)
#ifdef EGG_TEST
#include "egg-test.h"
-#if 0
-static gboolean test_got_request = FALSE;
-static void
-gpm_screensaver_test_auth_request_cb (GpmScreensaver *screensaver, gboolean auth, EggTest *test)
-{
- egg_debug ("auth request = %i", auth);
- test_got_request = auth;
-
- egg_test_loop_quit (test);
-}
-#endif
-
void
gpm_screensaver_test (gpointer data)
{
@@ -429,11 +311,6 @@ gpm_screensaver_test (gpointer data)
screensaver = gpm_screensaver_new ();
egg_test_assert (test, (screensaver != NULL));
-#if 0
- /* connect signals */
- g_signal_connect (screensaver, "auth-request",
- G_CALLBACK (gpm_screensaver_test_auth_request_cb), test);
-#endif
/************************************************************/
egg_test_title (test, "lock screensaver");
ret = gpm_screensaver_lock (screensaver);
diff --git a/src/gpm-screensaver.h b/src/gpm-screensaver.h
index b4c5733..9f81aec 100644
--- a/src/gpm-screensaver.h
+++ b/src/gpm-screensaver.h
@@ -44,10 +44,6 @@ typedef struct
typedef struct
{
GObjectClass parent_class;
-#if 0
- void (* auth_request) (GpmScreensaver *screensaver,
- gboolean auth);
-#endif
} GpmScreensaverClass;
GType gpm_screensaver_get_type (void);
@@ -55,7 +51,6 @@ GpmScreensaver *gpm_screensaver_new (void);
void gpm_screensaver_test (gpointer data);
gboolean gpm_screensaver_lock (GpmScreensaver *screensaver);
-gboolean gpm_screensaver_lock_enabled (GpmScreensaver *screensaver);
guint32 gpm_screensaver_add_throttle (GpmScreensaver *screensaver,
const gchar *reason);
gboolean gpm_screensaver_remove_throttle (GpmScreensaver *screensaver,
diff --git a/src/gpm-statistics.c b/src/gpm-statistics.c
index 48ce69b..3284067 100644
--- a/src/gpm-statistics.c
+++ b/src/gpm-statistics.c
@@ -28,7 +28,6 @@
#include <gtk/gtk.h>
#include <dbus/dbus-glib.h>
-#include <mateconf/mateconf-client.h>
#include <libupower-glib/upower.h>
#include "egg-debug.h"
@@ -49,7 +48,7 @@ gchar *current_device = NULL;
static const gchar *history_type;
static const gchar *stats_type;
static guint history_time;
-static MateConfClient *mateconf_client;
+static GSettings *settings;
static gfloat sigma_smoothing = 0.0f;
static UpWakeups *wakeups = NULL;
static GtkWidget *graph_history = NULL;
@@ -1107,8 +1106,8 @@ gpm_stats_notebook_changed_cb (GtkNotebook *notebook, gpointer page, gint page_n
widget = GTK_WIDGET (gtk_builder_get_object (builder, "dialog_stats"));
gpm_stats_set_title (GTK_WINDOW (widget), page_num);
- /* save page in mateconf */
- mateconf_client_set_int (mateconf_client, GPM_CONF_INFO_PAGE_NUMBER, page_num, NULL);
+ /* save page in gsettings */
+ g_settings_set_int (settings, GPM_SETTINGS_INFO_PAGE_NUMBER, page_num);
if (current_device == NULL)
return;
@@ -1151,8 +1150,8 @@ gpm_stats_devices_treeview_clicked_cb (GtkTreeSelection *selection, gboolean dat
g_free (current_device);
gtk_tree_model_get (model, &iter, GPM_DEVICES_COLUMN_ID, &current_device, -1);
- /* save device in mateconf */
- mateconf_client_set_string (mateconf_client, GPM_CONF_INFO_LAST_DEVICE, current_device, NULL);
+ /* save device in gsettings */
+ g_settings_set_string (settings, GPM_SETTINGS_INFO_LAST_DEVICE, current_device);
/* show transaction_id */
egg_debug ("selected row is: %s", current_device);
@@ -1326,8 +1325,8 @@ gpm_stats_history_type_combo_changed_cb (GtkWidget *widget, gpointer data)
gpm_stats_button_update_ui ();
- /* save to mateconf */
- mateconf_client_set_string (mateconf_client, GPM_CONF_INFO_HISTORY_TYPE, history_type, NULL);
+ /* save to gsettings */
+ g_settings_set_string (settings, GPM_SETTINGS_INFO_HISTORY_TYPE, history_type);
}
/**
@@ -1378,8 +1377,8 @@ gpm_stats_type_combo_changed_cb (GtkWidget *widget, gpointer data)
gpm_stats_button_update_ui ();
- /* save to mateconf */
- mateconf_client_set_string (mateconf_client, GPM_CONF_INFO_STATS_TYPE, stats_type, NULL);
+ /* save to gsettings */
+ g_settings_set_string (settings, GPM_SETTINGS_INFO_STATS_TYPE, stats_type);
}
/**
@@ -1405,8 +1404,8 @@ gpm_stats_range_combo_changed (GtkWidget *widget, gpointer data)
else
g_assert (FALSE);
- /* save to mateconf */
- mateconf_client_set_int (mateconf_client, GPM_CONF_INFO_HISTORY_TIME, history_time, NULL);
+ /* save to gsettings */
+ g_settings_set_int (settings, GPM_SETTINGS_INFO_HISTORY_TIME, history_time);
gpm_stats_button_update_ui ();
}
@@ -1420,7 +1419,7 @@ gpm_stats_smooth_checkbox_history_cb (GtkWidget *widget, gpointer data)
{
gboolean checked;
checked = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
- mateconf_client_set_bool (mateconf_client, GPM_CONF_INFO_HISTORY_GRAPH_SMOOTH, checked, NULL);
+ g_settings_set_boolean (settings, GPM_SETTINGS_INFO_HISTORY_GRAPH_SMOOTH, checked);
gpm_stats_button_update_ui ();
}
@@ -1433,7 +1432,7 @@ gpm_stats_smooth_checkbox_stats_cb (GtkWidget *widget, gpointer data)
{
gboolean checked;
checked = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
- mateconf_client_set_bool (mateconf_client, GPM_CONF_INFO_STATS_GRAPH_SMOOTH, checked, NULL);
+ g_settings_set_boolean (settings, GPM_SETTINGS_INFO_STATS_GRAPH_SMOOTH, checked);
gpm_stats_button_update_ui ();
}
@@ -1446,7 +1445,7 @@ gpm_stats_points_checkbox_history_cb (GtkWidget *widget, gpointer data)
{
gboolean checked;
checked = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
- mateconf_client_set_bool (mateconf_client, GPM_CONF_INFO_HISTORY_GRAPH_POINTS, checked, NULL);
+ g_settings_set_boolean (settings, GPM_SETTINGS_INFO_HISTORY_GRAPH_POINTS, checked);
gpm_stats_button_update_ui ();
}
@@ -1459,7 +1458,7 @@ gpm_stats_points_checkbox_stats_cb (GtkWidget *widget, gpointer data)
{
gboolean checked;
checked = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
- mateconf_client_set_bool (mateconf_client, GPM_CONF_INFO_STATS_GRAPH_POINTS, checked, NULL);
+ g_settings_set_boolean (settings, GPM_SETTINGS_INFO_STATS_GRAPH_POINTS, checked);
gpm_stats_button_update_ui ();
}
@@ -1592,8 +1591,8 @@ main (int argc, char *argv[])
gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
GPM_DATA G_DIR_SEPARATOR_S "icons");
- /* get data from mateconf */
- mateconf_client = mateconf_client_get_default ();
+ /* get data from the settings */
+ settings = g_settings_new (GPM_SETTINGS_SCHEMA);
/* get UI */
builder = gtk_builder_new ();
@@ -1639,31 +1638,31 @@ main (int argc, char *argv[])
G_CALLBACK (gpm_stats_button_help_cb), NULL);
widget = GTK_WIDGET (gtk_builder_get_object (builder, "checkbutton_smooth_history"));
- checked = mateconf_client_get_bool (mateconf_client, GPM_CONF_INFO_HISTORY_GRAPH_SMOOTH, NULL);
+ checked = g_settings_get_boolean (settings, GPM_SETTINGS_INFO_HISTORY_GRAPH_SMOOTH);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), checked);
g_signal_connect (widget, "clicked",
G_CALLBACK (gpm_stats_smooth_checkbox_history_cb), NULL);
widget = GTK_WIDGET (gtk_builder_get_object (builder, "checkbutton_smooth_stats"));
- checked = mateconf_client_get_bool (mateconf_client, GPM_CONF_INFO_STATS_GRAPH_SMOOTH, NULL);
+ checked = g_settings_get_boolean (settings, GPM_SETTINGS_INFO_STATS_GRAPH_SMOOTH);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), checked);
g_signal_connect (widget, "clicked",
G_CALLBACK (gpm_stats_smooth_checkbox_stats_cb), NULL);
widget = GTK_WIDGET (gtk_builder_get_object (builder, "checkbutton_points_history"));
- checked = mateconf_client_get_bool (mateconf_client, GPM_CONF_INFO_HISTORY_GRAPH_POINTS, NULL);
+ checked = g_settings_get_boolean (settings, GPM_SETTINGS_INFO_HISTORY_GRAPH_POINTS);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), checked);
g_signal_connect (widget, "clicked",
G_CALLBACK (gpm_stats_points_checkbox_history_cb), NULL);
widget = GTK_WIDGET (gtk_builder_get_object (builder, "checkbutton_points_stats"));
- checked = mateconf_client_get_bool (mateconf_client, GPM_CONF_INFO_STATS_GRAPH_POINTS, NULL);
+ checked = g_settings_get_boolean (settings, GPM_SETTINGS_INFO_STATS_GRAPH_POINTS);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), checked);
g_signal_connect (widget, "clicked",
G_CALLBACK (gpm_stats_points_checkbox_stats_cb), NULL);
widget = GTK_WIDGET (gtk_builder_get_object (builder, "notebook1"));
- page = mateconf_client_get_int (mateconf_client, GPM_CONF_INFO_PAGE_NUMBER, NULL);
+ page = g_settings_get_int (settings, GPM_SETTINGS_INFO_PAGE_NUMBER);
gtk_notebook_set_current_page (GTK_NOTEBOOK (widget), page);
g_signal_connect (widget, "switch-page",
G_CALLBACK (gpm_stats_notebook_changed_cb), NULL);
@@ -1705,14 +1704,14 @@ main (int argc, char *argv[])
gpm_stats_add_wakeups_columns (GTK_TREE_VIEW (widget));
gtk_tree_view_columns_autosize (GTK_TREE_VIEW (widget)); /* show */
- history_type = mateconf_client_get_string (mateconf_client, GPM_CONF_INFO_HISTORY_TYPE, NULL);
- history_time = mateconf_client_get_int (mateconf_client, GPM_CONF_INFO_HISTORY_TIME, NULL);
+ history_type = g_settings_get_string (settings, GPM_SETTINGS_INFO_HISTORY_TYPE);
+ history_time = g_settings_get_int (settings, GPM_SETTINGS_INFO_HISTORY_TIME);
if (history_type == NULL)
history_type = GPM_HISTORY_CHARGE_VALUE;
if (history_time == 0)
history_time = GPM_HISTORY_HOUR_VALUE;
- stats_type = mateconf_client_get_string (mateconf_client, GPM_CONF_INFO_STATS_TYPE, NULL);
+ stats_type = g_settings_get_string (settings, GPM_SETTINGS_INFO_STATS_TYPE);
if (stats_type == NULL)
stats_type = GPM_STATS_CHARGE_DATA_VALUE;
@@ -1821,7 +1820,7 @@ main (int argc, char *argv[])
}
if (last_device == NULL)
- last_device = mateconf_client_get_string (mateconf_client, GPM_CONF_INFO_LAST_DEVICE, NULL);
+ last_device = g_settings_get_string (settings, GPM_SETTINGS_INFO_LAST_DEVICE);
/* has capability to measure wakeups */
ret = up_wakeups_get_has_capability (wakeups);
@@ -1853,7 +1852,7 @@ main (int argc, char *argv[])
gtk_main ();
out:
- g_object_unref (mateconf_client);
+ g_object_unref (settings);
g_object_unref (client);
g_object_unref (wakeups);
g_object_unref (builder);
diff --git a/src/gpm-tray-icon.c b/src/gpm-tray-icon.c
index 8edddce..f2c26f7 100644
--- a/src/gpm-tray-icon.c
+++ b/src/gpm-tray-icon.c
@@ -38,7 +38,6 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
-#include <mateconf/mateconf-client.h>
#include <libupower-glib/upower.h>
#include "egg-debug.h"
@@ -55,7 +54,7 @@ static void gpm_tray_icon_finalize (GObject *object);
struct GpmTrayIconPrivate
{
- MateConfClient *conf;
+ GSettings *settings;
GpmEngine *engine;
GtkStatusIcon *status_icon;
gboolean show_actions;
@@ -339,22 +338,17 @@ gpm_tray_icon_activate_cb (GtkStatusIcon *status_icon, GpmTrayIcon *icon)
}
/**
- * gpm_conf_mateconf_key_changed_cb:
+ * gpm_tray_icon_settings_changed_cb:
*
- * We might have to do things when the mateconf keys change; do them here.
+ * We might have to do things when the settings change; do them here.
**/
static void
-gpm_conf_mateconf_key_changed_cb (MateConfClient *client, guint cnxn_id, MateConfEntry *entry, GpmTrayIcon *icon)
+gpm_tray_icon_settings_changed_cb (GSettings *settings, const gchar *key, GpmTrayIcon *icon)
{
- MateConfValue *value;
gboolean allowed_in_menu;
- value = mateconf_entry_get_value (entry);
- if (value == NULL)
- return;
-
- if (strcmp (entry->key, GPM_CONF_UI_SHOW_ACTIONS) == 0) {
- allowed_in_menu = mateconf_value_get_bool (value);
+ if (g_strcmp0 (key, GPM_SETTINGS_SHOW_ACTIONS) == 0) {
+ allowed_in_menu = g_settings_get_boolean (settings, key);
gpm_tray_icon_enable_actions (icon, allowed_in_menu);
}
}
@@ -373,13 +367,9 @@ gpm_tray_icon_init (GpmTrayIcon *icon)
icon->priv->engine = gpm_engine_new ();
- icon->priv->conf = mateconf_client_get_default ();
- /* watch mate-power-manager keys */
- mateconf_client_add_dir (icon->priv->conf, GPM_CONF_DIR,
- MATECONF_CLIENT_PRELOAD_RECURSIVE, NULL);
- mateconf_client_notify_add (icon->priv->conf, GPM_CONF_DIR,
- (MateConfClientNotifyFunc) gpm_conf_mateconf_key_changed_cb,
- icon, NULL, NULL);
+ icon->priv->settings = g_settings_new (GPM_SETTINGS_SCHEMA);
+ g_signal_connect (icon->priv->settings, "changed",
+ G_CALLBACK (gpm_tray_icon_settings_changed_cb), icon);
icon->priv->status_icon = gtk_status_icon_new ();
g_signal_connect_object (G_OBJECT (icon->priv->status_icon),
@@ -391,7 +381,7 @@ gpm_tray_icon_init (GpmTrayIcon *icon)
G_CALLBACK (gpm_tray_icon_activate_cb),
icon, 0);
- allowed_in_menu = mateconf_client_get_bool (icon->priv->conf, GPM_CONF_UI_SHOW_ACTIONS, NULL);
+ allowed_in_menu = g_settings_get_boolean (icon->priv->settings, GPM_SETTINGS_SHOW_ACTIONS);
gpm_tray_icon_enable_actions (icon, allowed_in_menu);
}
diff --git a/src/org.mate.PowerManager.xml b/src/org.mate.PowerManager.xml
index a5ca988..c4c73ff 100644
--- a/src/org.mate.PowerManager.xml
+++ b/src/org.mate.PowerManager.xml
@@ -1,9 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<node name="/">
<interface name="org.mate.PowerManager">
- <method name="GetPreferencesOptions">
- <arg type="i" name="capability" direction="out"/>
- </method>
</interface>
</node>