Ryujinx-GtkSharp/gconf/GConf.PropertyEditors/PropertyEditorBool.cs
Rachel Hestilow d33dd8a15f 2002-10-19 Rachel Hestilow <hestilow@ximian.com>
* gconf, sample/gconf: Added.

	* glue/combo.c: This was never added, add it now.

	* configure.in, makefile, sample/Makefile.in: Build new
	gconf bindings if gnome is enabled.

svn path=/trunk/gtk-sharp/; revision=8389
2002-10-19 09:31:20 +00:00

32 lines
574 B
C#

namespace GConf.PropertyEditors
{
using Gtk;
using System;
using System.Collections;
public abstract class PropertyEditorBool : PropertyEditor
{
ArrayList guards = new ArrayList ();
public void AddGuard (Widget control)
{
guards.Add (control);
control.Sensitive = (bool) Get ();
}
protected override void Set (object val)
{
bool val_bool = (bool) val;
foreach (Widget control in guards)
control.Sensitive = val_bool;
base.Set (val);
}
public PropertyEditorBool (string key, Widget control) : base (key, control)
{
}
}
}