Merge lp:~dobey/ubuntu/natty/libubuntuone/release-0-9-1 into lp:ubuntu/natty/libubuntuone

Proposed by dobey on 2011-03-18
Status: Merged
Merged at revision: 84
Proposed branch: lp:~dobey/ubuntu/natty/libubuntuone/release-0-9-1
Merge into: lp:ubuntu/natty/libubuntuone
Diff against target: 786 lines (+287/-116)
13 files modified
configure (+19/-19)
configure.ac (+2/-2)
data/u1-preview.js (+1/-1)
debian/changelog (+12/-0)
debian/control (+0/-2)
libubuntuone/Makefile.am (+2/-0)
libubuntuone/Makefile.in (+4/-1)
libubuntuone/u1-marshal.c (+1/-38)
libubuntuone/u1-marshal.h (+1/-10)
libubuntuone/u1-marshal.list (+0/-1)
libubuntuone/u1-music-store.c (+106/-42)
libubuntuone/u1-request-chrome.c (+90/-0)
libubuntuone/u1-request-chrome.h (+49/-0)
To merge this branch: bzr merge lp:~dobey/ubuntu/natty/libubuntuone/release-0-9-1
Reviewer Review Type Date Requested Status
Ubuntu branches 2011-03-18 Pending
Review via email: mp+54070@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure'
2--- configure 2011-03-10 01:14:13 +0000
3+++ configure 2011-03-18 20:44:28 +0000
4@@ -1,6 +1,6 @@
5 #! /bin/sh
6 # Guess values for system-dependent variables and create Makefiles.
7-# Generated by GNU Autoconf 2.67 for libubuntuone 0.9.0.
8+# Generated by GNU Autoconf 2.67 for libubuntuone 0.9.1.
9 #
10 #
11 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
12@@ -698,8 +698,8 @@
13 # Identity of this package.
14 PACKAGE_NAME='libubuntuone'
15 PACKAGE_TARNAME='libubuntuone'
16-PACKAGE_VERSION='0.9.0'
17-PACKAGE_STRING='libubuntuone 0.9.0'
18+PACKAGE_VERSION='0.9.1'
19+PACKAGE_STRING='libubuntuone 0.9.1'
20 PACKAGE_BUGREPORT=''
21 PACKAGE_URL=''
22
23@@ -1535,7 +1535,7 @@
24 # Omit some internal or obsolete options to make the list less imposing.
25 # This message is too long to be a string in the A/UX 3.1 sh.
26 cat <<_ACEOF
27-\`configure' configures libubuntuone 0.9.0 to adapt to many kinds of systems.
28+\`configure' configures libubuntuone 0.9.1 to adapt to many kinds of systems.
29
30 Usage: $0 [OPTION]... [VAR=VALUE]...
31
32@@ -1605,7 +1605,7 @@
33
34 if test -n "$ac_init_help"; then
35 case $ac_init_help in
36- short | recursive ) echo "Configuration of libubuntuone 0.9.0:";;
37+ short | recursive ) echo "Configuration of libubuntuone 0.9.1:";;
38 esac
39 cat <<\_ACEOF
40
41@@ -1730,7 +1730,7 @@
42 test -n "$ac_init_help" && exit $ac_status
43 if $ac_init_version; then
44 cat <<\_ACEOF
45-libubuntuone configure 0.9.0
46+libubuntuone configure 0.9.1
47 generated by GNU Autoconf 2.67
48
49 Copyright (C) 2010 Free Software Foundation, Inc.
50@@ -2095,7 +2095,7 @@
51 This file contains any messages produced by compilers while
52 running configure, to aid debugging if configure makes a mistake.
53
54-It was created by libubuntuone $as_me 0.9.0, which was
55+It was created by libubuntuone $as_me 0.9.1, which was
56 generated by GNU Autoconf 2.67. Invocation command line was
57
58 $ $0 $@
59@@ -2918,7 +2918,7 @@
60
61 # Define the identity of the package.
62 PACKAGE='libubuntuone'
63- VERSION='0.9.0'
64+ VERSION='0.9.1'
65
66
67 cat >>confdefs.h <<_ACEOF
68@@ -12750,12 +12750,12 @@
69 pkg_cv_LIBUBUNTUONE_CFLAGS="$LIBUBUNTUONE_CFLAGS"
70 elif test -n "$PKG_CONFIG"; then
71 if test -n "$PKG_CONFIG" && \
72- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-pixbuf-2.0 webkit-1.0 >= 1.1.15 gnome-keyring-1 dbus-glib-1 libxml-2.0 libsoup-gnome-2.4 libsyncdaemon-1.0 >= 1.4.2\""; } >&5
73- ($PKG_CONFIG --exists --print-errors "gdk-pixbuf-2.0 webkit-1.0 >= 1.1.15 gnome-keyring-1 dbus-glib-1 libxml-2.0 libsoup-gnome-2.4 libsyncdaemon-1.0 >= 1.4.2") 2>&5
74+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"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\""; } >&5
75+ ($PKG_CONFIG --exists --print-errors "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") 2>&5
76 ac_status=$?
77 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
78 test $ac_status = 0; }; then
79- pkg_cv_LIBUBUNTUONE_CFLAGS=`$PKG_CONFIG --cflags "gdk-pixbuf-2.0 webkit-1.0 >= 1.1.15 gnome-keyring-1 dbus-glib-1 libxml-2.0 libsoup-gnome-2.4 libsyncdaemon-1.0 >= 1.4.2" 2>/dev/null`
80+ pkg_cv_LIBUBUNTUONE_CFLAGS=`$PKG_CONFIG --cflags "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" 2>/dev/null`
81 else
82 pkg_failed=yes
83 fi
84@@ -12766,12 +12766,12 @@
85 pkg_cv_LIBUBUNTUONE_LIBS="$LIBUBUNTUONE_LIBS"
86 elif test -n "$PKG_CONFIG"; then
87 if test -n "$PKG_CONFIG" && \
88- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-pixbuf-2.0 webkit-1.0 >= 1.1.15 gnome-keyring-1 dbus-glib-1 libxml-2.0 libsoup-gnome-2.4 libsyncdaemon-1.0 >= 1.4.2\""; } >&5
89- ($PKG_CONFIG --exists --print-errors "gdk-pixbuf-2.0 webkit-1.0 >= 1.1.15 gnome-keyring-1 dbus-glib-1 libxml-2.0 libsoup-gnome-2.4 libsyncdaemon-1.0 >= 1.4.2") 2>&5
90+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"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\""; } >&5
91+ ($PKG_CONFIG --exists --print-errors "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") 2>&5
92 ac_status=$?
93 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
94 test $ac_status = 0; }; then
95- pkg_cv_LIBUBUNTUONE_LIBS=`$PKG_CONFIG --libs "gdk-pixbuf-2.0 webkit-1.0 >= 1.1.15 gnome-keyring-1 dbus-glib-1 libxml-2.0 libsoup-gnome-2.4 libsyncdaemon-1.0 >= 1.4.2" 2>/dev/null`
96+ pkg_cv_LIBUBUNTUONE_LIBS=`$PKG_CONFIG --libs "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" 2>/dev/null`
97 else
98 pkg_failed=yes
99 fi
100@@ -12791,14 +12791,14 @@
101 _pkg_short_errors_supported=no
102 fi
103 if test $_pkg_short_errors_supported = yes; then
104- LIBUBUNTUONE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gdk-pixbuf-2.0 webkit-1.0 >= 1.1.15 gnome-keyring-1 dbus-glib-1 libxml-2.0 libsoup-gnome-2.4 libsyncdaemon-1.0 >= 1.4.2" 2>&1`
105+ LIBUBUNTUONE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "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" 2>&1`
106 else
107- LIBUBUNTUONE_PKG_ERRORS=`$PKG_CONFIG --print-errors "gdk-pixbuf-2.0 webkit-1.0 >= 1.1.15 gnome-keyring-1 dbus-glib-1 libxml-2.0 libsoup-gnome-2.4 libsyncdaemon-1.0 >= 1.4.2" 2>&1`
108+ LIBUBUNTUONE_PKG_ERRORS=`$PKG_CONFIG --print-errors "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" 2>&1`
109 fi
110 # Put the nasty error message in config.log where it belongs
111 echo "$LIBUBUNTUONE_PKG_ERRORS" >&5
112
113- as_fn_error $? "Package requirements (gdk-pixbuf-2.0 webkit-1.0 >= 1.1.15 gnome-keyring-1 dbus-glib-1 libxml-2.0 libsoup-gnome-2.4 libsyncdaemon-1.0 >= 1.4.2) were not met:
114+ as_fn_error $? "Package requirements (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) were not met:
115
116 $LIBUBUNTUONE_PKG_ERRORS
117
118@@ -14638,7 +14638,7 @@
119 # report actual input values of CONFIG_FILES etc. instead of their
120 # values after options handling.
121 ac_log="
122-This file was extended by libubuntuone $as_me 0.9.0, which was
123+This file was extended by libubuntuone $as_me 0.9.1, which was
124 generated by GNU Autoconf 2.67. Invocation command line was
125
126 CONFIG_FILES = $CONFIG_FILES
127@@ -14704,7 +14704,7 @@
128 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
129 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
130 ac_cs_version="\\
131-libubuntuone config.status 0.9.0
132+libubuntuone config.status 0.9.1
133 configured by $0, generated by GNU Autoconf 2.67,
134 with options \\"\$ac_cs_config\\"
135
136
137=== modified file 'configure.ac'
138--- configure.ac 2011-03-10 01:13:12 +0000
139+++ configure.ac 2011-03-18 20:44:28 +0000
140@@ -1,4 +1,4 @@
141-AC_INIT([libubuntuone], [0.9.0], [], [libubuntuone])
142+AC_INIT([libubuntuone], [0.9.1], [], [libubuntuone])
143
144 AC_PREREQ([2.59])
145
146@@ -32,7 +32,7 @@
147 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
148
149 dnl Look for needed modules
150-PKG_CHECK_MODULES(LIBUBUNTUONE, gdk-pixbuf-2.0 webkit-1.0 >= 1.1.15 gnome-keyring-1 dbus-glib-1 libxml-2.0 libsoup-gnome-2.4 libsyncdaemon-1.0 >= 1.4.2)
151+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)
152 AC_SUBST(LIBUBUNTUONE_CFLAGS)
153 AC_SUBST(LIBUBUNTUONE_LIBS)
154
155
156=== modified file 'data/u1-preview.js'
157--- data/u1-preview.js 2010-04-01 17:42:58 +0000
158+++ data/u1-preview.js 2011-03-18 20:44:28 +0000
159@@ -53,7 +53,7 @@
160 // add a padlock if this is a secure page
161 if (location.href.substr(0,6) == "https:") {
162 var padlock = document.createElement("img");
163- padlock.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAYAAACwXJejAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAINJREFUeNpiTEtLYwACfiCeBsQ2QCwHxK%2BBeB8QZwHxOyYGCOgFYl0gjgNiQyD2B2IJIJ4DkmSBKvIGYjcgvsyAAOlAfAzEgJkkCsQ3GVDBI6gzwIp4gJgZiH%2BhKfoOFQdb9xkq%2BJ8BO/jPxEAEGABFTwmoeQpSlALEL3AoAImnAAQYAHZ7FWCCovUtAAAAAElFTkSuQmCC";
164+ padlock.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAYAAACwXJejAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAINJREFUeNpiTEtLYwACfiCeBsQ2QCwHxK+BeB8QZwHxOyYGCOgFYl0gjgNiQyD2B2IJIJ4DkmSBKvIGYjcgvsyAAOlAfAzEgJkkCsQ3GVDBI6gzwIp4gJgZiH+hKfoOFQdb9xkq+J8BO/jPxEAEGABFTwmoeQpSlALEL3AoAImnAAQYAHZ7FWCCovUtAAAAAElFTkSuQmCC";
165 padlock.style.position = "fixed";
166 padlock.style.bottom = "0";
167 padlock.style.right = "0";
168
169=== modified file 'debian/changelog'
170--- debian/changelog 2011-03-10 01:14:13 +0000
171+++ debian/changelog 2011-03-18 20:44:28 +0000
172@@ -1,3 +1,15 @@
173+libubuntuone (0.9.1-0ubuntu1) natty; urgency=low
174+
175+ * New upstream release.
176+ - Remove unneeded dbus-glib usage (LP: #732761)
177+ - Custom URI scheme handler for internal pages (LP: #733479)
178+ - False connection error message (LP: #596394)
179+ - Notify user when purchased folder is not subscribed to (LP: #727558)
180+ - Memory leak in navigation_requested_cb (LP: #733283)
181+ - Lock icon is broken in store pages (LP: #733308)
182+
183+ -- Rodney Dawes <rodney.dawes@ubuntu.com> Fri, 18 Mar 2011 16:30:19 -0400
184+
185 libubuntuone (0.9.0-0ubuntu1) natty; urgency=low
186
187 * New upstream release.
188
189=== modified file 'debian/control'
190--- debian/control 2011-02-11 21:56:37 +0000
191+++ debian/control 2011-03-18 20:44:28 +0000
192@@ -18,9 +18,7 @@
193 python-gtk2-dev,
194 python-gobject-dev,
195 libssl-dev,
196- libgnome-keyring-dev,
197 libxml2-dev,
198- libdbus-glib-1-dev,
199 mono-gmcs,
200 gtk-sharp2-gapi,
201 cli-common-dev (>= 0.5.7),
202
203=== modified file 'libubuntuone/Makefile.am'
204--- libubuntuone/Makefile.am 2011-01-14 22:24:48 +0000
205+++ libubuntuone/Makefile.am 2011-03-18 20:44:28 +0000
206@@ -20,6 +20,8 @@
207 oauth.c \
208 oauth.h \
209 u1-music-store.c \
210+ u1-request-chrome.c \
211+ u1-request-chrome.h \
212 xmalloc.c \
213 xmalloc.h
214 libubuntuone_1_0_la_LDFLAGS = -version-info $(LIBUBUNTUONE_CURRENT):$(LIBUBUNTUONE_REVISION):$(LIBUBUNTUONE_AGE)
215
216=== modified file 'libubuntuone/Makefile.in'
217--- libubuntuone/Makefile.in 2011-01-14 22:29:52 +0000
218+++ libubuntuone/Makefile.in 2011-03-18 20:44:28 +0000
219@@ -79,7 +79,7 @@
220 $(am__DEPENDENCIES_1)
221 am__objects_1 = u1-marshal.lo
222 am_libubuntuone_1_0_la_OBJECTS = $(am__objects_1) oauth.lo \
223- u1-music-store.lo xmalloc.lo
224+ u1-music-store.lo u1-request-chrome.lo xmalloc.lo
225 libubuntuone_1_0_la_OBJECTS = $(am_libubuntuone_1_0_la_OBJECTS)
226 AM_V_lt = $(am__v_lt_$(V))
227 am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
228@@ -319,6 +319,8 @@
229 oauth.c \
230 oauth.h \
231 u1-music-store.c \
232+ u1-request-chrome.c \
233+ u1-request-chrome.h \
234 xmalloc.c \
235 xmalloc.h
236
237@@ -426,6 +428,7 @@
238 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oauth.Plo@am__quote@
239 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u1-marshal.Plo@am__quote@
240 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u1-music-store.Plo@am__quote@
241+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u1-request-chrome.Plo@am__quote@
242 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Plo@am__quote@
243
244 .c.o:
245
246=== modified file 'libubuntuone/u1-marshal.c'
247--- libubuntuone/u1-marshal.c 2010-07-21 15:39:51 +0000
248+++ libubuntuone/u1-marshal.c 2011-03-18 20:44:28 +0000
249@@ -49,44 +49,7 @@
250 #endif /* !G_ENABLE_DEBUG */
251
252
253-/* NONE:STRING,OBJECT (u1-marshal.list:1) */
254-void
255-_u1_marshal_VOID__STRING_OBJECT (GClosure *closure,
256- GValue *return_value G_GNUC_UNUSED,
257- guint n_param_values,
258- const GValue *param_values,
259- gpointer invocation_hint G_GNUC_UNUSED,
260- gpointer marshal_data)
261-{
262- typedef void (*GMarshalFunc_VOID__STRING_OBJECT) (gpointer data1,
263- gpointer arg_1,
264- gpointer arg_2,
265- gpointer data2);
266- register GMarshalFunc_VOID__STRING_OBJECT callback;
267- register GCClosure *cc = (GCClosure*) closure;
268- register gpointer data1, data2;
269-
270- g_return_if_fail (n_param_values == 3);
271-
272- if (G_CCLOSURE_SWAP_DATA (closure))
273- {
274- data1 = closure->data;
275- data2 = g_value_peek_pointer (param_values + 0);
276- }
277- else
278- {
279- data1 = g_value_peek_pointer (param_values + 0);
280- data2 = closure->data;
281- }
282- callback = (GMarshalFunc_VOID__STRING_OBJECT) (marshal_data ? marshal_data : cc->callback);
283-
284- callback (data1,
285- g_marshal_value_peek_string (param_values + 1),
286- g_marshal_value_peek_object (param_values + 2),
287- data2);
288-}
289-
290-/* NONE:STRING,STRING (u1-marshal.list:2) */
291+/* NONE:STRING,STRING (u1-marshal.list:1) */
292 void
293 _u1_marshal_VOID__STRING_STRING (GClosure *closure,
294 GValue *return_value G_GNUC_UNUSED,
295
296=== modified file 'libubuntuone/u1-marshal.h'
297--- libubuntuone/u1-marshal.h 2010-02-16 20:56:56 +0000
298+++ libubuntuone/u1-marshal.h 2011-03-18 20:44:28 +0000
299@@ -6,16 +6,7 @@
300
301 G_BEGIN_DECLS
302
303-/* NONE:STRING,OBJECT (u1-marshal.list:1) */
304-extern void _u1_marshal_VOID__STRING_OBJECT (GClosure *closure,
305- GValue *return_value,
306- guint n_param_values,
307- const GValue *param_values,
308- gpointer invocation_hint,
309- gpointer marshal_data);
310-#define _u1_marshal_NONE__STRING_OBJECT _u1_marshal_VOID__STRING_OBJECT
311-
312-/* NONE:STRING,STRING (u1-marshal.list:2) */
313+/* NONE:STRING,STRING (u1-marshal.list:1) */
314 extern void _u1_marshal_VOID__STRING_STRING (GClosure *closure,
315 GValue *return_value,
316 guint n_param_values,
317
318=== modified file 'libubuntuone/u1-marshal.list'
319--- libubuntuone/u1-marshal.list 2009-12-21 13:09:23 +0000
320+++ libubuntuone/u1-marshal.list 2011-03-18 20:44:28 +0000
321@@ -1,2 +1,1 @@
322-NONE:STRING,OBJECT
323 NONE:STRING,STRING
324
325=== modified file 'libubuntuone/u1-music-store.c'
326--- libubuntuone/u1-music-store.c 2011-03-10 01:13:12 +0000
327+++ libubuntuone/u1-music-store.c 2011-03-18 20:44:28 +0000
328@@ -24,13 +24,13 @@
329 #include <libxml/HTMLparser.h>
330 #include <glib/gi18n.h>
331 #include <webkit/webkit.h>
332-#include <dbus/dbus-glib.h>
333 #include <libsoup/soup-gnome-features.h>
334 #include <libsoup/soup-uri.h>
335 #include <libsyncdaemon/libsyncdaemon.h>
336 #include "oauth.h"
337 #include "u1-music-store.h"
338 #include "u1-marshal.h"
339+#include "u1-request-chrome.h"
340
341 #define U1_MUSIC_LIBRARY_LOCATION ".ubuntuone/Purchased from Ubuntu One"
342
343@@ -50,7 +50,6 @@
344 #define MAXIMUM_AUTH_RETRIES 5
345
346 struct _U1MusicStorePrivate {
347- DBusGConnection *bus;
348 SyncdaemonDaemon *syncdaemon;
349 gchar *base_url;
350
351@@ -60,6 +59,14 @@
352 WebKitWebFrame *frame_to_use;
353 GtkWidget *progress;
354
355+ /* Alert bar widgets
356+ * We use two button widgets here, to avoid overlapping conditions
357+ */
358+ GtkWidget *alertbar;
359+ GtkWidget *alert_label;
360+ GtkWidget *subscribe_btn;
361+ gboolean folder_subscribed;
362+
363 guint watch_id;
364 guint idle_cb;
365 GHashTable *watched_downloads;
366@@ -97,9 +104,6 @@
367 if (music_store->priv->base_url != NULL)
368 g_free (music_store->priv->base_url);
369
370- if (music_store->priv->bus != NULL)
371- dbus_g_connection_unref (music_store->priv->bus);
372-
373 if (music_store->priv->syncdaemon != NULL)
374 g_object_unref (G_OBJECT (music_store->priv->syncdaemon));
375
376@@ -237,7 +241,7 @@
377
378 *oauth_consumer_token = *oauth_consumer_secret = *oauth_token = *oauth_token_secret = NULL;
379
380- /* Get the OAuth token from the keyring */
381+ /* Get the OAuth token from the SSO client */
382 if ((credentials = syncdaemon_authentication_find_credentials (
383 syncdaemon_daemon_get_authentication (music_store->priv->syncdaemon)))) {
384 *oauth_consumer_token = g_strdup (syncdaemon_credentials_get_consumer_key (credentials));
385@@ -508,6 +512,7 @@
386 U1MusicStore *music_store = U1_MUSIC_STORE (user_data);
387 SoupURI *parsed_uri;
388 gchar *internal_uri;
389+ gboolean return_val = FALSE;
390
391 /* Remove watching callback for the page */
392 if (music_store->priv->watch_id != 0) {
393@@ -547,7 +552,7 @@
394 g_debug ("overriding the library page to ours");
395 load_delayed_page (web_view, library_override, policy_decision);
396
397- return TRUE;
398+ return_val = TRUE;
399 }
400 } else if (!g_strcmp0 ((const gchar *) parsed_uri->host, "www.7digital.com")) {
401 /* host is 7digital.com. It must be in our store. */
402@@ -566,7 +571,7 @@
403 g_free (internal_uri);
404 g_free (to_and_from_error_uris);
405
406- return TRUE;
407+ return_val = TRUE;
408 }
409 } else if (!g_strcmp0 ((const gchar *) parsed_uri->host, "one.ubuntu.com")) {
410 /* host is one.ubuntu.com. It must not be the login page */
411@@ -593,7 +598,7 @@
412 g_free (internal_uri);
413 g_free (to_and_from_error_uris);
414
415- return TRUE;
416+ return_val = TRUE;
417 }
418 } else if (!g_strcmp0 ((const gchar *) parsed_uri->host, "login.ubuntu.com")) {
419 gchar *real_url;
420@@ -618,13 +623,13 @@
421 g_free (internal_uri);
422 g_free (to_and_from_error_uris);
423
424- return TRUE;
425+ return_val = TRUE;
426 }
427
428 /* Free memory */
429 soup_uri_free (parsed_uri);
430
431- return FALSE;
432+ return return_val;
433 }
434
435 static void
436@@ -824,8 +829,10 @@
437 load_finished_cb (WebKitWebView *web_view, WebKitWebFrame *frame, gpointer user_data)
438 {
439 const gchar *library_override;
440- gchar *tmp_url;
441 U1MusicStore *music_store = U1_MUSIC_STORE (user_data);
442+ SoupURI * uri;
443+
444+ uri = soup_uri_new (webkit_web_view_get_uri (web_view));
445
446 /* Remove the initial view if still around */
447 if (music_store->priv->initial_web_viewer != NULL) {
448@@ -846,8 +853,15 @@
449 execute_script (web_view, "u1-library-override.js", library_override);
450
451 /* If the URL just loaded is the library page, update download status */
452- tmp_url = g_strdup_printf ("%s%s", music_store->priv->base_url, U1_LIBRARY_URL);
453- if (g_str_has_prefix (webkit_web_view_get_uri (web_view), tmp_url)) {
454+ if (g_str_has_prefix (uri->path, U1_LIBRARY_URL)) {
455+ /* Show the alert bar if folder is unsubscribed */
456+ if (!music_store->priv->folder_subscribed) {
457+ gtk_label_set_text (GTK_LABEL (music_store->priv->alert_label),
458+ _("Your 'Purchased Music' folder is not subscribed. New purchases will not download to this computer."));
459+ gtk_widget_show (music_store->priv->subscribe_btn);
460+ gtk_widget_show (music_store->priv->alertbar);
461+ }
462+
463 /* Inject JavaScript to make songs clickable
464 Needs to be done before update-status-in-library-page */
465 execute_script (web_view, "u1-songs-clickable.js", NULL);
466@@ -859,13 +873,13 @@
467 music_store->priv->watch_id = g_timeout_add (1000, (GSourceFunc) poll_downloads_cb, music_store);
468 }
469
470- g_free (tmp_url);
471-
472 /* Signal users the URL finished loading */
473 gtk_widget_hide (music_store->priv->progress);
474
475 g_signal_emit (music_store, u1_music_store_signals[URL_LOADED_SIGNAL], 0,
476 (const gchar *) webkit_web_view_get_uri (WEBKIT_WEB_VIEW (music_store->priv->web_viewer)));
477+
478+ soup_uri_free (uri);
479 }
480
481 static void
482@@ -902,9 +916,12 @@
483 static gboolean
484 load_error_cb (WebKitWebView *web_view, WebKitWebFrame *frame, const gchar *uri, GError *error, gpointer user_data)
485 {
486- load_internal_html_page (web_view, U1_DEFAULT_ERROR_PAGE, uri);
487+ if (error->domain == WEBKIT_NETWORK_ERROR) {
488+ load_internal_html_page (web_view, U1_DEFAULT_ERROR_PAGE, uri);
489+ return TRUE;
490+ }
491
492- return TRUE;
493+ return FALSE;
494 }
495
496 static gboolean
497@@ -944,11 +961,40 @@
498 }
499
500 static void
501+sd_folder_subscribed_cb (SyncdaemonDaemon *daemon, gboolean success,
502+ SyncdaemonFolderInfo *folder_info, gpointer user_data)
503+{
504+ U1MusicStore *music_store = U1_MUSIC_STORE (user_data);
505+ const gchar *new_path = syncdaemon_folder_info_get_path (folder_info);
506+ const gchar *lib_path = u1_music_store_get_library_location (music_store);
507+
508+ if (success && g_strcmp0 (new_path, lib_path) == 0) {
509+ music_store->priv->folder_subscribed = TRUE;
510+ gtk_widget_hide (music_store->priv->subscribe_btn);
511+ gtk_widget_hide (music_store->priv->alertbar);
512+ }
513+}
514+
515+static void
516+subscribe_purchased_folder (GtkButton *button, gpointer user_data)
517+{
518+ U1MusicStore *music_store = U1_MUSIC_STORE (user_data);
519+ SyncdaemonFolderInfo *folder_info;
520+
521+ folder_info = syncdaemon_daemon_get_folder_info (music_store->priv->syncdaemon,
522+ u1_music_store_get_library_location (music_store));
523+ syncdaemon_daemon_subscribe_folder (music_store->priv->syncdaemon,
524+ syncdaemon_folder_info_get_volume_id (folder_info));
525+}
526+
527+static void
528 u1_music_store_init (U1MusicStore *music_store)
529 {
530 gchar *new_user_agent;
531 const gchar *url_to_use;
532- GError *error = NULL;
533+ SoupSession *session;
534+ GtkWidget *alert_icon;
535+ SyncdaemonFolderInfo *folder_info;
536
537 if (!g_thread_get_initialized ())
538 g_thread_init (NULL);
539@@ -957,32 +1003,16 @@
540 music_store->priv->watched_downloads = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
541 music_store->priv->syncdaemon = syncdaemon_daemon_new ();
542
543+ g_signal_connect (G_OBJECT (music_store->priv->syncdaemon),
544+ "folder_subscribed",
545+ G_CALLBACK (sd_folder_subscribed_cb), music_store);
546+
547 /* If U1MUSICSTOREURL is defined, use that instead of the real URL */
548 if (! (url_to_use = g_getenv ("U1MUSICSTOREURL")))
549 url_to_use = "https://one.ubuntu.com";
550
551 music_store->priv->base_url = g_strdup (url_to_use);
552
553- /* Initialize DBus */
554- music_store->priv->bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
555- if (error) {
556- g_warning ("Couldn't get session bus: %s", error->message);
557- g_error_free (error);
558-
559- }
560-
561- dbus_g_object_register_marshaller (_u1_marshal_VOID__STRING_STRING,
562- G_TYPE_NONE,
563- G_TYPE_STRING, G_TYPE_STRING,
564- G_TYPE_INVALID);
565- dbus_g_object_register_marshaller (g_cclosure_marshal_VOID__VOID,
566- G_TYPE_NONE,
567- G_TYPE_INVALID);
568- dbus_g_object_register_marshaller (g_cclosure_marshal_VOID__STRING,
569- G_TYPE_NONE,
570- G_TYPE_STRING,
571- G_TYPE_INVALID);
572-
573 /* Create web viewer object */
574 music_store->priv->scroll = gtk_scrolled_window_new (NULL, NULL);
575 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (music_store->priv->scroll),
576@@ -1002,8 +1032,13 @@
577 NULL);
578 g_free(new_user_agent);
579
580+ session = webkit_get_default_session ();
581+
582 /* Use GNOME proxy settings */
583- soup_session_add_feature_by_type (webkit_get_default_session (), SOUP_TYPE_PROXY_RESOLVER_GNOME);
584+ soup_session_add_feature_by_type (session, SOUP_TYPE_PROXY_RESOLVER_GNOME);
585+
586+ /* Add our handler for u1chrome: URIs */
587+ soup_session_add_feature_by_type (session, U1_TYPE_REQUEST_CHROME);
588
589 g_signal_connect (G_OBJECT (music_store->priv->web_viewer), "navigation-policy-decision-requested",
590 G_CALLBACK (navigation_requested_cb), music_store);
591@@ -1024,6 +1059,34 @@
592 gtk_widget_show (music_store->priv->initial_web_viewer);
593 gtk_container_add (GTK_CONTAINER (music_store->priv->scroll), music_store->priv->initial_web_viewer);
594
595+ /* Create the alert bar */
596+ music_store->priv->alertbar = gtk_hbox_new (FALSE, 12);
597+ alert_icon = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
598+ GTK_ICON_SIZE_MENU);
599+ gtk_box_pack_start (GTK_BOX (music_store->priv->alertbar), alert_icon,
600+ FALSE, FALSE, 0);
601+ gtk_widget_show (alert_icon);
602+
603+ music_store->priv->alert_label = gtk_label_new ("");
604+ gtk_misc_set_alignment (GTK_MISC (music_store->priv->alert_label),
605+ 0.0, 0.5);
606+ gtk_box_pack_start (GTK_BOX (music_store->priv->alertbar),
607+ music_store->priv->alert_label,
608+ TRUE, TRUE, 0);
609+ gtk_widget_show (music_store->priv->alert_label);
610+
611+ /* Button to subscribe the Purchased Music folder */
612+ music_store->priv->subscribe_btn = gtk_button_new_with_label (_("Subscribe"));
613+ gtk_box_pack_end (GTK_BOX (music_store->priv->alertbar),
614+ music_store->priv->subscribe_btn,
615+ FALSE, FALSE, 6);
616+ g_signal_connect (G_OBJECT (music_store->priv->subscribe_btn), "clicked",
617+ G_CALLBACK (subscribe_purchased_folder), music_store);
618+
619+ /* Figure out if the Purchased Music folder is subscribed */
620+ folder_info = syncdaemon_daemon_get_folder_info (music_store->priv->syncdaemon, u1_music_store_get_library_location (music_store));
621+ music_store->priv->folder_subscribed = syncdaemon_folder_info_get_subscribed (folder_info);
622+
623 /* Create a hidden progress bar */
624 music_store->priv->progress = gtk_progress_bar_new ();
625
626@@ -1033,8 +1096,9 @@
627 /* And load the real store in the background */
628 music_store->priv->idle_cb = g_idle_add ((GSourceFunc) load_real_store_cb, music_store);
629
630- gtk_box_pack_start (GTK_BOX (music_store), music_store->priv->scroll, TRUE, TRUE, 3);
631- gtk_box_pack_start (GTK_BOX (music_store), music_store->priv->progress, FALSE, FALSE, 3);
632+ gtk_box_pack_start (GTK_BOX (music_store), music_store->priv->alertbar, FALSE, FALSE, 6);
633+ gtk_box_pack_start (GTK_BOX (music_store), music_store->priv->scroll, TRUE, TRUE, 0);
634+ gtk_box_pack_end (GTK_BOX (music_store), music_store->priv->progress, FALSE, FALSE, 0);
635 }
636
637 /**
638
639=== added file 'libubuntuone/u1-request-chrome.c'
640--- libubuntuone/u1-request-chrome.c 1970-01-01 00:00:00 +0000
641+++ libubuntuone/u1-request-chrome.c 2011-03-18 20:44:28 +0000
642@@ -0,0 +1,90 @@
643+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
644+/*
645+ * Copyright (C) 2011 Canonical, Ltd.
646+ *
647+ * This library is free software; you can redistribute it and/or
648+ * modify it under the terms of version 2 of the GNU Lesser General Public
649+ * License as published by the Free Software Foundation.
650+ *
651+ * This program is distributed in the hope that it will be useful,
652+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
653+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
654+ * General Public License for more details.
655+ *
656+ * You should have received a copy of the GNU Lesser General Public
657+ * License along with this library; if not, write to the
658+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
659+ * Boston, MA 02110-1301, USA.
660+ */
661+
662+#ifdef HAVE_CONFIG_H
663+#include <config.h>
664+#endif
665+
666+#include <gio/gio.h>
667+#include <glib/gi18n-lib.h>
668+#include <libsoup/soup-uri.h>
669+
670+#include "u1-request-chrome.h"
671+
672+static GInputStream *u1_request_chrome_send (SoupRequest *request,
673+ GCancellable *cancellable,
674+ GError **error);
675+static goffset u1_request_chrome_get_content_length (SoupRequest *request);
676+static const gchar *u1_request_chrome_get_content_type (SoupRequest *request);
677+
678+G_DEFINE_TYPE (U1RequestChrome, u1_request_chrome, SOUP_TYPE_REQUEST)
679+
680+/* The URI schemes we handle */
681+static const gchar *chrome_schemes[] = { "u1chrome", NULL };
682+
683+struct _U1RequestChromePrivate {
684+};
685+
686+static void
687+u1_request_chrome_init (U1RequestChrome *chrome)
688+{
689+ chrome->priv = G_TYPE_INSTANCE_GET_PRIVATE (chrome, U1_TYPE_REQUEST_CHROME, U1RequestChromePrivate);
690+}
691+
692+static void
693+u1_request_chrome_class_init (U1RequestChromeClass *klass)
694+{
695+ SoupRequestClass *request_class = SOUP_REQUEST_CLASS (klass);
696+
697+ request_class->schemes = chrome_schemes;
698+
699+ g_type_class_add_private (klass, sizeof (U1RequestChromeClass));
700+
701+ request_class->send = u1_request_chrome_send;
702+ request_class->get_content_length = u1_request_chrome_get_content_length;
703+ request_class->get_content_type = u1_request_chrome_get_content_type;
704+}
705+
706+static GInputStream *
707+u1_request_chrome_send (SoupRequest *request,
708+ GCancellable *cancellable,
709+ GError **error)
710+{
711+ SoupURI *uri = soup_request_get_uri (request);
712+ gchar *data;
713+
714+ if (uri->path && !g_ascii_strcasecmp (uri->path, "empty"))
715+ data = g_strdup ("");
716+ else
717+ data = g_strdup ("");
718+
719+ return g_memory_input_stream_new_from_data (data, strlen (data), g_free);
720+}
721+
722+static goffset
723+u1_request_chrome_get_content_length (SoupRequest *request)
724+{
725+ return -1;
726+}
727+
728+static const gchar *
729+u1_request_chrome_get_content_type (SoupRequest *request)
730+{
731+ return "text/plain";
732+}
733
734=== added file 'libubuntuone/u1-request-chrome.h'
735--- libubuntuone/u1-request-chrome.h 1970-01-01 00:00:00 +0000
736+++ libubuntuone/u1-request-chrome.h 2011-03-18 20:44:28 +0000
737@@ -0,0 +1,49 @@
738+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
739+/*
740+ * Copyright (C) 2011 Canonical, Ltd.
741+ *
742+ * This library is free software; you can redistribute it and/or
743+ * modify it under the terms of version 2 of the GNU Lesser General Public
744+ * License as published by the Free Software Foundation.
745+ *
746+ * This program is distributed in the hope that it will be useful,
747+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
748+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
749+ * General Public License for more details.
750+ *
751+ * You should have received a copy of the GNU Lesser General Public
752+ * License along with this library; if not, write to the
753+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
754+ * Boston, MA 02110-1301, USA.
755+ */
756+
757+#ifndef __U1_REQUEST_CHROME_H__
758+#define __U1_REQUEST_CHROME_H__
759+
760+#define LIBSOUP_USE_UNSTABLE_REQUEST_API
761+#include <libsoup/soup-request.h>
762+
763+#define U1_TYPE_REQUEST_CHROME (u1_request_chrome_get_type ())
764+#define U1_REQUEST_CHROME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), U1_TYPE_REQUEST_CHROME, U1RequestChrome))
765+#define U1_IS_REQUEST_CHROME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), U1_TYPE_REQUEST_CHROME))
766+#define U1_REQUEST_CHROME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), U1_TYPE_REQUEST_CHROME, U1RequestChrome))
767+#define U1_IS_REQUEST_CHROME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), U1_TYPE_REQUEST_CHROME))
768+#define U1_REQUEST_CHROME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), U1_TYPE_REQUEST_CHROME, U1RequestChrome))
769+
770+typedef struct _U1RequestChrome U1RequestChrome;
771+typedef struct _U1RequestChromeClass U1RequestChromeClass;
772+typedef struct _U1RequestChromePrivate U1RequestChromePrivate;
773+
774+struct _U1RequestChrome {
775+ SoupRequest parent;
776+
777+ U1RequestChromePrivate *priv;
778+};
779+
780+struct _U1RequestChromeClass {
781+ SoupRequestClass parent_class;
782+};
783+
784+GType u1_request_chrome_get_type (void);
785+
786+#endif

Subscribers

People subscribed via source and target branches

to all changes: