summaryrefslogtreecommitdiff
path: root/libido3/ido-optional-ubuntu-private.patch
blob: 8f69d48eb7eae3b240f8d3094d011905b2db2b89 (plain)
    1 --- a/configure.ac
    2 +++ b/configure.ac
    3 @@ -140,6 +140,16 @@ dnl = GTK Doc Check ====================
    4  
    5  GTK_DOC_CHECK([1.8])
    6  
    7 +dnl = GTK+ Ubuntu Private API =================================================
    8 +
    9 +AC_ARG_ENABLE([ubuntu-private-api],
   10 +              [AS_HELP_STRING([--enable-ubuntu-private-api=@<:@no/yes@:>@],
   11 +                              [Use Ubuntu GTK+ Private API @<:@default=yes@:>@])],
   12 +              [enable_ubuntu_private_api="$enableval"],
   13 +              [enable_ubuntu_private_api=yes])
   14 +
   15 +AM_CONDITIONAL([USE_UBUNTU_PRIVATE_API], [test "x$enable_ubuntu_private_api" != xno])
   16 +
   17  dnl ===========================================================================
   18  
   19  AC_CONFIG_FILES([
   20 @@ -160,6 +170,7 @@ echo ""
   21  echo " Prefix       : ${prefix}"
   22  echo " gcov         : ${use_gcov}"
   23  echo " introspection: ${enable_introspection}"
   24 +echo " ubuntu gtk+  : ${enable_ubuntu_private_api}"
   25  echo ""
   26  echo " Documentation: ${enable_gtk_doc}"
   27  echo ""
   28 --- a/src/idomenuitemfactory.c
   29 +++ b/src/idomenuitemfactory.c
   30 @@ -17,6 +17,7 @@
   31   *     Lars Uebernickel <lars.uebernickel@canonical.com>
   32   */
   33  
   34 +#ifdef USE_UBUNTU_PRIVATE_API
   35  #include <gtk/gtk.h>
   36  #include <gtk/ubuntu-private.h>
   37  
   38 @@ -117,3 +118,4 @@ static void
   39  ido_menu_item_factory_init (IdoMenuItemFactory *factory)
   40  {
   41  }
   42 +#endif
   43 --- a/src/libido.c
   44 +++ b/src/libido.c
   45 @@ -28,9 +28,11 @@
   46  void
   47  ido_init (void)
   48  {
   49 +#ifdef USE_UBUNTU_PRIVATE_API
   50    GType ido_menu_item_factory_get_type (void);
   51  
   52    /* make sure this extension point is registered so that gtk calls it
   53     * when finding custom menu items */
   54    g_type_ensure (ido_menu_item_factory_get_type ());
   55 +#endif
   56  }
   57 --- a/src/Makefile.am
   58 +++ b/src/Makefile.am
   59 @@ -68,6 +68,10 @@ AM_CPPFLAGS =				\
   60  	$(MAINTAINER_CFLAGS)    \
   61  	-Wall -Werror -Wextra -Wno-unused-parameter -Wno-error=deprecated-declarations
   62  
   63 +if USE_UBUNTU_PRIVATE_API
   64 +AM_CPPFLAGS += -DUSE_UBUNTU_PRIVATE_API
   65 +endif
   66 +
   67  AM_CFLAGS =                             \
   68  	$(COVERAGE_CFLAGS)
   69  

Generated by cgit