[gnome-terminal] client: legacy: Error out when calling --preferences from within gnome-terminal
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] client: legacy: Error out when calling --preferences from within gnome-terminal
- Date: Mon, 12 Feb 2018 18:54:26 +0000 (UTC)
commit ccc1b32fd7a6361378bad6d62412a5584e150430
Author: Christian Persch <chpe src gnome org>
Date: Mon Feb 12 19:53:08 2018 +0100
client: legacy: Error out when calling --preferences from within gnome-terminal
https://bugzilla.gnome.org/show_bug.cgi?id=792622
src/terminal.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/terminal.c b/src/terminal.c
index 0c8e2d1..ae514d5 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -309,7 +309,14 @@ handle_show_preferences (const char *service_name)
/* For reasons (!?), the org.gtk.Actions interface's object path
* is derived from the service name, i.e. for service name
* "foo.bar.baz" the object path is "/foo/bar/baz".
+ * This means that without the name (like when given only the unique name),
+ * we cannot activate the action.
*/
+ if (g_dbus_is_unique_name(service_name)) {
+ terminal_printerr ("Cannot call this function from within gnome-terminal.\n");
+ return;
+ }
+
object_path = g_strdelimit (g_strdup_printf (".%s", service_name), ".", '/');
g_variant_builder_init (&builder, G_VARIANT_TYPE ("(sava{sv})"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]