~ubuntu-branches/ubuntu/wily/evolution-data-server/wily

« back to all changes in this revision

Viewing changes to calendar/libecal/e-cal-client-view.c

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2015-07-20 13:34:59 UTC
  • mfrom: (1.1.126) (1.2.48 sid)
  • Revision ID: package-import@ubuntu.com-20150720133459-g6y46hnu5ewtoz08
Tags: 3.16.4-0ubuntu2
debian/patches/0001-Bug-752373-Monthly-events-do-not-recur-correctly.patch:
Cherry-pick patch from upstream to fix events not recurring correctly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
5
5
 * Copyright (C) 2009 Intel Corporation
6
6
 *
7
 
 * Authors: Federico Mena-Quintero <federico@ximian.com>
8
 
 *          Ross Burton <ross@linux.intel.com>
9
 
 *
10
 
 * This library is free software you can redistribute it and/or modify it
 
7
 * This library is free software: you can redistribute it and/or modify it
11
8
 * under the terms of the GNU Lesser General Public License as published by
12
9
 * the Free Software Foundation.
13
10
 *
14
11
 * This library is distributed in the hope that it will be useful, but
15
12
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16
 
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
17
 
 *for more details.
 
13
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
 
14
 * for more details.
18
15
 *
19
16
 * You should have received a copy of the GNU Lesser General Public License
20
 
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
 
17
 * along with this library. If not, see <http://www.gnu.org/licenses/>.
 
18
 *
 
19
 * Authors: Federico Mena-Quintero <federico@ximian.com>
 
20
 *          Ross Burton <ross@linux.intel.com>
21
21
 */
22
22
 
23
23
/**
505
505
}
506
506
 
507
507
static void
508
 
cal_client_view_dispose_cb (GObject *source_object,
509
 
                            GAsyncResult *result,
510
 
                            gpointer user_data)
511
 
{
512
 
        GError *local_error = NULL;
513
 
 
514
 
        e_gdbus_cal_view_call_dispose_finish (
515
 
                G_DBUS_PROXY (source_object), result, &local_error);
516
 
 
517
 
        if (local_error != NULL) {
518
 
                g_dbus_error_strip_remote_error (local_error);
519
 
                g_warning ("%s: %s", G_STRFUNC, local_error->message);
520
 
                g_error_free (local_error);
521
 
        }
522
 
}
523
 
 
524
 
static void
525
508
cal_client_view_set_client (ECalClientView *client_view,
526
509
                            ECalClient *client)
527
510
{
647
630
                        priv->dbus_proxy,
648
631
                        priv->complete_handler_id);
649
632
 
650
 
                /* Call D-Bus dispose() asynchronously
651
 
                 * so we don't block this dispose(). */
652
 
                e_gdbus_cal_view_call_dispose (
653
 
                        priv->dbus_proxy, NULL,
654
 
                        cal_client_view_dispose_cb, NULL);
 
633
                /* Call D-Bus dispose() asynchronously so we don't block this dispose().
 
634
                 * Also omit a callback function, so the GDBusMessage
 
635
                 * uses G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED.
 
636
                 */
 
637
                e_gdbus_cal_view_call_dispose (priv->dbus_proxy, NULL, NULL, NULL);
655
638
                g_object_unref (priv->dbus_proxy);
656
639
                priv->dbus_proxy = NULL;
657
640
        }
681
664
                               GCancellable *cancellable,
682
665
                               GError **error)
683
666
{
 
667
        ECalClient *cal_client;
684
668
        ECalClientViewPrivate *priv;
685
669
        EGdbusCalView *gdbus_calview;
686
670
        gulong handler_id;
 
671
        gchar *bus_name;
687
672
 
688
673
        priv = E_CAL_CLIENT_VIEW_GET_PRIVATE (initable);
689
674
 
 
675
        cal_client = g_weak_ref_get (&priv->client);
 
676
        if (cal_client == NULL) {
 
677
                g_set_error (
 
678
                        error, E_CLIENT_ERROR,
 
679
                        E_CLIENT_ERROR_OTHER_ERROR,
 
680
                        _("Client disappeared"));
 
681
 
 
682
                return FALSE;
 
683
        }
 
684
 
 
685
        bus_name = e_client_dup_bus_name (E_CLIENT (cal_client));
 
686
        g_object_unref (cal_client);
 
687
 
690
688
        gdbus_calview = e_gdbus_cal_view_proxy_new_sync (
691
689
                priv->connection,
692
690
                G_DBUS_PROXY_FLAGS_NONE,
693
 
                CALENDAR_DBUS_SERVICE_NAME,
 
691
                bus_name,
694
692
                priv->object_path,
695
693
                cancellable, error);
696
694
 
 
695
        g_free (bus_name);
 
696
 
697
697
        if (gdbus_calview == NULL)
698
698
                return FALSE;
699
699