public InactivateTimer(TaskTreeView treeView, Gtk.TreeIter taskIter, Task taskToComplete, uint delayInSeconds) { tree = treeView; iter = taskIter; path = treeView.Model.GetPath (iter); task = taskToComplete; secondsLeft = delayInSeconds; delay = delayInSeconds * 1000; // Convert to milliseconds pulseTimeoutId = 0; }
public InactivateTimer(TaskTreeView treeView, Gtk.TreeIter taskIter, ITask taskToComplete, uint delayInSeconds) { tree = treeView; iter = taskIter; path = treeView.Model.GetPath(iter); task = taskToComplete; secondsLeft = delayInSeconds; delay = delayInSeconds * 1000; // Convert to milliseconds pulseTimeoutId = 0; }
public TaskGroup(string groupName, DateTime rangeStart, DateTime rangeEnd, Gtk.TreeModel tasks) { hideWhenEmpty = true; // TODO: Add a date time event watcher so that when we rollover to // a new day, we can update the rangeStart and rangeEnd times. The // ranges will be used to determine whether tasks fit into certain // groups in the main TaskWindow. Reference Tomboy's NoteOfTheDay // add-in for code that reacts on day changes. filteredTasks = CreateModel(rangeStart, rangeEnd, tasks); filteredTasks.ShowCompletedTasks = Application.Preferences.GetBool( Preferences.ShowCompletedTasksKey); Application.Preferences.SettingChanged += OnSettingChanged; // TODO: Add something to watch events so that the group will // automatically refilter and display/hide itself accordingly. // // Build the UI // // // Group Header // // Gtk.EventBox eb = new Gtk.EventBox(); // eb.Show(); // eb.BorderWidth = 0; // eb.ModifyBg(Gtk.StateType.Normal, new Gdk.Color(211,215,199)); // eb.ModifyBase(Gtk.StateType.Normal, new Gdk.Color(211,215,199)); Gtk.HBox headerHBox = new Gtk.HBox(false, 0); header = new Gtk.Label(); header.UseMarkup = true; header.UseUnderline = false; header.Markup = GetHeaderMarkup(groupName); header.Xalign = 0; header.Show(); // eb.Add(header); // PackStart (eb, false, false, 0); headerHBox.PackStart(header, false, false, 0); // spacer Gtk.Label spacerLabel = new Gtk.Label(string.Empty); spacerLabel.Show(); headerHBox.PackStart(spacerLabel, true, true, 0); extraWidgetHBox = new Gtk.HBox(false, 0); extraWidgetHBox.Show(); headerHBox.PackStart(extraWidgetHBox, false, false, 0); headerHBox.Show(); PackStart(headerHBox, false, false, 5); // // Group TreeView // treeView = new TaskTreeView(filteredTasks); treeView.Show(); PackStart(treeView, true, true, 0); treeView.NumberOfTasksChanged += OnNumberOfTasksChanged; treeView.RowActivated += OnRowActivated; treeView.ButtonPressEvent += OnButtonPressed; }
public TaskGroup(string groupName, DateTime rangeStart, DateTime rangeEnd, IEnumerable<Task> tasks) { hideWhenEmpty = true; // TODO: Add a date time event watcher so that when we rollover to // a new day, we can update the rangeStart and rangeEnd times. The // ranges will be used to determine whether tasks fit into certain // groups in the main TaskWindow. Reference Tomboy's NoteOfTheDay // add-in for code that reacts on day changes. filteredTasks = CreateModel (rangeStart, rangeEnd, tasks); filteredTasks.ShowCompletedTasks = GtkApplication.Instance.Preferences.GetBool ( Preferences.ShowCompletedTasksKey); GtkApplication.Instance.Preferences.SettingChanged += OnSettingChanged; // TODO: Add something to watch events so that the group will // automatically refilter and display/hide itself accordingly. // // Build the UI // // // Group Header // // Gtk.EventBox eb = new Gtk.EventBox(); // eb.Show(); // eb.BorderWidth = 0; // eb.ModifyBg(Gtk.StateType.Normal, new Gdk.Color(211,215,199)); // eb.ModifyBase(Gtk.StateType.Normal, new Gdk.Color(211,215,199)); Gtk.HBox headerHBox = new Gtk.HBox (false, 0); header = new Gtk.Label (); header.UseMarkup = true; header.UseUnderline = false; header.Markup = GetHeaderMarkup (groupName); header.Xalign = 0; header.Show (); // eb.Add(header); // PackStart (eb, false, false, 0); headerHBox.PackStart (header, false, false, 0); // spacer Gtk.Label spacerLabel = new Gtk.Label (string.Empty); spacerLabel.Show (); headerHBox.PackStart (spacerLabel, true, true, 0); extraWidgetHBox = new Gtk.HBox (false, 0); extraWidgetHBox.Show (); headerHBox.PackStart (extraWidgetHBox, false, false, 0); headerHBox.Show (); PackStart (headerHBox, false, false, 5); // // Group TreeView // treeView = new TaskTreeView (filteredTasks); treeView.Show (); PackStart (treeView, true, true, 0); treeView.NumberOfTasksChanged += OnNumberOfTasksChanged; treeView.RowActivated += OnRowActivated; treeView.ButtonPressEvent += OnButtonPressed; }