Fifteen display strings in the two preference forms were written as GTK mnemonics -- `_Directory`, `_Server`, `Multicast _group`, `_Theme` and the rest -- but the property that makes GTK read them was never set, so GTK drew the underscore literally: `_Directory` in the row, not a D with a line under it. Two switches are involved, FALSE by default in each case. `GtkLabel`/`GtkButton` take `use-underline`; the rows take `AdwPreferencesRow:use-underline`, "whether an embedded underline in the title indicates a mnemonic". The two buttons in the source form already set it (so their mnemonics worked and showed no underscore); the thirteen rows did not. All thirteen now do. The row classes that carry the property are not all related -- AdwEntryRow has its own, while AdwSpinRow, AdwComboRow and AdwSwitchRow get it through AdwActionRow -- so the probe reads it by name on a GObject (g_object_class_find_property, then g_object_get) rather than casting to one row type; a cast to a `GtkWidget*` where the type is only forward-declared does not compile at all. `_Cancel` and `_Connect` both claimed C in the same form, so Alt+C could only reach one of them: that marker was unreachable, which is worse than absent because it is in the source to be trusted. `_Connect` becomes `Conn_ect`, freeing C for Cancel. [prefs-probe] reads the count (4/4) on the real widgets; check_ui validates the property against the GIR for every object in every .ui file, inherited properties included.
141 lines
7.2 KiB
XML
141 lines
7.2 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- SPDX-License-Identifier: MIT -->
|
|
<!-- SPDX-FileCopyrightText: 2026 Martino Ferrari -->
|
|
<!--
|
|
The form a source is added or edited with: one dialog, two groups, eight rows.
|
|
|
|
A grid of labels and bare entries is what this was, and a grid is the wrong shape for it. Each row
|
|
here is a whole row — a title, a subtitle under it where the hint used to be a placeholder, and the
|
|
editing widget on the right — so the form reads the way every GNOME application's does, and the hints
|
|
survive being typed over (a placeholder does not: it disappears the moment there is a value, which is
|
|
exactly when a user may want to know what empty meant).
|
|
|
|
The action is in the header bar rather than a button row at the foot: it is what the dialog is *for*,
|
|
it is what the keyboard's Enter reaches, and its label says which mode the form is in — `Connect` for
|
|
a new host, `Save` for an existing configuration, which `source_dialog.cpp` sets.
|
|
|
|
Nothing here carries a value. The dialog is filled from the source being edited, or from the command
|
|
line for a new one, by the code that opens it.
|
|
-->
|
|
<interface>
|
|
<object class="AdwDialog" id="source_form">
|
|
<property name="content-width">420</property>
|
|
<property name="content-height">560</property>
|
|
<child>
|
|
<object class="AdwToolbarView">
|
|
<child type="top">
|
|
<object class="AdwHeaderBar">
|
|
<property name="title-widget">
|
|
<object class="AdwWindowTitle" id="form_title">
|
|
<property name="title" translatable="yes">New host</property>
|
|
</object>
|
|
</property>
|
|
<child type="end">
|
|
<object class="GtkButton" id="form_cancel">
|
|
<property name="label" translatable="yes">_Cancel</property>
|
|
<property name="use-underline">1</property>
|
|
</object>
|
|
</child>
|
|
<child type="end">
|
|
<object class="GtkButton" id="form_apply">
|
|
<property name="label" translatable="yes">Conn_ect</property>
|
|
<property name="use-underline">1</property>
|
|
<property name="receives-default">1</property>
|
|
<property name="css-classes">suggested-action</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
<property name="content">
|
|
<object class="GtkScrolledWindow">
|
|
<property name="hscrollbar-policy">never</property>
|
|
<property name="propagate-natural-height">1</property>
|
|
<property name="child">
|
|
<object class="AdwPreferencesPage">
|
|
<child>
|
|
<object class="AdwPreferencesGroup">
|
|
<property name="title" translatable="yes">Connection</property>
|
|
<property name="description" translatable="yes">Leave the multicast group and the interface empty for unicast on the default route</property>
|
|
<child>
|
|
<object class="AdwEntryRow" id="server_row">
|
|
<property name="title" translatable="yes">_Server</property>
|
|
<property name="use-underline">True</property>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="AdwSpinRow" id="port_row">
|
|
<property name="title" translatable="yes">_Port</property>
|
|
<property name="use-underline">True</property>
|
|
<property name="adjustment">
|
|
<object class="GtkAdjustment">
|
|
<property name="lower">1</property>
|
|
<property name="upper">65535</property>
|
|
<property name="step-increment">1</property>
|
|
<property name="value">8000</property>
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="AdwEntryRow" id="group_row">
|
|
<property name="title" translatable="yes">Multicast _group</property>
|
|
<property name="use-underline">True</property>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="AdwEntryRow" id="iface_row">
|
|
<property name="title" translatable="yes">_Interface</property>
|
|
<property name="use-underline">True</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="AdwPreferencesGroup">
|
|
<property name="title" translatable="yes">Configuration</property>
|
|
<property name="description" translatable="yes">The name is what this source's session is called. The buffer and the clock are decided before the first socket is opened.</property>
|
|
<child>
|
|
<object class="AdwEntryRow" id="name_row">
|
|
<property name="title" translatable="yes">_Name</property>
|
|
<property name="use-underline">True</property>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="AdwEntryRow" id="note_row">
|
|
<property name="title" translatable="yes">N_ote</property>
|
|
<property name="use-underline">True</property>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="AdwSpinRow" id="buffer_row">
|
|
<property name="title" translatable="yes">_Buffer MB</property>
|
|
<property name="use-underline">True</property>
|
|
<property name="subtitle" translatable="yes">sample buffer per source, applied when this source is opened</property>
|
|
<property name="adjustment">
|
|
<object class="GtkAdjustment">
|
|
<property name="lower">1</property>
|
|
<property name="upper">65536</property>
|
|
<property name="step-increment">1</property>
|
|
<property name="value">64</property>
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="AdwSwitchRow" id="form_relative_row">
|
|
<property name="title" translatable="yes">_Relative time</property>
|
|
<property name="use-underline">True</property>
|
|
<property name="subtitle" translatable="yes">plot time from the packet counter and the declared rate, instead of the stream's own time signal</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</interface>
|