summaryrefslogtreecommitdiff
path: root/src/gpm-brightness.c
diff options
context:
space:
mode:
authorColomban Wendling <[email protected]>2024-10-02 12:06:58 +0200
committerColomban Wendling <[email protected]>2024-10-02 12:06:58 +0200
commite8abdd43368d824e133e97271c5b89fbdfbd2c4f (patch)
treeb0cd0be2c0b6204305278a70bf3de4e8c56f1146 /src/gpm-brightness.c
parent3027b2e231b0fcefa9ab7c58bef163f1e967ee2b (diff)
downloadmate-power-manager-e8abdd43368d824e133e97271c5b89fbdfbd2c4f.tar.bz2
mate-power-manager-e8abdd43368d824e133e97271c5b89fbdfbd2c4f.tar.xz
brightness: Don't error-out on communication failuresubmodules-no-fatal-errors
No need to exit the whole MPM process when the module doesn't work.
Diffstat (limited to 'src/gpm-brightness.c')
-rw-r--r--src/gpm-brightness.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gpm-brightness.c b/src/gpm-brightness.c
index a3a0589..b1600bd 100644
--- a/src/gpm-brightness.c
+++ b/src/gpm-brightness.c
@@ -131,7 +131,7 @@ gpm_brightness_helper_get_value (const gchar *argument)
ret = g_spawn_command_line_sync (command,
&stdout_data, NULL, &exit_status, &error);
if (!ret) {
- g_error ("failed to get value: %s", error->message);
+ g_warning ("failed to get value: %s", error->message);
g_error_free (error);
goto out;
}
@@ -162,7 +162,7 @@ gpm_brightness_helper_set_value (const gchar *argument, gint value)
command = g_strdup_printf ("pkexec " SBINDIR "/mate-power-backlight-helper --%s %i", argument, value);
ret = g_spawn_command_line_sync (command, NULL, NULL, &exit_status, &error);
if (!ret) {
- g_error ("failed to get value: %s", error->message);
+ g_warning ("failed to get value: %s", error->message);
g_error_free (error);
goto out;
}
@@ -261,7 +261,7 @@ gpm_brightness_setup_display (GpmBrightness *brightness)
/* get the display */
brightness->priv->dpy = GDK_DISPLAY_XDISPLAY (gdk_display_get_default());
if (!brightness->priv->dpy) {
- g_error ("Cannot open display");
+ g_critical ("Cannot open display");
return FALSE;
}
/* is XRandR new enough? */