[gnome-disk-utility/udisks2-port] Single-instance fixes
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility/udisks2-port] Single-instance fixes
- Date: Wed, 16 Mar 2011 19:45:44 +0000 (UTC)
commit 2a07fafff30ee416919980725caa4eab5d4852de
Author: David Zeuthen <davidz redhat com>
Date: Wed Mar 16 14:34:10 2011 -0400
Single-instance fixes
Signed-off-by: David Zeuthen <davidz redhat com>
src/palimpsest/gduapplication.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/palimpsest/gduapplication.c b/src/palimpsest/gduapplication.c
index e219bf5..2e92145 100644
--- a/src/palimpsest/gduapplication.c
+++ b/src/palimpsest/gduapplication.c
@@ -53,7 +53,8 @@ gdu_application_finalize (GObject *object)
{
GduApplication *app = GDU_APPLICATION (object);
- g_object_unref (app->client);
+ if (app->client != NULL)
+ g_object_unref (app->client);
G_OBJECT_CLASS (gdu_application_parent_class)->finalize (object);
}
@@ -81,6 +82,9 @@ gdu_application_activate (GApplication *_app)
GduApplication *app = GDU_APPLICATION (_app);
GError *error;
+ if (app->client != NULL)
+ goto out;
+
error = NULL;
app->client = udisks_client_new_sync (NULL, /* GCancellable* */
&error);
@@ -94,6 +98,9 @@ gdu_application_activate (GApplication *_app)
gtk_application_add_window (GTK_APPLICATION (app),
GTK_WINDOW (app->window));
gtk_widget_show_all (GTK_WIDGET (app->window));
+
+ out:
+ ;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]