diff options
author | Robert Tari <robert@tari.in> | 2021-08-25 01:04:01 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-08-28 10:22:16 +0200 |
commit | 956867ac1d8f48cddad6414c06feaf7ceeaa398d (patch) | |
tree | 53d70f33f64990b7e3b8e29e478c1c99605306ba | |
parent | 046a91ec739efdf1504e8716a28cec2fd5782303 (diff) | |
download | ayatana-indicator-power-956867ac1d8f48cddad6414c06feaf7ceeaa398d.tar.gz ayatana-indicator-power-956867ac1d8f48cddad6414c06feaf7ceeaa398d.tar.bz2 ayatana-indicator-power-956867ac1d8f48cddad6414c06feaf7ceeaa398d.zip |
Fix Lomiri power setting
-rw-r--r-- | src/utils.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/utils.c b/src/utils.c index fd3a951..9ba904c 100644 --- a/src/utils.c +++ b/src/utils.c @@ -23,25 +23,20 @@ #include <ayatana/common/utils.h> #include "utils.h" -#ifdef HAS_URLDISPATCHER -# include <lomiri-url-dispatcher.h> -#endif - void utils_handle_settings_request (void) { static const gchar *control_center_cmd = NULL; + if (ayatana_common_utils_is_lomiri()) + { + ayatana_common_utils_open_url("settings:///system/battery"); + + return; + } + if (control_center_cmd == NULL) { -#ifdef HAS_URLDISPATCHER - if (g_getenv ("MIR_SOCKET") != NULL) - { - lomiri_url_dispatch_send("settings:///system/battery", NULL, NULL); - return; - } - else -#endif /* XFCE does not set XDG_CURRENT_DESKTOP, it seems... */ if (ayatana_common_utils_is_xfce()) { |