summaryrefslogtreecommitdiff
path: root/libraries/libido3/ido-optional-ubuntu-private.patch
blob: 8f69d48eb7eae3b240f8d3094d011905b2db2b89 (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
--- a/configure.ac
+++ b/configure.ac
@@ -140,6 +140,16 @@ dnl = GTK Doc Check ====================
 
 GTK_DOC_CHECK([1.8])
 
+dnl = GTK+ Ubuntu Private API =================================================
+
+AC_ARG_ENABLE([ubuntu-private-api],
+              [AS_HELP_STRING([--enable-ubuntu-private-api=@<:@no/yes@:>@],
+                              [Use Ubuntu GTK+ Private API @<:@default=yes@:>@])],
+              [enable_ubuntu_private_api="$enableval"],
+              [enable_ubuntu_private_api=yes])
+
+AM_CONDITIONAL([USE_UBUNTU_PRIVATE_API], [test "x$enable_ubuntu_private_api" != xno])
+
 dnl ===========================================================================
 
 AC_CONFIG_FILES([
@@ -160,6 +170,7 @@ echo ""
 echo " Prefix       : ${prefix}"
 echo " gcov         : ${use_gcov}"
 echo " introspection: ${enable_introspection}"
+echo " ubuntu gtk+  : ${enable_ubuntu_private_api}"
 echo ""
 echo " Documentation: ${enable_gtk_doc}"
 echo ""
--- a/src/idomenuitemfactory.c
+++ b/src/idomenuitemfactory.c
@@ -17,6 +17,7 @@
  *     Lars Uebernickel <lars.uebernickel@canonical.com>
  */
 
+#ifdef USE_UBUNTU_PRIVATE_API
 #include <gtk/gtk.h>
 #include <gtk/ubuntu-private.h>
 
@@ -117,3 +118,4 @@ static void
 ido_menu_item_factory_init (IdoMenuItemFactory *factory)
 {
 }
+#endif
--- a/src/libido.c
+++ b/src/libido.c
@@ -28,9 +28,11 @@
 void
 ido_init (void)
 {
+#ifdef USE_UBUNTU_PRIVATE_API
   GType ido_menu_item_factory_get_type (void);
 
   /* make sure this extension point is registered so that gtk calls it
    * when finding custom menu items */
   g_type_ensure (ido_menu_item_factory_get_type ());
+#endif
 }
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -68,6 +68,10 @@ AM_CPPFLAGS =				\
 	$(MAINTAINER_CFLAGS)    \
 	-Wall -Werror -Wextra -Wno-unused-parameter -Wno-error=deprecated-declarations
 
+if USE_UBUNTU_PRIVATE_API
+AM_CPPFLAGS += -DUSE_UBUNTU_PRIVATE_API
+endif
+
 AM_CFLAGS =                             \
 	$(COVERAGE_CFLAGS)