aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-05-04 14:29:31 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-05-04 14:29:31 +0200
commita3db57030481923c3624822f3e439468d969c500 (patch)
treea3ed86564b59adf3a6bf4c141b00ecb91432ec5d
parentd4e75ae9ca767eac3dea028e1f298e3de360d76c (diff)
parent22acbfc4d11f7c003582f5dec247d6e81eaf1e93 (diff)
downloadayatana-indicator-power-a3db57030481923c3624822f3e439468d969c500.tar.gz
ayatana-indicator-power-a3db57030481923c3624822f3e439468d969c500.tar.bz2
ayatana-indicator-power-a3db57030481923c3624822f3e439468d969c500.zip
Merge branch 'tari01-pr/remove-zenity-warning'
Attributes GH PR #26: https://github.com/AyatanaIndicators/ayatana-indicator-power/pull/26
-rw-r--r--CMakeLists.txt2
-rw-r--r--debian/control2
-rw-r--r--src/utils.c46
-rw-r--r--src/utils.h2
4 files changed, 2 insertions, 50 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ecd4ff1..0ca8dbe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,7 +37,7 @@ pkg_check_modules(SERVICE_DEPS REQUIRED
gio-2.0>=2.36
gio-unix-2.0>=2.36
libnotify>=0.7.6
- libayatana-common>=0.9.0)
+ libayatana-common>=0.9.1)
include_directories (SYSTEM ${SERVICE_DEPS_INCLUDE_DIRS})
diff --git a/debian/control b/debian/control
index f5fff5d..a70647f 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,7 @@ Build-Depends: cmake,
cmake-extras (>= 0.10),
gcovr,
lcov,
- libayatana-common-dev (>= 0.9.0),
+ libayatana-common-dev (>= 0.9.1),
libnotify-dev (>= 0.7.6),
libglib2.0-dev (>= 2.36),
liblomiri-url-dispatcher-dev | hello,
diff --git a/src/utils.c b/src/utils.c
index 9a5495f..992b84d 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -27,52 +27,6 @@
# include <lomiri-url-dispatcher.h>
#endif
-gboolean
-zenity_warning (const char * icon_name,
- const char * title,
- const char * text)
-{
- char * command_line;
- int exit_status;
- GError * error;
- gboolean confirmed;
- char * zenity;
-
- confirmed = FALSE;
- zenity = g_find_program_in_path ("zenity");
-
- if (zenity)
- {
- command_line = g_strdup_printf ("%s"
- " --warning"
- " --icon-name=\"%s\""
- " --title=\"%s\""
- " --text=\"%s\""
- " --no-wrap",
- zenity,
- icon_name,
- title,
- text);
-
- /* Treat errors as user confirmation.
- Otherwise how will the user ever log out? */
- exit_status = -1;
- error = NULL;
- if (!g_spawn_command_line_sync (command_line, NULL, NULL, &exit_status, &error))
- {
- confirmed = TRUE;
- }
- else
- {
- confirmed = g_spawn_check_exit_status (exit_status, &error);
- }
-
- g_free (command_line);
- }
- g_free (zenity);
- return confirmed;
-}
-
void
utils_handle_settings_request (void)
{
diff --git a/src/utils.h b/src/utils.h
index 2eb0de7..6dcf658 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -24,6 +24,4 @@
void utils_handle_settings_request(void);
-gboolean zenity_warning (const char * icon_name, const char * title, const char * text);
-
#endif /* __INDICATOR_POWER_UTILS_H__ */