~transmissionbt/transmission/ppa-oneiric

« back to all changes in this revision

Viewing changes to debian/patches/0102-lpi.patch

  • Committer: Andreas Noteng
  • Date: 2010-12-13 06:50:25 UTC
  • Revision ID: andreas@noteng.no-20101213065025-g2a8pvj22tz0fcit
rebase on official ubuntu packages

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Add Launchpad integration
 
2
Forwarded: not-needed
 
3
Author: Krzysztof Klimonda <kklimonda@syntaxhighlighted.com>
 
4
Last-Update: 2010-01-26
 
5
Bug-Ubuntu: http://bugs.launchpad.net/bugs/359260
 
6
Index: transmission/gtk/main.c
 
7
===================================================================
 
8
--- transmission.orig/gtk/main.c        2010-12-12 14:26:27.154418805 +0100
 
9
+++ transmission/gtk/main.c     2010-12-12 14:27:07.494418805 +0100
 
10
@@ -35,6 +35,10 @@
 
11
 #include <glib/gi18n.h>
 
12
 #include <glib/gstdio.h>
 
13
 
 
14
+#ifdef HAVE_LPI
 
15
+#include <launchpad-integration.h>
 
16
+#endif
 
17
+
 
18
 #include <libtransmission/transmission.h>
 
19
 #include <libtransmission/rpcimpl.h>
 
20
 #include <libtransmission/utils.h>
 
21
@@ -668,6 +672,10 @@
 
22
         myUIManager = gtk_ui_manager_new ( );
 
23
         actions_init ( myUIManager, cbdata );
 
24
         gtk_ui_manager_add_ui_from_string ( myUIManager, fallback_ui_file, -1, NULL );
 
25
+#ifdef HAVE_LPI
 
26
+        launchpad_integration_add_ui ( myUIManager,
 
27
+                                        "/main-window-menu/help-menu/launchpad-items" );
 
28
+#endif
 
29
         gtk_ui_manager_ensure_update ( myUIManager );
 
30
         gtk_window_set_default_icon_name ( MY_CONFIG_NAME );
 
31
 
 
32
Index: transmission/gtk/ui.h
 
33
===================================================================
 
34
--- transmission.orig/gtk/ui.h  2010-12-12 14:26:27.154418805 +0100
 
35
+++ transmission/gtk/ui.h       2010-12-12 14:27:07.494418805 +0100
 
36
@@ -56,6 +56,9 @@
 
37
     "      <separator/>\n"
 
38
     "      <menuitem action='donate'/>\n"
 
39
     "      <separator/>\n"
 
40
+#ifdef HAVE_LPI
 
41
+    "      <placeholder name='launchpad-items' />\n"
 
42
+#endif
 
43
     "      <menuitem action='help'/>\n"
 
44
     "      <menuitem action='show-about-dialog'/>\n"
 
45
     "    </menu>\n"
 
46
Index: transmission/gtk/Makefile.am
 
47
===================================================================
 
48
--- transmission.orig/gtk/Makefile.am   2010-12-12 14:26:27.154418805 +0100
 
49
+++ transmission/gtk/Makefile.am        2010-12-12 14:27:42.894418804 +0100
 
50
@@ -21,6 +21,7 @@
 
51
     @LIBCURL_CFLAGS@ \
 
52
     @GIO_CFLAGS@ \
 
53
     @LIBNOTIFY_CFLAGS@ \
 
54
+    @LPI_CFLAGS@ \
 
55
     @DBUS_GLIB_CFLAGS@ \
 
56
     @OPENSSL_CFLAGS@ \
 
57
     @ZLIB_CFLAGS@ \
 
58
@@ -96,6 +97,7 @@
 
59
 dist_man_MANS = transmission-gtk.1
 
60
 
 
61
 transmission_gtk_LDADD = \
 
62
+    @LPI_LIBS@ \
 
63
     $(top_builddir)/libtransmission/libtransmission.a \
 
64
     $(top_builddir)/third-party/miniupnp/libminiupnp.a \
 
65
     $(top_builddir)/third-party/libnatpmp/libnatpmp.a \
 
66
Index: transmission/configure.ac
 
67
===================================================================
 
68
--- transmission.orig/configure.ac      2010-12-12 14:26:27.154418805 +0100
 
69
+++ transmission/configure.ac   2010-12-12 14:27:07.494418805 +0100
 
70
@@ -270,6 +270,14 @@
 
71
 
 
72
 if test "x$build_gtk" = "xyes"; then
 
73
 
 
74
+    PKG_CHECK_MODULES([LPI],
 
75
+                      [launchpad-integration],
 
76
+                      [use_lpi=yes],
 
77
+                      [use_lpi=no])
 
78
+    if test "x$use_lpi" = "xyes"; then
 
79
+        AC_DEFINE([HAVE_LPI], 1)
 
80
+    fi
 
81
+       
 
82
     PKG_CHECK_MODULES([GIO],
 
83
                       [gio-2.0 >= $GIO_MINIMUM],
 
84
                       [use_gio=yes],