~noskcaj/ubuntu/vivid/gnome-online-accounts/3.14.2

« back to all changes in this revision

Viewing changes to src/goabackend/goawindowsliveprovider.c

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson, Laurent Bigonville, Andreas Henriksson
  • Date: 2014-05-16 11:42:52 UTC
  • mfrom: (1.2.6)
  • Revision ID: package-import@ubuntu.com-20140516114252-s42hd9ehklt09169
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:
92
92
{
93
93
  return GOA_PROVIDER_FEATURE_BRANDED |
94
94
         GOA_PROVIDER_FEATURE_MAIL |
95
 
         GOA_PROVIDER_FEATURE_CHAT |
96
95
         GOA_PROVIDER_FEATURE_DOCUMENTS;
97
96
}
98
97
 
119
118
static const gchar *
120
119
get_scope (GoaOAuth2Provider *provider)
121
120
{
122
 
  return "wl.messenger,"
123
 
         "wl.imap,"
 
121
  return "wl.imap,"
124
122
         "wl.offline_access,"
125
123
         "wl.skydrive_update,"
126
124
         "wl.emails";
129
127
static guint
130
128
get_credentials_generation (GoaProvider *provider)
131
129
{
132
 
  return 2;
 
130
  return 3;
133
131
}
134
132
 
135
133
static const gchar *
311
309
{
312
310
  GoaAccount *account;
313
311
  GoaMail *mail;
314
 
  GoaChat *chat = NULL;
315
312
  GoaDocuments *documents;
316
313
  gboolean mail_enabled;
317
 
  gboolean chat_enabled;
318
314
  gboolean documents_enabled;
319
315
  gboolean ret = FALSE;
320
316
  const gchar *email_address;
321
317
 
322
318
  account = NULL;
323
319
  mail = NULL;
 
320
  documents = NULL;
324
321
 
325
322
  /* Chain up */
326
323
  if (!GOA_PROVIDER_CLASS (goa_windows_live_provider_parent_class)->build_object (provider,
365
362
        goa_object_skeleton_set_mail (object, NULL);
366
363
    }
367
364
 
368
 
  /* Chat */
369
 
  chat = goa_object_get_chat (GOA_OBJECT (object));
370
 
  chat_enabled = g_key_file_get_boolean (key_file, group, "ChatEnabled", NULL);
371
 
  if (chat_enabled)
372
 
    {
373
 
      if (chat == NULL)
374
 
        {
375
 
          chat = goa_chat_skeleton_new ();
376
 
          goa_object_skeleton_set_chat (object, chat);
377
 
        }
378
 
    }
379
 
  else
380
 
    {
381
 
      if (chat != NULL)
382
 
        goa_object_skeleton_set_chat (object, NULL);
383
 
    }
384
 
 
385
365
  /* Documents */
386
366
  documents = goa_object_get_documents (GOA_OBJECT (object));
387
367
  documents_enabled = g_key_file_get_boolean (key_file, group, "DocumentsEnabled", NULL);
403
383
  if (just_added)
404
384
    {
405
385
      goa_account_set_mail_disabled (account, !mail_enabled);
406
 
      goa_account_set_chat_disabled (account, !chat_enabled);
407
386
      goa_account_set_documents_disabled (account, !documents_enabled);
408
387
 
409
388
      g_signal_connect (account,
411
390
                        G_CALLBACK (goa_util_account_notify_property_cb),
412
391
                        "MailEnabled");
413
392
      g_signal_connect (account,
414
 
                        "notify::chat-disabled",
415
 
                        G_CALLBACK (goa_util_account_notify_property_cb),
416
 
                        "ChatEnabled");
417
 
      g_signal_connect (account,
418
393
                        "notify::documents-disabled",
419
394
                        G_CALLBACK (goa_util_account_notify_property_cb),
420
395
                        "DocumentsEnabled");
423
398
  ret = TRUE;
424
399
 
425
400
 out:
426
 
  if (chat != NULL)
427
 
    g_object_unref (chat);
 
401
  g_clear_object (&documents);
428
402
  g_clear_object (&mail);
429
403
  if (account != NULL)
430
404
    g_object_unref (account);
456
430
 
457
431
  goa_util_add_row_switch_from_keyfile_with_blurb (grid, row++, object,
458
432
                                                   NULL,
459
 
                                                   "chat-disabled",
460
 
                                                   _("C_hat"));
461
 
 
462
 
  goa_util_add_row_switch_from_keyfile_with_blurb (grid, row++, object,
463
 
                                                   NULL,
464
433
                                                   "documents-disabled",
465
434
                                                   _("_Documents"));
466
435
}
472
441
                        GVariantBuilder   *builder)
473
442
{
474
443
  g_variant_builder_add (builder, "{ss}", "MailEnabled", "true");
475
 
  g_variant_builder_add (builder, "{ss}", "ChatEnabled", "true");
476
444
  g_variant_builder_add (builder, "{ss}", "DocumentsEnabled", "true");
477
445
}
478
446