summaryrefslogtreecommitdiff
path: root/src/gpm-backlight.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpm-backlight.c')
-rw-r--r--src/gpm-backlight.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/gpm-backlight.c b/src/gpm-backlight.c
index c2d58e2..1f1d834 100644
--- a/src/gpm-backlight.c
+++ b/src/gpm-backlight.c
@@ -66,7 +66,7 @@ struct GpmBacklightPrivate
GpmControl *control;
GpmDpms *dpms;
GpmIdle *idle;
- EggConsoleKit *consolekit;
+ EggConsoleKit *console;
gboolean can_dim;
gboolean system_is_idle;
GTimer *idle_timer;
@@ -175,14 +175,14 @@ static void
gpm_backlight_dialog_init (GpmBacklight *backlight)
{
if (backlight->priv->popup != NULL
- && !gsd_media_keys_window_is_valid (GSD_MEDIA_KEYS_WINDOW (backlight->priv->popup))) {
+ && !msd_osd_window_is_valid (MSD_OSD_WINDOW (backlight->priv->popup))) {
gtk_widget_destroy (backlight->priv->popup);
backlight->priv->popup = NULL;
}
if (backlight->priv->popup == NULL) {
- backlight->priv->popup= gsd_media_keys_window_new ();
- gsd_media_keys_window_set_action_custom (GSD_MEDIA_KEYS_WINDOW (backlight->priv->popup),
+ backlight->priv->popup= msd_media_keys_window_new ();
+ msd_media_keys_window_set_action_custom (MSD_MEDIA_KEYS_WINDOW (backlight->priv->popup),
"gpm-brightness-lcd",
TRUE);
gtk_window_set_position (GTK_WINDOW (backlight->priv->popup), GTK_WIN_POS_NONE);
@@ -351,7 +351,7 @@ gpm_backlight_brightness_evaluate_and_set (GpmBacklight *backlight, gboolean int
/* only show dialog if interactive */
if (interactive) {
gpm_backlight_dialog_init (backlight);
- gsd_media_keys_window_set_volume_level (GSD_MEDIA_KEYS_WINDOW (backlight->priv->popup),
+ msd_media_keys_window_set_volume_level (MSD_MEDIA_KEYS_WINDOW (backlight->priv->popup),
round (brightness));
gpm_backlight_dialog_show (backlight);
}
@@ -439,7 +439,7 @@ gpm_backlight_button_pressed_cb (GpmButton *button, const gchar *type, GpmBackli
if (ret) {
gpm_brightness_get (backlight->priv->brightness, &percentage);
gpm_backlight_dialog_init (backlight);
- gsd_media_keys_window_set_volume_level (GSD_MEDIA_KEYS_WINDOW (backlight->priv->popup),
+ msd_media_keys_window_set_volume_level (MSD_MEDIA_KEYS_WINDOW (backlight->priv->popup),
percentage);
gpm_backlight_dialog_show (backlight);
/* save the new percentage */
@@ -458,7 +458,7 @@ gpm_backlight_button_pressed_cb (GpmButton *button, const gchar *type, GpmBackli
if (ret) {
gpm_brightness_get (backlight->priv->brightness, &percentage);
gpm_backlight_dialog_init (backlight);
- gsd_media_keys_window_set_volume_level (GSD_MEDIA_KEYS_WINDOW (backlight->priv->popup),
+ msd_media_keys_window_set_volume_level (MSD_MEDIA_KEYS_WINDOW (backlight->priv->popup),
percentage);
gpm_backlight_dialog_show (backlight);
/* save the new percentage */
@@ -554,8 +554,8 @@ idle_changed_cb (GpmIdle *idle, GpmIdleMode mode, GpmBacklight *backlight)
if (gpm_button_is_lid_closed (backlight->priv->button))
return;
- /* don't dim or undim the screen unless we are on the active console */
- if (!egg_console_kit_is_active (backlight->priv->consolekit)) {
+ /* don't dim or undim the screen unless ConsoleKit/systemd say we are on the active console */
+ if (!LOGIND_RUNNING() && !egg_console_kit_is_active (backlight->priv->console)) {
egg_debug ("ignoring as not on active console");
return;
}
@@ -677,7 +677,7 @@ gpm_backlight_finalize (GObject *object)
g_object_unref (backlight->priv->button);
g_object_unref (backlight->priv->idle);
g_object_unref (backlight->priv->brightness);
- g_object_unref (backlight->priv->consolekit);
+ g_object_unref (backlight->priv->console);
g_return_if_fail (backlight->priv != NULL);
G_OBJECT_CLASS (gpm_backlight_parent_class)->finalize (object);
@@ -757,8 +757,8 @@ gpm_backlight_init (GpmBacklight *backlight)
gpm_idle_set_timeout_dim (backlight->priv->idle, backlight->priv->idle_dim_timeout);
/* use a visual widget */
- backlight->priv->popup = gsd_media_keys_window_new ();
- gsd_media_keys_window_set_action_custom (GSD_MEDIA_KEYS_WINDOW (backlight->priv->popup),
+ backlight->priv->popup = msd_media_keys_window_new ();
+ msd_media_keys_window_set_action_custom (MSD_MEDIA_KEYS_WINDOW (backlight->priv->popup),
"gpm-brightness-lcd",
TRUE);
gtk_window_set_position (GTK_WINDOW (backlight->priv->popup), GTK_WIN_POS_NONE);
@@ -772,7 +772,7 @@ gpm_backlight_init (GpmBacklight *backlight)
G_CALLBACK (control_resume_cb), backlight);
/* Don't do dimming on inactive console */
- backlight->priv->consolekit = egg_console_kit_new ();
+ backlight->priv->console = egg_console_kit_new ();
/* sync at startup */
gpm_backlight_brightness_evaluate_and_set (backlight, FALSE, TRUE);