From fff54e119823ba14123eb8273ec9a724eb81500a Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Fri, 11 Apr 2003 10:41:37 +0000 Subject: added missing capabilities. 2003-04-11 Rodrigo Moya * cal-util/cal-util.h: added missing capabilities. * cal-client/cal-client.c (cal_client_get_one_alarm_only, cal_client_get_organizer_must_attend, cal_client_get_save_schedules): * gui/itip-utils.c (itip_organizer_is_user): * gui/e-calendar-table.c (e_calendar_table_on_right_click): * gui/dialogs/task-editor.c (set_menu_sens): * gui/dialogs/event-page.c (event_page_fill_widgets): * gui/dialogs/meeting-page.c (meeting_page_fill_widgets): * gui/dialogs/alarm-page.c (button_options_clicked_cb): use the macros defined in cal-util.h for static capabilities. svn path=/trunk/; revision=20815 --- calendar/gui/dialogs/alarm-page.c | 11 ++++++----- calendar/gui/dialogs/event-page.c | 2 +- calendar/gui/dialogs/meeting-page.c | 8 ++++++-- calendar/gui/dialogs/task-editor.c | 3 ++- calendar/gui/e-calendar-table.c | 3 ++- calendar/gui/itip-utils.c | 2 +- 6 files changed, 18 insertions(+), 11 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/dialogs/alarm-page.c b/calendar/gui/dialogs/alarm-page.c index d0639bde16..540f11db92 100644 --- a/calendar/gui/dialogs/alarm-page.c +++ b/calendar/gui/dialogs/alarm-page.c @@ -105,10 +105,10 @@ static const int action_map[] = { }; static const char *action_map_cap[] = { - "no-display-alarms", - "no-audio-alarms", - "no-procedure-alarms", - "no-email-alarms" + CAL_STATIC_CAPABILITY_NO_DISPLAY_ALARMS, + CAL_STATIC_CAPABILITY_NO_AUDIO_ALARMS, + CAL_STATIC_CAPABILITY_NO_PROCEDURE_ALARMS, + CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS }; static const int value_map[] = { @@ -707,7 +707,8 @@ button_options_clicked_cb (GtkWidget *widget, gpointer data) cal_component_alarm_set_action (priv->alarm, e_dialog_option_menu_get (priv->action, action_map)); - repeat = !cal_client_get_static_capability (COMP_EDITOR_PAGE (apage)->client, "no-alarm-repeat"); + repeat = !cal_client_get_static_capability (COMP_EDITOR_PAGE (apage)->client, + CAL_STATIC_CAPABILITY_NO_ALARM_REPEAT); email = cal_client_get_alarm_email_address (COMP_EDITOR_PAGE (apage)->client); if (!alarm_options_dialog_run (priv->alarm, email, repeat)) g_message ("button_options_clicked_cb(): Could not create the alarm options dialog"); diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index ca28275ce9..b55e67dedd 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -507,7 +507,7 @@ event_page_fill_widgets (CompEditorPage *page, CalComponent *comp) transparency_map); break; } - if (cal_client_get_static_capability (page->client, "no-transparency")) + if (cal_client_get_static_capability (page->client, CAL_STATIC_CAPABILITY_NO_TRANSPARENCY)) gtk_widget_hide (priv->show_time_frame); else gtk_widget_show (priv->show_time_frame); diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c index 4443e124f7..cbc9dcdf4a 100644 --- a/calendar/gui/dialogs/meeting-page.c +++ b/calendar/gui/dialogs/meeting-page.c @@ -368,11 +368,15 @@ meeting_page_fill_widgets (CompEditorPage *page, CalComponent *comp) gtk_widget_show (priv->existing_organizer_table); if (itip_organizer_is_user (comp, page->client)) { gtk_widget_show (priv->invite); - if (cal_client_get_static_capability (page->client, "organizer-not-email-address")) + if (cal_client_get_static_capability ( + page->client, + CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS)) gtk_widget_hide (priv->existing_organizer_btn); e_meeting_model_etable_click_to_add (priv->model, TRUE); } else { - if (cal_client_get_static_capability (page->client, "organizer-not-email-address")) + if (cal_client_get_static_capability ( + page->client, + CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS)) gtk_widget_hide (priv->existing_organizer_btn); gtk_widget_hide (priv->invite); e_meeting_model_etable_click_to_add (priv->model, FALSE); diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c index 0b2aee9827..472f12dde0 100644 --- a/calendar/gui/dialogs/task-editor.c +++ b/calendar/gui/dialogs/task-editor.c @@ -117,7 +117,8 @@ set_menu_sens (TaskEditor *te) user = comp_editor_get_user_org (COMP_EDITOR (te)); read_only = cal_client_is_read_only (comp_editor_get_cal_client (COMP_EDITOR (te))); - sens = cal_client_get_static_capability (comp_editor_get_cal_client (COMP_EDITOR (te)), "no-task-assignment") + sens = cal_client_get_static_capability (comp_editor_get_cal_client (COMP_EDITOR (te)), + CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT) || priv->assignment_shown || read_only; comp_editor_set_ui_prop (COMP_EDITOR (te), "/commands/ActionAssignTask", diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index 0cf38eedd1..41d12685b8 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -995,7 +995,8 @@ e_calendar_table_on_right_click (ETable *table, if (cal_client_is_read_only (calendar_model_get_cal_client (e_calendar_table_get_model (cal_table)))) disable_mask |= MASK_EDITABLE; - if (cal_client_get_static_capability (calendar_model_get_cal_client (e_calendar_table_get_model (cal_table)), "no-task-assignment")) + if (cal_client_get_static_capability (calendar_model_get_cal_client (e_calendar_table_get_model (cal_table)), + CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT)) disable_mask |= MASK_ASSIGNABLE; e_popup_menu_run (tasks_popup_menu, (GdkEvent *) event, diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index 7db8456209..0360a3ca85 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -97,7 +97,7 @@ itip_organizer_is_user (CalComponent *comp, CalClient *client) strip = itip_strip_mailto (organizer.value); - if (cal_client_get_static_capability (client, "organizer-not-email-address")) { + if (cal_client_get_static_capability (client, CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS)) { const char *email; email = cal_client_get_cal_address (client); -- cgit