mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 13:15:39 +00:00
[Samples] Update section name handling
This commit is contained in:
parent
c5ff4f2acb
commit
7c9efe3fe6
|
@ -134,8 +134,8 @@ namespace Samples
|
||||||
{
|
{
|
||||||
if (attribute is SectionAttribute a)
|
if (attribute is SectionAttribute a)
|
||||||
{
|
{
|
||||||
_store.AppendValues(dict[a.Category], a.Name);
|
_store.AppendValues(dict[a.Category], a.ContentType.Name);
|
||||||
_items[a.Name] = (type, null);
|
_items[a.ContentType.Name] = (type, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ using Gtk;
|
||||||
|
|
||||||
namespace Samples
|
namespace Samples
|
||||||
{
|
{
|
||||||
[Section(Name = "AboutDialog", Category = Category.Dialogs)]
|
[Section(ContentType = typeof(AboutDialog), Category = Category.Dialogs)]
|
||||||
class AboutDialogSection : Box
|
class AboutDialogSection : Box
|
||||||
{
|
{
|
||||||
public AboutDialogSection() : base(Orientation.Vertical, 0)
|
public AboutDialogSection() : base(Orientation.Vertical, 0)
|
||||||
|
|
|
@ -7,7 +7,7 @@ namespace Samples
|
||||||
{
|
{
|
||||||
class SectionAttribute : Attribute
|
class SectionAttribute : Attribute
|
||||||
{
|
{
|
||||||
public string Name { get; set; }
|
public Type ContentType { get; set; }
|
||||||
|
|
||||||
public Category Category { get; set; }
|
public Category Category { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ using Gtk;
|
||||||
|
|
||||||
namespace Samples
|
namespace Samples
|
||||||
{
|
{
|
||||||
[Section(Name = "Button", Category = Category.Widgets)]
|
[Section(ContentType = typeof(Button), Category = Category.Widgets)]
|
||||||
class ButtonSection : ListSection
|
class ButtonSection : ListSection
|
||||||
{
|
{
|
||||||
public ButtonSection()
|
public ButtonSection()
|
||||||
|
|
|
@ -5,7 +5,7 @@ using Gtk;
|
||||||
|
|
||||||
namespace Samples
|
namespace Samples
|
||||||
{
|
{
|
||||||
[Section(Name = "Color Button", Category = Category.Widgets)]
|
[Section(ContentType = typeof(ColorButton), Category = Category.Widgets)]
|
||||||
class ColorButtonSection : ListSection
|
class ColorButtonSection : ListSection
|
||||||
{
|
{
|
||||||
public ColorButtonSection()
|
public ColorButtonSection()
|
||||||
|
|
|
@ -5,7 +5,7 @@ using Gtk;
|
||||||
|
|
||||||
namespace Samples
|
namespace Samples
|
||||||
{
|
{
|
||||||
[Section(Name= "Entry", Category = Category.Widgets)]
|
[Section(ContentType = typeof(Entry), Category = Category.Widgets)]
|
||||||
class EntrySection : ListSection
|
class EntrySection : ListSection
|
||||||
{
|
{
|
||||||
public EntrySection()
|
public EntrySection()
|
||||||
|
|
|
@ -6,7 +6,7 @@ using Gtk;
|
||||||
|
|
||||||
namespace Samples
|
namespace Samples
|
||||||
{
|
{
|
||||||
[Section(Name = "Link Button", Category = Category.Widgets)]
|
[Section(ContentType = typeof(LinkButton), Category = Category.Widgets)]
|
||||||
class LinkButtonSection : ListSection
|
class LinkButtonSection : ListSection
|
||||||
{
|
{
|
||||||
public LinkButtonSection()
|
public LinkButtonSection()
|
||||||
|
|
|
@ -5,7 +5,7 @@ using Gtk;
|
||||||
|
|
||||||
namespace Samples
|
namespace Samples
|
||||||
{
|
{
|
||||||
[Section(Name = "Spin Button", Category = Category.Widgets)]
|
[Section(ContentType = typeof(SpinButton), Category = Category.Widgets)]
|
||||||
class SpinButtonSection : ListSection
|
class SpinButtonSection : ListSection
|
||||||
{
|
{
|
||||||
public SpinButtonSection()
|
public SpinButtonSection()
|
||||||
|
|
|
@ -5,10 +5,10 @@ using Gtk;
|
||||||
|
|
||||||
namespace Samples
|
namespace Samples
|
||||||
{
|
{
|
||||||
[Section(Name = "Switch Button", Category = Category.Widgets)]
|
[Section(ContentType = typeof(Switch), Category = Category.Widgets)]
|
||||||
class SwitchButtonSection : ListSection
|
class SwitchSection : ListSection
|
||||||
{
|
{
|
||||||
public SwitchButtonSection()
|
public SwitchSection()
|
||||||
{
|
{
|
||||||
AddItem(CreateSwitchButton());
|
AddItem(CreateSwitchButton());
|
||||||
}
|
}
|
|
@ -5,7 +5,7 @@ using Gtk;
|
||||||
|
|
||||||
namespace Samples
|
namespace Samples
|
||||||
{
|
{
|
||||||
[Section(Name = "Toggle Button", Category = Category.Widgets)]
|
[Section(ContentType = typeof(ToggleButton), Category = Category.Widgets)]
|
||||||
class ToggleButtonSection : ListSection
|
class ToggleButtonSection : ListSection
|
||||||
{
|
{
|
||||||
public ToggleButtonSection()
|
public ToggleButtonSection()
|
||||||
|
|
Loading…
Reference in a new issue