~ubuntu-branches/ubuntu/utopic/gnome-online-accounts/utopic

« back to all changes in this revision

Viewing changes to src/goabackend/goaflickrprovider.c

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson, Laurent Bigonville, Andreas Henriksson
  • Date: 2014-05-16 11:42:52 UTC
  • mfrom: (1.1.28) (0.1.12 sid)
  • Revision ID: package-import@ubuntu.com-20140516114252-u5ect6mk6ht8i38x
Tags: 3.12.2-1
[ Laurent Bigonville ]
* debian/control.in: Recommends realmd package (Closes: #725965)

[ Andreas Henriksson ]
* New upstream release.
  - Removes chat support from Windows Live provider (XMPP gateway gone).
* Bump Standards-Version to 3.9.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 * Lesser General Public License for more details.
15
15
 *
16
16
 * You should have received a copy of the GNU Lesser General
17
 
 * Public License along with this library; if not, write to the
18
 
 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
19
 
 * Boston, MA 02111-1307, USA.
 
17
 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
20
18
 *
21
19
 * Authors: Debarshi Ray <debarshir@gnome.org>
22
20
 *          Willem van Engen <gnome@willem.engen.nl>
28
26
#include <rest/oauth-proxy.h>
29
27
#include <json-glib/json-glib.h>
30
28
 
31
 
#include "goalogging.h"
32
29
#include "goaprovider.h"
33
30
#include "goaprovider-priv.h"
34
31
#include "goaoauthprovider.h"
186
183
      g_set_error (error,
187
184
                   GOA_ERROR,
188
185
                   GOA_ERROR_FAILED,
189
 
                   _("Expected status 200 when requesting user id, instead got status %d (%s)"),
 
186
                   _("Expected status 200 when requesting your identity, instead got status %d (%s)"),
190
187
                   rest_proxy_call_get_status_code (call),
191
188
                   rest_proxy_call_get_status_message (call));
192
189
      goto out;
198
195
                                   rest_proxy_call_get_payload_length (call),
199
196
                                   &identity_error))
200
197
    {
201
 
      goa_warning ("json_parser_load_from_data() failed: %s (%s, %d)",
202
 
                   identity_error->message,
203
 
                   g_quark_to_string (identity_error->domain),
204
 
                   identity_error->code);
 
198
      g_warning ("json_parser_load_from_data() failed: %s (%s, %d)",
 
199
                 identity_error->message,
 
200
                 g_quark_to_string (identity_error->domain),
 
201
                 identity_error->code);
205
202
      g_set_error (error,
206
203
                   GOA_ERROR,
207
204
                   GOA_ERROR_FAILED,
213
210
  json_object = json_object_get_object_member (json_object, "user");
214
211
  if (json_object == NULL)
215
212
    {
216
 
      goa_warning ("Did not find user in JSON data");
 
213
      g_warning ("Did not find user in JSON data");
217
214
      g_set_error (error,
218
215
                   GOA_ERROR,
219
216
                   GOA_ERROR_FAILED,
223
220
  id = g_strdup (json_object_get_string_member (json_object, "id"));
224
221
  if (id == NULL)
225
222
    {
226
 
      goa_warning ("Did not find user.id in JSON data");
 
223
      g_warning ("Did not find user.id in JSON data");
227
224
      g_set_error (error,
228
225
                   GOA_ERROR,
229
226
                   GOA_ERROR_FAILED,
233
230
  json_object = json_object_get_object_member (json_object, "username");
234
231
  if (json_object == NULL)
235
232
    {
236
 
      goa_warning ("Did not find user.username in JSON data");
 
233
      g_warning ("Did not find user.username in JSON data");
237
234
      g_set_error (error,
238
235
                   GOA_ERROR,
239
236
                   GOA_ERROR_FAILED,
243
240
  presentation_identity = g_strdup (json_object_get_string_member (json_object, "_content"));
244
241
  if (presentation_identity == NULL)
245
242
    {
246
 
      goa_warning ("Did not find user.username._content in JSON data");
 
243
      g_warning ("Did not find user.username._content in JSON data");
247
244
      g_set_error (error,
248
245
                   GOA_ERROR,
249
246
                   GOA_ERROR_FAILED,
422
419
  goa_util_add_account_info (grid, row++, object);
423
420
 
424
421
  goa_util_add_row_switch_from_keyfile_with_blurb (grid, row++, object,
 
422
                                                   /* Translators: This is a label for a series of
 
423
                                                    * options switches. For example: “Use for Mail”. */
425
424
                                                   _("Use for"),
426
425
                                                   "photos-disabled",
427
426
                                                   _("_Photos"));