Merge lp:~dobey/ubuntu/natty/libubuntuone/release-0-9-1 into lp:ubuntu/natty/libubuntuone
- Natty (11.04)
- release-0-9-1
- Merge into natty
Proposed by
dobey
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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu branches | Pending | ||
Review via email: mp+54070@code.launchpad.net |
Commit message
Description of the change
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 | 1 | #! /bin/sh | 1 | #! /bin/sh |
6 | 2 | # Guess values for system-dependent variables and create Makefiles. | 2 | # Guess values for system-dependent variables and create Makefiles. |
8 | 3 | # Generated by GNU Autoconf 2.67 for libubuntuone 0.9.0. | 3 | # Generated by GNU Autoconf 2.67 for libubuntuone 0.9.1. |
9 | 4 | # | 4 | # |
10 | 5 | # | 5 | # |
11 | 6 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, | 6 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, |
12 | @@ -698,8 +698,8 @@ | |||
13 | 698 | # Identity of this package. | 698 | # Identity of this package. |
14 | 699 | PACKAGE_NAME='libubuntuone' | 699 | PACKAGE_NAME='libubuntuone' |
15 | 700 | PACKAGE_TARNAME='libubuntuone' | 700 | PACKAGE_TARNAME='libubuntuone' |
18 | 701 | PACKAGE_VERSION='0.9.0' | 701 | PACKAGE_VERSION='0.9.1' |
19 | 702 | PACKAGE_STRING='libubuntuone 0.9.0' | 702 | PACKAGE_STRING='libubuntuone 0.9.1' |
20 | 703 | PACKAGE_BUGREPORT='' | 703 | PACKAGE_BUGREPORT='' |
21 | 704 | PACKAGE_URL='' | 704 | PACKAGE_URL='' |
22 | 705 | 705 | ||
23 | @@ -1535,7 +1535,7 @@ | |||
24 | 1535 | # Omit some internal or obsolete options to make the list less imposing. | 1535 | # Omit some internal or obsolete options to make the list less imposing. |
25 | 1536 | # This message is too long to be a string in the A/UX 3.1 sh. | 1536 | # This message is too long to be a string in the A/UX 3.1 sh. |
26 | 1537 | cat <<_ACEOF | 1537 | cat <<_ACEOF |
28 | 1538 | \`configure' configures libubuntuone 0.9.0 to adapt to many kinds of systems. | 1538 | \`configure' configures libubuntuone 0.9.1 to adapt to many kinds of systems. |
29 | 1539 | 1539 | ||
30 | 1540 | Usage: $0 [OPTION]... [VAR=VALUE]... | 1540 | Usage: $0 [OPTION]... [VAR=VALUE]... |
31 | 1541 | 1541 | ||
32 | @@ -1605,7 +1605,7 @@ | |||
33 | 1605 | 1605 | ||
34 | 1606 | if test -n "$ac_init_help"; then | 1606 | if test -n "$ac_init_help"; then |
35 | 1607 | case $ac_init_help in | 1607 | case $ac_init_help in |
37 | 1608 | short | recursive ) echo "Configuration of libubuntuone 0.9.0:";; | 1608 | short | recursive ) echo "Configuration of libubuntuone 0.9.1:";; |
38 | 1609 | esac | 1609 | esac |
39 | 1610 | cat <<\_ACEOF | 1610 | cat <<\_ACEOF |
40 | 1611 | 1611 | ||
41 | @@ -1730,7 +1730,7 @@ | |||
42 | 1730 | test -n "$ac_init_help" && exit $ac_status | 1730 | test -n "$ac_init_help" && exit $ac_status |
43 | 1731 | if $ac_init_version; then | 1731 | if $ac_init_version; then |
44 | 1732 | cat <<\_ACEOF | 1732 | cat <<\_ACEOF |
46 | 1733 | libubuntuone configure 0.9.0 | 1733 | libubuntuone configure 0.9.1 |
47 | 1734 | generated by GNU Autoconf 2.67 | 1734 | generated by GNU Autoconf 2.67 |
48 | 1735 | 1735 | ||
49 | 1736 | Copyright (C) 2010 Free Software Foundation, Inc. | 1736 | Copyright (C) 2010 Free Software Foundation, Inc. |
50 | @@ -2095,7 +2095,7 @@ | |||
51 | 2095 | This file contains any messages produced by compilers while | 2095 | This file contains any messages produced by compilers while |
52 | 2096 | running configure, to aid debugging if configure makes a mistake. | 2096 | running configure, to aid debugging if configure makes a mistake. |
53 | 2097 | 2097 | ||
55 | 2098 | It was created by libubuntuone $as_me 0.9.0, which was | 2098 | It was created by libubuntuone $as_me 0.9.1, which was |
56 | 2099 | generated by GNU Autoconf 2.67. Invocation command line was | 2099 | generated by GNU Autoconf 2.67. Invocation command line was |
57 | 2100 | 2100 | ||
58 | 2101 | $ $0 $@ | 2101 | $ $0 $@ |
59 | @@ -2918,7 +2918,7 @@ | |||
60 | 2918 | 2918 | ||
61 | 2919 | # Define the identity of the package. | 2919 | # Define the identity of the package. |
62 | 2920 | PACKAGE='libubuntuone' | 2920 | PACKAGE='libubuntuone' |
64 | 2921 | VERSION='0.9.0' | 2921 | VERSION='0.9.1' |
65 | 2922 | 2922 | ||
66 | 2923 | 2923 | ||
67 | 2924 | cat >>confdefs.h <<_ACEOF | 2924 | cat >>confdefs.h <<_ACEOF |
68 | @@ -12750,12 +12750,12 @@ | |||
69 | 12750 | pkg_cv_LIBUBUNTUONE_CFLAGS="$LIBUBUNTUONE_CFLAGS" | 12750 | pkg_cv_LIBUBUNTUONE_CFLAGS="$LIBUBUNTUONE_CFLAGS" |
70 | 12751 | elif test -n "$PKG_CONFIG"; then | 12751 | elif test -n "$PKG_CONFIG"; then |
71 | 12752 | if test -n "$PKG_CONFIG" && \ | 12752 | if test -n "$PKG_CONFIG" && \ |
74 | 12753 | { { $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 | 12753 | { { $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 | 12754 | ($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 | 12754 | ($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 | 12755 | ac_status=$? | 12755 | ac_status=$? |
77 | 12756 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | 12756 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
78 | 12757 | test $ac_status = 0; }; then | 12757 | test $ac_status = 0; }; then |
80 | 12758 | 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` | 12758 | 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 | 12759 | else | 12759 | else |
82 | 12760 | pkg_failed=yes | 12760 | pkg_failed=yes |
83 | 12761 | fi | 12761 | fi |
84 | @@ -12766,12 +12766,12 @@ | |||
85 | 12766 | pkg_cv_LIBUBUNTUONE_LIBS="$LIBUBUNTUONE_LIBS" | 12766 | pkg_cv_LIBUBUNTUONE_LIBS="$LIBUBUNTUONE_LIBS" |
86 | 12767 | elif test -n "$PKG_CONFIG"; then | 12767 | elif test -n "$PKG_CONFIG"; then |
87 | 12768 | if test -n "$PKG_CONFIG" && \ | 12768 | if test -n "$PKG_CONFIG" && \ |
90 | 12769 | { { $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 | 12769 | { { $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 | 12770 | ($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 | 12770 | ($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 | 12771 | ac_status=$? | 12771 | ac_status=$? |
93 | 12772 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | 12772 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
94 | 12773 | test $ac_status = 0; }; then | 12773 | test $ac_status = 0; }; then |
96 | 12774 | 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` | 12774 | 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 | 12775 | else | 12775 | else |
98 | 12776 | pkg_failed=yes | 12776 | pkg_failed=yes |
99 | 12777 | fi | 12777 | fi |
100 | @@ -12791,14 +12791,14 @@ | |||
101 | 12791 | _pkg_short_errors_supported=no | 12791 | _pkg_short_errors_supported=no |
102 | 12792 | fi | 12792 | fi |
103 | 12793 | if test $_pkg_short_errors_supported = yes; then | 12793 | if test $_pkg_short_errors_supported = yes; then |
105 | 12794 | 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` | 12794 | 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 | 12795 | else | 12795 | else |
108 | 12796 | 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` | 12796 | 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 | 12797 | fi | 12797 | fi |
110 | 12798 | # Put the nasty error message in config.log where it belongs | 12798 | # Put the nasty error message in config.log where it belongs |
111 | 12799 | echo "$LIBUBUNTUONE_PKG_ERRORS" >&5 | 12799 | echo "$LIBUBUNTUONE_PKG_ERRORS" >&5 |
112 | 12800 | 12800 | ||
114 | 12801 | 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: | 12801 | 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 | 12802 | 12802 | ||
116 | 12803 | $LIBUBUNTUONE_PKG_ERRORS | 12803 | $LIBUBUNTUONE_PKG_ERRORS |
117 | 12804 | 12804 | ||
118 | @@ -14638,7 +14638,7 @@ | |||
119 | 14638 | # report actual input values of CONFIG_FILES etc. instead of their | 14638 | # report actual input values of CONFIG_FILES etc. instead of their |
120 | 14639 | # values after options handling. | 14639 | # values after options handling. |
121 | 14640 | ac_log=" | 14640 | ac_log=" |
123 | 14641 | This file was extended by libubuntuone $as_me 0.9.0, which was | 14641 | This file was extended by libubuntuone $as_me 0.9.1, which was |
124 | 14642 | generated by GNU Autoconf 2.67. Invocation command line was | 14642 | generated by GNU Autoconf 2.67. Invocation command line was |
125 | 14643 | 14643 | ||
126 | 14644 | CONFIG_FILES = $CONFIG_FILES | 14644 | CONFIG_FILES = $CONFIG_FILES |
127 | @@ -14704,7 +14704,7 @@ | |||
128 | 14704 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | 14704 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
129 | 14705 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" | 14705 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
130 | 14706 | ac_cs_version="\\ | 14706 | ac_cs_version="\\ |
132 | 14707 | libubuntuone config.status 0.9.0 | 14707 | libubuntuone config.status 0.9.1 |
133 | 14708 | configured by $0, generated by GNU Autoconf 2.67, | 14708 | configured by $0, generated by GNU Autoconf 2.67, |
134 | 14709 | with options \\"\$ac_cs_config\\" | 14709 | with options \\"\$ac_cs_config\\" |
135 | 14710 | 14710 | ||
136 | 14711 | 14711 | ||
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 @@ | |||
142 | 1 | AC_INIT([libubuntuone], [0.9.0], [], [libubuntuone]) | 1 | AC_INIT([libubuntuone], [0.9.1], [], [libubuntuone]) |
143 | 2 | 2 | ||
144 | 3 | AC_PREREQ([2.59]) | 3 | AC_PREREQ([2.59]) |
145 | 4 | 4 | ||
146 | @@ -32,7 +32,7 @@ | |||
147 | 32 | AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) | 32 | AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) |
148 | 33 | 33 | ||
149 | 34 | dnl Look for needed modules | 34 | dnl Look for needed modules |
151 | 35 | 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) | 35 | 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 | 36 | AC_SUBST(LIBUBUNTUONE_CFLAGS) | 36 | AC_SUBST(LIBUBUNTUONE_CFLAGS) |
153 | 37 | AC_SUBST(LIBUBUNTUONE_LIBS) | 37 | AC_SUBST(LIBUBUNTUONE_LIBS) |
154 | 38 | 38 | ||
155 | 39 | 39 | ||
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 | 53 | // add a padlock if this is a secure page | 53 | // add a padlock if this is a secure page |
161 | 54 | if (location.href.substr(0,6) == "https:") { | 54 | if (location.href.substr(0,6) == "https:") { |
162 | 55 | var padlock = document.createElement("img"); | 55 | var padlock = document.createElement("img"); |
164 | 56 | padlock.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAYAAACwXJejAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAINJREFUeNpiTEtLYwACfiCeBsQ2QCwHxK%2BBeB8QZwHxOyYGCOgFYl0gjgNiQyD2B2IJIJ4DkmSBKvIGYjcgvsyAAOlAfAzEgJkkCsQ3GVDBI6gzwIp4gJgZiH%2BhKfoOFQdb9xkq%2BJ8BO/jPxEAEGABFTwmoeQpSlALEL3AoAImnAAQYAHZ7FWCCovUtAAAAAElFTkSuQmCC"; | 56 | padlock.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAYAAACwXJejAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAINJREFUeNpiTEtLYwACfiCeBsQ2QCwHxK+BeB8QZwHxOyYGCOgFYl0gjgNiQyD2B2IJIJ4DkmSBKvIGYjcgvsyAAOlAfAzEgJkkCsQ3GVDBI6gzwIp4gJgZiH+hKfoOFQdb9xkq+J8BO/jPxEAEGABFTwmoeQpSlALEL3AoAImnAAQYAHZ7FWCCovUtAAAAAElFTkSuQmCC"; |
165 | 57 | padlock.style.position = "fixed"; | 57 | padlock.style.position = "fixed"; |
166 | 58 | padlock.style.bottom = "0"; | 58 | padlock.style.bottom = "0"; |
167 | 59 | padlock.style.right = "0"; | 59 | padlock.style.right = "0"; |
168 | 60 | 60 | ||
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 | 1 | libubuntuone (0.9.1-0ubuntu1) natty; urgency=low | ||
174 | 2 | |||
175 | 3 | * New upstream release. | ||
176 | 4 | - Remove unneeded dbus-glib usage (LP: #732761) | ||
177 | 5 | - Custom URI scheme handler for internal pages (LP: #733479) | ||
178 | 6 | - False connection error message (LP: #596394) | ||
179 | 7 | - Notify user when purchased folder is not subscribed to (LP: #727558) | ||
180 | 8 | - Memory leak in navigation_requested_cb (LP: #733283) | ||
181 | 9 | - Lock icon is broken in store pages (LP: #733308) | ||
182 | 10 | |||
183 | 11 | -- Rodney Dawes <rodney.dawes@ubuntu.com> Fri, 18 Mar 2011 16:30:19 -0400 | ||
184 | 12 | |||
185 | 1 | libubuntuone (0.9.0-0ubuntu1) natty; urgency=low | 13 | libubuntuone (0.9.0-0ubuntu1) natty; urgency=low |
186 | 2 | 14 | ||
187 | 3 | * New upstream release. | 15 | * New upstream release. |
188 | 4 | 16 | ||
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 | 18 | python-gtk2-dev, | 18 | python-gtk2-dev, |
194 | 19 | python-gobject-dev, | 19 | python-gobject-dev, |
195 | 20 | libssl-dev, | 20 | libssl-dev, |
196 | 21 | libgnome-keyring-dev, | ||
197 | 22 | libxml2-dev, | 21 | libxml2-dev, |
198 | 23 | libdbus-glib-1-dev, | ||
199 | 24 | mono-gmcs, | 22 | mono-gmcs, |
200 | 25 | gtk-sharp2-gapi, | 23 | gtk-sharp2-gapi, |
201 | 26 | cli-common-dev (>= 0.5.7), | 24 | cli-common-dev (>= 0.5.7), |
202 | 27 | 25 | ||
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 | 20 | oauth.c \ | 20 | oauth.c \ |
208 | 21 | oauth.h \ | 21 | oauth.h \ |
209 | 22 | u1-music-store.c \ | 22 | u1-music-store.c \ |
210 | 23 | u1-request-chrome.c \ | ||
211 | 24 | u1-request-chrome.h \ | ||
212 | 23 | xmalloc.c \ | 25 | xmalloc.c \ |
213 | 24 | xmalloc.h | 26 | xmalloc.h |
214 | 25 | libubuntuone_1_0_la_LDFLAGS = -version-info $(LIBUBUNTUONE_CURRENT):$(LIBUBUNTUONE_REVISION):$(LIBUBUNTUONE_AGE) | 27 | libubuntuone_1_0_la_LDFLAGS = -version-info $(LIBUBUNTUONE_CURRENT):$(LIBUBUNTUONE_REVISION):$(LIBUBUNTUONE_AGE) |
215 | 26 | 28 | ||
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 | 79 | $(am__DEPENDENCIES_1) | 79 | $(am__DEPENDENCIES_1) |
221 | 80 | am__objects_1 = u1-marshal.lo | 80 | am__objects_1 = u1-marshal.lo |
222 | 81 | am_libubuntuone_1_0_la_OBJECTS = $(am__objects_1) oauth.lo \ | 81 | am_libubuntuone_1_0_la_OBJECTS = $(am__objects_1) oauth.lo \ |
224 | 82 | u1-music-store.lo xmalloc.lo | 82 | u1-music-store.lo u1-request-chrome.lo xmalloc.lo |
225 | 83 | libubuntuone_1_0_la_OBJECTS = $(am_libubuntuone_1_0_la_OBJECTS) | 83 | libubuntuone_1_0_la_OBJECTS = $(am_libubuntuone_1_0_la_OBJECTS) |
226 | 84 | AM_V_lt = $(am__v_lt_$(V)) | 84 | AM_V_lt = $(am__v_lt_$(V)) |
227 | 85 | am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) | 85 | am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) |
228 | @@ -319,6 +319,8 @@ | |||
229 | 319 | oauth.c \ | 319 | oauth.c \ |
230 | 320 | oauth.h \ | 320 | oauth.h \ |
231 | 321 | u1-music-store.c \ | 321 | u1-music-store.c \ |
232 | 322 | u1-request-chrome.c \ | ||
233 | 323 | u1-request-chrome.h \ | ||
234 | 322 | xmalloc.c \ | 324 | xmalloc.c \ |
235 | 323 | xmalloc.h | 325 | xmalloc.h |
236 | 324 | 326 | ||
237 | @@ -426,6 +428,7 @@ | |||
238 | 426 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oauth.Plo@am__quote@ | 428 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oauth.Plo@am__quote@ |
239 | 427 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u1-marshal.Plo@am__quote@ | 429 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u1-marshal.Plo@am__quote@ |
240 | 428 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u1-music-store.Plo@am__quote@ | 430 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u1-music-store.Plo@am__quote@ |
241 | 431 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u1-request-chrome.Plo@am__quote@ | ||
242 | 429 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Plo@am__quote@ | 432 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Plo@am__quote@ |
243 | 430 | 433 | ||
244 | 431 | .c.o: | 434 | .c.o: |
245 | 432 | 435 | ||
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 | 49 | #endif /* !G_ENABLE_DEBUG */ | 49 | #endif /* !G_ENABLE_DEBUG */ |
251 | 50 | 50 | ||
252 | 51 | 51 | ||
291 | 52 | /* NONE:STRING,OBJECT (u1-marshal.list:1) */ | 52 | /* NONE:STRING,STRING (u1-marshal.list:1) */ |
254 | 53 | void | ||
255 | 54 | _u1_marshal_VOID__STRING_OBJECT (GClosure *closure, | ||
256 | 55 | GValue *return_value G_GNUC_UNUSED, | ||
257 | 56 | guint n_param_values, | ||
258 | 57 | const GValue *param_values, | ||
259 | 58 | gpointer invocation_hint G_GNUC_UNUSED, | ||
260 | 59 | gpointer marshal_data) | ||
261 | 60 | { | ||
262 | 61 | typedef void (*GMarshalFunc_VOID__STRING_OBJECT) (gpointer data1, | ||
263 | 62 | gpointer arg_1, | ||
264 | 63 | gpointer arg_2, | ||
265 | 64 | gpointer data2); | ||
266 | 65 | register GMarshalFunc_VOID__STRING_OBJECT callback; | ||
267 | 66 | register GCClosure *cc = (GCClosure*) closure; | ||
268 | 67 | register gpointer data1, data2; | ||
269 | 68 | |||
270 | 69 | g_return_if_fail (n_param_values == 3); | ||
271 | 70 | |||
272 | 71 | if (G_CCLOSURE_SWAP_DATA (closure)) | ||
273 | 72 | { | ||
274 | 73 | data1 = closure->data; | ||
275 | 74 | data2 = g_value_peek_pointer (param_values + 0); | ||
276 | 75 | } | ||
277 | 76 | else | ||
278 | 77 | { | ||
279 | 78 | data1 = g_value_peek_pointer (param_values + 0); | ||
280 | 79 | data2 = closure->data; | ||
281 | 80 | } | ||
282 | 81 | callback = (GMarshalFunc_VOID__STRING_OBJECT) (marshal_data ? marshal_data : cc->callback); | ||
283 | 82 | |||
284 | 83 | callback (data1, | ||
285 | 84 | g_marshal_value_peek_string (param_values + 1), | ||
286 | 85 | g_marshal_value_peek_object (param_values + 2), | ||
287 | 86 | data2); | ||
288 | 87 | } | ||
289 | 88 | |||
290 | 89 | /* NONE:STRING,STRING (u1-marshal.list:2) */ | ||
292 | 90 | void | 53 | void |
293 | 91 | _u1_marshal_VOID__STRING_STRING (GClosure *closure, | 54 | _u1_marshal_VOID__STRING_STRING (GClosure *closure, |
294 | 92 | GValue *return_value G_GNUC_UNUSED, | 55 | GValue *return_value G_GNUC_UNUSED, |
295 | 93 | 56 | ||
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 | 6 | 6 | ||
301 | 7 | G_BEGIN_DECLS | 7 | G_BEGIN_DECLS |
302 | 8 | 8 | ||
313 | 9 | /* NONE:STRING,OBJECT (u1-marshal.list:1) */ | 9 | /* NONE:STRING,STRING (u1-marshal.list:1) */ |
304 | 10 | extern void _u1_marshal_VOID__STRING_OBJECT (GClosure *closure, | ||
305 | 11 | GValue *return_value, | ||
306 | 12 | guint n_param_values, | ||
307 | 13 | const GValue *param_values, | ||
308 | 14 | gpointer invocation_hint, | ||
309 | 15 | gpointer marshal_data); | ||
310 | 16 | #define _u1_marshal_NONE__STRING_OBJECT _u1_marshal_VOID__STRING_OBJECT | ||
311 | 17 | |||
312 | 18 | /* NONE:STRING,STRING (u1-marshal.list:2) */ | ||
314 | 19 | extern void _u1_marshal_VOID__STRING_STRING (GClosure *closure, | 10 | extern void _u1_marshal_VOID__STRING_STRING (GClosure *closure, |
315 | 20 | GValue *return_value, | 11 | GValue *return_value, |
316 | 21 | guint n_param_values, | 12 | guint n_param_values, |
317 | 22 | 13 | ||
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 | 1 | NONE:STRING,OBJECT | ||
323 | 2 | NONE:STRING,STRING | 1 | NONE:STRING,STRING |
324 | 3 | 2 | ||
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 | 24 | #include <libxml/HTMLparser.h> | 24 | #include <libxml/HTMLparser.h> |
330 | 25 | #include <glib/gi18n.h> | 25 | #include <glib/gi18n.h> |
331 | 26 | #include <webkit/webkit.h> | 26 | #include <webkit/webkit.h> |
332 | 27 | #include <dbus/dbus-glib.h> | ||
333 | 28 | #include <libsoup/soup-gnome-features.h> | 27 | #include <libsoup/soup-gnome-features.h> |
334 | 29 | #include <libsoup/soup-uri.h> | 28 | #include <libsoup/soup-uri.h> |
335 | 30 | #include <libsyncdaemon/libsyncdaemon.h> | 29 | #include <libsyncdaemon/libsyncdaemon.h> |
336 | 31 | #include "oauth.h" | 30 | #include "oauth.h" |
337 | 32 | #include "u1-music-store.h" | 31 | #include "u1-music-store.h" |
338 | 33 | #include "u1-marshal.h" | 32 | #include "u1-marshal.h" |
339 | 33 | #include "u1-request-chrome.h" | ||
340 | 34 | 34 | ||
341 | 35 | #define U1_MUSIC_LIBRARY_LOCATION ".ubuntuone/Purchased from Ubuntu One" | 35 | #define U1_MUSIC_LIBRARY_LOCATION ".ubuntuone/Purchased from Ubuntu One" |
342 | 36 | 36 | ||
343 | @@ -50,7 +50,6 @@ | |||
344 | 50 | #define MAXIMUM_AUTH_RETRIES 5 | 50 | #define MAXIMUM_AUTH_RETRIES 5 |
345 | 51 | 51 | ||
346 | 52 | struct _U1MusicStorePrivate { | 52 | struct _U1MusicStorePrivate { |
347 | 53 | DBusGConnection *bus; | ||
348 | 54 | SyncdaemonDaemon *syncdaemon; | 53 | SyncdaemonDaemon *syncdaemon; |
349 | 55 | gchar *base_url; | 54 | gchar *base_url; |
350 | 56 | 55 | ||
351 | @@ -60,6 +59,14 @@ | |||
352 | 60 | WebKitWebFrame *frame_to_use; | 59 | WebKitWebFrame *frame_to_use; |
353 | 61 | GtkWidget *progress; | 60 | GtkWidget *progress; |
354 | 62 | 61 | ||
355 | 62 | /* Alert bar widgets | ||
356 | 63 | * We use two button widgets here, to avoid overlapping conditions | ||
357 | 64 | */ | ||
358 | 65 | GtkWidget *alertbar; | ||
359 | 66 | GtkWidget *alert_label; | ||
360 | 67 | GtkWidget *subscribe_btn; | ||
361 | 68 | gboolean folder_subscribed; | ||
362 | 69 | |||
363 | 63 | guint watch_id; | 70 | guint watch_id; |
364 | 64 | guint idle_cb; | 71 | guint idle_cb; |
365 | 65 | GHashTable *watched_downloads; | 72 | GHashTable *watched_downloads; |
366 | @@ -97,9 +104,6 @@ | |||
367 | 97 | if (music_store->priv->base_url != NULL) | 104 | if (music_store->priv->base_url != NULL) |
368 | 98 | g_free (music_store->priv->base_url); | 105 | g_free (music_store->priv->base_url); |
369 | 99 | 106 | ||
370 | 100 | if (music_store->priv->bus != NULL) | ||
371 | 101 | dbus_g_connection_unref (music_store->priv->bus); | ||
372 | 102 | |||
373 | 103 | if (music_store->priv->syncdaemon != NULL) | 107 | if (music_store->priv->syncdaemon != NULL) |
374 | 104 | g_object_unref (G_OBJECT (music_store->priv->syncdaemon)); | 108 | g_object_unref (G_OBJECT (music_store->priv->syncdaemon)); |
375 | 105 | 109 | ||
376 | @@ -237,7 +241,7 @@ | |||
377 | 237 | 241 | ||
378 | 238 | *oauth_consumer_token = *oauth_consumer_secret = *oauth_token = *oauth_token_secret = NULL; | 242 | *oauth_consumer_token = *oauth_consumer_secret = *oauth_token = *oauth_token_secret = NULL; |
379 | 239 | 243 | ||
381 | 240 | /* Get the OAuth token from the keyring */ | 244 | /* Get the OAuth token from the SSO client */ |
382 | 241 | if ((credentials = syncdaemon_authentication_find_credentials ( | 245 | if ((credentials = syncdaemon_authentication_find_credentials ( |
383 | 242 | syncdaemon_daemon_get_authentication (music_store->priv->syncdaemon)))) { | 246 | syncdaemon_daemon_get_authentication (music_store->priv->syncdaemon)))) { |
384 | 243 | *oauth_consumer_token = g_strdup (syncdaemon_credentials_get_consumer_key (credentials)); | 247 | *oauth_consumer_token = g_strdup (syncdaemon_credentials_get_consumer_key (credentials)); |
385 | @@ -508,6 +512,7 @@ | |||
386 | 508 | U1MusicStore *music_store = U1_MUSIC_STORE (user_data); | 512 | U1MusicStore *music_store = U1_MUSIC_STORE (user_data); |
387 | 509 | SoupURI *parsed_uri; | 513 | SoupURI *parsed_uri; |
388 | 510 | gchar *internal_uri; | 514 | gchar *internal_uri; |
389 | 515 | gboolean return_val = FALSE; | ||
390 | 511 | 516 | ||
391 | 512 | /* Remove watching callback for the page */ | 517 | /* Remove watching callback for the page */ |
392 | 513 | if (music_store->priv->watch_id != 0) { | 518 | if (music_store->priv->watch_id != 0) { |
393 | @@ -547,7 +552,7 @@ | |||
394 | 547 | g_debug ("overriding the library page to ours"); | 552 | g_debug ("overriding the library page to ours"); |
395 | 548 | load_delayed_page (web_view, library_override, policy_decision); | 553 | load_delayed_page (web_view, library_override, policy_decision); |
396 | 549 | 554 | ||
398 | 550 | return TRUE; | 555 | return_val = TRUE; |
399 | 551 | } | 556 | } |
400 | 552 | } else if (!g_strcmp0 ((const gchar *) parsed_uri->host, "www.7digital.com")) { | 557 | } else if (!g_strcmp0 ((const gchar *) parsed_uri->host, "www.7digital.com")) { |
401 | 553 | /* host is 7digital.com. It must be in our store. */ | 558 | /* host is 7digital.com. It must be in our store. */ |
402 | @@ -566,7 +571,7 @@ | |||
403 | 566 | g_free (internal_uri); | 571 | g_free (internal_uri); |
404 | 567 | g_free (to_and_from_error_uris); | 572 | g_free (to_and_from_error_uris); |
405 | 568 | 573 | ||
407 | 569 | return TRUE; | 574 | return_val = TRUE; |
408 | 570 | } | 575 | } |
409 | 571 | } else if (!g_strcmp0 ((const gchar *) parsed_uri->host, "one.ubuntu.com")) { | 576 | } else if (!g_strcmp0 ((const gchar *) parsed_uri->host, "one.ubuntu.com")) { |
410 | 572 | /* host is one.ubuntu.com. It must not be the login page */ | 577 | /* host is one.ubuntu.com. It must not be the login page */ |
411 | @@ -593,7 +598,7 @@ | |||
412 | 593 | g_free (internal_uri); | 598 | g_free (internal_uri); |
413 | 594 | g_free (to_and_from_error_uris); | 599 | g_free (to_and_from_error_uris); |
414 | 595 | 600 | ||
416 | 596 | return TRUE; | 601 | return_val = TRUE; |
417 | 597 | } | 602 | } |
418 | 598 | } else if (!g_strcmp0 ((const gchar *) parsed_uri->host, "login.ubuntu.com")) { | 603 | } else if (!g_strcmp0 ((const gchar *) parsed_uri->host, "login.ubuntu.com")) { |
419 | 599 | gchar *real_url; | 604 | gchar *real_url; |
420 | @@ -618,13 +623,13 @@ | |||
421 | 618 | g_free (internal_uri); | 623 | g_free (internal_uri); |
422 | 619 | g_free (to_and_from_error_uris); | 624 | g_free (to_and_from_error_uris); |
423 | 620 | 625 | ||
425 | 621 | return TRUE; | 626 | return_val = TRUE; |
426 | 622 | } | 627 | } |
427 | 623 | 628 | ||
428 | 624 | /* Free memory */ | 629 | /* Free memory */ |
429 | 625 | soup_uri_free (parsed_uri); | 630 | soup_uri_free (parsed_uri); |
430 | 626 | 631 | ||
432 | 627 | return FALSE; | 632 | return return_val; |
433 | 628 | } | 633 | } |
434 | 629 | 634 | ||
435 | 630 | static void | 635 | static void |
436 | @@ -824,8 +829,10 @@ | |||
437 | 824 | load_finished_cb (WebKitWebView *web_view, WebKitWebFrame *frame, gpointer user_data) | 829 | load_finished_cb (WebKitWebView *web_view, WebKitWebFrame *frame, gpointer user_data) |
438 | 825 | { | 830 | { |
439 | 826 | const gchar *library_override; | 831 | const gchar *library_override; |
440 | 827 | gchar *tmp_url; | ||
441 | 828 | U1MusicStore *music_store = U1_MUSIC_STORE (user_data); | 832 | U1MusicStore *music_store = U1_MUSIC_STORE (user_data); |
442 | 833 | SoupURI * uri; | ||
443 | 834 | |||
444 | 835 | uri = soup_uri_new (webkit_web_view_get_uri (web_view)); | ||
445 | 829 | 836 | ||
446 | 830 | /* Remove the initial view if still around */ | 837 | /* Remove the initial view if still around */ |
447 | 831 | if (music_store->priv->initial_web_viewer != NULL) { | 838 | if (music_store->priv->initial_web_viewer != NULL) { |
448 | @@ -846,8 +853,15 @@ | |||
449 | 846 | execute_script (web_view, "u1-library-override.js", library_override); | 853 | execute_script (web_view, "u1-library-override.js", library_override); |
450 | 847 | 854 | ||
451 | 848 | /* If the URL just loaded is the library page, update download status */ | 855 | /* If the URL just loaded is the library page, update download status */ |
454 | 849 | tmp_url = g_strdup_printf ("%s%s", music_store->priv->base_url, U1_LIBRARY_URL); | 856 | if (g_str_has_prefix (uri->path, U1_LIBRARY_URL)) { |
455 | 850 | if (g_str_has_prefix (webkit_web_view_get_uri (web_view), tmp_url)) { | 857 | /* Show the alert bar if folder is unsubscribed */ |
456 | 858 | if (!music_store->priv->folder_subscribed) { | ||
457 | 859 | gtk_label_set_text (GTK_LABEL (music_store->priv->alert_label), | ||
458 | 860 | _("Your 'Purchased Music' folder is not subscribed. New purchases will not download to this computer.")); | ||
459 | 861 | gtk_widget_show (music_store->priv->subscribe_btn); | ||
460 | 862 | gtk_widget_show (music_store->priv->alertbar); | ||
461 | 863 | } | ||
462 | 864 | |||
463 | 851 | /* Inject JavaScript to make songs clickable | 865 | /* Inject JavaScript to make songs clickable |
464 | 852 | Needs to be done before update-status-in-library-page */ | 866 | Needs to be done before update-status-in-library-page */ |
465 | 853 | execute_script (web_view, "u1-songs-clickable.js", NULL); | 867 | execute_script (web_view, "u1-songs-clickable.js", NULL); |
466 | @@ -859,13 +873,13 @@ | |||
467 | 859 | music_store->priv->watch_id = g_timeout_add (1000, (GSourceFunc) poll_downloads_cb, music_store); | 873 | music_store->priv->watch_id = g_timeout_add (1000, (GSourceFunc) poll_downloads_cb, music_store); |
468 | 860 | } | 874 | } |
469 | 861 | 875 | ||
470 | 862 | g_free (tmp_url); | ||
471 | 863 | |||
472 | 864 | /* Signal users the URL finished loading */ | 876 | /* Signal users the URL finished loading */ |
473 | 865 | gtk_widget_hide (music_store->priv->progress); | 877 | gtk_widget_hide (music_store->priv->progress); |
474 | 866 | 878 | ||
475 | 867 | g_signal_emit (music_store, u1_music_store_signals[URL_LOADED_SIGNAL], 0, | 879 | g_signal_emit (music_store, u1_music_store_signals[URL_LOADED_SIGNAL], 0, |
476 | 868 | (const gchar *) webkit_web_view_get_uri (WEBKIT_WEB_VIEW (music_store->priv->web_viewer))); | 880 | (const gchar *) webkit_web_view_get_uri (WEBKIT_WEB_VIEW (music_store->priv->web_viewer))); |
477 | 881 | |||
478 | 882 | soup_uri_free (uri); | ||
479 | 869 | } | 883 | } |
480 | 870 | 884 | ||
481 | 871 | static void | 885 | static void |
482 | @@ -902,9 +916,12 @@ | |||
483 | 902 | static gboolean | 916 | static gboolean |
484 | 903 | load_error_cb (WebKitWebView *web_view, WebKitWebFrame *frame, const gchar *uri, GError *error, gpointer user_data) | 917 | load_error_cb (WebKitWebView *web_view, WebKitWebFrame *frame, const gchar *uri, GError *error, gpointer user_data) |
485 | 904 | { | 918 | { |
487 | 905 | load_internal_html_page (web_view, U1_DEFAULT_ERROR_PAGE, uri); | 919 | if (error->domain == WEBKIT_NETWORK_ERROR) { |
488 | 920 | load_internal_html_page (web_view, U1_DEFAULT_ERROR_PAGE, uri); | ||
489 | 921 | return TRUE; | ||
490 | 922 | } | ||
491 | 906 | 923 | ||
493 | 907 | return TRUE; | 924 | return FALSE; |
494 | 908 | } | 925 | } |
495 | 909 | 926 | ||
496 | 910 | static gboolean | 927 | static gboolean |
497 | @@ -944,11 +961,40 @@ | |||
498 | 944 | } | 961 | } |
499 | 945 | 962 | ||
500 | 946 | static void | 963 | static void |
501 | 964 | sd_folder_subscribed_cb (SyncdaemonDaemon *daemon, gboolean success, | ||
502 | 965 | SyncdaemonFolderInfo *folder_info, gpointer user_data) | ||
503 | 966 | { | ||
504 | 967 | U1MusicStore *music_store = U1_MUSIC_STORE (user_data); | ||
505 | 968 | const gchar *new_path = syncdaemon_folder_info_get_path (folder_info); | ||
506 | 969 | const gchar *lib_path = u1_music_store_get_library_location (music_store); | ||
507 | 970 | |||
508 | 971 | if (success && g_strcmp0 (new_path, lib_path) == 0) { | ||
509 | 972 | music_store->priv->folder_subscribed = TRUE; | ||
510 | 973 | gtk_widget_hide (music_store->priv->subscribe_btn); | ||
511 | 974 | gtk_widget_hide (music_store->priv->alertbar); | ||
512 | 975 | } | ||
513 | 976 | } | ||
514 | 977 | |||
515 | 978 | static void | ||
516 | 979 | subscribe_purchased_folder (GtkButton *button, gpointer user_data) | ||
517 | 980 | { | ||
518 | 981 | U1MusicStore *music_store = U1_MUSIC_STORE (user_data); | ||
519 | 982 | SyncdaemonFolderInfo *folder_info; | ||
520 | 983 | |||
521 | 984 | folder_info = syncdaemon_daemon_get_folder_info (music_store->priv->syncdaemon, | ||
522 | 985 | u1_music_store_get_library_location (music_store)); | ||
523 | 986 | syncdaemon_daemon_subscribe_folder (music_store->priv->syncdaemon, | ||
524 | 987 | syncdaemon_folder_info_get_volume_id (folder_info)); | ||
525 | 988 | } | ||
526 | 989 | |||
527 | 990 | static void | ||
528 | 947 | u1_music_store_init (U1MusicStore *music_store) | 991 | u1_music_store_init (U1MusicStore *music_store) |
529 | 948 | { | 992 | { |
530 | 949 | gchar *new_user_agent; | 993 | gchar *new_user_agent; |
531 | 950 | const gchar *url_to_use; | 994 | const gchar *url_to_use; |
533 | 951 | GError *error = NULL; | 995 | SoupSession *session; |
534 | 996 | GtkWidget *alert_icon; | ||
535 | 997 | SyncdaemonFolderInfo *folder_info; | ||
536 | 952 | 998 | ||
537 | 953 | if (!g_thread_get_initialized ()) | 999 | if (!g_thread_get_initialized ()) |
538 | 954 | g_thread_init (NULL); | 1000 | g_thread_init (NULL); |
539 | @@ -957,32 +1003,16 @@ | |||
540 | 957 | music_store->priv->watched_downloads = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); | 1003 | music_store->priv->watched_downloads = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); |
541 | 958 | music_store->priv->syncdaemon = syncdaemon_daemon_new (); | 1004 | music_store->priv->syncdaemon = syncdaemon_daemon_new (); |
542 | 959 | 1005 | ||
543 | 1006 | g_signal_connect (G_OBJECT (music_store->priv->syncdaemon), | ||
544 | 1007 | "folder_subscribed", | ||
545 | 1008 | G_CALLBACK (sd_folder_subscribed_cb), music_store); | ||
546 | 1009 | |||
547 | 960 | /* If U1MUSICSTOREURL is defined, use that instead of the real URL */ | 1010 | /* If U1MUSICSTOREURL is defined, use that instead of the real URL */ |
548 | 961 | if (! (url_to_use = g_getenv ("U1MUSICSTOREURL"))) | 1011 | if (! (url_to_use = g_getenv ("U1MUSICSTOREURL"))) |
549 | 962 | url_to_use = "https://one.ubuntu.com"; | 1012 | url_to_use = "https://one.ubuntu.com"; |
550 | 963 | 1013 | ||
551 | 964 | music_store->priv->base_url = g_strdup (url_to_use); | 1014 | music_store->priv->base_url = g_strdup (url_to_use); |
552 | 965 | 1015 | ||
553 | 966 | /* Initialize DBus */ | ||
554 | 967 | music_store->priv->bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error); | ||
555 | 968 | if (error) { | ||
556 | 969 | g_warning ("Couldn't get session bus: %s", error->message); | ||
557 | 970 | g_error_free (error); | ||
558 | 971 | |||
559 | 972 | } | ||
560 | 973 | |||
561 | 974 | dbus_g_object_register_marshaller (_u1_marshal_VOID__STRING_STRING, | ||
562 | 975 | G_TYPE_NONE, | ||
563 | 976 | G_TYPE_STRING, G_TYPE_STRING, | ||
564 | 977 | G_TYPE_INVALID); | ||
565 | 978 | dbus_g_object_register_marshaller (g_cclosure_marshal_VOID__VOID, | ||
566 | 979 | G_TYPE_NONE, | ||
567 | 980 | G_TYPE_INVALID); | ||
568 | 981 | dbus_g_object_register_marshaller (g_cclosure_marshal_VOID__STRING, | ||
569 | 982 | G_TYPE_NONE, | ||
570 | 983 | G_TYPE_STRING, | ||
571 | 984 | G_TYPE_INVALID); | ||
572 | 985 | |||
573 | 986 | /* Create web viewer object */ | 1016 | /* Create web viewer object */ |
574 | 987 | music_store->priv->scroll = gtk_scrolled_window_new (NULL, NULL); | 1017 | music_store->priv->scroll = gtk_scrolled_window_new (NULL, NULL); |
575 | 988 | gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (music_store->priv->scroll), | 1018 | gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (music_store->priv->scroll), |
576 | @@ -1002,8 +1032,13 @@ | |||
577 | 1002 | NULL); | 1032 | NULL); |
578 | 1003 | g_free(new_user_agent); | 1033 | g_free(new_user_agent); |
579 | 1004 | 1034 | ||
580 | 1035 | session = webkit_get_default_session (); | ||
581 | 1036 | |||
582 | 1005 | /* Use GNOME proxy settings */ | 1037 | /* Use GNOME proxy settings */ |
584 | 1006 | soup_session_add_feature_by_type (webkit_get_default_session (), SOUP_TYPE_PROXY_RESOLVER_GNOME); | 1038 | soup_session_add_feature_by_type (session, SOUP_TYPE_PROXY_RESOLVER_GNOME); |
585 | 1039 | |||
586 | 1040 | /* Add our handler for u1chrome: URIs */ | ||
587 | 1041 | soup_session_add_feature_by_type (session, U1_TYPE_REQUEST_CHROME); | ||
588 | 1007 | 1042 | ||
589 | 1008 | g_signal_connect (G_OBJECT (music_store->priv->web_viewer), "navigation-policy-decision-requested", | 1043 | g_signal_connect (G_OBJECT (music_store->priv->web_viewer), "navigation-policy-decision-requested", |
590 | 1009 | G_CALLBACK (navigation_requested_cb), music_store); | 1044 | G_CALLBACK (navigation_requested_cb), music_store); |
591 | @@ -1024,6 +1059,34 @@ | |||
592 | 1024 | gtk_widget_show (music_store->priv->initial_web_viewer); | 1059 | gtk_widget_show (music_store->priv->initial_web_viewer); |
593 | 1025 | gtk_container_add (GTK_CONTAINER (music_store->priv->scroll), music_store->priv->initial_web_viewer); | 1060 | gtk_container_add (GTK_CONTAINER (music_store->priv->scroll), music_store->priv->initial_web_viewer); |
594 | 1026 | 1061 | ||
595 | 1062 | /* Create the alert bar */ | ||
596 | 1063 | music_store->priv->alertbar = gtk_hbox_new (FALSE, 12); | ||
597 | 1064 | alert_icon = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING, | ||
598 | 1065 | GTK_ICON_SIZE_MENU); | ||
599 | 1066 | gtk_box_pack_start (GTK_BOX (music_store->priv->alertbar), alert_icon, | ||
600 | 1067 | FALSE, FALSE, 0); | ||
601 | 1068 | gtk_widget_show (alert_icon); | ||
602 | 1069 | |||
603 | 1070 | music_store->priv->alert_label = gtk_label_new (""); | ||
604 | 1071 | gtk_misc_set_alignment (GTK_MISC (music_store->priv->alert_label), | ||
605 | 1072 | 0.0, 0.5); | ||
606 | 1073 | gtk_box_pack_start (GTK_BOX (music_store->priv->alertbar), | ||
607 | 1074 | music_store->priv->alert_label, | ||
608 | 1075 | TRUE, TRUE, 0); | ||
609 | 1076 | gtk_widget_show (music_store->priv->alert_label); | ||
610 | 1077 | |||
611 | 1078 | /* Button to subscribe the Purchased Music folder */ | ||
612 | 1079 | music_store->priv->subscribe_btn = gtk_button_new_with_label (_("Subscribe")); | ||
613 | 1080 | gtk_box_pack_end (GTK_BOX (music_store->priv->alertbar), | ||
614 | 1081 | music_store->priv->subscribe_btn, | ||
615 | 1082 | FALSE, FALSE, 6); | ||
616 | 1083 | g_signal_connect (G_OBJECT (music_store->priv->subscribe_btn), "clicked", | ||
617 | 1084 | G_CALLBACK (subscribe_purchased_folder), music_store); | ||
618 | 1085 | |||
619 | 1086 | /* Figure out if the Purchased Music folder is subscribed */ | ||
620 | 1087 | folder_info = syncdaemon_daemon_get_folder_info (music_store->priv->syncdaemon, u1_music_store_get_library_location (music_store)); | ||
621 | 1088 | music_store->priv->folder_subscribed = syncdaemon_folder_info_get_subscribed (folder_info); | ||
622 | 1089 | |||
623 | 1027 | /* Create a hidden progress bar */ | 1090 | /* Create a hidden progress bar */ |
624 | 1028 | music_store->priv->progress = gtk_progress_bar_new (); | 1091 | music_store->priv->progress = gtk_progress_bar_new (); |
625 | 1029 | 1092 | ||
626 | @@ -1033,8 +1096,9 @@ | |||
627 | 1033 | /* And load the real store in the background */ | 1096 | /* And load the real store in the background */ |
628 | 1034 | music_store->priv->idle_cb = g_idle_add ((GSourceFunc) load_real_store_cb, music_store); | 1097 | music_store->priv->idle_cb = g_idle_add ((GSourceFunc) load_real_store_cb, music_store); |
629 | 1035 | 1098 | ||
632 | 1036 | gtk_box_pack_start (GTK_BOX (music_store), music_store->priv->scroll, TRUE, TRUE, 3); | 1099 | gtk_box_pack_start (GTK_BOX (music_store), music_store->priv->alertbar, FALSE, FALSE, 6); |
633 | 1037 | gtk_box_pack_start (GTK_BOX (music_store), music_store->priv->progress, FALSE, FALSE, 3); | 1100 | gtk_box_pack_start (GTK_BOX (music_store), music_store->priv->scroll, TRUE, TRUE, 0); |
634 | 1101 | gtk_box_pack_end (GTK_BOX (music_store), music_store->priv->progress, FALSE, FALSE, 0); | ||
635 | 1038 | } | 1102 | } |
636 | 1039 | 1103 | ||
637 | 1040 | /** | 1104 | /** |
638 | 1041 | 1105 | ||
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 | 1 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ | ||
644 | 2 | /* | ||
645 | 3 | * Copyright (C) 2011 Canonical, Ltd. | ||
646 | 4 | * | ||
647 | 5 | * This library is free software; you can redistribute it and/or | ||
648 | 6 | * modify it under the terms of version 2 of the GNU Lesser General Public | ||
649 | 7 | * License as published by the Free Software Foundation. | ||
650 | 8 | * | ||
651 | 9 | * This program is distributed in the hope that it will be useful, | ||
652 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
653 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
654 | 12 | * General Public License for more details. | ||
655 | 13 | * | ||
656 | 14 | * You should have received a copy of the GNU Lesser General Public | ||
657 | 15 | * License along with this library; if not, write to the | ||
658 | 16 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
659 | 17 | * Boston, MA 02110-1301, USA. | ||
660 | 18 | */ | ||
661 | 19 | |||
662 | 20 | #ifdef HAVE_CONFIG_H | ||
663 | 21 | #include <config.h> | ||
664 | 22 | #endif | ||
665 | 23 | |||
666 | 24 | #include <gio/gio.h> | ||
667 | 25 | #include <glib/gi18n-lib.h> | ||
668 | 26 | #include <libsoup/soup-uri.h> | ||
669 | 27 | |||
670 | 28 | #include "u1-request-chrome.h" | ||
671 | 29 | |||
672 | 30 | static GInputStream *u1_request_chrome_send (SoupRequest *request, | ||
673 | 31 | GCancellable *cancellable, | ||
674 | 32 | GError **error); | ||
675 | 33 | static goffset u1_request_chrome_get_content_length (SoupRequest *request); | ||
676 | 34 | static const gchar *u1_request_chrome_get_content_type (SoupRequest *request); | ||
677 | 35 | |||
678 | 36 | G_DEFINE_TYPE (U1RequestChrome, u1_request_chrome, SOUP_TYPE_REQUEST) | ||
679 | 37 | |||
680 | 38 | /* The URI schemes we handle */ | ||
681 | 39 | static const gchar *chrome_schemes[] = { "u1chrome", NULL }; | ||
682 | 40 | |||
683 | 41 | struct _U1RequestChromePrivate { | ||
684 | 42 | }; | ||
685 | 43 | |||
686 | 44 | static void | ||
687 | 45 | u1_request_chrome_init (U1RequestChrome *chrome) | ||
688 | 46 | { | ||
689 | 47 | chrome->priv = G_TYPE_INSTANCE_GET_PRIVATE (chrome, U1_TYPE_REQUEST_CHROME, U1RequestChromePrivate); | ||
690 | 48 | } | ||
691 | 49 | |||
692 | 50 | static void | ||
693 | 51 | u1_request_chrome_class_init (U1RequestChromeClass *klass) | ||
694 | 52 | { | ||
695 | 53 | SoupRequestClass *request_class = SOUP_REQUEST_CLASS (klass); | ||
696 | 54 | |||
697 | 55 | request_class->schemes = chrome_schemes; | ||
698 | 56 | |||
699 | 57 | g_type_class_add_private (klass, sizeof (U1RequestChromeClass)); | ||
700 | 58 | |||
701 | 59 | request_class->send = u1_request_chrome_send; | ||
702 | 60 | request_class->get_content_length = u1_request_chrome_get_content_length; | ||
703 | 61 | request_class->get_content_type = u1_request_chrome_get_content_type; | ||
704 | 62 | } | ||
705 | 63 | |||
706 | 64 | static GInputStream * | ||
707 | 65 | u1_request_chrome_send (SoupRequest *request, | ||
708 | 66 | GCancellable *cancellable, | ||
709 | 67 | GError **error) | ||
710 | 68 | { | ||
711 | 69 | SoupURI *uri = soup_request_get_uri (request); | ||
712 | 70 | gchar *data; | ||
713 | 71 | |||
714 | 72 | if (uri->path && !g_ascii_strcasecmp (uri->path, "empty")) | ||
715 | 73 | data = g_strdup (""); | ||
716 | 74 | else | ||
717 | 75 | data = g_strdup (""); | ||
718 | 76 | |||
719 | 77 | return g_memory_input_stream_new_from_data (data, strlen (data), g_free); | ||
720 | 78 | } | ||
721 | 79 | |||
722 | 80 | static goffset | ||
723 | 81 | u1_request_chrome_get_content_length (SoupRequest *request) | ||
724 | 82 | { | ||
725 | 83 | return -1; | ||
726 | 84 | } | ||
727 | 85 | |||
728 | 86 | static const gchar * | ||
729 | 87 | u1_request_chrome_get_content_type (SoupRequest *request) | ||
730 | 88 | { | ||
731 | 89 | return "text/plain"; | ||
732 | 90 | } | ||
733 | 0 | 91 | ||
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 | 1 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ | ||
739 | 2 | /* | ||
740 | 3 | * Copyright (C) 2011 Canonical, Ltd. | ||
741 | 4 | * | ||
742 | 5 | * This library is free software; you can redistribute it and/or | ||
743 | 6 | * modify it under the terms of version 2 of the GNU Lesser General Public | ||
744 | 7 | * License as published by the Free Software Foundation. | ||
745 | 8 | * | ||
746 | 9 | * This program is distributed in the hope that it will be useful, | ||
747 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
748 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
749 | 12 | * General Public License for more details. | ||
750 | 13 | * | ||
751 | 14 | * You should have received a copy of the GNU Lesser General Public | ||
752 | 15 | * License along with this library; if not, write to the | ||
753 | 16 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
754 | 17 | * Boston, MA 02110-1301, USA. | ||
755 | 18 | */ | ||
756 | 19 | |||
757 | 20 | #ifndef __U1_REQUEST_CHROME_H__ | ||
758 | 21 | #define __U1_REQUEST_CHROME_H__ | ||
759 | 22 | |||
760 | 23 | #define LIBSOUP_USE_UNSTABLE_REQUEST_API | ||
761 | 24 | #include <libsoup/soup-request.h> | ||
762 | 25 | |||
763 | 26 | #define U1_TYPE_REQUEST_CHROME (u1_request_chrome_get_type ()) | ||
764 | 27 | #define U1_REQUEST_CHROME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), U1_TYPE_REQUEST_CHROME, U1RequestChrome)) | ||
765 | 28 | #define U1_IS_REQUEST_CHROME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), U1_TYPE_REQUEST_CHROME)) | ||
766 | 29 | #define U1_REQUEST_CHROME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), U1_TYPE_REQUEST_CHROME, U1RequestChrome)) | ||
767 | 30 | #define U1_IS_REQUEST_CHROME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), U1_TYPE_REQUEST_CHROME)) | ||
768 | 31 | #define U1_REQUEST_CHROME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), U1_TYPE_REQUEST_CHROME, U1RequestChrome)) | ||
769 | 32 | |||
770 | 33 | typedef struct _U1RequestChrome U1RequestChrome; | ||
771 | 34 | typedef struct _U1RequestChromeClass U1RequestChromeClass; | ||
772 | 35 | typedef struct _U1RequestChromePrivate U1RequestChromePrivate; | ||
773 | 36 | |||
774 | 37 | struct _U1RequestChrome { | ||
775 | 38 | SoupRequest parent; | ||
776 | 39 | |||
777 | 40 | U1RequestChromePrivate *priv; | ||
778 | 41 | }; | ||
779 | 42 | |||
780 | 43 | struct _U1RequestChromeClass { | ||
781 | 44 | SoupRequestClass parent_class; | ||
782 | 45 | }; | ||
783 | 46 | |||
784 | 47 | GType u1_request_chrome_get_type (void); | ||
785 | 48 | |||
786 | 49 | #endif |