aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorDan Vrátil <dvratil@redhat.com>2011-06-23 15:35:26 +0800
committerMilan Crha <mcrha@redhat.com>2011-06-23 15:35:26 +0800
commitcc96d85ef9a68ab4898a9c77bffcc5097e10d7e8 (patch)
tree79f8a4d7497f3b0d147a38f74f6d9dde2268e5d3 /calendar/gui/dialogs
parent5b1dc9a806557f139200ddbec710bc457cd3f305 (diff)
downloadgsoc2013-evolution-cc96d85ef9a68ab4898a9c77bffcc5097e10d7e8.tar
gsoc2013-evolution-cc96d85ef9a68ab4898a9c77bffcc5097e10d7e8.tar.gz
gsoc2013-evolution-cc96d85ef9a68ab4898a9c77bffcc5097e10d7e8.tar.bz2
gsoc2013-evolution-cc96d85ef9a68ab4898a9c77bffcc5097e10d7e8.tar.lz
gsoc2013-evolution-cc96d85ef9a68ab4898a9c77bffcc5097e10d7e8.tar.xz
gsoc2013-evolution-cc96d85ef9a68ab4898a9c77bffcc5097e10d7e8.tar.zst
gsoc2013-evolution-cc96d85ef9a68ab4898a9c77bffcc5097e10d7e8.zip
Bug #646442 - [mail-to-task] Edit event details before adding to calendar
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/comp-editor.c16
-rw-r--r--calendar/gui/dialogs/comp-editor.h2
2 files changed, 18 insertions, 0 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 21ac86e9c3..da7759523e 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -121,6 +121,8 @@ struct _CompEditorPrivate {
gboolean changed;
gboolean needs_send;
+ gboolean saved;
+
CalObjModType mod;
gboolean existing_org;
@@ -212,6 +214,7 @@ G_DEFINE_TYPE_WITH_CODE (
enum {
OBJECT_CREATED,
+ COMP_CLOSED,
LAST_SIGNAL
};
@@ -624,6 +627,7 @@ save_comp (CompEditor *editor)
}
priv->changed = FALSE;
+ priv->saved = TRUE;
}
g_free (orig_uid_copy);
@@ -1868,6 +1872,15 @@ comp_editor_class_init (CompEditorClass *class)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
+
+ signals[COMP_CLOSED] = g_signal_new (
+ "comp_closed",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (CompEditorClass, comp_closed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__BOOLEAN,
+ G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
}
static void
@@ -1920,6 +1933,7 @@ comp_editor_init (CompEditor *editor)
priv->user_org = FALSE;
priv->warned = FALSE;
priv->is_group_item = FALSE;
+ priv->saved = FALSE;
priv->ui_manager = e_ui_manager_new ();
e_ui_manager_set_express_mode (
@@ -2201,6 +2215,8 @@ close_dialog (CompEditor *editor)
{
CompEditorPrivate *priv = editor->priv;
+ g_signal_emit_by_name (editor, "comp_closed", priv->saved);
+
/* FIXME Unfortunately we do this here because otherwise corba
calls happen during destruction and we might get a change
notification back when we are in an inconsistent state */
diff --git a/calendar/gui/dialogs/comp-editor.h b/calendar/gui/dialogs/comp-editor.h
index 3f1ddbb673..aca5c8ef11 100644
--- a/calendar/gui/dialogs/comp-editor.h
+++ b/calendar/gui/dialogs/comp-editor.h
@@ -86,6 +86,8 @@ struct _CompEditorClass {
gboolean visible);
void (*show_type) (CompEditor *editor,
gboolean visible);
+ void (*comp_closed) (CompEditor *editor,
+ gboolean saved);
};
typedef enum {