From d41062daa4c177d5fb3d4b717d79743e2f9b7182 Mon Sep 17 00:00:00 2001 From: Max Krummenacher 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 --- 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 #include #include +#if USE_GTK2 #include +#endif #include @@ -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 #include #include +#if USE_GTK2 #include +#endif #include @@ -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