[longomatch] Ask before deleting a category and all its plays
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [longomatch] Ask before deleting a category and all its plays
- Date: Wed, 23 Sep 2009 16:52:37 +0000 (UTC)
commit a94025b883da0016188db9e5eca1d05eb59c82f5
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed Sep 23 00:53:22 2009 +0200
Ask before deleting a category and all its plays
LongoMatch/Gui/Component/ProjectTemplateWidget.cs | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/LongoMatch/Gui/Component/ProjectTemplateWidget.cs b/LongoMatch/Gui/Component/ProjectTemplateWidget.cs
index f6589db..da48542 100644
--- a/LongoMatch/Gui/Component/ProjectTemplateWidget.cs
+++ b/LongoMatch/Gui/Component/ProjectTemplateWidget.cs
@@ -99,14 +99,19 @@ namespace LongoMatch.Gui.Component
private void RemoveSection(int index){
if(project!= null){
+ MessageDialog dialog = new MessageDialog((Gtk.Window)this.Toplevel,DialogFlags.Modal,MessageType.Question,
+ ButtonsType.YesNo,true,
+ Catalog.GetString("You are about to delete a category and all the plays added to this category.Do you want to proceed?"));
+ if (dialog.Run() == (int)ResponseType.Yes)
try{
- project.DeleteSection(index);
- }
- catch {
+ project.DeleteSection(index);
+ }catch{
MessagePopup.PopupMessage(this,MessageType.Warning,
Catalog.GetString("You can't delete the last section"));
+ dialog.Destroy();
return;
}
+ dialog.Destroy();
sections=project.Sections;
}else{
sections.RemoveSection(index);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]