[evolution] Task view's "Assign task" doesn't open editor with attendees
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Task view's "Assign task" doesn't open editor with attendees
- Date: Tue, 10 Nov 2015 12:52:23 +0000 (UTC)
commit a8cf2863ecbb6ec61fdc60639419b93a9685ce76
Author: Milan Crha <mcrha redhat com>
Date: Tue Nov 10 13:51:48 2015 +0100
Task view's "Assign task" doesn't open editor with attendees
calendar/gui/e-cal-ops.c | 6 ++++--
calendar/gui/e-cal-ops.h | 3 ++-
modules/calendar/e-cal-shell-view-memopad.c | 2 +-
modules/calendar/e-cal-shell-view-taskpad.c | 2 +-
modules/calendar/e-memo-shell-view-private.c | 2 +-
modules/calendar/e-task-shell-view-actions.c | 4 ++--
modules/calendar/e-task-shell-view-private.c | 17 ++++++++++++++---
modules/calendar/e-task-shell-view-private.h | 3 ++-
8 files changed, 27 insertions(+), 12 deletions(-)
---
diff --git a/calendar/gui/e-cal-ops.c b/calendar/gui/e-cal-ops.c
index 2d4155b..a3f014c 100644
--- a/calendar/gui/e-cal-ops.c
+++ b/calendar/gui/e-cal-ops.c
@@ -1809,6 +1809,7 @@ e_cal_ops_new_component_editor_from_model (ECalModel *model,
* @model: an #ECalModel instance
* @client: an #ECalClient, to which the component belongs
* @icalcomp: an #icalcomponent to open in an editor
+ * @force_attendees: set to TRUE to force to show attendees, FALSE to auto-detect
*
* Opens a component @icalcomp, which belongs to a @client, in
* a component editor. This is done synchronously.
@@ -1818,7 +1819,8 @@ e_cal_ops_new_component_editor_from_model (ECalModel *model,
void
e_cal_ops_open_component_in_editor_sync (ECalModel *model,
ECalClient *client,
- icalcomponent *icalcomp)
+ icalcomponent *icalcomp,
+ gboolean force_attendees)
{
NewComponentData *ncd;
ECalComponent *comp;
@@ -1842,7 +1844,7 @@ e_cal_ops_open_component_in_editor_sync (ECalModel *model,
ncd->shell = g_object_ref (e_cal_model_get_shell (model));
ncd->model = g_object_ref (model);
ncd->source_type = e_cal_client_get_source_type (client);
- ncd->is_assigned = FALSE; /* will be figured out later */
+ ncd->is_assigned = force_attendees;
ncd->extension_name = NULL;
ncd->for_client_uid = NULL;
ncd->default_source = NULL;
diff --git a/calendar/gui/e-cal-ops.h b/calendar/gui/e-cal-ops.h
index 6434144..66ca22e 100644
--- a/calendar/gui/e-cal-ops.h
+++ b/calendar/gui/e-cal-ops.h
@@ -97,7 +97,8 @@ void e_cal_ops_new_component_editor_from_model
gboolean all_day);
void e_cal_ops_open_component_in_editor_sync (ECalModel *model,
ECalClient *client,
- icalcomponent *icalcomp);
+ icalcomponent *icalcomp,
+ gboolean force_attendees);
void e_cal_ops_transfer_components (EShellView *shell_view,
ECalModel *model,
diff --git a/modules/calendar/e-cal-shell-view-memopad.c b/modules/calendar/e-cal-shell-view-memopad.c
index 6a43d4c..470a158 100644
--- a/modules/calendar/e-cal-shell-view-memopad.c
+++ b/modules/calendar/e-cal-shell-view-memopad.c
@@ -387,5 +387,5 @@ e_cal_shell_view_memopad_open_memo (ECalShellView *cal_shell_view,
shell_content = e_shell_view_get_shell_content (E_SHELL_VIEW (cal_shell_view));
model = e_cal_base_shell_content_get_model (E_CAL_BASE_SHELL_CONTENT (shell_content));
- e_cal_ops_open_component_in_editor_sync (model, comp_data->client, comp_data->icalcomp);
+ e_cal_ops_open_component_in_editor_sync (model, comp_data->client, comp_data->icalcomp, FALSE);
}
diff --git a/modules/calendar/e-cal-shell-view-taskpad.c b/modules/calendar/e-cal-shell-view-taskpad.c
index 917c090..e14a462 100644
--- a/modules/calendar/e-cal-shell-view-taskpad.c
+++ b/modules/calendar/e-cal-shell-view-taskpad.c
@@ -506,5 +506,5 @@ e_cal_shell_view_taskpad_open_task (ECalShellView *cal_shell_view,
shell_content = e_shell_view_get_shell_content (E_SHELL_VIEW (cal_shell_view));
model = e_cal_base_shell_content_get_model (E_CAL_BASE_SHELL_CONTENT (shell_content));
- e_cal_ops_open_component_in_editor_sync (model, comp_data->client, comp_data->icalcomp);
+ e_cal_ops_open_component_in_editor_sync (model, comp_data->client, comp_data->icalcomp, FALSE);
}
diff --git a/modules/calendar/e-memo-shell-view-private.c b/modules/calendar/e-memo-shell-view-private.c
index ac6486f..3785942 100644
--- a/modules/calendar/e-memo-shell-view-private.c
+++ b/modules/calendar/e-memo-shell-view-private.c
@@ -337,7 +337,7 @@ e_memo_shell_view_open_memo (EMemoShellView *memo_shell_view,
shell_content = e_shell_view_get_shell_content (E_SHELL_VIEW (memo_shell_view));
model = e_cal_base_shell_content_get_model (E_CAL_BASE_SHELL_CONTENT (shell_content));
- e_cal_ops_open_component_in_editor_sync (model, comp_data->client, comp_data->icalcomp);
+ e_cal_ops_open_component_in_editor_sync (model, comp_data->client, comp_data->icalcomp, FALSE);
}
void
diff --git a/modules/calendar/e-task-shell-view-actions.c b/modules/calendar/e-task-shell-view-actions.c
index 567181a..29f8718 100644
--- a/modules/calendar/e-task-shell-view-actions.c
+++ b/modules/calendar/e-task-shell-view-actions.c
@@ -47,7 +47,7 @@ action_task_assign_cb (GtkAction *action,
g_slist_free (list);
/* XXX We only open the first selected task. */
- e_task_shell_view_open_task (task_shell_view, comp_data);
+ e_task_shell_view_open_task (task_shell_view, comp_data, TRUE);
/* FIXME Need to actually assign the task. */
}
@@ -436,7 +436,7 @@ action_task_open_cb (GtkAction *action,
g_slist_free (list);
/* XXX We only open the first selected task. */
- e_task_shell_view_open_task (task_shell_view, comp_data);
+ e_task_shell_view_open_task (task_shell_view, comp_data, FALSE);
}
static void
diff --git a/modules/calendar/e-task-shell-view-private.c b/modules/calendar/e-task-shell-view-private.c
index a7775f7..4022127 100644
--- a/modules/calendar/e-task-shell-view-private.c
+++ b/modules/calendar/e-task-shell-view-private.c
@@ -90,6 +90,16 @@ task_shell_view_hide_completed_tasks_changed_cb (GSettings *settings,
}
static void
+task_shell_view_table_open_component_cb (ETaskShellView *task_shell_view,
+ ECalModelComponent *comp_data)
+{
+ g_return_if_fail (E_IS_TASK_SHELL_VIEW (task_shell_view));
+ g_return_if_fail (E_IS_CAL_MODEL_COMPONENT (comp_data));
+
+ e_task_shell_view_open_task (task_shell_view, comp_data, FALSE);
+}
+
+static void
task_shell_view_table_popup_event_cb (EShellView *shell_view,
GdkEvent *button_event)
{
@@ -233,7 +243,7 @@ e_task_shell_view_private_constructed (ETaskShellView *task_shell_view)
handler_id = g_signal_connect_swapped (
priv->task_table, "open-component",
- G_CALLBACK (e_task_shell_view_open_task),
+ G_CALLBACK (task_shell_view_table_open_component_cb),
task_shell_view);
priv->open_component_handler_id = handler_id;
@@ -478,7 +488,8 @@ e_task_shell_view_private_finalize (ETaskShellView *task_shell_view)
void
e_task_shell_view_open_task (ETaskShellView *task_shell_view,
- ECalModelComponent *comp_data)
+ ECalModelComponent *comp_data,
+ gboolean force_attendees)
{
EShellContent *shell_content;
ECalModel *model;
@@ -489,7 +500,7 @@ e_task_shell_view_open_task (ETaskShellView *task_shell_view,
shell_content = e_shell_view_get_shell_content (E_SHELL_VIEW (task_shell_view));
model = e_cal_base_shell_content_get_model (E_CAL_BASE_SHELL_CONTENT (shell_content));
- e_cal_ops_open_component_in_editor_sync (model, comp_data->client, comp_data->icalcomp);
+ e_cal_ops_open_component_in_editor_sync (model, comp_data->client, comp_data->icalcomp,
force_attendees);
}
void
diff --git a/modules/calendar/e-task-shell-view-private.h b/modules/calendar/e-task-shell-view-private.h
index 109b3ac..50f1958 100644
--- a/modules/calendar/e-task-shell-view-private.h
+++ b/modules/calendar/e-task-shell-view-private.h
@@ -128,7 +128,8 @@ void e_task_shell_view_actions_init
(ETaskShellView *task_shell_view);
void e_task_shell_view_open_task
(ETaskShellView *task_shell_view,
- ECalModelComponent *comp_data);
+ ECalModelComponent *comp_data,
+ gboolean force_attendees);
void e_task_shell_view_delete_completed
(ETaskShellView *task_shell_view);
void e_task_shell_view_update_sidebar
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]