diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-05-06 01:21:42 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-05-06 01:21:42 +0800 |
commit | 16d914886110d57eaf8946000c365de2007728b3 (patch) | |
tree | dc91c2e17d9febfc121cfdc3b375cc75162f1877 /calendar/gui/dialogs/comp-editor.c | |
parent | c3e0648d8b5a1d73f82f0a7691b9ab1320248392 (diff) | |
parent | a30e0738880809f8e3a6d05a66f82081d91c21a0 (diff) | |
download | gsoc2013-evolution-16d914886110d57eaf8946000c365de2007728b3.tar gsoc2013-evolution-16d914886110d57eaf8946000c365de2007728b3.tar.gz gsoc2013-evolution-16d914886110d57eaf8946000c365de2007728b3.tar.bz2 gsoc2013-evolution-16d914886110d57eaf8946000c365de2007728b3.tar.lz gsoc2013-evolution-16d914886110d57eaf8946000c365de2007728b3.tar.xz gsoc2013-evolution-16d914886110d57eaf8946000c365de2007728b3.tar.zst gsoc2013-evolution-16d914886110d57eaf8946000c365de2007728b3.zip |
Merge branch 'master' into kill-bonobo
Conflicts:
calendar/gui/dialogs/comp-editor.c
Diffstat (limited to 'calendar/gui/dialogs/comp-editor.c')
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index cf8d77668c..440cf35388 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -197,6 +197,14 @@ comp_editor_weak_notify_cb (gpointer unused, active_editors = g_list_remove (active_editors, where_the_object_was); } +static void +attachment_store_changed_cb (CompEditor *editor) +{ + /* Mark the editor as changed so it prompts about unsaved + changes on close */ + comp_editor_set_changed (editor, TRUE); +} + static GSList * get_attachment_list (CompEditor *editor) { @@ -1569,6 +1577,7 @@ comp_editor_init (CompEditor *editor) { CompEditorPrivate *priv; EAttachmentView *view; + EAttachmentStore *store; GdkDragAction drag_actions; GtkTargetList *target_list; GtkTargetEntry *targets; @@ -1710,6 +1719,18 @@ comp_editor_init (CompEditor *editor) gtk_window_set_type_hint ( GTK_WINDOW (editor), GDK_WINDOW_TYPE_HINT_NORMAL); + /* Listen for attachment store changes. */ + + store = e_attachment_view_get_store (view); + + g_signal_connect_swapped ( + store, "row-deleted", + G_CALLBACK (attachment_store_changed_cb), editor); + + g_signal_connect_swapped ( + store, "row-inserted", + G_CALLBACK (attachment_store_changed_cb), editor); + /* FIXME Shell should be passed in. */ shell = e_shell_get_default (); e_shell_watch_window (shell, GTK_WINDOW (editor)); @@ -1765,14 +1786,6 @@ prompt_and_save_changes (CompEditor *editor, gboolean send) } } -static void -attachment_store_changed_cb (CompEditor *editor) -{ - /* Mark the editor as changed so it prompts about unsaved - changes on close */ - comp_editor_set_changed (editor, TRUE); -} - /* Menu callbacks */ static void |