utils: Pass GcalCalendar to ask_recurrence_modification_type()
The method ask_recurrence_modification_type() currently receives an ESource, and tried to fetch the ECalClient from the ESource by using g_object_get_data(). However, since we moved to GcalCalendar, we do not set this data field in ESource. Receive a GcalCalendar instead, and use the appropriate function gcal_calendar_get_client() instead.
This commit is contained in:
@@ -922,15 +922,15 @@ is_source_enabled (ESource *source)
|
||||
* @modtype is assigned, %FALSE otherwise.
|
||||
*/
|
||||
gboolean
|
||||
ask_recurrence_modification_type (GtkWidget *parent,
|
||||
ask_recurrence_modification_type (GtkWidget *parent,
|
||||
GcalRecurrenceModType *modtype,
|
||||
ESource *source)
|
||||
GcalCalendar *calendar)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
GtkDialogFlags flags;
|
||||
gint result;
|
||||
ECalClient *client;
|
||||
GtkWidget *dialog;
|
||||
gboolean is_set;
|
||||
EClient *client;
|
||||
gint result;
|
||||
|
||||
flags = GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT;
|
||||
*modtype = GCAL_RECURRENCE_MOD_THIS_ONLY;
|
||||
@@ -948,7 +948,7 @@ ask_recurrence_modification_type (GtkWidget *parent,
|
||||
GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
|
||||
client = g_object_get_data (G_OBJECT (source), "client");
|
||||
client = gcal_calendar_get_client (calendar);
|
||||
|
||||
if (!e_client_check_capability (E_CLIENT (client), E_CAL_STATIC_CAPABILITY_NO_THISANDFUTURE))
|
||||
gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Subsequent events"), GTK_RESPONSE_OK);
|
||||
|
||||
@@ -107,7 +107,7 @@ gboolean is_source_enabled (ESource
|
||||
|
||||
gboolean ask_recurrence_modification_type (GtkWidget *parent,
|
||||
GcalRecurrenceModType *modtype,
|
||||
ESource *source);
|
||||
GcalCalendar *calendar);
|
||||
|
||||
gboolean is_workday (guint day);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user