コード例 #1
0
        /// <summary>
        /// If the user has just clicked on the checkbutton, the standard
        /// behavior of the OnActivated should be suppressed.
        /// </summary>
        protected override void OnActivated()
        {
            // Open the option dialog
            if (!inhibit_activate)
            {
                TaskOptionsDialog dialog;
                if (options_dialogs.ContainsKey(task))
                {
                    dialog = options_dialogs [task];
                }
                else
                {
                    dialog =
                        new TaskOptionsDialog(
                            null,
                            Gtk.DialogFlags.DestroyWithParent,
                            task);
                    dialog.WindowPosition  = Gtk.WindowPosition.CenterOnParent;
                    dialog.DeleteEvent    += OnOptionsDialogDeleted;
                    options_dialogs [task] = dialog;
                }

                dialog.Present();
                dialog.GrabFocus();
            }
        }
コード例 #2
0
        void OnOptionsDialogDeleted(object sender, Gtk.DeleteEventArgs args)
        {
            TaskOptionsDialog dialog = sender as TaskOptionsDialog;

            if (dialog == null)
            {
                return;
            }

            if (options_dialogs.ContainsKey(dialog.Task))
            {
                options_dialogs.Remove(dialog.Task);
            }
        }
コード例 #3
0
ファイル: TaskListWindow.cs プロジェクト: shubhtr/tomboy-1
        void OnOpenTask(object sender, EventArgs args)
        {
            Task task = GetSelectedTask();

            if (task == null)
            {
                return;
            }

            TaskOptionsDialog dialog = new TaskOptionsDialog(this, DialogFlags.DestroyWithParent, task);

            dialog.WindowPosition = Gtk.WindowPosition.CenterOnParent;
            dialog.Run();
            dialog.Destroy();
        }
コード例 #4
0
        void OnOpenTaskOptions(object sender, EventArgs args)
        {
            TaskMenuItem item = sender as TaskMenuItem;

            if (item == null)
            {
                return;
            }

            Task task =
                TasksApplicationAddin.DefaultTaskManager.FindByUri(
                    item.TaskUri);

            if (task == null)
            {
                return;
            }

            TaskOptionsDialog dialog;

            if (options_dialogs.ContainsKey(task))
            {
                dialog = options_dialogs [task];
            }
            else
            {
                dialog =
                    new TaskOptionsDialog(
                        Note.Window,
                        Gtk.DialogFlags.DestroyWithParent,
                        task);
                dialog.WindowPosition  = Gtk.WindowPosition.CenterOnParent;
                dialog.DeleteEvent    += OnOptionsDialogDeleted;
                options_dialogs [task] = dialog;
            }

            dialog.Show();
            dialog.GrabFocus();
        }
コード例 #5
0
		void OnOpenTaskOptions (object sender, EventArgs args)
		{
			TaskMenuItem item = sender as TaskMenuItem;
			if (item == null)
				return;

			Task task =
			        TasksApplicationAddin.DefaultTaskManager.FindByUri (
			                item.TaskUri);
			if (task == null)
				return;

			TaskOptionsDialog dialog;
			if (options_dialogs.ContainsKey (task)) {
				dialog = options_dialogs [task];
			} else {
				dialog =
				        new TaskOptionsDialog (
				        Note.Window,
				        Gtk.DialogFlags.DestroyWithParent,
				        task);
				dialog.WindowPosition = Gtk.WindowPosition.CenterOnParent;
				dialog.DeleteEvent += OnOptionsDialogDeleted;
				options_dialogs [task] = dialog;
			}

			dialog.Show ();
			dialog.GrabFocus ();
		}
コード例 #6
0
		/// <summary>
		/// If the user has just clicked on the checkbutton, the standard
		/// behavior of the OnActivated should be suppressed.
		/// </summary>
		protected override void OnActivated ()
		{
			// Open the option dialog
			if (!inhibit_activate) {
				TaskOptionsDialog dialog;
				if (options_dialogs.ContainsKey (task)) {
					dialog = options_dialogs [task];
				} else {
					dialog =
					        new TaskOptionsDialog (
					        null,
					        Gtk.DialogFlags.DestroyWithParent,
					        task);
					dialog.WindowPosition = Gtk.WindowPosition.CenterOnParent;
					dialog.DeleteEvent += OnOptionsDialogDeleted;
					options_dialogs [task] = dialog;
				}

				dialog.Present ();
				dialog.GrabFocus ();
			}
		}
コード例 #7
0
		void OnOpenTask (object sender, EventArgs args)
		{
			Task task = GetSelectedTask ();
			if (task == null)
				return;

			TaskOptionsDialog dialog = new TaskOptionsDialog (this, DialogFlags.DestroyWithParent, task);
			dialog.WindowPosition = Gtk.WindowPosition.CenterOnParent;
			dialog.Run ();
			dialog.Destroy ();
		}