aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/calendar-offline-handler.c12
-rw-r--r--calendar/gui/dialogs/event-editor.c14
-rw-r--r--calendar/gui/dialogs/task-editor.c14
3 files changed, 31 insertions, 9 deletions
diff --git a/calendar/gui/calendar-offline-handler.c b/calendar/gui/calendar-offline-handler.c
index 53db8f46e5..d1140e9123 100644
--- a/calendar/gui/calendar-offline-handler.c
+++ b/calendar/gui/calendar-offline-handler.c
@@ -54,8 +54,14 @@ add_connection (gpointer data, gpointer user_data)
g_return_if_fail (uri != NULL);
- list->_buffer[list->_length].hostName = CORBA_string_dup (uri->host);
- list->_buffer[list->_length].type = CORBA_string_dup (uri->protocol);
+ if (uri->host != NULL)
+ list->_buffer[list->_length].hostName = CORBA_string_dup (uri->host);
+ else
+ list->_buffer[list->_length].hostName = CORBA_string_dup ("Unknown");
+ if (uri->protocol != NULL)
+ list->_buffer[list->_length].type = CORBA_string_dup (uri->protocol);
+ else
+ list->_buffer[list->_length].type = CORBA_string_dup ("Unknown");
list->_length++;
e_uri_free (uri);
@@ -70,7 +76,7 @@ create_connection_list (CalendarOfflineHandler *offline_handler)
priv = offline_handler->priv;
- uris = cal_client_uri_list (priv->client, CAL_MODE_REMOTE);
+ uris = cal_client_uri_list (priv->client, CAL_MODE_REMOTE);
list = GNOME_Evolution_ConnectionList__alloc ();
list->_length = 0;
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 0b5fe9ec16..f464015fb0 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -49,6 +49,7 @@ struct _EventEditorPrivate {
EMeetingModel *model;
gboolean meeting_shown;
+ gboolean existing_org;
gboolean updating;
};
@@ -137,18 +138,22 @@ static void
set_menu_sens (EventEditor *ee)
{
EventEditorPrivate *priv;
+ gboolean sens;
priv = ee->priv;
+ sens = priv->meeting_shown;
comp_editor_set_ui_prop (COMP_EDITOR (ee),
"/commands/ActionScheduleMeeting",
- "sensitive", priv->meeting_shown ? "0" : "1");
+ "sensitive", sens ? "0" : "1");
+
+ sens = sens && priv->existing_org;
comp_editor_set_ui_prop (COMP_EDITOR (ee),
"/commands/ActionRefreshMeeting",
- "sensitive", priv->meeting_shown ? "1" : "0");
+ "sensitive", sens ? "1" : "0");
comp_editor_set_ui_prop (COMP_EDITOR (ee),
"/commands/ActionCancelMeeting",
- "sensitive", priv->meeting_shown ? "1" : "0");
+ "sensitive", sens ? "1" : "0");
}
static void
@@ -207,6 +212,7 @@ event_editor_init (EventEditor *ee)
verbs);
priv->meeting_shown = TRUE;
+ priv->existing_org = FALSE;
priv->updating = FALSE;
init_widgets (ee);
@@ -239,6 +245,8 @@ event_editor_edit_comp (CompEditor *editor, CalComponent *comp)
priv = ee->priv;
priv->updating = TRUE;
+
+ priv->existing_org = cal_component_has_organizer (comp);
cal_component_get_attendee_list (comp, &attendees);
if (attendees == NULL) {
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 3c09dece79..774a9cc1c3 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -44,6 +44,7 @@ struct _TaskEditorPrivate {
EMeetingModel *model;
gboolean meeting_shown;
+ gboolean existing_org;
gboolean updating;
};
@@ -128,18 +129,22 @@ static void
set_menu_sens (TaskEditor *te)
{
TaskEditorPrivate *priv;
+ gboolean sens;
priv = te->priv;
+ sens = priv->meeting_shown;
comp_editor_set_ui_prop (COMP_EDITOR (te),
"/commands/ActionAssignTask",
- "sensitive", priv->meeting_shown ? "0" : "1");
+ "sensitive", sens ? "0" : "1");
+
+ sens = sens && priv->existing_org;
comp_editor_set_ui_prop (COMP_EDITOR (te),
"/commands/ActionRefreshTask",
- "sensitive", priv->meeting_shown ? "1" : "0");
+ "sensitive", sens ? "1" : "0");
comp_editor_set_ui_prop (COMP_EDITOR (te),
"/commands/ActionCancelTask",
- "sensitive", priv->meeting_shown ? "1" : "0");
+ "sensitive", sens ? "1" : "0");
}
static void
@@ -188,6 +193,7 @@ task_editor_init (TaskEditor *te)
verbs);
priv->meeting_shown = TRUE;
+ priv->existing_org = FALSE;
priv->updating = FALSE;
init_widgets (te);
@@ -206,6 +212,8 @@ task_editor_edit_comp (CompEditor *editor, CalComponent *comp)
priv->updating = TRUE;
+ priv->existing_org = cal_component_has_organizer (comp);
+
cal_component_get_attendee_list (comp, &attendees);
if (attendees == NULL) {
comp_editor_remove_page (editor, COMP_EDITOR_PAGE (priv->meet_page));