Exemple #1
0
        void OnCategoryToggled(object sender, Gtk.ToggledArgs args)
        {
            Logger.Debug("OnCategoryToggled");
            Gtk.TreeIter iter;
            Gtk.TreePath path = new Gtk.TreePath(args.Path);
            if (!categoriesTree.Model.GetIter(out iter, path))
            {
                return;                 // Do nothing
            }
            ICategory category = categoriesTree.Model.GetValue(iter, 0) as ICategory;

            if (category == null)
            {
                return;
            }

            //if (categoriesToHide == null)
            //	categoriesToHide = BuildNewCategoryList ();

            if (categoriesToHide.Contains(category.Name))
            {
                categoriesToHide.Remove(category.Name);
            }
            else
            {
                categoriesToHide.Add(category.Name);
            }

            Application.Preferences.SetStringList(Preferences.HideInAllCategory,
                                                  categoriesToHide);
        }
        public void AddReference(object sender, Gtk.ToggledArgs e)
        {
            Gtk.TreeIter iter;
            store.GetIterFromString(out iter, e.Path);
            ReferenceType rt       = (ReferenceType)store.GetValue(iter, ColType);
            string        fullName = (string)store.GetValue(iter, ColFullName);

            if ((bool)store.GetValue(iter, ColSelected) == false)
            {
                store.SetValue(iter, ColSelected, true);
                if (rt == ReferenceType.Package)
                {
                    selectDialog.AddReference(new ProjectReference((SystemAssembly)store.GetValue(iter, ColAssembly)));
                }
                else
                {
                    selectDialog.AddReference(new ProjectReference(rt, fullName));
                }
            }
            else
            {
                store.SetValue(iter, ColSelected, false);
                selectDialog.RemoveReference(rt, fullName);
            }
        }
Exemple #3
0
        // we need to manually set the toggle when selected otherwise
        // it won't show in the gui.
        public void toggle_it(object o, Gtk.ToggledArgs args)
        {
            store.GetIterFromString(out iter, args.Path);
            bool tog = (bool)store.GetValue(iter, 0);

            store.SetValue(iter, 0, !tog);
        }
Exemple #4
0
        public void AddReference(object sender, Gtk.ToggledArgs e)
        {
            Gtk.TreeIter iter;
            store.GetIterFromString(out iter, e.Path);
            var    ainfo    = (AssemblyInfo)store.GetValue(iter, ColAssemblyInfo);
            string fullName = (string)store.GetValue(iter, ColPath);

            if (!(bool)store.GetValue(iter, ColSelected))
            {
                store.SetValue(iter, ColSelected, true);
                ainfo.Selected = true;
                AddReference(fullName);
            }
            else
            {
                store.SetValue(iter, ColSelected, false);
                ainfo.Selected = false;
                RemoveReference(fullName);

                // Ensure that this file is kept in the recents list, so it can be added later on
                if (IsExternalAssembly(fullName))
                {
                    selectDialog.RegisterFileReference(fullName);
                }
                else if (!IsNuGetAssembly(fullName))
                {
                    selectDialog.RegisterFileReference(fullName, project.ParentSolution.FileName);
                }
            }
        }
        void OnTaskListToggled(object sender, Gtk.ToggledArgs args)
        {
            Logger.Debug("OnTaskListToggled");
            Gtk.TreeIter iter;
            Gtk.TreePath path = new Gtk.TreePath(args.Path);
            if (!taskListsTree.Model.GetIter(out iter, path))
            {
                return;                 // Do nothing
            }
            ITaskList taskList = taskListsTree.Model.GetValue(iter, 0) as ITaskList;

            if (taskList == null)
            {
                return;
            }

            //if (taskListsToHide == null)
            //	taskListsToHide = BuildNewTaskListList ();

            if (taskListsToHide.Contains(taskList.Name))
            {
                taskListsToHide.Remove(taskList.Name);
            }
            else
            {
                taskListsToHide.Add(taskList.Name);
            }

            application.Preferences.SetStringList(PreferencesKeys.HideInAllTaskList,
                                                  taskListsToHide);
        }
Exemple #6
0
        public void AddReference(object sender, Gtk.ToggledArgs e)
        {
            Gtk.TreeIter iter;
            store.GetIterFromString(out iter, e.Path);
            ReferenceType rt       = (ReferenceType)store.GetValue(iter, ColType);
            string        fullName = (string)store.GetValue(iter, ColFullName);

            if ((bool)store.GetValue(iter, ColSelected) == false)
            {
                store.SetValue(iter, ColSelected, true);
                switch (rt)
                {
                case ReferenceType.Package:
                    selectDialog.AddReference(ProjectReference.CreateAssemblyReference((SystemAssembly)store.GetValue(iter, ColAssembly)));
                    break;

                case ReferenceType.Assembly:
                    selectDialog.AddReference(ProjectReference.CreateAssemblyFileReference(fullName));
                    break;

                case ReferenceType.Project:
                    selectDialog.AddReference(ProjectReference.CreateProjectReference(fullName));
                    break;
                }
            }
            else
            {
                store.SetValue(iter, ColSelected, false);
                selectDialog.RemoveReference(rt, fullName);
            }
        }
        protected virtual void OnToggled(object sender, Gtk.ToggledArgs args)
        {
            TreeIter iter;

            store.GetIterFromString(out iter, args.Path);

            bool   sel = (bool)store.GetValue(iter, 2);
            string cat = (string)store.GetValue(iter, 0);

            if (sel)
            {
                selection.Remove(cat);
            }
            else
            {
                selection.Add(cat);
            }

            store.SetValue(iter, 2, !sel);

            // A 'main' category must always be selected when a subcategory is selected
            while (store.IterParent(out iter, iter))
            {
                string txt = (string)store.GetValue(iter, 1);
                if (txt.StartsWith("<b>"))
                {
                    store.SetValue(iter, 2, true);
                    cat = (string)store.GetValue(iter, 0);
                    if (!selection.Contains(cat))
                    {
                        selection.Add(cat);
                    }
                }
            }
        }
Exemple #8
0
        void OnTaskToggled(object sender, Gtk.ToggledArgs args)
        {
            Gtk.TreePath path = new Gtk.TreePath(args.Path);
            Gtk.TreeIter iter;
            if (store_sort.GetIter(out iter, path) == false)
            {
                return;
            }

            Task task = store_sort.GetValue(iter, 0) as Task;

            if (task == null)
            {
                return;
            }

            if (task.IsComplete)
            {
                task.ReOpen();
            }
            else
            {
                task.Complete();
            }
        }
		void HandleToggled (object o, ToggledArgs args)
		{
			SetCurrentEventRow ();

			var view = (ICheckBoxCellViewFrontend) Frontend;
			IDataField field = (IDataField) view.StateField ?? view.ActiveField;

			if (!view.RaiseToggled () && (field != null)) {
				Type type = field.FieldType;

				Gtk.TreeIter iter;
				if (TreeModel.GetIterFromString (out iter, args.Path)) {
					CheckBoxState newState;

					if (view.AllowMixed && type == typeof(CheckBoxState)) {
						if (renderer.Inconsistent)
							newState = CheckBoxState.Off;
						else if (renderer.Active)
							newState = CheckBoxState.Mixed;
						else
							newState = CheckBoxState.On;
					} else {
						if (renderer.Active)
							newState = CheckBoxState.Off;
						else
							newState = CheckBoxState.On;
					}

					object newValue = type == typeof(CheckBoxState) ?
						(object) newState : (object) (newState == CheckBoxState.On);

					CellUtil.SetModelValue (TreeModel, iter, field.Index, type, newValue);
				}
			}
		}
		private void FixedToggled (object o, ToggledArgs args)
		{
			Gtk.TreeIter iter;
			if (store.GetIterFromString (out iter, args.Path)) {
				bool val = (bool) store.GetValue (iter, 0);
				store.SetValue (iter, 0, !val);
			}
		}
 private void IncludeCheckBoxToggled(object o, ToggledArgs args)
 {
     TreeIter iter;
     if (m_configStore.GetIterFromString (out iter, args.Path)) 
     {
         ConfigItemSetting itemSetting = (ConfigItemSetting)m_configStore.GetValue(iter, 3);
         itemSetting.Include = !itemSetting.Include;
     }
 }
Exemple #12
0
        protected void HandleFilterCellToggled(object o, ToggledArgs args)
        {
            Gtk.TreeIter iter;

            if (store.GetIterFromString (out iter, args.Path)) {
                bool active = !((bool)store.GetValue (iter, 1));
                UpdateSelection (iter, active);
            }
        }
 private void InputIncludeCheckBoxToggled(object o, ToggledArgs args)
 {
     TreeIter iter;
     if (m_inputsStore.GetIterFromString (out iter, args.Path)) 
     {
         ItemSetting itemSetting = (ItemSetting)m_inputsStore.GetValue(iter, 2);
         itemSetting.Include = !itemSetting.Include;
     }
 }
Exemple #14
0
		private void ItemToggled (object sender, ToggledArgs args)
		{
			int column = columns.IndexOf (sender);

 			Gtk.TreeIter iter;
 			if (store.GetIterFromString (out iter, args.Path)) {
 				bool val = (bool) store.GetValue (iter, column);
 				store.SetValue (iter, column, !val);
 			}
		}
		void HandleToggled (object o, ToggledArgs args)
		{
			TreeIter iter;
			Check (store.GetIter (out iter, new TreePath (args.Path)));
			var val = !(bool)store.GetValue (iter, COL_SELECTED);
			store.SetValue (iter, COL_SELECTED, val);

			selectedCount += val ? 1 : -1;
			addButton.Sensitive = selectedCount > 0;
		}
Exemple #16
0
        void onCellSelectToggled(object o, ToggledArgs args)
        {
            TreeIter iter;

            if (MetersList.GetIter (out iter, new TreePath(args.Path)))
            {
                bool old = (bool) MetersList.GetValue(iter,1);
                MetersList.SetValue(iter, 1, !old);
            }
        }
        void OnToggled(object sender, Gtk.ToggledArgs args)
        {
            TreeIter iter;

            store.GetIterFromString(out iter, args.Path);
            DeployFile file = (DeployFile)store.GetValue(iter, ColObject);
            bool       inc  = !builder.IsFileIncluded(file);

            builder.SetFileIncluded(file, inc);
            store.SetValue(iter, ColIncluded, inc);
        }
Exemple #18
0
        void crt_toggled(object o, ToggledArgs args)
        {
            TreeIter iter;
            Console.WriteLine("Toggled");
            Gtk.ListStore store = (Gtk.ListStore) tvBar.Model;

            if (store.GetIter (out iter, new TreePath(args.Path))) {
                bool old = (bool) store.GetValue(iter, 3);
                store.SetValue(iter, 3, !old);
            }
        }
Exemple #19
0
        void OnTaskToggled(object sender, Gtk.ToggledArgs args)
        {
            Logger.Debug("OnTaskToggled");
            Gtk.TreeIter iter;
            Gtk.TreePath path = new Gtk.TreePath(args.Path);
            if (!Model.GetIter(out iter, path))
            {
                return;                 // Do nothing
            }
            ITask task = Model.GetValue(iter, 0) as ITask;

            if (task == null)
            {
                return;
            }

            // remove any timer set up on this task
            InactivateTimer.CancelTimer(task);

            if (task.State == TaskState.Active)
            {
                bool showCompletedTasks =
                    Application.Preferences.GetBool(
                        Preferences.ShowCompletedTasksKey);

                // When showCompletedTasks is true, complete the tasks right
                // away.  Otherwise, set a timer and show the timer animation
                // before marking the task completed.
                if (showCompletedTasks)
                {
                    task.Complete();
                    ShowCompletedTaskStatus();
                }
                else
                {
                    task.Inactivate();

                    // Read the inactivate timeout from a preference
                    int timeout =
                        Application.Preferences.GetInt(Preferences.InactivateTimeoutKey);
                    Logger.Debug("Read timeout from prefs: {0}", timeout);
                    InactivateTimer timer =
                        new InactivateTimer(this, iter, task, (uint)timeout);
                    timer.StartTimer();
                    toggled = true;
                }
            }
            else
            {
                status = Catalog.GetString("Action Canceled");
                TaskWindow.ShowStatus(status);
                task.Activate();
            }
        }
		void OnToggleItem (object ob, Gtk.ToggledArgs args)
		{
			Gtk.TreeIter it;
			if (store.GetIterFromString (out it, args.Path)) {
				bool b = (bool) store.GetValue (it, ColChecked);
				ItemToolboxNode item = (ItemToolboxNode) store.GetValue (it, ColItem);
				if (!b)
					currentItems.Add (item, item);
				else
					currentItems.Remove (item);
				store.SetValue (it, ColChecked, !b);
			}
		}
Exemple #21
0
        protected virtual void OnCellRendererToggled(object sender, ToggledArgs e)
        {
            TreeIter iter;

            if (store.GetIter (out iter, new TreePath(e.Path))) {
                Addin addin = store.GetValue (iter, 2) as Addin;
                bool old = (bool)store.GetValue (iter, 1);

                if (addin != null) {
                    addin.Enabled = !old;
                    store.SetValue (iter, 1, !old);
                }
            }
        }
 public void AddReference(object sender, Gtk.ToggledArgs e)
 {
     Gtk.TreeIter iter;
     store.GetIterFromString(out iter, e.Path);
     if ((bool)store.GetValue(iter, 3) == false)
     {
         store.SetValue(iter, 3, true);
         ProjectReference pr = new ProjectReference((SystemAssembly)store.GetValue(iter, 2));
         selectDialog.AddReference(pr);
     }
     else
     {
         store.SetValue(iter, 3, false);
         selectDialog.RemoveReference(ReferenceType.Gac, (string)store.GetValue(iter, 4));
     }
 }
    private void HandleLoopCellToggled(object o, Gtk.ToggledArgs args)
    {
        Gtk.TreeIter iter;
        treeview_lines_store.GetIter(out iter, new Gtk.TreePath(args.Path));

        userLine line = (userLine)treeview_lines_store.GetValue(iter, 0);

        if (line.m_loop)
        {
            line.m_loop = false;
        }
        else
        {
            line.m_loop = true;
        }
    }
Exemple #24
0
 private void DoToggle(object sender, ToggledArgs args)
 {
     ListStore store = (ListStore) this.AreasTreeView.Model;
     TreePath path = new TreePath(args.Path);
     TreeIter iter;
     if(store.GetIter(out iter, path))
     {
         bool old_value = (bool) store.GetValue(iter, 0);
         long area_id = (long) store.GetValue(iter, 2);
         if(old_value)
             this.SelectedIds.Remove(area_id);
         else
             this.SelectedIds.Add(area_id);
         store.SetValue(iter, 0, !old_value);
     }
 }
        public void AddReference(object sender, Gtk.ToggledArgs e)
        {
            Gtk.TreeIter iter;
            store.GetIterFromString(out iter, e.Path);
            Project project = (Project)store.GetValue(iter, 2);

            if ((bool)store.GetValue(iter, ColSelected) == false)
            {
                store.SetValue(iter, ColSelected, true);
                selectDialog.AddReference(ProjectReference.CreateProjectReference(project));
            }
            else
            {
                store.SetValue(iter, ColSelected, false);
                selectDialog.RemoveReference(ReferenceType.Project, project.Name);
            }
        }
        void OnToggled(object sender, Gtk.ToggledArgs args)
        {
            TreeIter iter;

            store.GetIterFromString(out iter, args.Path);
            IBuildTarget ob = (IBuildTarget)store.GetValue(iter, 2);

            if (activeItems.Contains(ob))
            {
                activeItems.Remove(ob);
                if (CascadeCheckboxSelection)
                {
                    foreach (var i in GetAllChildren(ob))
                    {
                        activeItems.Remove(i);
                    }
                    SetSelection(iter, null, new HashSet <IBuildTarget> ());
                }
                else
                {
                    store.SetValue(iter, 3, false);
                }
            }
            else
            {
                activeItems.Add(ob);
                if (CascadeCheckboxSelection)
                {
                    foreach (var i in GetAllChildren(ob))
                    {
                        activeItems.Add(i);
                    }
                    SetSelection(iter, null, activeItems);
                }
                else
                {
                    store.SetValue(iter, 3, true);
                }
            }
            if (ActiveChanged != null)
            {
                ActiveChanged(this, EventArgs.Empty);
            }
        }
Exemple #27
0
    private void encoderToggled(object sender, Gtk.ToggledArgs args)
    {
        Gtk.TreeIter iter;
        listStoreAll.GetIter(out iter, new Gtk.TreePath(args.Path));

        ChronopicRegisterWindowTypes crwt = (ChronopicRegisterWindowTypes)listStoreAll.GetValue(iter, 0);

        if (!crwt.Encoder)
        {
            crwt.Unknown  = false;
            crwt.Contacts = false;
            crwt.Encoder  = true;
        }

        //store on SQL
        SqliteChronopicRegister.Update(false,
                                       new ChronopicRegisterPort(crwt.SerialNumber, ChronopicRegisterPort.Types.ENCODER),
                                       ChronopicRegisterPort.Types.ENCODER);
    }
        void OnToggled(object sender, Gtk.ToggledArgs args)
        {
            TreeIter iter;

            store.GetIterFromString(out iter, args.Path);
            SolutionItem ob = (SolutionItem)store.GetValue(iter, 2);

            if (selectedEntries.ContainsKey(ob))
            {
                selectedEntries.Remove(ob);
                store.SetValue(iter, 3, false);
                if (ob is SolutionFolder)
                {
                    foreach (SolutionItem e in ((SolutionFolder)ob).GetAllItems())
                    {
                        selectedEntries.Remove(e);
                    }
                    UpdateSelectionChecks(TreeIter.Zero, false);
                }
            }
            else
            {
                selectedEntries [ob] = ob;
                store.SetValue(iter, 3, true);
                if (ob is SolutionFolder)
                {
                    foreach (SolutionItem e in ((SolutionFolder)ob).GetAllItems())
                    {
                        if (builder.CanBuild(e))
                        {
                            selectedEntries [e] = e;
                        }
                    }
                    UpdateSelectionChecks(TreeIter.Zero, false);
                }
                SelectCommonCombine((SolutionItem)ob);
            }
            if (SelectionChanged != null)
            {
                SelectionChanged(this, EventArgs.Empty);
            }
        }
        private void HandleToggled (object o, ToggledArgs args)
        {
            TreeIter iter;      
            if (m_treeStore.GetIter(out iter, new TreePath(args.Path))) 
            {
                PackageReferenceNode node = (PackageReferenceNode)m_treeStore.GetValue(iter, 0);              
                node.State = !node.State;

                var packageReference = new TraceLab.Core.PackageSystem.PackageReference(node.Package);

                if (node.State == false) 
                {
                    PackagesViewModelHelper.RemoveReference(m_experiment, packageReference);
                }
                else if(node.State && !m_experiment.References.Contains(packageReference))
                {
                    PackagesViewModelHelper.AddReference(m_experiment, packageReference);
                }
            }
        }
Exemple #30
0
        private void OnToggled(object o, Gtk.ToggledArgs e)
        {
            TreeIter iter;

            store.GetIter(out iter, new TreePath(e.Path));
            bool value = !(bool)store.GetValue(iter, 1);

            store.SetValue(iter, 1, value);
            TorrentFile file = (TorrentFile)store.GetValue(iter, 2);

            if (file != null)
            {
                file.Priority = value ? Priority.Normal : Priority.DoNotDownload;
            }

            if (store.IterHasChild(iter))
            {
                store.IterChildren(out iter, iter);
                RecurseToggle(iter, value);
            }
        }
        void OnEnvironmentClicked(object s, Gtk.ToggledArgs args)
        {
            TreeIter iter;

            storeEnvs.GetIterFromString(out iter, args.Path);

            bool             sel = (bool)storeEnvs.GetValue(iter, 0);
            string           env = (string)storeEnvs.GetValue(iter, 2);
            StringCollection col = radioOnlyShowIn.Active ? entry.OnlyShowIn : entry.NotShowIn;

            if (sel)
            {
                col.Remove(env);
            }
            else
            {
                col.Add(env);
            }

            storeEnvs.SetValue(iter, 0, !sel);
            NotifyChanged();
        }
    private void HandleActiveCellToggled(object o, Gtk.ToggledArgs args)
    {
        bool state;

        Gtk.TreeIter iter;
        treeview_lines_store.GetIter(out iter, new Gtk.TreePath(args.Path));

        userLine line = (userLine)treeview_lines_store.GetValue(iter, 0);

        state = line.m_active;
        foreach (userLine foo in user_lines)
        {
            foo.m_active = false;
        }

        if (state)
        {
            line.m_active = false;
        }
        else
        {
            set_line_active(line);
        }
    }
		void OptionToggled (object sender, ToggledArgs e)
		{
			TreeIter iter;
			if (this.optionsStore.GetIterFromString (out iter, e.Path)) {
				bool toggled = (bool)this.optionsStore.GetValue (iter, 0);
				this.optionsStore.SetValue (iter, 0, !toggled);
				UpdateRegex ();
			}
		}
        void HandleCellToggled(object o, ToggledArgs args)
        {
            TreeIter iter;

            if (sort.GetIterFromString (out iter, args.Path)) {
                bool active = !((bool)sort.GetValue (iter, COL_ACTIVE));
                iter = sort.ConvertIterToChildIter (iter);
                iter = filter.ConvertIterToChildIter (iter);
                UpdateSelection (iter, active);
            }
        }
Exemple #35
0
		private void ItemToggled (object o, ToggledArgs args)
		{
			Gtk.TreeIter iter;
			if (store.GetIterFromString (out iter, args.Path)) {
				Task task = (Task)store.GetValue (iter, DataColumns.Task);
				task.Completed = !task.Completed;
				TaskService.FireTaskToggleEvent (this, new TaskEventArgs (task));
			}
		}
	void Cell2_Toggled(object o, ToggledArgs args)
	{
		TreeIter iter;

		if (accountData_SelectAccount.GetIter (out iter, new TreePath(args.Path))) {
			bool old = (bool) accountData_SelectAccount.GetValue(iter,1);
			accountData_SelectAccount.SetValue(iter,1,!old);
		}
		accountData_SelectAccount.GetIterFirst (out iter);

		var value = accountData_SelectAccount.GetValue(iter, 1);

		Updatelst_Of_Fb_Insta_For_Selected_Accounts ();

	}
    private void ToggleRadioButtonToggled(object o, ToggledArgs args)
    {
        Console.WriteLine("ToggleRadioButtonToggled()");
        TreeIter iter;

        // Radio button "group" behavior must be manually implemneted with something like this:
        if (this.listStore1.GetIterFirst(out iter))
        {
            do
            {
                this.listStore1.SetValue(iter, (int)Column.ToggleRadioButton, false);
            }
            while (this.listStore1.IterNext(ref iter));
        }

        if (this.listStore1.GetIterFromString(out iter, args.Path))
        {
            this.listStore1.SetValue(iter, (int)Column.ToggleRadioButton, true);
        }
    }
		void HandleRepoToggled (object o, ToggledArgs args)
		{
			Gtk.TreeIter iter;
			if (!treeStore.GetIterFromString (out iter, args.Path))
				return;
			
			bool newVal = !(bool) treeStore.GetValue (iter, 2);
			string rep = (string) treeStore.GetValue (iter, 0);
			service.Repositories.SetRepositoryEnabled (rep, newVal);
			
			treeStore.SetValue (iter, 2, newVal);
		}
		private void OnReadOnlyToggled (object o, ToggledArgs args)
		{
			TreeIter iter;
			if (store.GetIterFromString (out iter, args.Path)) {
				IField ifield = (IField) store.GetValue (iter, colFieldIndex);
				if (ifield.IsReadonly || ifield.IsLiteral)
					return;

				bool value = (bool) store.GetValue (iter, colReadOnlyIndex);
				store.SetValue (iter, colReadOnlyIndex, !value);
			}
		}
 void OnCellToggled(object sender, ToggledArgs a)
 {
     TreeIter iter;
     if (store.GetIterFromString (out iter, a.Path))
         Toggle (iter);
 }
		void ActiveToggled (object sender, ToggledArgs e)
		{
			TreeIter iter;
			if (store.GetIterFromString (out iter, e.Path)) {
				bool         isTogglod = (bool)store.GetValue (iter, 1);
				SolutionFolderItem entry     = (SolutionFolderItem)store.GetValue (iter, 3);
				if (entry is Project) {
					TranslationProjectInformation info = project.GetProjectInformation (entry, true);
					info.IsIncluded = !isTogglod;
					store.SetValue (iter, 1, !isTogglod);
				}
			}
		}
Exemple #42
0
		void HandleCellRendFuzzyToggled (object sender, ToggledArgs args)
		{
			TreeIter iter;
			if (store.GetIterFromString (out iter, args.Path)) {
				CatalogEntry entry = (CatalogEntry)store.GetValue (iter, 0);
				entry.IsFuzzy = !entry.IsFuzzy; 
				UpdateProgressBar ();
			}
		}
		void OnExplicitToggled (object o, ToggledArgs args)
		{
			TreeIter iter;
			if (!store.GetIterFromString (out iter, args.Path))
				return;

			store.SetValue (iter, colExplicitIndex, !GetExplicit (iter));
		}
		void toggled (object o, ToggledArgs e)
		{
			TreeIter iter;
			tsFiles.GetIterFromString (out iter, e.Path);
			bool newsetting = !(bool)tsFiles.GetValue (iter, 1);
			tsFiles.SetValue (iter, 1, newsetting);
			if (tsFiles.IterHasChild (iter))
				ToggleChildren (iter, newsetting);
			
			TreeIter iterFirst;
			tsFiles.GetIterFirst (out iterFirst);
			if (tsFiles.IterHasChild (iterFirst))
				NewCheckStatus (iterFirst);
		}
Exemple #45
0
		private void ItemToggled (object o, ToggledArgs args)
		{
			Gtk.TreeIter iter;
			if (store.GetIterFromString(out iter, args.Path)) {
				bool val = (bool) store.GetValue(iter, (int)Columns.Selected);
				Breakpoint bp = (Breakpoint) store.GetValue (iter, (int) Columns.Breakpoint);
				store.SetValue (iter, (int)Columns.Selected, !val);
				bp.Enabled = !bp.Enabled;
			}
		}
		private void OnSelectedToggled (object o, ToggledArgs args)
		{
			TreeIter iter;
			if (!store.GetIterFromString (out iter, args.Path))
				return;

			bool old_value = (bool) store.GetValue (iter, colCheckedIndex);
			store.SetValue (iter, colCheckedIndex, !old_value);

			if (old_value)
				SetErrorMessage (null);
			else
				CheckAndUpdateConflictMessage (iter, true);
			UpdateOKButton ();
		}
 private void ToggleCheckBoxToggled(object o, ToggledArgs args)
 {
     Console.WriteLine("ToggleCheckBoxToggled()");
     TreeIter iter;
     if (this.listStore1.GetIterFromString(out iter, args.Path))
     {
         bool value = (bool)this.listStore1.GetValue(iter, (int)Column.ToggleCheckBox);
         this.listStore1.SetValue(iter, (int)Column.ToggleCheckBox, !value);
     }
 }
		void OnSelectToggled (object o, ToggledArgs args)
		{
			TreeIter iter;
			if (!store.GetIterFromString (out iter, args.Path))
				return;

			bool old_value = GetChecked (iter);
			store.SetValue (iter, colCheckedIndex, !old_value);

			TreeIter parent;
			if (store.IterParent (out parent, iter)) {
				// Member(method/property/etc) row clicked
				// Set the parent's 'checked' state according to the children's state
				bool all_children_checked = true;
				foreach (TreeIter child in GetAllNodes (parent, false)) {
					if (!GetChecked (child)) {
						all_children_checked = false;
						break;
					}
				}

				store.SetValue (parent, colCheckedIndex, all_children_checked);
			} else {
				// Mark children's state to match parent's checked state
				foreach (TreeIter child in GetAllNodes (iter, false))
					store.SetValue (child, colCheckedIndex, !old_value);
			}
			UpdateOKButton ();
		}
Exemple #49
0
		void OnCommitCellToggled(object o, ToggledArgs args) 
		{
			TreeIter pos;
			if (!filestore.GetIterFromString (out pos, args.Path))
				return;

			ToggleCommitStatus (pos);
			public void Toggled (object o, ToggledArgs args)
			{
				TreeIter iter;
				if (model.GetIterFromString (out iter, args.Path)) {
					var info = GetProperty (model, iter);
					if (info == null || info.PropertyType != typeof(bool))
						return;
					bool value = (bool)info.GetValue (dialog.profile, null);
					info.SetValue (dialog.profile, !value, null);
					dialog.UpdateExample (model, iter);
					// When toggeling with the keyboard the tree view doesn't update automatically
					// see 'Bug 188 - Pressing space to select does not update checkbox'
					treeView.QueueDraw ();
				}
			}
 private void HandleToggled(object o, ToggledArgs args)
 {
 }