mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-05 16:09:07 -04:00
Fix flag values
Enums/bitfields have a C identifier, a GLib nick, and a GIR name. The last two are usually the same except the nick uses '-' and the GIR name uses '_'. It is confusing. Blueprint tries to use GIR names for everything, but GTK requires a C identifier or GLib nick for enum and bitfield values. Blueprint was sometimes passing the GIR name through instead of finding one of the other names. Fixed by always emitting the C identifier for enums and bitfields where the GIR type is known.
This commit is contained in:
parent
fac311d3c3
commit
fd55a5abf2
8 changed files with 27 additions and 18 deletions
|
@ -5,7 +5,7 @@
|
|||
<accessibility>
|
||||
<property name="label" translatable="true">Hello, world!</property>
|
||||
<relation name="labelled-by">my_label</relation>
|
||||
<state name="checked">true</state>
|
||||
<state name="checked">GTK_ACCESSIBLE_TRISTATE_TRUE</state>
|
||||
</accessibility>
|
||||
</object>
|
||||
<object class="GtkLabel" id="my_label"></object>
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="window-placement">top-left</property>
|
||||
<property name="window-placement">GTK_CORNER_TOP_LEFT</property>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
|
@ -6,5 +6,5 @@ Gio.Application {
|
|||
}
|
||||
|
||||
EventControllerScroll {
|
||||
flags: vertical;
|
||||
flags: both_axes;
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GApplication">
|
||||
<property name="flags">is_service|handles_open</property>
|
||||
<property name="flags">G_APPLICATION_IS_SERVICE|G_APPLICATION_HANDLES_OPEN</property>
|
||||
</object>
|
||||
<object class="GtkEventControllerScroll">
|
||||
<property name="flags">vertical</property>
|
||||
<property name="flags">GTK_EVENT_CONTROLLER_SCROLL_BOTH_AXES</property>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="orientation">GTK_ORIENTATION_VERTICAL</property>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkSizeGroup">
|
||||
<property name="mode">horizontal</property>
|
||||
<property name="mode">GTK_SIZE_GROUP_HORIZONTAL</property>
|
||||
<widgets>
|
||||
<widget name="label"/>
|
||||
<widget name="button"/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue