diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2010-07-21 06:06:37 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2010-07-21 06:06:37 +0000 |
commit | a821369819ad9f3fc54a6e2625d734f4cdaa9da9 (patch) | |
tree | f86d570fa6ee65f4294dea91f344f8dd54795c14 /src/prefs_template.c | |
parent | 16b70cd5605ea7145e1f1aeb9944c7c4f94e8a4a (diff) |
src/prefs_template.c: notify on OK button press if not saved.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2631 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/prefs_template.c')
-rw-r--r-- | src/prefs_template.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/prefs_template.c b/src/prefs_template.c index 8cc3b701..147ce29f 100644 --- a/src/prefs_template.c +++ b/src/prefs_template.c @@ -429,6 +429,14 @@ static void prefs_template_ok_cb(void) { GSList *tmpl_list; + if (templates.entry_modified) { + if (alertpanel(_("Template is modified"), + _("Current modification is not applied. Finish without saving it?"), + GTK_STOCK_YES, GTK_STOCK_NO, NULL) + != G_ALERTDEFAULT) + return; + } + tmpl_list = prefs_template_get_list(); template_set_config(tmpl_list); compose_reflect_prefs_all(); @@ -592,6 +600,7 @@ static gint prefs_template_clist_set_row(gint row) } gtk_clist_set_row_data(clist, row, tmpl); + templates.entry_modified = FALSE; templates.list_modified = TRUE; return row; |