gnome-power-manager r3118 - in trunk: . data po src
- From: rhughes svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-power-manager r3118 - in trunk: . data po src
- Date: Tue, 2 Dec 2008 17:36:38 +0000 (UTC)
Author: rhughes
Date: Tue Dec 2 17:36:38 2008
New Revision: 3118
URL: http://svn.gnome.org/viewvc/gnome-power-manager?rev=3118&view=rev
Log:
2008-12-02 Richard Hughes <richard hughsie com>
* data/Makefile.am:
* data/gpm-statistics-old.glade:
* po/POTFILES.in:
* po/POTFILES.skip:
* src/Makefile.am:
* src/gpm-info.c:
* src/gpm-info.h:
* src/gpm-manager.c: (gpm_manager_action_suspend),
(gpm_manager_action_hibernate), (manager_policy_do),
(idle_do_sleep), (idle_changed_cb), (button_pressed_cb),
(ac_adapter_changed_cb), (control_sleep_failure_cb):
Don't log to GpmInfo even without DeviceKit.
Removed:
trunk/data/gpm-statistics-old.glade
trunk/src/gpm-info.c
trunk/src/gpm-info.h
Modified:
trunk/ChangeLog
trunk/data/Makefile.am
trunk/po/POTFILES.in
trunk/po/POTFILES.skip
trunk/src/Makefile.am
trunk/src/gpm-manager.c
Modified: trunk/data/Makefile.am
==============================================================================
--- trunk/data/Makefile.am (original)
+++ trunk/data/Makefile.am Tue Dec 2 17:36:38 2008
@@ -25,7 +25,6 @@
pkgdata_DATA = \
gpm-statistics.glade \
- gpm-statistics-old.glade \
gpm-feedback-widget.glade \
gpm-inhibit-test.glade \
gpm-prefs.glade
Modified: trunk/po/POTFILES.in
==============================================================================
--- trunk/po/POTFILES.in (original)
+++ trunk/po/POTFILES.in Tue Dec 2 17:36:38 2008
@@ -11,7 +11,7 @@
data/gnome-power-preferences.desktop.in.in
data/gnome-power-statistics.desktop.in.in
data/gpm-feedback-widget.glade
-data/gpm-graph.glade
+data/gpm-statistics.glade
data/gpm-inhibit-test.glade
data/gpm-prefs.glade
src/gpm-ac-adapter.c
@@ -30,8 +30,7 @@
src/gpm-control.h
src/gpm-common.c
src/gpm-common.h
-src/gpm-conf.c
-src/gpm-conf.h
+src/gpm-devicekit.c
src/gpm-dpms.h
src/gpm-dpms.c
src/gpm-engine.c
@@ -43,12 +42,10 @@
src/gpm-idle.h
src/gpm-load.c
src/gpm-load.h
-src/gpm-info.c
src/gpm-array.c
src/gpm-array.h
src/gpm-profile.c
src/gpm-profile.h
-src/gpm-info.h
src/gpm-inhibit.c
src/gpm-inhibit.h
src/gpm-main.c
@@ -71,13 +68,7 @@
src/gpm-screensaver.c
src/gpm-screensaver.h
src/gpm-statistics.c
-src/gpm-statistics-core.c
-src/gpm-statistics-core.h
src/gpm-stock-icons.h
-src/gpm-srv-brightness-kbd.h
-src/gpm-srv-brightness-kbd.c
-src/gpm-srv-screensaver.h
-src/gpm-srv-screensaver.c
src/gpm-tray-icon.c
src/gpm-tray-icon.h
src/gpm-refcount.c
Modified: trunk/po/POTFILES.skip
==============================================================================
--- trunk/po/POTFILES.skip (original)
+++ trunk/po/POTFILES.skip Tue Dec 2 17:36:38 2008
@@ -3,4 +3,6 @@
data/gnome-power-manager.desktop.in
data/gnome-power-preferences.desktop.in
data/gnome-power-statistics.desktop.in
+data/gpm-qos.glade
+src/gpm-engine-old.c
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Tue Dec 2 17:36:38 2008
@@ -218,10 +218,6 @@
else
egg-color.c \
egg-color.h \
- gpm-info.h \
- gpm-info.c \
- gpm-graph-widget-old.h \
- gpm-graph-widget-old.c \
gpm-profile.h \
gpm-profile.c \
gpm-array.h \
Modified: trunk/src/gpm-manager.c
==============================================================================
--- trunk/src/gpm-manager.c (original)
+++ trunk/src/gpm-manager.c Tue Dec 2 17:36:38 2008
@@ -57,9 +57,6 @@
#include "gpm-common.h"
#include "gpm-dpms.h"
#include "gpm-idle.h"
-#ifndef HAVE_DK_POWER
- #include "gpm-info.h"
-#endif
#include "gpm-inhibit.h"
#include "gpm-manager.h"
#include "gpm-notify.h"
@@ -106,9 +103,6 @@
GConfClient *conf;
GpmDpms *dpms;
GpmIdle *idle;
-#ifndef HAVE_DK_POWER
- GpmInfo *info;
-#endif
GpmPrefsServer *prefs_server;
GpmInhibit *inhibit;
GpmNotify *notify;
@@ -443,10 +437,7 @@
if (gpm_manager_is_inhibit_valid (manager, FALSE, "suspend") == FALSE)
return FALSE;
-#ifndef HAVE_DK_POWER
- gpm_info_explain_reason (manager->priv->info, GPM_EVENT_SUSPEND,
- _("Suspending computer."), reason);
-#endif
+ egg_debug ("suspending, reason: %s", reason);
gpm_control_suspend (manager->priv->control, &error);
gpm_button_reset_time (manager->priv->button);
if (error != NULL)
@@ -493,10 +484,7 @@
if (gpm_manager_is_inhibit_valid (manager, FALSE, "hibernate") == FALSE)
return FALSE;
-#ifndef HAVE_DK_POWER
- gpm_info_explain_reason (manager->priv->info, GPM_EVENT_HIBERNATE,
- _("Hibernating computer."), reason);
-#endif
+ egg_debug ("hibernating, reason: %s", reason);
gpm_control_hibernate (manager->priv->control, &error);
gpm_button_reset_time (manager->priv->button);
if (error != NULL)
@@ -555,10 +543,7 @@
return FALSE;
if (strcmp (action, ACTION_NOTHING) == 0) {
-#ifndef HAVE_DK_POWER
- gpm_info_explain_reason (manager->priv->info, GPM_EVENT_NOTIFICATION,
- _("Doing nothing."), reason);
-#endif
+ egg_debug ("doing nothing, reason: %s", reason);
} else if (strcmp (action, ACTION_SUSPEND) == 0) {
gpm_manager_action_suspend (manager, reason);
@@ -569,17 +554,11 @@
gpm_manager_blank_screen (manager, NULL);
} else if (strcmp (action, ACTION_SHUTDOWN) == 0) {
-#ifndef HAVE_DK_POWER
- gpm_info_explain_reason (manager->priv->info, GPM_EVENT_NOTIFICATION,
- _("Shutting down computer."), reason);
-#endif
+ egg_debug ("shutting down, reason: %s", reason);
gpm_control_shutdown (manager->priv->control, NULL);
} else if (strcmp (action, ACTION_INTERACTIVE) == 0) {
-#ifndef HAVE_DK_POWER
- gpm_info_explain_reason (manager->priv->info, GPM_EVENT_NOTIFICATION,
- _("GNOME interactive logout."), reason);
-#endif
+ egg_debug ("logout, reason: %s", reason);
gpm_manager_logout_interactive (manager);
} else {
egg_warning ("unknown action %s", action);
@@ -777,10 +756,7 @@
egg_debug ("doing nothing as system idle action");
} else if (strcmp (action, ACTION_SUSPEND) == 0) {
-#ifndef HAVE_DK_POWER
- gpm_info_explain_reason (manager->priv->info, GPM_EVENT_SUSPEND,
- _("Suspending computer."), _("System idle."));
-#endif
+ egg_debug ("suspending, reason: System idle");
ret = gpm_control_suspend (manager->priv->control, &error);
if (!ret) {
egg_warning ("cannot suspend (error: %s), so trying hibernate", error->message);
@@ -794,10 +770,7 @@
}
} else if (strcmp (action, ACTION_HIBERNATE) == 0) {
-#ifndef HAVE_DK_POWER
- gpm_info_explain_reason (manager->priv->info, GPM_EVENT_HIBERNATE,
- _("Hibernating computer."), _("System idle."));
-#endif
+ egg_debug ("hibernating, reason: System idle");
ret = gpm_control_hibernate (manager->priv->control, &error);
if (!ret) {
egg_warning ("cannot hibernate (error: %s), so trying suspend", error->message);
@@ -833,15 +806,6 @@
return;
}
-#ifndef HAVE_DK_POWER
- if (mode == GPM_IDLE_MODE_NORMAL)
- gpm_info_event_log (manager->priv->info, GPM_EVENT_SESSION_ACTIVE, _("idle mode ended"));
- else if (mode == GPM_IDLE_MODE_SESSION)
- gpm_info_event_log (manager->priv->info, GPM_EVENT_SESSION_IDLE, _("idle mode started"));
- else if (mode == GPM_IDLE_MODE_POWERSAVE)
- gpm_info_event_log (manager->priv->info, GPM_EVENT_SESSION_POWERSAVE, _("powersave mode started"));
-#endif
-
/* Ignore timeout events when the lid is closed, as the DPMS is
* already off, and we don't want to perform policy actions or re-enable
* the screen when the user moves the mouse on systems that do not
@@ -1006,13 +970,6 @@
return;
}
-#ifndef HAVE_DK_POWER
- if (strcmp (type, GPM_BUTTON_LID_CLOSED) == 0)
- gpm_info_event_log (manager->priv->info, GPM_EVENT_LID_CLOSED, _("The laptop lid has been closed"));
- else if (strcmp (type, GPM_BUTTON_LID_OPEN) == 0)
- gpm_info_event_log (manager->priv->info, GPM_EVENT_LID_OPENED, _("The laptop lid has been re-opened"));
-#endif
-
if (strcmp (type, GPM_BUTTON_POWER) == 0)
manager_policy_do (manager, GPM_CONF_BUTTON_POWER, _("The power button has been pressed."));
else if (strcmp (type, GPM_BUTTON_SLEEP) == 0)
@@ -1077,13 +1034,6 @@
egg_debug ("Setting on-ac: %d", on_ac);
-#ifndef HAVE_DK_POWER
- if (on_ac)
- gpm_info_event_log (manager->priv->info, GPM_EVENT_ON_AC, _("AC adapter inserted"));
- else
- gpm_info_event_log (manager->priv->info, GPM_EVENT_ON_BATTERY, _("AC adapter removed"));
-#endif
-
if (on_ac)
brightness = gconf_client_get_int (manager->priv->conf, GPM_CONF_KEYBOARD_BRIGHTNESS_AC, NULL);
else
@@ -1442,16 +1392,10 @@
{
gboolean show_sleep_failed;
-#ifndef HAVE_DK_POWER
- if (action == GPM_CONTROL_ACTION_HIBERNATE)
- gpm_info_event_log (manager->priv->info, GPM_EVENT_NOTIFICATION, _("Hibernate Problem"));
- else
- gpm_info_event_log (manager->priv->info, GPM_EVENT_NOTIFICATION, _("Suspend Problem"));
-#endif
-
/* only show this if specified in gconf */
show_sleep_failed = gconf_client_get_bool (manager->priv->conf, GPM_CONF_NOTIFY_SLEEP_FAILED, NULL);
+ egg_debug ("sleep failed");
gpm_manager_play (manager, GPM_MANAGER_SOUND_SUSPEND_ERROR, TRUE);
/* only emit if in GConf */
@@ -1885,16 +1829,14 @@
{
egg_debug ("DPMS mode changed: %d", mode);
-#ifndef HAVE_DK_POWER
if (mode == GPM_DPMS_MODE_ON)
- gpm_info_event_log (manager->priv->info, GPM_EVENT_DPMS_ON, _("dpms on"));
+ egg_debug ("dpms on");
else if (mode == GPM_DPMS_MODE_STANDBY)
- gpm_info_event_log (manager->priv->info, GPM_EVENT_DPMS_STANDBY, _("dpms standby"));
+ egg_debug ("dpms standby");
else if (mode == GPM_DPMS_MODE_SUSPEND)
- gpm_info_event_log (manager->priv->info, GPM_EVENT_DPMS_SUSPEND, _("dpms suspend"));
+ egg_debug ("suspend");
else if (mode == GPM_DPMS_MODE_OFF)
- gpm_info_event_log (manager->priv->info, GPM_EVENT_DPMS_OFF, _("dpms off"));
-#endif
+ egg_debug ("dpms off");
update_dpms_throttle (manager);
}
@@ -2045,16 +1987,6 @@
"hibernate", G_CALLBACK (gpm_manager_tray_icon_hibernate),
manager, G_CONNECT_SWAPPED);
-#ifndef HAVE_DK_POWER
- egg_debug ("initialising info infrastructure");
- manager->priv->info = gpm_info_new ();
-
- /* add the new statistics DBUS interface */
- dbus_g_object_type_install_info (GPM_TYPE_INFO, &dbus_glib_gpm_statistics_object_info);
- dbus_g_connection_register_g_object (connection, GPM_DBUS_PATH_STATS,
- G_OBJECT (manager->priv->info));
-#endif
-
gpm_manager_sync_policy_sleep (manager);
/* on startup, check if there are suspend errors left */
@@ -2088,10 +2020,6 @@
collection = gpm_engine_get_collection (manager->priv->engine);
gpm_tray_icon_set_collection_data (manager->priv->tray_icon, collection);
#endif
-
-#ifndef HAVE_DK_POWER
- gpm_info_set_collection_data (manager->priv->info, collection);
-#endif
}
/**
@@ -2116,9 +2044,6 @@
g_object_unref (manager->priv->hal_device_power);
g_object_unref (manager->priv->dpms);
g_object_unref (manager->priv->idle);
-#ifndef HAVE_DK_POWER
- g_object_unref (manager->priv->info);
-#endif
g_object_unref (manager->priv->engine);
g_object_unref (manager->priv->tray_icon);
g_object_unref (manager->priv->inhibit);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]