Commit c1f2bc18 authored by Arnaud B.'s avatar Arnaud B.

Use a Grid in PrintDialog.

parent 85bea9a1
......@@ -44,164 +44,142 @@
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="print_box">
<object class="GtkGrid" id="print_grid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="border-width">12</property>
<property name="spacing">18</property>
<property name="row-spacing">16</property>
<property name="column-spacing">10</property>
<property name="margin">6</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">_Number of puzzles</property>
<property name="use-underline">True</property>
<property name="mnemonic-widget">n_sudokus_button</property>
<property name="valign">center</property>
<property name="halign">end</property>
<property name="width-request">150</property>
<property name="xalign">1.0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="n_sudokus_button">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="halign">center</property>
<property name="primary-icon-activatable">False</property>
<property name="secondary-icon-activatable">False</property>
<property name="primary-icon-sensitive">True</property>
<property name="secondary-icon-sensitive">True</property>
<property name="adjustment">adjustment1</property>
<property name="climb-rate">1</property>
<property name="valign">center</property>
<property name="margin-start">12</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">10</property>
<property name="valign">start</property>
<property name="label" translatable="yes">Difficulty</property>
<property name="halign">end</property>
<property name="width-request">150</property>
<property name="xalign">1.0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="homogeneous">True</property>
<property name="halign">center</property>
<property name="valign">start</property>
<child>
<object class="GtkBox">
<object class="GtkRadioButton" id="easy_radio_button">
<property name="label" translatable="yes">_Easy</property>
<property name="visible">True</property>
<property name="width-request">150</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">_Number of puzzles</property>
<property name="use-underline">True</property>
<property name="mnemonic-widget">n_sudokus_button</property>
<property name="valign">center</property>
<property name="halign">end</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="n_sudokus_button">
<object class="GtkRadioButton" id="medium_radio_button">
<property name="label" translatable="yes">_Medium</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="halign">center</property>
<property name="primary-icon-activatable">False</property>
<property name="secondary-icon-activatable">False</property>
<property name="primary-icon-sensitive">True</property>
<property name="secondary-icon-sensitive">True</property>
<property name="adjustment">adjustment1</property>
<property name="climb-rate">1</property>
<property name="valign">center</property>
<property name="receives-default">False</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
<property name="group">easy_radio_button</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">10</property>
<child>
<object class="GtkBox">
<object class="GtkRadioButton" id="hard_radio_button">
<property name="label" translatable="yes">_Hard</property>
<property name="visible">True</property>
<property name="width-request">150</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="valign">start</property>
<property name="label" translatable="yes">Difficulty</property>
<property name="halign">end</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
<property name="group">easy_radio_button</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkBox">
<object class="GtkRadioButton" id="very_hard_radio_button">
<property name="label" translatable="yes">_Very Hard</property>
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="homogeneous">True</property>
<property name="halign">center</property>
<property name="valign">start</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
<object class="GtkRadioButton" id="easy_radio_button">
<property name="label" translatable="yes">_Easy</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="medium_radio_button">
<property name="label" translatable="yes">_Medium</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
<property name="group">easy_radio_button</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="hard_radio_button">
<property name="label" translatable="yes">_Hard</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
<property name="group">easy_radio_button</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="very_hard_radio_button">
<property name="label" translatable="yes">_Very Hard</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
<property name="group">easy_radio_button</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
<property name="group">easy_radio_button</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
......
......@@ -28,7 +28,7 @@ public class PrintDialog : Dialog
private GLib.Settings settings;
[GtkChild] private Button print_button;
[GtkChild] private Box print_box;
[GtkChild] private Grid print_grid;
[GtkChild] private SpinButton n_sudokus_button;
[GtkChild] private RadioButton easy_radio_button;
[GtkChild] private RadioButton medium_radio_button;
......@@ -119,7 +119,7 @@ public class PrintDialog : Dialog
Timeout.add_seconds (3, (SourceFunc) start_spinner_cb);
print_button.sensitive = false;
print_box.sensitive = false;
print_grid.sensitive = false;
cancellable = new Cancellable ();
SudokuGenerator.generate_boards_async.begin (nsudokus, level, cancellable, (obj, res) => {
......
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