summaryrefslogtreecommitdiff
path: root/recipes-lxde/lxsession/lxsession/0001-replace-use-of-UniqueApp-with-GtkApplication.patch
blob: 07b0e09f6dd2a221df297ff0c0ffbba55b36463b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
From d41062daa4c177d5fb3d4b717d79743e2f9b7182 Mon Sep 17 00:00:00 2001
From: Max Krummenacher <max.krummenacher@toradex.com>
Date: Sat, 21 Oct 2017 15:26:32 +0200
Subject: [PATCH 1/2] replace use of UniqueApp with GtkApplication

i.e. drop libunique use.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
---
 lxclipboard/main.c | 14 +++++++++++++-
 lxpolkit/main.c    | 12 ++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/lxclipboard/main.c b/lxclipboard/main.c
index 9656e5b..e9eabfb 100644
--- a/lxclipboard/main.c
+++ b/lxclipboard/main.c
@@ -25,7 +25,9 @@
 #include <stdlib.h>
 #include <string.h>
 #include <gtk/gtk.h>
+#if USE_GTK2
 #include <unique/unique.h>
+#endif
 #include <lxclipboard/clipboard.h>
 
 
@@ -65,15 +67,25 @@ LxsessionMain* lxsession_main_construct (GType object_type);
 
 gint lxsession_main_main (gchar** args, int args_length1) {
 	gint result = 0;
+#if USE_GTK2
 	UniqueApp* app = NULL;
 	UniqueApp* _tmp0_ = NULL;
 	UniqueApp* _tmp1_ = NULL;
+#else
+	GtkApplication* app = NULL;
+	GtkApplication* _tmp0_ = NULL;
+	GtkApplication* _tmp1_ = NULL;
+#endif
 	gboolean _tmp2_ = FALSE;
 	gboolean _tmp3_ = FALSE;
 	GMainLoop* _tmp4_ = NULL;
 	GMainLoop* _tmp5_ = NULL;
 	gtk_init (&args_length1, &args);
-	_tmp0_ = unique_app_new ("org.lxde.lxclipboard", NULL);
+#if USE_GTK2
+	_tmp0_ = gtk_application_new ("org.lxde.lxclipboard", NULL);
+#else
+	_tmp0_ = gtk_application_new ("org.lxde.lxclipboard", 0);
+#endif
 	app = _tmp0_;
 	_tmp1_ = app;
 	g_object_get (_tmp1_, "is-running", &_tmp2_, NULL);
diff --git a/lxpolkit/main.c b/lxpolkit/main.c
index 243ee1a..9e23e62 100644
--- a/lxpolkit/main.c
+++ b/lxpolkit/main.c
@@ -26,7 +26,9 @@
 #include <string.h>
 #include <glib/gi18n-lib.h>
 #include <gtk/gtk.h>
+#if USE_GTK2
 #include <unique/unique.h>
+#endif
 #include <lxpolkit/lxpolkit.h>
 
 
@@ -67,9 +69,15 @@ LxsessionMain* lxsession_main_construct (GType object_type);
 
 gint lxsession_main_main (gchar** args, int args_length1) {
 	gint result = 0;
+#if USE_GTK2
 	UniqueApp* app = NULL;
 	UniqueApp* _tmp0_ = NULL;
 	UniqueApp* _tmp1_ = NULL;
+#else
+	GtkApplication* app = NULL;
+	GtkApplication* _tmp0_ = NULL;
+	GtkApplication* _tmp1_ = NULL;
+#endif
 	gboolean _tmp2_ = FALSE;
 	gboolean _tmp3_ = FALSE;
 	GMainLoop* _tmp5_ = NULL;
@@ -77,7 +85,11 @@ gint lxsession_main_main (gchar** args, int args_length1) {
 	textdomain (GETTEXT_PACKAGE);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "utf-8");
 	gtk_init (&args_length1, &args);
+#if USE_GTK2
 	_tmp0_ = unique_app_new ("org.lxde.lxpolkit", NULL);
+#else
+	_tmp0_ = gtk_application_new ("org.lxde.lxclipboard", 0);
+#endif
 	app = _tmp0_;
 	_tmp1_ = app;
 	g_object_get (_tmp1_, "is-running", &_tmp2_, NULL);
-- 
2.9.4