mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-27 07:15:32 +00:00
32 lines
574 B
C#
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)
|
||
|
{
|
||
|
}
|
||
|
}
|
||
|
}
|