aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-memos.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2007-11-05 18:03:02 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-11-05 18:03:02 +0800
commitabf34a4520db2714e688fcdc01f3e5cbb890bc73 (patch)
tree55c9a141a81af5be89ec7cb38a5ac64aeee5fc11 /calendar/gui/e-memos.c
parent92d0fb79a748036a21403539a8c296eafb2e2613 (diff)
downloadgsoc2013-evolution-abf34a4520db2714e688fcdc01f3e5cbb890bc73.tar
gsoc2013-evolution-abf34a4520db2714e688fcdc01f3e5cbb890bc73.tar.gz
gsoc2013-evolution-abf34a4520db2714e688fcdc01f3e5cbb890bc73.tar.bz2
gsoc2013-evolution-abf34a4520db2714e688fcdc01f3e5cbb890bc73.tar.lz
gsoc2013-evolution-abf34a4520db2714e688fcdc01f3e5cbb890bc73.tar.xz
gsoc2013-evolution-abf34a4520db2714e688fcdc01f3e5cbb890bc73.tar.zst
gsoc2013-evolution-abf34a4520db2714e688fcdc01f3e5cbb890bc73.zip
** Fix for bug #318604
2007-11-05 Milan Crha <mcrha@redhat.com> ** Fix for bug #318604 * Enable source when adding event to disabled source. * gui/gnome-cal.h: (gnome_calendar_emit_user_created_signal): New helper function which will store used calendar before emitting signal "user_created" on the instance to GnomeCalendar for later use and unset it right after the emit. * gui/gnome-cal.c: (struct _GnomeCalendarPrivate): New member to store used ECal before emitting "user_created" signal. * gui/gnome-cal.c: (gnome_calendar_emit_user_created_signal), (user_created_cb): Implementation of new helper function and enabling last used source instead of default one on "user_created" signal. * gui/e-day-view.c: (e_day_view_on_editing_stopped): * gui/e-week-view.c: (e_week_view_on_editing_stopped): * gui/e-calendar-view.c: (object_created_cb): Use our new helper function to emit "user_created" signal with proper ECal. * gui/e-calendar-table.h: (struct _ECalendarTable): * gui/e-memo-table.h: (struct _EMemoTable): New member added. * gui/e-calendar-table.c: (e_calendar_table_init): * gui/e-memo-table.c: (e_memo_table_init): Initialize member to NULL. * gui/tasks-component.c: (object_created_cb), (create_new_todo): * gui/memos-component.c: (object_created_cb), (create_new_memo): Add new callback function to notice new object created and emit "user_created" signal with proper ECal stored in ECalendarTable. * gui/e-tasks.c: (user_created_cb): * gui/e-memos.c: (user_created_cb): Use previously stored ECal, which has been used to create event, instead of using default ECal. svn path=/trunk/; revision=34495
Diffstat (limited to 'calendar/gui/e-memos.c')
-rw-r--r--calendar/gui/e-memos.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/calendar/gui/e-memos.c b/calendar/gui/e-memos.c
index 60dc54a927..d20d909808 100644
--- a/calendar/gui/e-memos.c
+++ b/calendar/gui/e-memos.c
@@ -183,13 +183,20 @@ static void
user_created_cb (GtkWidget *view, EMemos *memos)
{
EMemosPrivate *priv;
+ EMemoTable *memo_table;
ECal *ecal;
- ECalModel *model;
priv = memos->priv;
+ memo_table = E_MEMO_TABLE (priv->memos_view);
- model = e_memo_table_get_model (E_MEMO_TABLE (priv->memos_view));
- ecal = e_cal_model_get_default_client (model);
+ if (memo_table->user_created_cal)
+ ecal = memo_table->user_created_cal;
+ else {
+ ECalModel *model;
+
+ model = e_memo_table_get_model (E_MEMO_TABLE (priv->memos_view));
+ ecal = e_cal_model_get_default_client (model);
+ }
e_memos_add_memo_source (memos, e_cal_get_source (ecal));
}