[tasque/viewmodel: 33/78] Change default SetExecuteAction behavior to set CanExecute to true
- From: Antonius Riha <antoniusri src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tasque/viewmodel: 33/78] Change default SetExecuteAction behavior to set CanExecute to true
- Date: Wed, 29 Aug 2012 18:37:26 +0000 (UTC)
commit b1853571f8773a9345749b24a39ce94a6aaade53
Author: Antonius Riha <antoniusriha gmail com>
Date: Mon Jul 30 15:01:45 2012 +0200
Change default SetExecuteAction behavior to set CanExecute to true
src/Tasque.Gtk/TaskWindow.cs | 4 ++--
src/libtasqueui/UICommand.cs | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/Tasque.Gtk/TaskWindow.cs b/src/Tasque.Gtk/TaskWindow.cs
index 35b006b..66d7d50 100644
--- a/src/Tasque.Gtk/TaskWindow.cs
+++ b/src/Tasque.Gtk/TaskWindow.cs
@@ -1292,8 +1292,8 @@ namespace Tasque
if (mainWindowModel == null)
throw new ArgumentNullException ("mainWindowModel");
vm = mainWindowModel;
- mainWindowModel.Show.SetExecuteAction (ShowWindow, true);
- mainWindowModel.Hide.SetExecuteAction (HideWindow, true);
+ mainWindowModel.Show.SetExecuteAction (ShowWindow);
+ mainWindowModel.Hide.SetExecuteAction (HideWindow);
}
void ShowWindow ()
diff --git a/src/libtasqueui/UICommand.cs b/src/libtasqueui/UICommand.cs
index cb7eaa1..5c2ec34 100644
--- a/src/libtasqueui/UICommand.cs
+++ b/src/libtasqueui/UICommand.cs
@@ -61,6 +61,7 @@ namespace Tasque.UIModel
public void SetExecuteAction (Action executeAction)
{
this.executeAction = executeAction;
+ CanExecute = true;
}
public void SetExecuteAction (Action executeAction, bool canExecute)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]