コード例 #1
0
ファイル: TaskListWindow.cs プロジェクト: shubhtr/tomboy-1
        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;
        }
コード例 #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;
		}
コード例 #3
0
        private void OnOpenToDoListAction()
        {
            TaskListWindow task_list_window = TaskListWindow.GetInstance(manager);

            if (task_list_window != null)
            {
                task_list_window.Present();
            }
        }
コード例 #4
0
ファイル: TaskListWindow.cs プロジェクト: shubhtr/tomboy-1
 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);
 }
コード例 #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;
		}