Ejemplo n.º 1
0
        void OnCloseWindow(object sender, EventArgs args)
        {
            // Disconnect external signal handlers to prevent bloweup
            TaskManager.TaskAdded         -= OnTaskAdded;
            TaskManager.TaskDeleted       -= OnTaskDeleted;
            TaskManager.TaskStatusChanged -= OnTaskStatusChanged;

            // The following code has to be done for the MenuBar to
            // appear properly the next time this window is opened.
            if (menu_bar != null)
            {
                content_vbox.Remove(menu_bar);
                ActionManager am = Tomboy.ActionManager;
                am ["NewTaskAction"].Activated             -= OnNewTask;
                am ["OpenTaskAction"].Activated            -= OnOpenTask;
                am ["CloseTaskListWindowAction"].Activated -= OnCloseWindow;
                am ["DeleteTaskAction"].Activated          -= OnDeleteTask;
                am ["ShowTaskHelpAction"].Activated        -= OnShowHelp;
            }

            Tomboy.ActionManager.UI.RemoveActionGroup(action_group);
            Tomboy.ActionManager.UI.RemoveUi(menubar_ui);

            Hide();
            Destroy();
            instance = null;
        }
Ejemplo n.º 2
0
		public static TaskListWindow GetInstance (TaskManager manager)
		{
			if (instance == null)
				instance = new TaskListWindow (manager);
			System.Diagnostics.Debug.Assert (
			        instance.manager == manager,
			        "Multiple TaskManagers not supported");
			return instance;
		}
        private void OnOpenToDoListAction()
        {
            TaskListWindow task_list_window = TaskListWindow.GetInstance(manager);

            if (task_list_window != null)
            {
                task_list_window.Present();
            }
        }
Ejemplo n.º 4
0
 public static TaskListWindow GetInstance(TaskManager manager)
 {
     if (instance == null)
     {
         instance = new TaskListWindow(manager);
     }
     System.Diagnostics.Debug.Assert(
         instance.manager == manager,
         "Multiple TaskManagers not supported");
     return(instance);
 }
Ejemplo n.º 5
0
		void OnCloseWindow (object sender, EventArgs args)
		{
			// Disconnect external signal handlers to prevent bloweup
			TaskManager.TaskAdded -= OnTaskAdded;
			TaskManager.TaskDeleted -= OnTaskDeleted;
			TaskManager.TaskStatusChanged -= OnTaskStatusChanged;

			// The following code has to be done for the MenuBar to
			// appear properly the next time this window is opened.
			if (menu_bar != null) {
				content_vbox.Remove (menu_bar);
				ActionManager am = Tomboy.ActionManager;
				am ["NewTaskAction"].Activated -= OnNewTask;
				am ["OpenTaskAction"].Activated -= OnOpenTask;
				am ["CloseTaskListWindowAction"].Activated -= OnCloseWindow;
				am ["DeleteTaskAction"].Activated -= OnDeleteTask;
				am ["ShowTaskHelpAction"].Activated -= OnShowHelp;
			}

			Tomboy.ActionManager.UI.RemoveActionGroup (action_group);
			Tomboy.ActionManager.UI.RemoveUi (menubar_ui);

			Hide ();
			Destroy ();
			instance = null;
		}