From a821369819ad9f3fc54a6e2625d734f4cdaa9da9 Mon Sep 17 00:00:00 2001 From: hiro Date: Wed, 21 Jul 2010 06:06:37 +0000 Subject: 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 --- src/prefs_template.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/prefs_template.c') 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; -- cgit v1.2.3