Commit 8ef8db5b authored by Aral Balkan's avatar Aral Balkan

Merge Sergey’s patch: move buttons to the header bar

Beyond a cosmetic change, this also makes the app use Gtk.Window rather than Gtk.Dialog which is semantically more correct (and will remove the related warning).
parent 9a27d20b
Pipeline #706 failed with stages
......@@ -2,80 +2,57 @@
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<template class="GnomitWindow" parent="GtkDialog">
<template class="GnomitWindow" parent="GtkWindow">
<property name="can_focus">False</property>
<property name="default_width">586</property>
<property name="default_height">300</property>
<property name="type_hint">dialog</property>
<property name="urgency_hint">True</property>
<child>
<placeholder/>
</child>
<child internal-child="vbox">
<object class="GtkBox">
<child type="titlebar">
<object class="GtkHeaderBar">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="cancelButton">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="commitButton">
<property name="label" translatable="yes">Commit</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<accelerator key="Return" signal="clicked" modifiers="GDK_CONTROL_MASK"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="cancelButton">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<object class="GtkButton" id="commitButton">
<property name="label" translatable="yes">Commit</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTextView" id="messageText">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="wrap_mode">word</property>
<property name="input_hints">GTK_INPUT_HINT_SPELLCHECK | GTK_INPUT_HINT_WORD_COMPLETION | GTK_INPUT_HINT_EMOJI | GTK_INPUT_HINT_NONE</property>
<property name="monospace">True</property>
</object>
</child>
<property name="receives_default">True</property>
<accelerator key="Return" signal="clicked" modifiers="GDK_CONTROL_MASK"/>
<style>
<class name="suggested-action"/>
</style>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTextView" id="messageText">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="wrap_mode">word</property>
<property name="input_hints">GTK_INPUT_HINT_SPELLCHECK | GTK_INPUT_HINT_WORD_COMPLETION | GTK_INPUT_HINT_EMOJI | GTK_INPUT_HINT_NONE</property>
<property name="monospace">True</property>
</object>
</child>
</object>
</child>
</template>
</interface>
......@@ -23,7 +23,7 @@ var GnomitWindow = GObject.registerClass({
GTypeName: 'GnomitWindow',
Template: 'resource:///ind/ie/Gnomit/window.glade',
InternalChildren: ['messageText', 'commitButton', 'cancelButton'],
}, class GnomitWindow extends Gtk.Dialog {
}, class GnomitWindow extends Gtk.Window {
_init(application) {
super._init({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment