wok-next view lxsession/stuff/patches/0001-Use-GApplication-for-unique-app-handling.patch @ rev 20529

Up libblockdev (2.16), nspr (4.18), openssh (7.6p1), udisks2 (2.7.6).
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Mar 24 15:55:55 2018 +0200 (2018-03-24)
parents
children
line source
1 From a7d3b40a79a7a16c1f5d50d2bd466570258dae29 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
3 Date: Sun, 22 Jan 2017 01:09:59 +0100
4 Subject: [PATCH] Use GApplication for unique app handling
6 Remove libunique dependency, and use glib >= 2.28.0 to handle unique apps both for GTK+ 2 and 3.
7 ---
8 Makefile.am | 6 ------
9 configure.ac | 7 +------
10 lxclipboard/main.vala | 16 +---------------
11 lxpolkit/main.vala | 16 +---------------
12 4 files changed, 3 insertions(+), 42 deletions(-)
14 diff --git a/Makefile.am b/Makefile.am
15 index c2e1fe8..e3a3b97 100644
16 --- a/Makefile.am
17 +++ b/Makefile.am
18 @@ -90,9 +90,6 @@ if USE_GTK3
19 lxclipboard_lxclipboard_VALAFLAGS += --define USE_GTK3
20 else
21 lxclipboard_lxclipboard_VALAFLAGS += --define USE_GTK2
22 -lxclipboard_lxclipboard_VALAFLAGS += --pkg unique-1.0
23 -lxclipboard_lxclipboard_CPPFLAGS += $(UNIQUE_CFLAGS)
24 -lxclipboard_lxclipboard_LDADD += $(UNIQUE_LIBS)
25 endif
27 lxpolkit_lxpolkit_vala_SOURCES = \
28 @@ -137,9 +134,6 @@ if USE_GTK3
29 lxpolkit_lxpolkit_VALAFLAGS += --define USE_GTK3
30 else
31 lxpolkit_lxpolkit_VALAFLAGS += --define USE_GTK2
32 -lxpolkit_lxpolkit_VALAFLAGS += --pkg unique-1.0
33 -lxpolkit_lxpolkit_CPPFLAGS += $(UNIQUE_CFLAGS)
34 -lxpolkit_lxpolkit_LDADD += $(UNIQUE_LIBS)
35 endif
37 lxsession_db_lxsession_db_SOURCES = \
38 diff --git a/configure.ac b/configure.ac
39 index 06ddbb3..9126f4d 100644
40 --- a/configure.ac
41 +++ b/configure.ac
42 @@ -45,7 +45,7 @@ PKG_CHECK_MODULES(X11, [x11])
43 AC_SUBST(X11_CFLAGS)
44 AC_SUBST(X11_LIBS)
46 -PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.6.0])
47 +PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.28.0])
48 AC_SUBST(GLIB_CFLAGS)
49 AC_SUBST(GLIB_LIBS)
51 @@ -79,11 +79,6 @@ else
52 CFLAGS="$CFLAGS -D USE_GTK2"
53 gtk_modules="gtk+-2.0 >= 2.6.0"
54 VALA_GTK_LIBS="gtk+-2.0"
55 -
56 - PKG_CHECK_MODULES(UNIQUE, [unique-1.0])
57 - AC_SUBST(UNIQUE_CFLAGS)
58 - AC_SUBST(UNIQUE_LIBS)
59 -
60 fi
61 PKG_CHECK_MODULES(GTK, [$gtk_modules])
62 AC_SUBST(GTK_CFLAGS)
63 diff --git a/lxclipboard/main.vala b/lxclipboard/main.vala
64 index bee4044..3d4a8d7 100644
65 --- a/lxclipboard/main.vala
66 +++ b/lxclipboard/main.vala
67 @@ -17,9 +17,6 @@
68 * MA 02110-1301, USA.
69 */
70 using Gtk;
71 -#if USE_GTK2
72 -using Unique;
73 -#endif
75 namespace Lxsession
76 {
77 @@ -28,17 +25,7 @@ namespace Lxsession
78 public static int main(string[] args)
79 {
80 Gtk.init (ref args);
81 -#if USE_GTK2
82 - Unique.App app = new Unique.App("org.lxde.lxclipboard", null);
83 -
84 - if(app.is_running)
85 - {
86 - message("lxclipboard is already running. Existing");
87 - return 0;
88 - }
89 -#endif
90 -# if USE_GTK3
91 - Gtk.Application app = new Gtk.Application (
92 + GLib.Application app = new GLib.Application (
93 "org.lxde.lxclipboard",
94 GLib.ApplicationFlags.FLAGS_NONE);
95 app.register ();
96 @@ -48,7 +35,6 @@ namespace Lxsession
97 message("lxclipboard is already running. Existing");
98 return 0;
99 }
100 -#endif
102 clipboard_start ();
104 diff --git a/lxpolkit/main.vala b/lxpolkit/main.vala
105 index c0d6ae2..50c3cb7 100644
106 --- a/lxpolkit/main.vala
107 +++ b/lxpolkit/main.vala
108 @@ -17,9 +17,6 @@
109 * MA 02110-1301, USA.
110 */
111 using Gtk;
112 -#if USE_GTK2
113 -using Unique;
114 -#endif
116 const string GETTEXT_PACKAGE = "lxsession";
118 @@ -33,17 +30,7 @@ namespace Lxsession
119 Intl.bind_textdomain_codeset(GETTEXT_PACKAGE, "utf-8");
121 Gtk.init (ref args);
122 -#if USE_GTK2
123 - Unique.App app = new Unique.App("org.lxde.lxpolkit", null);
124 -
125 - if(app.is_running)
126 - {
127 - message(_("lxpolkit is already running. Existing"));
128 - return 0;
129 - }
130 -#endif
131 -# if USE_GTK3
132 - Gtk.Application app = new Gtk.Application (
133 + GLib.Application app = new GLib.Application (
134 "org.lxde.lxpolkit",
135 GLib.ApplicationFlags.FLAGS_NONE);
136 app.register ();
137 @@ -53,7 +40,6 @@ namespace Lxsession
138 message(_("lxpolkit is already running. Existing"));
139 return 0;
140 }
141 -#endif
143 policykit_agent_init();
145 --
146 2.11.0