Description: Add Launchpad integration Forwarded: not-needed Author: Krzysztof Klimonda Last-Update: 2011-07-19 Bug-Ubuntu: http://bugs.launchpad.net/bugs/359260 Index: transmission-2.50/gtk/main.c =================================================================== --- transmission-2.50.orig/gtk/main.c 2012-02-14 22:03:42.688421096 -0500 +++ transmission-2.50/gtk/main.c 2012-02-14 22:03:45.260433850 -0500 @@ -34,6 +34,10 @@ #include #include +#ifdef HAVE_LPI +#include +#endif + #include #include #include @@ -508,6 +512,10 @@ ui_manager = gtk_ui_manager_new ( ); gtr_actions_init ( ui_manager, cbdata ); gtk_ui_manager_add_ui_from_string ( ui_manager, fallback_ui_file, -1, NULL ); +#ifdef HAVE_LPI + launchpad_integration_add_ui ( ui_manager, + "/main-window-menu/help-menu/launchpad-items" ); +#endif gtk_ui_manager_ensure_update ( ui_manager ); /* create main window now to be a parent to any error dialogs */ Index: transmission-2.50/gtk/ui.h =================================================================== --- transmission-2.50.orig/gtk/ui.h 2012-02-14 22:03:42.704421174 -0500 +++ transmission-2.50/gtk/ui.h 2012-02-14 22:03:45.260433850 -0500 @@ -64,6 +64,9 @@ " \n" " \n" " \n" +#ifdef HAVE_LPI + " \n" +#endif " \n" " \n" " \n" Index: transmission-2.50/gtk/Makefile.am =================================================================== --- transmission-2.50.orig/gtk/Makefile.am 2012-02-14 22:03:42.680421056 -0500 +++ transmission-2.50/gtk/Makefile.am 2012-02-14 22:03:45.260433850 -0500 @@ -16,6 +16,7 @@ @LIBAPPINDICATOR_CFLAGS@ \ @LIBEVENT_CFLAGS@ \ @GTK_CFLAGS@ \ + @LPI_CFLAGS@ \ @LIBCURL_CFLAGS@ \ @OPENSSL_CFLAGS@ \ @ZLIB_CFLAGS@ \ @@ -83,6 +84,7 @@ dist_man_MANS = transmission-gtk.1 transmission_gtk_LDADD = \ + @LPI_LIBS@ \ $(top_builddir)/libtransmission/libtransmission.a \ @LIBUPNP_LIBS@ \ @LIBNATPMP_LIBS@ \ Index: transmission-2.50/configure.ac =================================================================== --- transmission-2.50.orig/configure.ac 2012-02-14 22:03:42.668420996 -0500 +++ transmission-2.50/configure.ac 2012-02-14 22:03:45.260433850 -0500 @@ -382,6 +382,14 @@ [appindicator3-0.1 >= $LIBAPPINDICATOR_MINIMUM], [have_libappindicator=yes], [have_libappindicator=no]) + PKG_CHECK_MODULES([LPI], + [launchpad-integration-3.0], + [use_lpi=yes], + [use_lpi=no]) + if test "x$use_lpi" = "xyes"; then + AC_DEFINE([HAVE_LPI], 1) + fi + AC_MSG_NOTICE([using GTK+ 3]) else