diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-05-17 21:49:21 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-05-17 21:49:21 +0800 |
commit | ea1a5fca456b891f8bb9ab248ad65651b66b54b2 (patch) | |
tree | 9619f2f9631aac471da3f8b24dd30908335627c9 /modules/calendar/e-memo-shell-view-actions.c | |
parent | c20b1701e81473504f1d67f6e7387a6f1e5fb856 (diff) | |
parent | 99ebc23e0860ef5baf1f169803d751db70e2aa32 (diff) | |
download | gsoc2013-evolution-ea1a5fca456b891f8bb9ab248ad65651b66b54b2.tar gsoc2013-evolution-ea1a5fca456b891f8bb9ab248ad65651b66b54b2.tar.gz gsoc2013-evolution-ea1a5fca456b891f8bb9ab248ad65651b66b54b2.tar.bz2 gsoc2013-evolution-ea1a5fca456b891f8bb9ab248ad65651b66b54b2.tar.lz gsoc2013-evolution-ea1a5fca456b891f8bb9ab248ad65651b66b54b2.tar.xz gsoc2013-evolution-ea1a5fca456b891f8bb9ab248ad65651b66b54b2.tar.zst gsoc2013-evolution-ea1a5fca456b891f8bb9ab248ad65651b66b54b2.zip |
Merge branch 'gnome-2-30' into express2
Diffstat (limited to 'modules/calendar/e-memo-shell-view-actions.c')
-rw-r--r-- | modules/calendar/e-memo-shell-view-actions.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/modules/calendar/e-memo-shell-view-actions.c b/modules/calendar/e-memo-shell-view-actions.c index a9b7fea82e..69bf9c5e8e 100644 --- a/modules/calendar/e-memo-shell-view-actions.c +++ b/modules/calendar/e-memo-shell-view-actions.c @@ -334,7 +334,6 @@ action_memo_new_cb (GtkAction *action, EShellWindow *shell_window; EMemoShellContent *memo_shell_content; EMemoTable *memo_table; - ECalModelComponent *comp_data; ECal *client; ECalComponent *comp; CompEditor *editor; @@ -348,11 +347,21 @@ action_memo_new_cb (GtkAction *action, memo_table = e_memo_shell_content_get_memo_table (memo_shell_content); list = e_memo_table_get_selected (memo_table); - g_return_if_fail (list != NULL); - comp_data = list->data; - g_slist_free (list); + if (list == NULL) { + ECalModel *model; + + model = e_memo_table_get_model (memo_table); + client = e_cal_model_get_default_client (model); + } else { + ECalModelComponent *comp_data; + + comp_data = list->data; + client = comp_data->client; + g_slist_free (list); + } + + g_return_if_fail (client != NULL); - client = comp_data->client; editor = memo_editor_new (client, shell, COMP_EDITOR_NEW_ITEM); comp = cal_comp_memo_new_with_defaults (client); comp_editor_edit_comp (editor, comp); |