gnome-power-manager r3032 - in trunk: . src
- From: rhughes svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-power-manager r3032 - in trunk: . src
- Date: Wed, 22 Oct 2008 10:56:55 +0000 (UTC)
Author: rhughes
Date: Wed Oct 22 10:56:54 2008
New Revision: 3032
URL: http://svn.gnome.org/viewvc/gnome-power-manager?rev=3032&view=rev
Log:
2008-10-22 Richard Hughes <richard hughsie com>
* src/egg-test.c: (egg_test_start):
* src/gpm-backlight.c: (gpm_backlight_brightness_evaluate_and_set):
* src/gpm-brightness.c: (gpm_brightness_get_step),
(gpm_brightness_set), (gpm_brightness_up), (gpm_brightness_down),
(gpm_brightness_xrandr_changed_cb),
(gpm_brightness_hal_changed_cb), (gpm_brightness_init):
* src/gpm-cell-array.c: (gpm_cell_array_update):
* src/gpm-cell.c: (gpm_cell_refresh_hal_all):
* src/gpm-engine.c: (gpm_engine_get_summary),
(gpm_engine_get_icon), (gpm_engine_recalculate_state_icon),
(gpm_engine_recalculate_state_summary):
* src/gpm-manager.c: (gpm_manager_is_inhibit_valid),
(gpm_manager_blank_screen), (gpm_manager_unblank_screen),
(manager_policy_do), (gpm_manager_suspend),
(gpm_manager_hibernate), (gpm_manager_reboot),
(gpm_manager_can_suspend), (gpm_manager_can_hibernate),
(gpm_manager_can_reboot), (gpm_manager_can_shutdown),
(gpm_manager_get_preferences_options),
(gpm_manager_get_power_save_status), (gpm_manager_get_on_battery),
(gpm_manager_get_low_battery), (button_pressed_cb),
(manager_critical_action_do), (gpm_manager_tray_icon_suspend),
(screensaver_auth_request_cb), (gpm_manager_finalize):
* src/gpm-tray-icon.c: (gpm_tray_icon_activate_cb):
Whitespace and refactoring changes.
Modified:
trunk/ChangeLog
trunk/src/egg-test.c
trunk/src/gpm-backlight.c
trunk/src/gpm-brightness.c
trunk/src/gpm-cell-array.c
trunk/src/gpm-cell.c
trunk/src/gpm-engine.c
trunk/src/gpm-manager.c
trunk/src/gpm-tray-icon.c
Modified: trunk/src/egg-test.c
==============================================================================
--- trunk/src/egg-test.c (original)
+++ trunk/src/egg-test.c Wed Oct 22 10:56:54 2008
@@ -167,7 +167,7 @@
gboolean
egg_test_start (EggTest *test, const gchar *name)
{
- if (test->started == TRUE) {
+ if (test->started) {
g_print ("Not ended test! Cannot start!\n");
exit (1);
}
Modified: trunk/src/gpm-backlight.c
==============================================================================
--- trunk/src/gpm-backlight.c (original)
+++ trunk/src/gpm-backlight.c Wed Oct 22 10:56:54 2008
@@ -402,7 +402,7 @@
} else {
enable_action = gconf_client_get_bool (backlight->priv->conf, GPM_CONF_BACKLIGHT_IDLE_DIM_BATT, NULL);
}
- if (enable_action && backlight->priv->system_is_idle == TRUE) {
+ if (enable_action && backlight->priv->system_is_idle) {
value = gconf_client_get_int (backlight->priv->conf, GPM_CONF_BACKLIGHT_IDLE_BRIGHTNESS, NULL);
if (value > 100) {
egg_warning ("cannot use idle brightness value %i, correcting to 50", value);
@@ -417,7 +417,7 @@
/* reduce if ambient is low */
enable_action = gconf_client_get_bool (backlight->priv->conf, GPM_CONF_AMBIENT_ENABLE, NULL);
- if (backlight->priv->can_sense && enable_action == TRUE) {
+ if (backlight->priv->can_sense && enable_action) {
value = gconf_client_get_int (backlight->priv->conf, GPM_CONF_AMBIENT_SCALE, NULL);
scale = backlight->priv->ambient_sensor_value * (value / 100.0f);
value = gconf_client_get_int (backlight->priv->conf, GPM_CONF_AMBIENT_FACTOR, NULL);
Modified: trunk/src/gpm-brightness.c
==============================================================================
--- trunk/src/gpm-brightness.c (original)
+++ trunk/src/gpm-brightness.c Wed Oct 22 10:56:54 2008
@@ -73,10 +73,9 @@
guint
gpm_brightness_get_step (guint levels)
{
- if (levels > 20) {
- /* macbook pro has a bazzillion brightness levels, do in 5% steps */
+ /* macbook pro has a bazzillion brightness levels, do in 5% steps */
+ if (levels > 20)
return levels / 20;
- }
return 1;
}
@@ -141,13 +140,13 @@
return FALSE;
out:
/* we did something to the hardware, so untrusted */
- if (ret) {
+ if (ret)
brightness->priv->cache_trusted = FALSE;
- }
+
/* is the caller interested? */
- if (ret && hw_changed != NULL) {
+ if (ret && hw_changed != NULL)
*hw_changed = hw_changed_local;
- }
+
return ret;
}
@@ -232,9 +231,8 @@
return FALSE;
out:
/* we did something to the hardware, so untrusted */
- if (ret) {
+ if (ret)
brightness->priv->cache_trusted = FALSE;
- }
/* is the caller interested? */
if (ret && hw_changed != NULL) {
*hw_changed = hw_changed_local;
@@ -270,13 +268,12 @@
return FALSE;
out:
/* we did something to the hardware, so untrusted */
- if (ret) {
+ if (ret)
brightness->priv->cache_trusted = FALSE;
- }
+
/* is the caller interested? */
- if (ret && hw_changed != NULL) {
+ if (ret && hw_changed != NULL)
*hw_changed = hw_changed_local;
- }
return ret;
}
@@ -359,9 +356,8 @@
gpm_brightness_xrandr_changed_cb (GpmBrightnessXRandR *xrandr, guint percentage, GpmBrightness *brightness)
{
g_return_if_fail (GPM_IS_BRIGHTNESS (brightness));
- if (brightness->priv->use_xrandr) {
+ if (brightness->priv->use_xrandr)
gpm_brightness_changed (brightness, percentage);
- }
}
/**
@@ -372,9 +368,8 @@
gpm_brightness_hal_changed_cb (GpmBrightnessHal *hal, guint percentage, GpmBrightness *brightness)
{
g_return_if_fail (GPM_IS_BRIGHTNESS (brightness));
- if (brightness->priv->use_hal) {
+ if (brightness->priv->use_hal)
gpm_brightness_changed (brightness, percentage);
- }
}
/**
@@ -397,13 +392,11 @@
brightness->priv->use_xrandr = TRUE;
}
brightness->priv->hal = gpm_brightness_hal_new ();
- if (gpm_brightness_hal_has_hw (brightness->priv->hal)) {
+ if (gpm_brightness_hal_has_hw (brightness->priv->hal))
brightness->priv->use_hal = TRUE;
- }
/* we want to default to only use XRANDR if available, as some hardware can use either */
- if (brightness->priv->use_xrandr) {
+ if (brightness->priv->use_xrandr)
brightness->priv->use_hal = FALSE;
- }
g_signal_connect (brightness->priv->hal, "brightness-changed",
G_CALLBACK (gpm_brightness_hal_changed_cb), brightness);
g_signal_connect (brightness->priv->xrandr, "brightness-changed",
Modified: trunk/src/gpm-cell-array.c
==============================================================================
--- trunk/src/gpm-cell-array.c (original)
+++ trunk/src/gpm-cell-array.c Wed Oct 22 10:56:54 2008
@@ -345,7 +345,7 @@
}
/* sanity check */
- if (unit->is_discharging && unit->is_charging == TRUE) {
+ if (unit->is_discharging && unit->is_charging) {
egg_warning ("Sanity check kicked in! "
"Multiple device object cannot be charging and discharging simultaneously!");
unit->is_charging = FALSE;
Modified: trunk/src/gpm-cell.c
==============================================================================
--- trunk/src/gpm-cell.c (original)
+++ trunk/src/gpm-cell.c Wed Oct 22 10:56:54 2008
@@ -136,7 +136,7 @@
if (unit->kind == GPM_CELL_UNIT_KIND_PRIMARY) {
exists = hal_device_get_uint (device, "battery.charge_level.rate",
&unit->rate, NULL);
- if (exists == FALSE && (unit->is_discharging || unit->is_charging == TRUE)) {
+ if (exists == FALSE && (unit->is_discharging || unit->is_charging)) {
egg_warning ("could not read your battery's charge rate");
}
/* sanity check to less than 100W */
@@ -168,7 +168,7 @@
unit->kind == GPM_CELL_UNIT_KIND_UPS) {
exists = hal_device_get_uint (device,"battery.remaining_time",
&unit->time_charge, NULL);
- if (exists == FALSE && (unit->is_discharging || unit->is_charging == TRUE)) {
+ if (exists == FALSE && (unit->is_discharging || unit->is_charging)) {
egg_warning ("could not read your battery's remaining time");
}
}
Modified: trunk/src/gpm-engine.c
==============================================================================
--- trunk/src/gpm-engine.c (original)
+++ trunk/src/gpm-engine.c Wed Oct 22 10:56:54 2008
@@ -269,22 +269,17 @@
unit = gpm_cell_array_get_unit (collection->ups);
- if (unit->is_present && unit->is_discharging == TRUE) {
- /* only enable this if discharging on UPS */
+ if (unit->is_present && unit->is_discharging)
tooltip = g_string_new (_("Computer is running on backup power\n"));
-
- } else if (on_ac) {
+ else if (on_ac)
tooltip = g_string_new (_("Computer is running on AC power\n"));
-
- } else {
+ else
tooltip = g_string_new (_("Computer is running on battery power\n"));
- }
/* do each device type we know about, in the correct visual order */
part = gpm_cell_array_get_description (collection->primary);
- if (part != NULL) {
+ if (part != NULL)
tooltip = g_string_append (tooltip, part);
- }
g_free (part);
/* if we have limited accuracy, add this to the tooltip */
@@ -412,11 +407,11 @@
/* we try (DIS)CHARGING: PRIMARY, UPS */
egg_debug ("Trying CHARGING icon: primary, ups");
if (unit_primary->is_present &&
- (unit_primary->is_charging || unit_primary->is_discharging == TRUE)) {
+ (unit_primary->is_charging || unit_primary->is_discharging)) {
return gpm_cell_array_get_icon (collection->primary);
} else if (unit_ups->is_present &&
- (unit_ups->is_charging || unit_ups->is_discharging == TRUE)) {
+ (unit_ups->is_charging || unit_ups->is_discharging)) {
return gpm_cell_array_get_icon (collection->ups);
}
@@ -522,13 +517,10 @@
g_return_val_if_fail (GPM_IS_ENGINE (engine), FALSE);
/* show a different icon if we are disconnected */
- if (engine->priv->hal_connected) {
- /* check the icon */
+ if (engine->priv->hal_connected)
icon = gpm_engine_get_icon (engine);
- } else {
- /* show a AC icon */
+ else
icon = g_strdup (GPM_STOCK_AC_ADAPTER);
- }
if (icon == NULL) {
/* none before, now none */
@@ -576,14 +568,11 @@
{
gchar *summary;
- /* show a different icon if we are disconnected */
- if (engine->priv->hal_connected) {
- /* check the summary */
+ /* show a different summary if we are disconnected */
+ if (engine->priv->hal_connected)
summary = gpm_engine_get_summary (engine);
- } else {
- /* show a AC icon */
+ else
summary = g_strdup (_("Unable to get data..."));
- }
if (engine->priv->previous_summary == NULL) {
engine->priv->previous_summary = summary;
Modified: trunk/src/gpm-manager.c
==============================================================================
--- trunk/src/gpm-manager.c (original)
+++ trunk/src/gpm-manager.c Wed Oct 22 10:56:54 2008
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
* Copyright (C) 2005 William Jon McCann <mccann jhu edu>
- * Copyright (C) 2005-2007 Richard Hughes <richard hughsie com>
+ * Copyright (C) 2005-2008 Richard Hughes <richard hughsie com>
*
* Licensed under the GNU General Public License Version 2
*
@@ -249,9 +249,7 @@
* Return value: TRUE if we can perform the action.
**/
static gboolean
-gpm_manager_is_inhibit_valid (GpmManager *manager,
- gboolean user_action,
- const char *action)
+gpm_manager_is_inhibit_valid (GpmManager *manager, gboolean user_action, const char *action)
{
gboolean has_inhibit;
gchar *title = NULL;
@@ -340,8 +338,7 @@
* Return value: Success.
**/
static gboolean
-gpm_manager_blank_screen (GpmManager *manager,
- GError **noerror)
+gpm_manager_blank_screen (GpmManager *manager, GError **noerror)
{
gboolean do_lock;
gboolean ret = TRUE;
@@ -371,8 +368,7 @@
* Return value: Success.
**/
static gboolean
-gpm_manager_unblank_screen (GpmManager *manager,
- GError **noerror)
+gpm_manager_unblank_screen (GpmManager *manager, GError **noerror)
{
gboolean do_lock;
gboolean ret = TRUE;
@@ -495,9 +491,7 @@
* Does one of the policy actions specified in gconf.
**/
static gboolean
-manager_policy_do (GpmManager *manager,
- const gchar *policy,
- const gchar *reason)
+manager_policy_do (GpmManager *manager, const gchar *policy, const gchar *reason)
{
gchar *action = NULL;
@@ -548,8 +542,7 @@
* Attempt to suspend the system.
**/
gboolean
-gpm_manager_suspend (GpmManager *manager,
- GError **error)
+gpm_manager_suspend (GpmManager *manager, GError **error)
{
gboolean allowed;
@@ -583,8 +576,7 @@
* Attempt to hibernate the system.
**/
gboolean
-gpm_manager_hibernate (GpmManager *manager,
- GError **error)
+gpm_manager_hibernate (GpmManager *manager, GError **error)
{
gboolean allowed;
@@ -618,8 +610,7 @@
* Attempt to restart the system.
**/
gboolean
-gpm_manager_reboot (GpmManager *manager,
- GError **error)
+gpm_manager_reboot (GpmManager *manager, GError **error)
{
g_return_val_if_fail (manager != NULL, FALSE);
g_return_val_if_fail (GPM_IS_MANAGER (manager), FALSE);
@@ -656,9 +647,7 @@
* If the current session user is able to suspend.
**/
gboolean
-gpm_manager_can_suspend (GpmManager *manager,
- gboolean *can_suspend,
- GError **error)
+gpm_manager_can_suspend (GpmManager *manager, gboolean *can_suspend, GError **error)
{
g_return_val_if_fail (manager != NULL, FALSE);
g_return_val_if_fail (GPM_IS_MANAGER (manager), FALSE);
@@ -671,9 +660,7 @@
* If the current session user is able to hibernate.
**/
gboolean
-gpm_manager_can_hibernate (GpmManager *manager,
- gboolean *can_hibernate,
- GError **error)
+gpm_manager_can_hibernate (GpmManager *manager, gboolean *can_hibernate, GError **error)
{
g_return_val_if_fail (manager != NULL, FALSE);
g_return_val_if_fail (GPM_IS_MANAGER (manager), FALSE);
@@ -686,9 +673,7 @@
* If the current session user is able to reboot.
**/
gboolean
-gpm_manager_can_reboot (GpmManager *manager,
- gboolean *can_reboot,
- GError **error)
+gpm_manager_can_reboot (GpmManager *manager, gboolean *can_reboot, GError **error)
{
g_return_val_if_fail (manager != NULL, FALSE);
g_return_val_if_fail (GPM_IS_MANAGER (manager), FALSE);
@@ -701,9 +686,7 @@
* If the current session user is able to shutdown.
**/
gboolean
-gpm_manager_can_shutdown (GpmManager *manager,
- gboolean *can_shutdown,
- GError **error)
+gpm_manager_can_shutdown (GpmManager *manager, gboolean *can_shutdown, GError **error)
{
g_return_val_if_fail (manager != NULL, FALSE);
g_return_val_if_fail (GPM_IS_MANAGER (manager), FALSE);
@@ -714,9 +697,7 @@
* gpm_manager_get_preferences_options:
**/
gboolean
-gpm_manager_get_preferences_options (GpmManager *manager,
- gint *capability,
- GError **error)
+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);
@@ -733,9 +714,7 @@
* Programs should respect this value for the session.
**/
gboolean
-gpm_manager_get_power_save_status (GpmManager *manager,
- gboolean *low_power,
- GError **error)
+gpm_manager_get_power_save_status (GpmManager *manager, gboolean *low_power, GError **error)
{
g_return_val_if_fail (manager != NULL, FALSE);
g_return_val_if_fail (GPM_IS_MANAGER (manager), FALSE);
@@ -752,9 +731,7 @@
* if the computer is using backup power from a monitored UPS.
**/
gboolean
-gpm_manager_get_on_battery (GpmManager *manager,
- gboolean *on_battery,
- GError **error)
+gpm_manager_get_on_battery (GpmManager *manager, gboolean *on_battery, GError **error)
{
gboolean on_ac;
g_return_val_if_fail (manager != NULL, FALSE);
@@ -768,9 +745,7 @@
* gpm_manager_get_low_battery:
**/
gboolean
-gpm_manager_get_low_battery (GpmManager *manager,
- gboolean *low_battery,
- GError **error)
+gpm_manager_get_low_battery (GpmManager *manager, gboolean *low_battery, GError **error)
{
g_return_val_if_fail (manager != NULL, FALSE);
g_return_val_if_fail (GPM_IS_MANAGER (manager), FALSE);
@@ -890,64 +865,6 @@
}
/**
- * battery_button_pressed:
- * @manager: This class instance
- *
- * What to do when the battery button is pressed.
- **/
-static void
-battery_button_pressed (GpmManager *manager)
-{
- gchar *message;
-
- message = gpm_engine_get_summary (manager->priv->engine);
-
- gpm_notify_display (manager->priv->notify,
- _("Power Information"),
- message,
- GPM_NOTIFY_TIMEOUT_LONG,
- GTK_STOCK_DIALOG_INFO,
- GPM_NOTIFY_URGENCY_NORMAL);
- g_free (message);
-}
-
-/**
- * power_button_pressed:
- * @manager: This class instance
- *
- * What to do when the power button is pressed.
- **/
-static void
-power_button_pressed (GpmManager *manager)
-{
- manager_policy_do (manager, GPM_CONF_BUTTON_POWER, _("The power button has been pressed."));
-}
-
-/**
- * suspend_button_pressed:
- * @manager: This class instance
- *
- * What to do when the suspend button is pressed.
- **/
-static void
-suspend_button_pressed (GpmManager *manager)
-{
- manager_policy_do (manager, GPM_CONF_BUTTON_SUSPEND, _("The suspend button has been pressed."));
-}
-
-/**
- * hibernate_button_pressed:
- * @manager: This class instance
- *
- * What to do when the hibernate button is pressed.
- **/
-static void
-hibernate_button_pressed (GpmManager *manager)
-{
- manager_policy_do (manager, GPM_CONF_BUTTON_HIBERNATE, _("The hibernate button has been pressed."));
-}
-
-/**
* lid_button_pressed:
* @manager: This class instance
* @state: TRUE for closed
@@ -1078,6 +995,7 @@
static void
button_pressed_cb (GpmButton *button, const gchar *type, GpmManager *manager)
{
+ gchar *message;
egg_debug ("Button press event type=%s", type);
if (strcmp (type, GPM_BUTTON_LID_CLOSED) == 0)
@@ -1086,19 +1004,27 @@
gpm_info_event_log (manager->priv->info, GPM_EVENT_LID_OPENED, _("The laptop lid has been re-opened"));
if (strcmp (type, GPM_BUTTON_POWER) == 0)
- power_button_pressed (manager);
+ manager_policy_do (manager, GPM_CONF_BUTTON_POWER, _("The power button has been pressed."));
else if (strcmp (type, GPM_BUTTON_SLEEP) == 0)
- suspend_button_pressed (manager);
+ manager_policy_do (manager, GPM_CONF_BUTTON_SUSPEND, _("The suspend button has been pressed."));
else if (strcmp (type, GPM_BUTTON_SUSPEND) == 0)
- suspend_button_pressed (manager);
+ manager_policy_do (manager, GPM_CONF_BUTTON_SUSPEND, _("The suspend button has been pressed."));
else if (strcmp (type, GPM_BUTTON_HIBERNATE) == 0)
- hibernate_button_pressed (manager);
+ manager_policy_do (manager, GPM_CONF_BUTTON_HIBERNATE, _("The hibernate button has been pressed."));
else if (strcmp (type, GPM_BUTTON_LID_OPEN) == 0)
lid_button_pressed (manager, FALSE);
else if (strcmp (type, GPM_BUTTON_LID_CLOSED) == 0)
lid_button_pressed (manager, TRUE);
- else if (strcmp (type, GPM_BUTTON_BATTERY) == 0)
- battery_button_pressed (manager);
+ else if (strcmp (type, GPM_BUTTON_BATTERY) == 0) {
+ message = gpm_engine_get_summary (manager->priv->engine);
+ gpm_notify_display (manager->priv->notify,
+ _("Power Information"),
+ message,
+ GPM_NOTIFY_TIMEOUT_LONG,
+ GTK_STOCK_DIALOG_INFO,
+ GPM_NOTIFY_URGENCY_NORMAL);
+ g_free (message);
+ }
/* really belongs in gnome-manager */
if (strcmp (type, GPM_BUTTON_LOCK) == 0)
@@ -1197,9 +1123,7 @@
static gboolean
manager_critical_action_do (GpmManager *manager)
{
- manager_policy_do (manager,
- GPM_CONF_ACTIONS_CRITICAL_BATT,
- _("Battery is critically low."));
+ manager_policy_do (manager, GPM_CONF_ACTIONS_CRITICAL_BATT, _("Battery is critically low."));
return FALSE;
}
@@ -1320,8 +1244,7 @@
* the inhibit states are valid.
**/
static void
-gpm_manager_tray_icon_suspend (GpmManager *manager,
- GpmTrayIcon *tray)
+gpm_manager_tray_icon_suspend (GpmManager *manager, GpmTrayIcon *tray)
{
gpm_manager_action_suspend (manager, _("User clicked on tray"));
}
@@ -1355,31 +1278,28 @@
* Called when the user is trying or has authenticated
**/
static void
-screensaver_auth_request_cb (GpmScreensaver *screensaver,
- gboolean auth_begin,
- GpmManager *manager)
+screensaver_auth_request_cb (GpmScreensaver *screensaver, gboolean auth_begin, GpmManager *manager)
{
- GError *error;
+ GError *error = NULL;
gboolean ret;
/* only clear errors if we have finished the authentication */
if (!auth_begin) {
- error = NULL;
ret = hal_device_power_clear_suspend_error (manager->priv->hal_device_power, &error);
if (!ret) {
egg_debug ("Failed to clear suspend error; %s", error->message);
g_error_free (error);
+ error = NULL;
}
error = NULL;
ret = hal_device_power_clear_hibernate_error (manager->priv->hal_device_power, &error);
if (!ret) {
egg_debug ("Failed to clear hibernate error; %s", error->message);
g_error_free (error);
+ error = NULL;
}
}
if (auth_begin) {
- GError *error = NULL;
-
/* TODO: This may be a bid of a bodge, as we will have multiple
resume requests -- maybe this need a logic cleanup */
gpm_brightness_kbd_undim (manager->priv->brightness_kbd);
@@ -1391,6 +1311,7 @@
if (error != NULL) {
egg_warning ("Failed to turn on DPMS: %s", error->message);
g_error_free (error);
+ error = NULL;
}
}
}
@@ -2046,7 +1967,6 @@
g_return_if_fail (manager->priv != NULL);
- /* compulsory gobjects */
g_object_unref (manager->priv->conf);
g_object_unref (manager->priv->hal_device_power);
g_object_unref (manager->priv->dpms);
@@ -2062,10 +1982,7 @@
g_object_unref (manager->priv->feedback_kbd);
g_object_unref (manager->priv->button);
g_object_unref (manager->priv->brightness_kbd);
-
- /* optional gobjects */
- if (manager->priv->backlight)
- g_object_unref (manager->priv->backlight);
+ g_object_unref (manager->priv->backlight);
G_OBJECT_CLASS (gpm_manager_parent_class)->finalize (object);
}
Modified: trunk/src/gpm-tray-icon.c
==============================================================================
--- trunk/src/gpm-tray-icon.c (original)
+++ trunk/src/gpm-tray-icon.c Wed Oct 22 10:56:54 2008
@@ -567,7 +567,7 @@
}
/* only do the seporator if we have at least one device and can do an action */
- if (dev_cnt != 0 && (icon->priv->show_suspend || icon->priv->show_hibernate == TRUE)) {
+ if (dev_cnt != 0 && (icon->priv->show_suspend || icon->priv->show_hibernate)) {
item = gtk_separator_menu_item_new ();
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]