Fix gcal_manager_is_client_writable() semantics
Fix all the calls to it accordingly.
This commit is contained in:
@@ -143,7 +143,7 @@ fill_sources_menu (GcalEditDialog *dialog)
|
|||||||
g_menu_item_set_icon (item, G_ICON (pix));
|
g_menu_item_set_icon (item, G_ICON (pix));
|
||||||
|
|
||||||
/* set insensitive for read-only calendars */
|
/* set insensitive for read-only calendars */
|
||||||
if (gcal_manager_is_client_writable (priv->manager, source))
|
if (!gcal_manager_is_client_writable (priv->manager, source))
|
||||||
{
|
{
|
||||||
g_menu_item_set_action_and_target_value (item, "select_calendar", NULL);
|
g_menu_item_set_action_and_target_value (item, "select_calendar", NULL);
|
||||||
}
|
}
|
||||||
@@ -935,10 +935,7 @@ gcal_edit_dialog_set_event_data (GcalEditDialog *dialog,
|
|||||||
g_free (description);
|
g_free (description);
|
||||||
}
|
}
|
||||||
|
|
||||||
gcal_edit_dialog_set_writable (
|
gcal_edit_dialog_set_writable (dialog, gcal_manager_is_client_writable (priv->manager, priv->source));
|
||||||
dialog,
|
|
||||||
! gcal_manager_is_client_writable (priv->manager,
|
|
||||||
priv->source));
|
|
||||||
|
|
||||||
priv->setting_event = FALSE;
|
priv->setting_event = FALSE;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1451,7 +1451,7 @@ gcal_manager_is_client_writable (GcalManager *manager,
|
|||||||
if (unit == NULL)
|
if (unit == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
return unit->connected && e_client_is_readonly (E_CLIENT (unit->client));
|
return unit->connected && !e_client_is_readonly (E_CLIENT (unit->client));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -426,7 +426,7 @@ make_row_for_event_data (GcalSearchView *view,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* lock icon */
|
/* lock icon */
|
||||||
if (gcal_manager_is_client_writable (priv->manager, data->source))
|
if (!gcal_manager_is_client_writable (priv->manager, data->source))
|
||||||
{
|
{
|
||||||
GtkWidget *lock_icon;
|
GtkWidget *lock_icon;
|
||||||
|
|
||||||
|
|||||||
@@ -927,7 +927,7 @@ stack_visible_child_name_changed (GObject *object,
|
|||||||
|
|
||||||
/* default source check button */
|
/* default source check button */
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->default_check), (priv->source == default_source));
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->default_check), (priv->source == default_source));
|
||||||
gtk_widget_set_visible (priv->default_check, !gcal_manager_is_client_writable (priv->manager, priv->source));
|
gtk_widget_set_visible (priv->default_check, gcal_manager_is_client_writable (priv->manager, priv->source));
|
||||||
|
|
||||||
/* title */
|
/* title */
|
||||||
if (!creation_mode)
|
if (!creation_mode)
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ add_event_to_day_array (GcalYearView *year_view,
|
|||||||
priv = year_view->priv;
|
priv = year_view->priv;
|
||||||
child_widget = gcal_event_widget_new_from_data (event_data);
|
child_widget = gcal_event_widget_new_from_data (event_data);
|
||||||
gcal_event_widget_set_read_only (GCAL_EVENT_WIDGET (child_widget),
|
gcal_event_widget_set_read_only (GCAL_EVENT_WIDGET (child_widget),
|
||||||
gcal_manager_is_client_writable (priv->manager, event_data->source));
|
!gcal_manager_is_client_writable (priv->manager, event_data->source));
|
||||||
|
|
||||||
dt_start = gcal_event_widget_peek_start_date (GCAL_EVENT_WIDGET (child_widget));
|
dt_start = gcal_event_widget_peek_start_date (GCAL_EVENT_WIDGET (child_widget));
|
||||||
dt_end = gcal_event_widget_peek_end_date (GCAL_EVENT_WIDGET (child_widget));
|
dt_end = gcal_event_widget_peek_end_date (GCAL_EVENT_WIDGET (child_widget));
|
||||||
|
|||||||
Reference in New Issue
Block a user