mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-26 04:45:37 +00:00
d33dd8a15f
* 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
32 lines
721 B
C#
32 lines
721 B
C#
namespace GConf.PropertyEditors
|
|
{
|
|
using Gtk;
|
|
using System;
|
|
|
|
public class PropertyEditorToggleButton : PropertyEditorBool
|
|
{
|
|
protected override void ValueChanged (object sender, NotifyEventArgs args)
|
|
{
|
|
object val = args.Value;
|
|
ToggleButton checkbox = (ToggleButton) Control;
|
|
checkbox.Active = (bool) val;
|
|
}
|
|
|
|
void Toggled (object obj, EventArgs args)
|
|
{
|
|
ToggleButton checkbox = (ToggleButton) Control;
|
|
Set (checkbox.Active);
|
|
}
|
|
|
|
protected override void ConnectHandlers ()
|
|
{
|
|
ToggleButton checkbox = (ToggleButton) Control;
|
|
checkbox.Toggled += new EventHandler (Toggled);
|
|
}
|
|
|
|
public PropertyEditorToggleButton (string key, ToggleButton checkbox) : base (key, checkbox)
|
|
{
|
|
}
|
|
}
|
|
}
|