aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-08-28 10:22:38 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-08-28 10:22:38 +0200
commit75bcdb4238247642f9b259421964c3a6ec2d6e5c (patch)
tree53d70f33f64990b7e3b8e29e478c1c99605306ba
parent046a91ec739efdf1504e8716a28cec2fd5782303 (diff)
parent956867ac1d8f48cddad6414c06feaf7ceeaa398d (diff)
downloadayatana-indicator-power-75bcdb4238247642f9b259421964c3a6ec2d6e5c.tar.gz
ayatana-indicator-power-75bcdb4238247642f9b259421964c3a6ec2d6e5c.tar.bz2
ayatana-indicator-power-75bcdb4238247642f9b259421964c3a6ec2d6e5c.zip
Merge branch 'tari01-pr/fix-lomiri-power-setting'
Attribute GH PR #37: https://github.com/AyatanaIndicators/ayatana-indicator-power/pull/37
-rw-r--r--src/utils.c19
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())
{