mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 05:05:34 +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)
|
||||
{
|
||||
_store.AppendValues(dict[a.Category], a.Name);
|
||||
_items[a.Name] = (type, null);
|
||||
_store.AppendValues(dict[a.Category], a.ContentType.Name);
|
||||
_items[a.ContentType.Name] = (type, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ using Gtk;
|
|||
|
||||
namespace Samples
|
||||
{
|
||||
[Section(Name = "AboutDialog", Category = Category.Dialogs)]
|
||||
[Section(ContentType = typeof(AboutDialog), Category = Category.Dialogs)]
|
||||
class AboutDialogSection : Box
|
||||
{
|
||||
public AboutDialogSection() : base(Orientation.Vertical, 0)
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace Samples
|
|||
{
|
||||
class SectionAttribute : Attribute
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public Type ContentType { get; set; }
|
||||
|
||||
public Category Category { get; set; }
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ using Gtk;
|
|||
|
||||
namespace Samples
|
||||
{
|
||||
[Section(Name = "Button", Category = Category.Widgets)]
|
||||
[Section(ContentType = typeof(Button), Category = Category.Widgets)]
|
||||
class ButtonSection : ListSection
|
||||
{
|
||||
public ButtonSection()
|
||||
|
|
|
@ -5,7 +5,7 @@ using Gtk;
|
|||
|
||||
namespace Samples
|
||||
{
|
||||
[Section(Name = "Color Button", Category = Category.Widgets)]
|
||||
[Section(ContentType = typeof(ColorButton), Category = Category.Widgets)]
|
||||
class ColorButtonSection : ListSection
|
||||
{
|
||||
public ColorButtonSection()
|
||||
|
|
|
@ -5,7 +5,7 @@ using Gtk;
|
|||
|
||||
namespace Samples
|
||||
{
|
||||
[Section(Name= "Entry", Category = Category.Widgets)]
|
||||
[Section(ContentType = typeof(Entry), Category = Category.Widgets)]
|
||||
class EntrySection : ListSection
|
||||
{
|
||||
public EntrySection()
|
||||
|
|
|
@ -6,7 +6,7 @@ using Gtk;
|
|||
|
||||
namespace Samples
|
||||
{
|
||||
[Section(Name = "Link Button", Category = Category.Widgets)]
|
||||
[Section(ContentType = typeof(LinkButton), Category = Category.Widgets)]
|
||||
class LinkButtonSection : ListSection
|
||||
{
|
||||
public LinkButtonSection()
|
||||
|
|
|
@ -5,7 +5,7 @@ using Gtk;
|
|||
|
||||
namespace Samples
|
||||
{
|
||||
[Section(Name = "Spin Button", Category = Category.Widgets)]
|
||||
[Section(ContentType = typeof(SpinButton), Category = Category.Widgets)]
|
||||
class SpinButtonSection : ListSection
|
||||
{
|
||||
public SpinButtonSection()
|
||||
|
|
|
@ -5,10 +5,10 @@ using Gtk;
|
|||
|
||||
namespace Samples
|
||||
{
|
||||
[Section(Name = "Switch Button", Category = Category.Widgets)]
|
||||
class SwitchButtonSection : ListSection
|
||||
[Section(ContentType = typeof(Switch), Category = Category.Widgets)]
|
||||
class SwitchSection : ListSection
|
||||
{
|
||||
public SwitchButtonSection()
|
||||
public SwitchSection()
|
||||
{
|
||||
AddItem(CreateSwitchButton());
|
||||
}
|
|
@ -5,7 +5,7 @@ using Gtk;
|
|||
|
||||
namespace Samples
|
||||
{
|
||||
[Section(Name = "Toggle Button", Category = Category.Widgets)]
|
||||
[Section(ContentType = typeof(ToggleButton), Category = Category.Widgets)]
|
||||
class ToggleButtonSection : ListSection
|
||||
{
|
||||
public ToggleButtonSection()
|
||||
|
|
Loading…
Reference in a new issue