[glib] Revert "gapplication: don't rely on cmdline being finalized immediately"
- From: Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Revert "gapplication: don't rely on cmdline being finalized immediately"
- Date: Thu, 17 Oct 2013 12:22:19 +0000 (UTC)
commit 4e1e36a7f0d3254bad01aaf3ba94dc70b230ef62
Author: Ryan Lortie <desrt desrt ca>
Date: Thu Oct 17 08:22:11 2013 -0400
Revert "gapplication: don't rely on cmdline being finalized immediately"
This reverts commit c5748328bee08e322997cc4703c372f6866a1693.
gio/gapplicationimpl-dbus.c | 26 +++-----------------------
1 files changed, 3 insertions(+), 23 deletions(-)
---
diff --git a/gio/gapplicationimpl-dbus.c b/gio/gapplicationimpl-dbus.c
index 5c948cc..d15e643 100644
--- a/gio/gapplicationimpl-dbus.c
+++ b/gio/gapplicationimpl-dbus.c
@@ -129,9 +129,6 @@ struct _GApplicationImpl
static GApplicationCommandLine *
g_dbus_command_line_new (GDBusMethodInvocation *invocation);
-static void
-g_dbus_command_line_return (GApplicationCommandLine *cmdline);
-
static GVariant *
g_application_impl_get_property (GDBusConnection *connection,
const gchar *sender,
@@ -262,8 +259,6 @@ g_application_impl_method_call (GDBusConnection *connection,
g_application_command_line_set_exit_status (cmdline, status);
class->after_emit (impl->app, platform_data);
g_variant_unref (platform_data);
-
- g_dbus_command_line_return (cmdline);
g_object_unref (cmdline);
}
else if (g_str_equal (method_name, "ActivateAction"))
@@ -792,8 +787,6 @@ typedef struct
GDBusConnection *connection;
const gchar *bus_name;
const gchar *object_path;
-
- gboolean returned;
} GDBusCommandLine;
@@ -859,29 +852,16 @@ g_dbus_command_line_get_stdin (GApplicationCommandLine *cmdline)
}
static void
-g_dbus_command_line_return (GApplicationCommandLine *cmdline)
+g_dbus_command_line_finalize (GObject *object)
{
- GDBusCommandLine *gdbcl = (GDBusCommandLine *) cmdline;
+ GApplicationCommandLine *cmdline = G_APPLICATION_COMMAND_LINE (object);
+ GDBusCommandLine *gdbcl = (GDBusCommandLine *) object;
gint status;
- if (gdbcl->returned)
- return;
-
- gdbcl->returned = TRUE;
-
status = g_application_command_line_get_exit_status (cmdline);
g_dbus_method_invocation_return_value (gdbcl->invocation,
g_variant_new ("(i)", status));
-}
-
-static void
-g_dbus_command_line_finalize (GObject *object)
-{
- GApplicationCommandLine *cmdline = G_APPLICATION_COMMAND_LINE (object);
- GDBusCommandLine *gdbcl = (GDBusCommandLine *) object;
-
- g_dbus_command_line_return (cmdline);
g_object_unref (gdbcl->invocation);
G_OBJECT_CLASS (g_dbus_command_line_parent_class)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]