Merge lp:~kalikiana/midori/screensaver into lp:midori

Proposed by Cris Dywan
Status: Merged
Approved by: Paweł Forysiuk
Approved revision: 6379
Merged at revision: 6386
Proposed branch: lp:~kalikiana/midori/screensaver
Merge into: lp:midori
Diff against target: 72 lines (+15/-8)
2 files modified
CMakeLists.txt (+11/-4)
midori/midori-app.c (+4/-4)
To merge this branch: bzr merge lp:~kalikiana/midori/screensaver
Reviewer Review Type Date Requested Status
Paweł Forysiuk Needs Fixing
Review via email: mp+183768@code.launchpad.net

Commit message

Add XSS to OPTS_LIBRARIES

To post a comment you must log in.
Revision history for this message
Paweł Forysiuk (tuxator) wrote :

In WIN32 case I would add explicit HAVE_LIBNOTIFY=0 to match waf behaviour. When it is missing it defaults to 0 so it still builds and works fine but i think it is better to be explicit here. Otherwise looks sane.

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2013-09-03 19:20:31 +0000
3+++ CMakeLists.txt 2013-09-07 20:40:00 +0000
4@@ -57,6 +57,7 @@
5 find_library (XSS Xss /usr/lib/X11R6/lib)
6 if (SCRNSAVER AND XSS)
7 add_definitions("-DHAVE_X11_EXTENSIONS_SCRNSAVER_H")
8+ set(OPTS_LIBRARIES "${OPTS_LIBRARIES};${XSS}")
9 endif ()
10 endif ()
11
12@@ -89,10 +90,16 @@
13 set(VALAFLAGS ${VALAFLAGS} "-D;HAVE_LIBSOUP_2_34_0")
14 endif ()
15
16-# Always pass >1 module, otherwise we get different variable names
17-pkg_check_modules(OPTS gio-2.0 libnotify)
18-add_definitions("-DLIBNOTIFY_VERSION=\"${OPTS_libnotify_VERSION}\"")
19-set(PKGS ${PKGS} libnotify)
20+if (WIN32)
21+ add_definitions("-DLIBNOTIFY_VERSION=\"No\"")
22+else ()
23+ pkg_check_modules(NOTIFY REQUIRED libnotify)
24+ add_definitions("-DLIBNOTIFY_VERSION=\"${NOTIFY_VERSION}\"")
25+ add_definitions("-DHAVE_LIBNOTIFY")
26+ set(OPTS_INCLUDE_DIRS "${OPTS_INCLUDE_DIRS};${NOTIFY_INCLUDE_DIRS}")
27+ set(OPTS_LIBRARIES "${OPTS_LIBRARIES};${NOTIFY_LIBRARIES}")
28+ set(PKGS ${PKGS} libnotify)
29+endif ()
30
31 option(USE_GTK3 "Use GTK+3" OFF)
32 option(HALF_BRO_INCOM_WEBKIT2 "Serve as a guniea pig" OFF)
33
34=== modified file 'midori/midori-app.c'
35--- midori/midori-app.c 2013-09-02 20:05:07 +0000
36+++ midori/midori-app.c 2013-09-07 20:40:00 +0000
37@@ -33,7 +33,7 @@
38 #include <locale.h>
39 #endif
40
41-#if HAVE_LIBNOTIFY
42+#ifdef HAVE_LIBNOTIFY
43 #include <libnotify/notify.h>
44 #ifndef NOTIFY_CHECK_VERSION
45 #define NOTIFY_CHECK_VERSION(x,y,z) 0
46@@ -659,7 +659,7 @@
47 app->extensions = katze_array_new (KATZE_TYPE_ARRAY);
48 app->browsers = katze_array_new (MIDORI_TYPE_BROWSER);
49
50- #if HAVE_LIBNOTIFY
51+ #ifdef HAVE_LIBNOTIFY
52 notify_init (PACKAGE_NAME);
53 #endif
54 }
55@@ -679,7 +679,7 @@
56 katze_object_assign (app->extensions, NULL);
57 katze_object_assign (app->browsers, NULL);
58
59- #if HAVE_LIBNOTIFY
60+ #ifdef HAVE_LIBNOTIFY
61 if (notify_is_initted ())
62 notify_uninit ();
63 #endif
64@@ -1097,7 +1097,7 @@
65 g_return_if_fail (MIDORI_IS_APP (app));
66 g_return_if_fail (title);
67
68- #if HAVE_LIBNOTIFY
69+ #ifdef HAVE_LIBNOTIFY
70 if (notify_is_initted ())
71 {
72 #if NOTIFY_CHECK_VERSION (0, 7, 0)

Subscribers

People subscribed via source and target branches

to all changes: