[chronojump] new genericWindow EditAction: EDITDELETE



commit 1c47ca733026f06690e8eb9c954b18a3942eabf9
Author: Xavier de Blas <xaviblas gmail com>
Date:   Sun Nov 29 23:46:38 2020 +0100

    new genericWindow EditAction: EDITDELETE

 src/gui/genericWindow.cs | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/gui/genericWindow.cs b/src/gui/genericWindow.cs
index b39aacf8..b957489c 100644
--- a/src/gui/genericWindow.cs
+++ b/src/gui/genericWindow.cs
@@ -104,7 +104,7 @@ public class GenericWindow
        private TreeStore store;
        private bool textviewChanging = false;
 
-       public enum EditActions { NONE, EDITPLAYDELETE, DELETE }
+       public enum EditActions { NONE, EDITDELETE, EDITPLAYDELETE, DELETE }
 
        //used to read data, see if it's ok, and print an error message.
        //if all is ok, destroy it with HideAndNull()
@@ -627,7 +627,15 @@ public class GenericWindow
 
                this.activateRowAcceptsWindow = activateRowAcceptsWindow;
 
-               if(editAction == EditActions.EDITPLAYDELETE)
+               if(editAction == EditActions.EDITDELETE)
+               {
+                       button_treeviewload_row_edit.Sensitive = false;
+                       button_treeviewload_row_edit.Visible = true;
+                       button_treeviewload_row_delete.Sensitive = false;
+                       button_treeviewload_row_delete.Visible = true;
+                       button_row_edit = new Gtk.Button();
+                       button_row_delete = new Gtk.Button();
+               } else if(editAction == EditActions.EDITPLAYDELETE)
                {
                        button_treeviewload_row_edit.Sensitive = false;
                        button_treeviewload_row_edit.Visible = true;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]