[tasque/viewmodel: 77/78] Make it build
- From: Antonius Riha <antoniusri src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tasque/viewmodel: 77/78] Make it build
- Date: Wed, 29 Aug 2012 18:41:07 +0000 (UTC)
commit 167dafe0ea023a2c8f0830de638acac185c45d3b
Author: Antonius Riha <antoniusriha gmail com>
Date: Mon Aug 13 16:39:40 2012 +0200
Make it build
src/Addins/DummyBackend/DummyBackend.cs | 2 +-
src/Addins/DummyBackend/DummyNote.cs | 39 ---------
src/Addins/DummyBackend/DummyTask.cs | 5 +
src/Tasque.Gtk/AppIndicatorTray.cs | 7 +-
src/Tasque.Gtk/Application.cs | 45 +++-------
src/Tasque.Gtk/GtkApplicationBase.cs | 45 +++--------
src/Tasque.Gtk/GtkLinuxApplication.cs | 1 +
src/Tasque.Gtk/{GtkTrayBase.cs => GtkTray.cs} | 96 ++++++++++++----------
src/Tasque.Gtk/StatusIconTray.cs | 4 +-
src/Tasque.Gtk/TaskGroup.cs | 1 +
src/Tasque.Gtk/Utilities.cs | 1 +
src/libtasqueui/Legacy/DueDateOptionsModel.cs | 10 +-
src/libtasqueui/Legacy/NativeApplication.cs | 20 +++++
src/libtasqueui/Legacy/PreferencesDialogModel.cs | 4 +-
src/libtasqueui/Legacy/TaskGroupModelFactory.cs | 64 +++++++-------
src/libtasqueui/Legacy/TrayModel.cs | 2 +-
src/libtasqueui/Legacy/ViewModelRoot.cs | 2 +-
src/libtasqueui/OptionsModel.cs | 4 +-
18 files changed, 157 insertions(+), 195 deletions(-)
---
diff --git a/src/Addins/DummyBackend/DummyBackend.cs b/src/Addins/DummyBackend/DummyBackend.cs
index c0f0af2..bb05e3d 100644
--- a/src/Addins/DummyBackend/DummyBackend.cs
+++ b/src/Addins/DummyBackend/DummyBackend.cs
@@ -74,7 +74,7 @@ namespace Tasque.Backends.Dummy
task = CreateTask ("Call Roger", homeCategory);
task.DueDate = DateTime.Now.AddDays (-1);
task.Complete ();
- task.CompletionDate = task.DueDate;
+ ((DummyTask)task).SetCompletionDate (task.DueDate);
task = CreateTask ("Replace burnt out lightbulb", homeCategory);
task.DueDate = DateTime.Now;
diff --git a/src/Addins/DummyBackend/DummyTask.cs b/src/Addins/DummyBackend/DummyTask.cs
index f73fb6b..1812430 100644
--- a/src/Addins/DummyBackend/DummyTask.cs
+++ b/src/Addins/DummyBackend/DummyTask.cs
@@ -56,5 +56,10 @@ namespace Tasque.Backends.Dummy
State = TaskState.Deleted;
}
#endregion
+
+ internal void SetCompletionDate (DateTime date)
+ {
+ CompletionDate = date;
+ }
}
}
diff --git a/src/Tasque.Gtk/AppIndicatorTray.cs b/src/Tasque.Gtk/AppIndicatorTray.cs
index d81f6aa..3b99249 100644
--- a/src/Tasque.Gtk/AppIndicatorTray.cs
+++ b/src/Tasque.Gtk/AppIndicatorTray.cs
@@ -30,14 +30,15 @@ using Tasque.UIModel.Legacy;
namespace Tasque
{
- public class AppIndicatorTray : GtkTrayBase
+ public class AppIndicatorTray : GtkTray
{
public AppIndicatorTray (TrayModel viewModel) : base (viewModel)
{
- var appIndicator = new ApplicationIndicator ("TasqueTray", ViewModel.IconName,
+ appIndicator = new ApplicationIndicator ("TasqueTray", ViewModel.IconName,
AppIndicator.Category.ApplicationStatus);
appIndicator.Status = Status.Active;
+
viewModel.ToggleTaskWindow.Executed += delegate { UpdateToggleTaskWindowActionLabel (); };
var menu = Menu;
@@ -57,5 +58,7 @@ namespace Tasque
? Catalog.GetString ("Hide Task Window")
: Catalog.GetString ("Show Task Window");
}
+
+ ApplicationIndicator appIndicator;
}
}
diff --git a/src/Tasque.Gtk/Application.cs b/src/Tasque.Gtk/Application.cs
index 0568293..739f05b 100644
--- a/src/Tasque.Gtk/Application.cs
+++ b/src/Tasque.Gtk/Application.cs
@@ -63,8 +63,6 @@ namespace Tasque
private PreferencesDialog preferencesDialog;
private bool quietStart = false;
- private DateTime currentDay = DateTime.Today;
-
/// <value>
/// Keep track of the available backends. The key is the Type name of
/// the backend.
@@ -75,19 +73,19 @@ namespace Tasque
- public static Backend Backend
- {
- get { return Application.Instance.backend; }
- set { Application.Instance.SetBackend (value); }
- }
+// public static Backend Backend
+// {
+// get { return Application.Instance.backend; }
+// set { Application.Instance.SetBackend (value); }
+// }
- public static List<Backend> AvailableBackends
- {
- get {
- return new List<Backend> (Application.Instance.availableBackends.Values);
- }
-// get { return Application.Instance.availableBackends; }
- }
+// public static List<Backend> AvailableBackends
+// {
+// get {
+//// return new List<Backend> (Application.Instance.availableBackends.Values);
+// }
+//// get { return Application.Instance.availableBackends; }
+// }
public NativeApplication NativeApplication
{
@@ -151,26 +149,11 @@ namespace Tasque
}
}
- private bool CheckForDaySwitch ()
- {
- if (DateTime.Today != currentDay) {
- Debug.WriteLine ("Day has changed, reloading tasks");
- currentDay = DateTime.Today;
- // Reinitialize window according to new date
- if (TaskWindow.IsOpen)
- TaskWindow.Reinitialize (true);
-
- UnhookFromTooltipTaskGroupModels ();
- RebuildTooltipTaskGroupModels ();
- RefreshTrayIconTooltip ();
- }
-
- return true;
- }
+
private void SetupTrayIcon ()
{
- GtkTrayBase tray;
+ GtkTray tray;
#if APPINDICATOR
tray = new AppIndicatorTray (null);
#else
diff --git a/src/Tasque.Gtk/GtkApplicationBase.cs b/src/Tasque.Gtk/GtkApplicationBase.cs
index 53b4726..8dbbe45 100644
--- a/src/Tasque.Gtk/GtkApplicationBase.cs
+++ b/src/Tasque.Gtk/GtkApplicationBase.cs
@@ -25,51 +25,30 @@
// Antonius Riha <antoniusriha gmail com>
//
using System;
-using System.IO;
using System.Diagnostics;
-using Mono.Unix;
-using Gtk;
using Tasque.UIModel.Legacy;
namespace Tasque
{
public abstract class GtkApplicationBase : NativeApplication
{
- #region just copied
- public UIManager UIManager
+ protected override void SetupTray (TrayModel trayModel)
{
- get { return uiManager; }
+ Tray = GtkTray.CreateTray (trayModel);
}
- #region implemented abstract members of Tasque.UIModel.Legacy.NativeApplication
- public override Backend CurrentBackend {
- get {
- throw new System.NotImplementedException ();
- }
- }
-
- public override System.Collections.ObjectModel.ReadOnlyCollection<Backend> AvailableBackends {
- get {
- throw new System.NotImplementedException ();
- }
- }
-
- public override Tasque.UIModel.Legacy.MainWindowModel MainWindowModel {
- get {
- throw new System.NotImplementedException ();
- }
- }
- #endregion
- #endregion
-
- public override string ConfDir { get { return confDir; } }
-
protected override void OnInitialize ()
{
// Catalog.Init ("tasque", GlobalDefines.LocaleDir);
Gtk.Application.Init ();
- GLib.Idle.Add (InitializeIdle);
- GLib.Timeout.Add (60000, CheckForDaySwitch);
+ GLib.Idle.Add (delegate {
+ InitializeIdle ();
+ return false;
+ });
+ GLib.Timeout.Add (60000, delegate {
+ CheckForDaySwitch ();
+ return true;
+ });
}
public override void StartMainLoop ()
@@ -91,6 +70,8 @@ namespace Tasque
}
}
+ protected GtkTray Tray { get; private set; }
+
protected override event EventHandler RemoteInstanceKnocked;
protected void OnRemoteInstanceKnocked ()
@@ -98,7 +79,5 @@ namespace Tasque
if (RemoteInstanceKnocked != null)
RemoteInstanceKnocked (this, EventArgs.Empty);
}
-
- string confDir;
}
}
diff --git a/src/Tasque.Gtk/GtkLinuxApplication.cs b/src/Tasque.Gtk/GtkLinuxApplication.cs
index caec039..2341407 100644
--- a/src/Tasque.Gtk/GtkLinuxApplication.cs
+++ b/src/Tasque.Gtk/GtkLinuxApplication.cs
@@ -25,6 +25,7 @@
// THE SOFTWARE.
using System;
using System.Diagnostics;
+using Tasque.UIModel.Legacy;
namespace Tasque
{
diff --git a/src/Tasque.Gtk/GtkTrayBase.cs b/src/Tasque.Gtk/GtkTray.cs
similarity index 69%
rename from src/Tasque.Gtk/GtkTrayBase.cs
rename to src/Tasque.Gtk/GtkTray.cs
index 4f337ad..f2e0417 100644
--- a/src/Tasque.Gtk/GtkTrayBase.cs
+++ b/src/Tasque.Gtk/GtkTray.cs
@@ -1,5 +1,5 @@
//
-// GtkTrayBase.cs
+// GtkTray.cs
//
// Author:
// Antonius Riha <antoniusriha gmail com>
@@ -27,13 +27,21 @@ using System;
using Mono.Unix;
using Gtk;
using Tasque.UIModel.Legacy;
-using System.Text;
namespace Tasque
{
- public class GtkTrayBase
+ public class GtkTray
{
- public GtkTrayBase (TrayModel viewModel)
+ public static GtkTray CreateTray (TrayModel viewModel)
+ {
+#if APPINDICATOR
+ return new AppIndicatorTray (viewModel);
+#else
+ return new StatusIconTray (viewModel);
+#endif
+ }
+
+ public GtkTray (TrayModel viewModel)
{
if (viewModel == null)
throw new ArgumentNullException ("viewModel");
@@ -41,12 +49,12 @@ namespace Tasque
var newTask = viewModel.NewTask;
newTask.CanExecuteChanged += delegate {
- UIManager.GetAction ("/TrayIconMenu/NewTaskAction").Sensitive = newTask.CanExecute;
+ UIManager.GetAction ("/TrayIconMenu/NewTaskAction").Sensitive = newTask.CanExecute (null);
};
var refresh = viewModel.Refresh;
refresh.CanExecuteChanged += delegate {
- UIManager.GetAction ("/TrayIconMenu/RefreshAction").Sensitive = refresh.CanExecute;
+ UIManager.GetAction ("/TrayIconMenu/RefreshAction").Sensitive = refresh.CanExecute (null);
};
}
@@ -69,18 +77,18 @@ namespace Tasque
ActionGroup trayActionGroup = new ActionGroup ("Tray");
trayActionGroup.Add (new ActionEntry [] {
new ActionEntry ("NewTaskAction", Stock.New, Catalog.GetString ("New Task ..."),
- null, null, delegate { ViewModel.NewTask.Execute (); }),
- new ActionEntry ("AboutAction", Stock.About, delegate { ViewModel.ShowAbout.Execute (); }),
+ null, null, delegate { ViewModel.NewTask.Execute (null); }),
+ new ActionEntry ("AboutAction", Stock.About, delegate { ViewModel.ShowAbout.Execute (null); }),
new ActionEntry ("PreferencesAction", Stock.Preferences,
- delegate { ViewModel.ShowPreferences.Execute (); }),
+ delegate { ViewModel.ShowPreferences.Execute (null); }),
new ActionEntry ("RefreshAction", Stock.Execute, Catalog.GetString ("Refresh Tasks ..."),
- null, null, delegate { ViewModel.Refresh.Execute (); }),
- new ActionEntry ("QuitAction", Stock.Quit, delegate { ViewModel.Quit.Execute (); })
+ null, null, delegate { ViewModel.Refresh.Execute (null); }),
+ new ActionEntry ("QuitAction", Stock.Quit, delegate { ViewModel.Quit.Execute (null); })
});
ToggleTaskWindowAction = new Gtk.Action ("ToggleTaskWindowAction", null);
ToggleTaskWindowAction.ActionGroup = trayActionGroup;
- ToggleTaskWindowAction.Activated += delegate { ViewModel.ToggleTaskWindow.Execute (); };
+ ToggleTaskWindowAction.Activated += delegate { ViewModel.ToggleTaskWindow.Execute (null); };
uiManager = new UIManager ();
uiManager.AddUiFromString (MenuXml);
@@ -90,38 +98,38 @@ namespace Tasque
void RefreshTrayIconTooltip ()
{
- var sb = new StringBuilder ();
- if (overdue_tasks != null) {
- int count = overdue_tasks.Count;
-
- if (count > 0) {
- sb.Append (String.Format (Catalog.GetPluralString ("{0} task is Overdue\n", "{0} tasks are Overdue\n", count), count));
- }
- }
-
- if (today_tasks != null) {
- int count = today_tasks.Count;
-
- if (count > 0) {
- sb.Append (String.Format (Catalog.GetPluralString ("{0} task for Today\n", "{0} tasks for Today\n", count), count));
- }
- }
-
- if (tomorrow_tasks != null) {
- int count = tomorrow_tasks.Count;
-
- if (count > 0) {
- sb.Append (String.Format (Catalog.GetPluralString ("{0} task for Tomorrow\n", "{0} tasks for Tomorrow\n", count), count));
- }
- }
-
- if (sb.Length == 0) {
- // Translators: This is the status icon's tooltip. When no tasks are overdue, due today, or due tomorrow, it displays this fun message
- trayIcon.Tooltip = Catalog.GetString ("Tasque Rocks");
- return;
- }
-
- trayIcon.Tooltip = sb.ToString ().TrimEnd ('\n');
+// var sb = new StringBuilder ();
+// if (overdue_tasks != null) {
+// int count = overdue_tasks.Count;
+//
+// if (count > 0) {
+// sb.Append (String.Format (Catalog.GetPluralString ("{0} task is Overdue\n", "{0} tasks are Overdue\n", count), count));
+// }
+// }
+//
+// if (today_tasks != null) {
+// int count = today_tasks.Count;
+//
+// if (count > 0) {
+// sb.Append (String.Format (Catalog.GetPluralString ("{0} task for Today\n", "{0} tasks for Today\n", count), count));
+// }
+// }
+//
+// if (tomorrow_tasks != null) {
+// int count = tomorrow_tasks.Count;
+//
+// if (count > 0) {
+// sb.Append (String.Format (Catalog.GetPluralString ("{0} task for Tomorrow\n", "{0} tasks for Tomorrow\n", count), count));
+// }
+// }
+//
+// if (sb.Length == 0) {
+// // Translators: This is the status icon's tooltip. When no tasks are overdue, due today, or due tomorrow, it displays this fun message
+// trayIcon.Tooltip = Catalog.GetString ("Tasque Rocks");
+// return;
+// }
+//
+// trayIcon.Tooltip = sb.ToString ().TrimEnd ('\n');
}
UIManager uiManager;
diff --git a/src/Tasque.Gtk/StatusIconTray.cs b/src/Tasque.Gtk/StatusIconTray.cs
index d1ee86d..6591603 100644
--- a/src/Tasque.Gtk/StatusIconTray.cs
+++ b/src/Tasque.Gtk/StatusIconTray.cs
@@ -28,11 +28,11 @@ using Tasque.UIModel.Legacy;
namespace Tasque
{
- public class StatusIconTray : GtkTrayBase
+ public class StatusIconTray : GtkTray
{
public StatusIconTray (TrayModel viewModel) : base (viewModel)
{
- tray = new StatusIcon (Utilities.GetIcon (ViewModel.IconName));
+ tray = new StatusIcon (Utilities.GetIcon (ViewModel.IconName, 16));
tray.Visible = true;
tray.Activate += HandleActivate;
tray.PopupMenu += HandlePopupMenu;
diff --git a/src/Tasque.Gtk/TaskGroup.cs b/src/Tasque.Gtk/TaskGroup.cs
index 138f422..125f5e1 100644
--- a/src/Tasque.Gtk/TaskGroup.cs
+++ b/src/Tasque.Gtk/TaskGroup.cs
@@ -30,6 +30,7 @@ using System.Collections;
using System.Linq;
using Gtk;
using System.Collections.Generic;
+using Tasque.UIModel.Legacy;
namespace Tasque
{
diff --git a/src/Tasque.Gtk/Utilities.cs b/src/Tasque.Gtk/Utilities.cs
index f4bafa6..cafeb8d 100644
--- a/src/Tasque.Gtk/Utilities.cs
+++ b/src/Tasque.Gtk/Utilities.cs
@@ -35,6 +35,7 @@
using System;
using Gdk;
using Mono.Unix;
+using System.Diagnostics;
namespace Tasque
{
diff --git a/src/libtasqueui/Legacy/DueDateOptionsModel.cs b/src/libtasqueui/Legacy/DueDateOptionsModel.cs
index 45ae7c7..1b42534 100644
--- a/src/libtasqueui/Legacy/DueDateOptionsModel.cs
+++ b/src/libtasqueui/Legacy/DueDateOptionsModel.cs
@@ -47,7 +47,7 @@ namespace Tasque.UIModel.Legacy
protected override bool CanExecuteSelectOption (OptionItem parameter)
{
- return parameter != parameter [9] || customDate != DateTime.MinValue;
+ return parameter != Options [9] || customDate != DateTime.MinValue;
}
protected override void OnClose ()
@@ -66,16 +66,16 @@ namespace Tasque.UIModel.Legacy
ProtectedOptions.Clear ();
var today = DateTime.Today;
- ProtectedOptions.Add (today, new DueDateOption (today.ToString (
+ ProtectedOptions.Add (new DueDateOption (today, today.ToString (
Catalog.GetString ("M/d - ")) + Catalog.GetString ("Today")));
var tomorrow = today.AddDays (1);
- ProtectedOptions.Add (tomorrow, new DueDateOption (
- tomorrow.ToString (Catalog.GetString ("M/d - ")) + Catalog.GetString ("Tomorrow")));
+ ProtectedOptions.Add (new DueDateOption (tomorrow, tomorrow.ToString (
+ Catalog.GetString ("M/d - ")) + Catalog.GetString ("Tomorrow")));
for (int i = 2; i < 7; i++) {
var date = today.AddDays (i);
- ProtectedOptions.Add (date, new DueDateOption (date.ToString (
+ ProtectedOptions.Add (new DueDateOption (date, date.ToString (
Catalog.GetString ("M/d - ddd"))));
}
diff --git a/src/libtasqueui/Legacy/NativeApplication.cs b/src/libtasqueui/Legacy/NativeApplication.cs
index 3cb6954..6f9cd34 100644
--- a/src/libtasqueui/Legacy/NativeApplication.cs
+++ b/src/libtasqueui/Legacy/NativeApplication.cs
@@ -45,6 +45,8 @@ namespace Tasque.UIModel.Legacy
if (confDir == null)
throw new ArgumentNullException ("confDir");
+ currentDay = DateTime.Today;
+
ConfDir = confDir;
if (!Directory.Exists (confDir))
Directory.CreateDirectory (confDir);
@@ -338,6 +340,22 @@ namespace Tasque.UIModel.Legacy
}
}
+ protected void CheckForDaySwitch ()
+ {
+ if (DateTime.Today != currentDay) {
+ Debug.WriteLine ("Day has changed, reloading tasks");
+ currentDay = DateTime.Today;
+
+ // Reinitialize window according to new date
+// if (TaskWindow.IsOpen)
+// TaskWindow.Reinitialize (true);
+
+// UnhookFromTooltipTaskGroupModels ();
+// RebuildTooltipTaskGroupModels ();
+// RefreshTrayIconTooltip ();
+ }
+ }
+
Preferences preferences;
Backend customBackend;
@@ -349,5 +367,7 @@ namespace Tasque.UIModel.Legacy
TrayModel tray;
ViewModelRoot viewModelRoot;
+
+ DateTime currentDay;
}
}
diff --git a/src/libtasqueui/Legacy/PreferencesDialogModel.cs b/src/libtasqueui/Legacy/PreferencesDialogModel.cs
index cf32cd9..b208aa9 100644
--- a/src/libtasqueui/Legacy/PreferencesDialogModel.cs
+++ b/src/libtasqueui/Legacy/PreferencesDialogModel.cs
@@ -26,9 +26,9 @@
using System;
namespace Tasque.UIModel.Legacy
{
- public class PreferencesDialogModel
+ public class PreferencesDialogModel : ViewModel
{
- public PreferencesDialogModel ()
+ public PreferencesDialogModel (ViewModel parent) : base (parent)
{
}
}
diff --git a/src/libtasqueui/Legacy/TaskGroupModelFactory.cs b/src/libtasqueui/Legacy/TaskGroupModelFactory.cs
index 9bd328c..820c9ec 100644
--- a/src/libtasqueui/Legacy/TaskGroupModelFactory.cs
+++ b/src/libtasqueui/Legacy/TaskGroupModelFactory.cs
@@ -30,37 +30,37 @@ namespace Tasque.UIModel.Legacy
{
public static class TaskGroupModelFactory
{
- public static TaskGroupModel CreateTodayModel (IEnumerable<Task> tasks)
- {
- DateTime rangeStart = DateTime.Now;
- rangeStart = new DateTime (rangeStart.Year, rangeStart.Month,
- rangeStart.Day, 0, 0, 0);
- DateTime rangeEnd = DateTime.Now;
- rangeEnd = new DateTime (rangeEnd.Year, rangeEnd.Month,
- rangeEnd.Day, 23, 59, 59);
- return new TaskGroupModel (rangeStart, rangeEnd, tasks);
- }
-
- public static TaskGroupModel CreateOverdueModel (IEnumerable<Task> tasks)
- {
- DateTime rangeStart = DateTime.MinValue;
- DateTime rangeEnd = DateTime.Now.AddDays (-1);
- rangeEnd = new DateTime (rangeEnd.Year, rangeEnd.Month, rangeEnd.Day,
- 23, 59, 59);
-
- return new TaskGroupModel (rangeStart, rangeEnd, tasks);
- }
-
- public static TaskGroupModel CreateTomorrowModel (IEnumerable<Task> tasks)
- {
- DateTime rangeStart = DateTime.Now.AddDays (1);
- rangeStart = new DateTime (rangeStart.Year, rangeStart.Month,
- rangeStart.Day, 0, 0, 0);
- DateTime rangeEnd = DateTime.Now.AddDays (1);
- rangeEnd = new DateTime (rangeEnd.Year, rangeEnd.Month,
- rangeEnd.Day, 23, 59, 59);
-
- return new TaskGroupModel (rangeStart, rangeEnd, tasks);
- }
+// public static TaskGroupModel CreateTodayModel (IEnumerable<Task> tasks)
+// {
+// DateTime rangeStart = DateTime.Now;
+// rangeStart = new DateTime (rangeStart.Year, rangeStart.Month,
+// rangeStart.Day, 0, 0, 0);
+// DateTime rangeEnd = DateTime.Now;
+// rangeEnd = new DateTime (rangeEnd.Year, rangeEnd.Month,
+// rangeEnd.Day, 23, 59, 59);
+// return new TaskGroupModel (rangeStart, rangeEnd, tasks);
+// }
+//
+// public static TaskGroupModel CreateOverdueModel (IEnumerable<Task> tasks)
+// {
+// DateTime rangeStart = DateTime.MinValue;
+// DateTime rangeEnd = DateTime.Now.AddDays (-1);
+// rangeEnd = new DateTime (rangeEnd.Year, rangeEnd.Month, rangeEnd.Day,
+// 23, 59, 59);
+//
+// return new TaskGroupModel (rangeStart, rangeEnd, tasks);
+// }
+//
+// public static TaskGroupModel CreateTomorrowModel (IEnumerable<Task> tasks)
+// {
+// DateTime rangeStart = DateTime.Now.AddDays (1);
+// rangeStart = new DateTime (rangeStart.Year, rangeStart.Month,
+// rangeStart.Day, 0, 0, 0);
+// DateTime rangeEnd = DateTime.Now.AddDays (1);
+// rangeEnd = new DateTime (rangeEnd.Year, rangeEnd.Month,
+// rangeEnd.Day, 23, 59, 59);
+//
+// return new TaskGroupModel (rangeStart, rangeEnd, tasks);
+// }
}
}
diff --git a/src/libtasqueui/Legacy/TrayModel.cs b/src/libtasqueui/Legacy/TrayModel.cs
index 724ef40..f0368e8 100644
--- a/src/libtasqueui/Legacy/TrayModel.cs
+++ b/src/libtasqueui/Legacy/TrayModel.cs
@@ -48,6 +48,6 @@ namespace Tasque.UIModel.Legacy
public ICommand ShowPreferences { get { throw new NotImplementedException (); } }
- public ICommand ToggleTaskWindow { get { throw new NotImplementedException (); } }
+ public Command ToggleTaskWindow { get { throw new NotImplementedException (); } }
}
}
diff --git a/src/libtasqueui/Legacy/ViewModelRoot.cs b/src/libtasqueui/Legacy/ViewModelRoot.cs
index fe9bdd5..9008ccf 100644
--- a/src/libtasqueui/Legacy/ViewModelRoot.cs
+++ b/src/libtasqueui/Legacy/ViewModelRoot.cs
@@ -58,7 +58,7 @@ namespace Tasque.UIModel.Legacy
return showPreferencesDialog ?? (showPreferencesDialog = new RelayCommand () {
ExecuteAction = delegate {
if (PreferencesDialogModel == null)
- PreferencesDialogModel = new PreferencesDialogModel (this);
+ PreferencesDialogModel = new PreferencesDialogModel (this);
OnPropertyChanged ("PreferencesDialogModel");
}
});
diff --git a/src/libtasqueui/OptionsModel.cs b/src/libtasqueui/OptionsModel.cs
index d9a3bf8..d648293 100644
--- a/src/libtasqueui/OptionsModel.cs
+++ b/src/libtasqueui/OptionsModel.cs
@@ -36,7 +36,7 @@ namespace Tasque.UIModel
internal OptionsModel (ViewModel parent) : this (null, parent) {}
internal OptionsModel (IValueConverter<T, string> converter, ViewModel parent)
- : this (new OptionItem [] {}, converter, parent) {}
+ : this (new T [] {}, converter, parent) {}
internal OptionsModel (IEnumerable<T> optionValues, IValueConverter<T, string> converter,
ViewModel parent) : base (parent)
@@ -102,7 +102,7 @@ namespace Tasque.UIModel
}
public virtual string Text {
- get { return converter == null ? Value.ToString () : converter.Convert (Value); }
+ get { return converter == null ? Value.ToString () : converter.Convert (Value, null, null); }
}
internal T Value { get; private set; }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]