Fix gcal_manager_is_client_writable() semantics

Fix all the calls to it accordingly.
This commit is contained in:
Erick Perez Castellanos
2015-10-07 08:39:51 -05:00
parent d8265a498b
commit 5f6bd95750
5 changed files with 6 additions and 9 deletions
+2 -5
View File
@@ -143,7 +143,7 @@ fill_sources_menu (GcalEditDialog *dialog)
g_menu_item_set_icon (item, G_ICON (pix));
/* 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);
}
@@ -935,10 +935,7 @@ gcal_edit_dialog_set_event_data (GcalEditDialog *dialog,
g_free (description);
}
gcal_edit_dialog_set_writable (
dialog,
! gcal_manager_is_client_writable (priv->manager,
priv->source));
gcal_edit_dialog_set_writable (dialog, gcal_manager_is_client_writable (priv->manager, priv->source));
priv->setting_event = FALSE;
}
+1 -1
View File
@@ -1451,7 +1451,7 @@ gcal_manager_is_client_writable (GcalManager *manager,
if (unit == NULL)
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
+1 -1
View File
@@ -426,7 +426,7 @@ make_row_for_event_data (GcalSearchView *view,
}
/* 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;
+1 -1
View File
@@ -927,7 +927,7 @@ stack_visible_child_name_changed (GObject *object,
/* default source check button */
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 */
if (!creation_mode)
+1 -1
View File
@@ -247,7 +247,7 @@ add_event_to_day_array (GcalYearView *year_view,
priv = year_view->priv;
child_widget = gcal_event_widget_new_from_data (event_data);
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_end = gcal_event_widget_peek_end_date (GCAL_EVENT_WIDGET (child_widget));