Merge lp:~dobey/libubuntuone/merge-to-stable-3-0 into lp:libubuntuone/stable-3-0

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 145
Merged at revision: 143
Proposed branch: lp:~dobey/libubuntuone/merge-to-stable-3-0
Merge into: lp:libubuntuone/stable-3-0
Diff against target: 88 lines (+14/-9)
4 files modified
configure.ac (+2/-2)
libubuntuone/u1-codec-installer.c (+9/-3)
libubuntuone/u1-music-store.c (+2/-3)
tests/test-music-store.c (+1/-1)
To merge this branch: bzr merge lp:~dobey/libubuntuone/merge-to-stable-3-0
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
Review via email: mp+86485@code.launchpad.net

Commit message

[Martin Pitt]

    Fix usage of deprecated glib symbols.

[Rodney Dawes]

    Disable errors on deprecated declarations for newer glib/gtk+ versions.

[Gabor Kelemen]

    Include correct header to make i18n work.

To post a comment you must log in.
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure.ac'
2--- configure.ac 2011-12-01 19:19:07 +0000
3+++ configure.ac 2011-12-20 23:51:25 +0000
4@@ -32,7 +32,7 @@
5 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
6
7 dnl Look for needed modules
8-PKG_CHECK_MODULES(LIBUBUNTUONE, gdk-pixbuf-2.0 webkit-1.0 >= 1.1.15 libxml-2.0 libsoup-2.4 >= 2.33.1 libsoup-gnome-2.4 libsyncdaemon-1.0 >= 1.4.2 gstreamer-0.10 gstreamer-pbutils-0.10)
9+PKG_CHECK_MODULES(LIBUBUNTUONE, glib-2.0 >= 2.24 gdk-pixbuf-2.0 webkit-1.0 >= 1.1.15 libxml-2.0 libsoup-2.4 >= 2.33.1 libsoup-gnome-2.4 libsyncdaemon-1.0 >= 1.4.2 gstreamer-0.10 gstreamer-pbutils-0.10)
10 AC_SUBST(LIBUBUNTUONE_CFLAGS)
11 AC_SUBST(LIBUBUNTUONE_LIBS)
12
13@@ -59,7 +59,7 @@
14 enable_debug=$enableval,
15 enable_debug=$debugging)
16 if test "x$enable_debug" != "xno"; then
17- CFLAGS="${CFLAGS} -Wno-strict-prototypes -Wall -Werror"
18+ CFLAGS="${CFLAGS} -Wno-strict-prototypes -Wall -Werror -Wno-error=deprecated-declarations"
19 AC_SUBST(CFLAGS)
20 fi
21
22
23=== modified file 'libubuntuone/u1-codec-installer.c'
24--- libubuntuone/u1-codec-installer.c 2011-04-01 17:19:03 +0000
25+++ libubuntuone/u1-codec-installer.c 2011-12-20 23:51:25 +0000
26@@ -39,6 +39,12 @@
27 "unless the seller has received a license by Fraunhofer IIS " \
28 "and Thomson and paid the relevant royalties to them."
29
30+/* glib < 2.30 still uses the deprecated g_format_size_for_display(), provide
31+ * compatibility shim */
32+#if (!GLIB_CHECK_VERSION(2, 30, 0))
33+ #define g_format_size g_format_size_for_display
34+#endif
35+
36 G_DEFINE_TYPE (U1CodecInstaller, u1_codec_installer, G_TYPE_OBJECT)
37
38 struct _U1CodecInstallerPrivate {
39@@ -235,10 +241,10 @@
40 gchar *message;
41 gchar *bd, *bt;
42
43- bd = g_format_size_for_display (bytes_done);
44- bt = g_format_size_for_display (bytes_total);
45+ bd = g_format_size (bytes_done);
46+ bt = g_format_size (bytes_total);
47 if (speed != 0) {
48- gchar *ks = g_format_size_for_display (speed);
49+ gchar *ks = g_format_size (speed);
50
51 message = g_strdup_printf (_("Downloaded %sB of %sB at %sB/s"), bd, bt, ks);
52 g_free (ks);
53
54=== modified file 'libubuntuone/u1-music-store.c'
55--- libubuntuone/u1-music-store.c 2011-10-17 14:33:03 +0000
56+++ libubuntuone/u1-music-store.c 2011-12-20 23:51:25 +0000
57@@ -22,7 +22,7 @@
58 #include "config.h"
59 #include <string.h>
60 #include <libxml/HTMLparser.h>
61-#include <glib/gi18n.h>
62+#include <glib/gi18n-lib.h>
63 #include <gst/gst.h>
64 #include <gst/pbutils/pbutils.h>
65 #include <webkit/webkit.h>
66@@ -1237,8 +1237,7 @@
67 SoupSession *session;
68 GtkWidget *alert_icon;
69
70- if (!g_thread_get_initialized ())
71- g_thread_init (NULL);
72+ g_type_init();
73
74 gst_init (NULL, NULL);
75
76
77=== modified file 'tests/test-music-store.c'
78--- tests/test-music-store.c 2010-07-09 14:19:48 +0000
79+++ tests/test-music-store.c 2011-12-20 23:51:25 +0000
80@@ -55,7 +55,7 @@
81 GtkWidget *window, *music_store;
82
83 gtk_init (&argc, &argv);
84- g_thread_init (NULL);
85+ g_type_init ();
86
87 /* Create the main window */
88 window = gtk_window_new (GTK_WINDOW_TOPLEVEL);

Subscribers

People subscribed via source and target branches

to all changes: