diff options
author | Thomas White <taw@bitwiz.me.uk> | 2018-04-22 12:18:28 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.me.uk> | 2018-04-22 23:22:39 +0200 |
commit | ef49ac2a7919d9284e2db4c34b5fccf3d636f72e (patch) | |
tree | 77761a6c0035c083eadaa9b7da96a0df0bddc253 | |
parent | 3f0ef3ba6d8389a6aaeef7183c2a41b57ba36a8d (diff) |
Add preliminary stylesheet editor
-rw-r--r-- | data/colloquium.gresource.xml | 1 | ||||
-rw-r--r-- | data/stylesheeteditor.ui | 1085 | ||||
-rw-r--r-- | meson.build | 1 | ||||
-rw-r--r-- | po/POTFILES | 1 | ||||
-rw-r--r-- | po/colloquium.pot | 143 | ||||
-rw-r--r-- | po/de.po | 143 | ||||
-rw-r--r-- | src/colloquium.c | 1 | ||||
-rw-r--r-- | src/narrative_window.c | 14 | ||||
-rw-r--r-- | src/stylesheet_editor.c | 79 | ||||
-rw-r--r-- | src/stylesheet_editor.h | 73 |
10 files changed, 1497 insertions, 44 deletions
diff --git a/data/colloquium.gresource.xml b/data/colloquium.gresource.xml index 5c8b4b0..369144b 100644 --- a/data/colloquium.gresource.xml +++ b/data/colloquium.gresource.xml @@ -3,6 +3,7 @@ <gresource prefix="/uk/me/bitwiz/Colloquium"> <file>sky.png</file> <file>menus.ui</file> + <file>stylesheeteditor.ui</file> <file>demo.sc</file> <file>canvas.png</file> <file>alpha_warning.svg</file> diff --git a/data/stylesheeteditor.ui b/data/stylesheeteditor.ui new file mode 100644 index 0000000..514e01c --- /dev/null +++ b/data/stylesheeteditor.ui @@ -0,0 +1,1085 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.20.4 --> +<interface> + <requires lib="gtk+" version="3.20"/> + <template class="StylesheetEditor" parent="GtkDialog"> + <property name="can_focus">False</property> + <property name="title" translatable="yes">Stylesheet editor</property> + <property name="window_position">center-on-parent</property> + <property name="default_width">640</property> + <property name="default_height">640</property> + <property name="destroy_with_parent">True</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox"> + <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"> + <property name="label">gtk-revert-to-saved</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + <property name="always_show_image">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="Close"> + <property name="label">gtk-close</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + <property name="always_show_image">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkNotebook"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_left">8</property> + <property name="margin_right">8</property> + <property name="margin_top">8</property> + <property name="margin_bottom">8</property> + <property name="orientation">vertical</property> + <property name="spacing">8</property> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">This style will be used in the narrative editor and for slides unless overridden</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">4</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">8</property> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Text:</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFontButton"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="font">Sans 12</property> + <property name="preview_text"/> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkColorButton"> + <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">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">4</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">8</property> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Background:</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="active">0</property> + <items> + <item translatable="yes">Flat colour</item> + <item translatable="yes">Horizontal gradient</item> + <item translatable="yes">Vertical gradient</item> + </items> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkColorButton"> + <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">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkColorButton"> + <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">True</property> + <property name="position">3</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">4</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkFrame"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">out</property> + <child> + <object class="GtkAlignment"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Top:</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="padding">4</property> + <property name="position">0</property> + </packing> + </child> + <child type="center"> + <object class="GtkSpinButton"> + <property name="visible">True</property> + <property name="can_focus">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">5</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Left:</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">4</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkSpinButton"> + <property name="visible">True</property> + <property name="can_focus">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton"> + <property name="visible">True</property> + <property name="can_focus">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">5</property> + <property name="pack_type">end</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Right:</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">4</property> + <property name="pack_type">end</property> + <property name="position">3</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">5</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Bottom:</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="padding">4</property> + <property name="position">0</property> + </packing> + </child> + <child type="center"> + <object class="GtkSpinButton"> + <property name="visible">True</property> + <property name="can_focus">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">5</property> + <property name="position">2</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Paragraph spacing</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">4</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkFrame"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">in</property> + <child> + <object class="GtkAlignment"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkTextView" id="default_style_ss"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="margin_top">8</property> + <property name="margin_bottom">8</property> + <property name="wrap_mode">char</property> + <property name="left_margin">12</property> + <property name="right_margin">12</property> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Storycode</property> + </object> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="padding">4</property> + <property name="position">4</property> + </packing> + </child> + </object> + </child> + <child type="tab"> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Default style</property> + </object> + <packing> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_left">8</property> + <property name="margin_right">8</property> + <property name="margin_top">8</property> + <property name="margin_bottom">8</property> + <property name="orientation">vertical</property> + <property name="spacing">8</property> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">This style will be used in the narrative editor</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">4</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkCheckButton"> + <property name="label" translatable="yes">Use default style</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">8</property> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Text:</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFontButton"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="font">Sans 12</property> + <property name="preview_text"/> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkColorButton"> + <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">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">4</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">8</property> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Background:</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <items> + <item translatable="yes">Flat colour</item> + <item translatable="yes">Horizontal gradient</item> + <item translatable="yes">Vertical gradient</item> + </items> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkColorButton"> + <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">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkColorButton"> + <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">True</property> + <property name="position">3</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">4</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkFrame"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">out</property> + <child> + <object class="GtkAlignment"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_right">5</property> + <property name="label" translatable="yes">Top:</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child type="center"> + <object class="GtkSpinButton"> + <property name="visible">True</property> + <property name="can_focus">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">5</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_right">5</property> + <property name="label" translatable="yes">Left:</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">5</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkSpinButton"> + <property name="visible">True</property> + <property name="can_focus">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton"> + <property name="visible">True</property> + <property name="can_focus">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">5</property> + <property name="pack_type">end</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_right">5</property> + <property name="label" translatable="yes">Right:</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">3</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">5</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_right">5</property> + <property name="label" translatable="yes">Bottom:</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child type="center"> + <object class="GtkSpinButton"> + <property name="visible">True</property> + <property name="can_focus">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">5</property> + <property name="position">2</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Paragraph spacing</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">4</property> + <property name="position">4</property> + </packing> + </child> + <child> + <object class="GtkFrame"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">in</property> + <child> + <object class="GtkAlignment"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkTextView"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="margin_top">8</property> + <property name="margin_bottom">8</property> + <property name="wrap_mode">char</property> + <property name="left_margin">12</property> + <property name="right_margin">12</property> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Storycode</property> + </object> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="padding">4</property> + <property name="position">5</property> + </packing> + </child> + </object> + <packing> + <property name="position">1</property> + </packing> + </child> + <child type="tab"> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Narrative style</property> + </object> + <packing> + <property name="position">1</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_left">8</property> + <property name="margin_right">8</property> + <property name="margin_top">8</property> + <property name="margin_bottom">8</property> + <property name="orientation">vertical</property> + <property name="spacing">8</property> + <child> + <object class="GtkComboBoxText"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="active">0</property> + <items> + <item translatable="yes">Presentation title</item> + <item translatable="yes">Slide title</item> + </items> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">in</property> + <child> + <object class="GtkAlignment"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkTextView"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="margin_top">8</property> + <property name="margin_bottom">8</property> + <property name="wrap_mode">char</property> + <property name="left_margin">12</property> + <property name="right_margin">12</property> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Storycode</property> + </object> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="padding">4</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="position">2</property> + </packing> + </child> + <child type="tab"> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Style definitions</property> + </object> + <packing> + <property name="position">2</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_left">8</property> + <property name="margin_right">8</property> + <property name="margin_top">8</property> + <property name="margin_bottom">8</property> + <property name="orientation">vertical</property> + <property name="spacing">8</property> + <child> + <object class="GtkComboBoxText"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="active">0</property> + <items> + <item translatable="yes">Presentation title</item> + <item translatable="yes">Slide title</item> + </items> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">in</property> + <child> + <object class="GtkAlignment"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkTextView"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="margin_top">8</property> + <property name="margin_bottom">8</property> + <property name="wrap_mode">char</property> + <property name="left_margin">12</property> + <property name="right_margin">12</property> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Storycode</property> + </object> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="padding">4</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="position">3</property> + </packing> + </child> + <child type="tab"> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Templates</property> + </object> + <packing> + <property name="position">3</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_top">8</property> + <property name="margin_bottom">8</property> + <property name="orientation">vertical</property> + <property name="spacing">8</property> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_left">8</property> + <property name="margin_right">8</property> + <property name="spacing">8</property> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Slide width:</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkSpinButton"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="width_chars">6</property> + <property name="numeric">True</property> + <property name="value">1024</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Slide height:</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkSpinButton"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="width_chars">6</property> + <property name="numeric">True</property> + <property name="value">768</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(arbitrary units)</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">4</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="padding">4</property> + <property name="position">0</property> + </packing> + </child> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="position">4</property> + </packing> + </child> + <child type="tab"> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Properties</property> + </object> + <packing> + <property name="position">4</property> + <property name="tab_fill">False</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <child> + <placeholder/> + </child> + </template> + <object class="GtkListStore" id="liststore1"/> +</interface> diff --git a/meson.build b/meson.build index 24f54ed..a2e3fb2 100644 --- a/meson.build +++ b/meson.build @@ -44,6 +44,7 @@ executable('colloquium', 'src/print.c', 'src/sc_parse.c', 'src/utils.c', + 'src/stylesheet_editor.c', ], gresources, dependencies : [gtkdep, mdep], diff --git a/po/POTFILES b/po/POTFILES index 0d736d9..ff4049c 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -15,3 +15,4 @@ src/slide_window.c src/testcard.c src/utils.c data/menus.ui +data/stylesheeteditor.ui diff --git a/po/colloquium.pot b/po/colloquium.pot index 67114d4..ac51e51 100644 --- a/po/colloquium.pot +++ b/po/colloquium.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: colloquium\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-04-22 12:15+0200\n" +"POT-Creation-Date: 2018-04-22 23:21+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -40,12 +40,12 @@ msgstr "" msgid "Open Presentation" msgstr "" -#: src/colloquium.c:198 src/narrative_window.c:129 src/narrative_window.c:341 -#: src/narrative_window.c:508 +#: src/colloquium.c:198 src/narrative_window.c:130 src/narrative_window.c:340 +#: src/narrative_window.c:507 msgid "_Cancel" msgstr "" -#: src/colloquium.c:199 src/narrative_window.c:342 +#: src/colloquium.c:199 src/narrative_window.c:341 msgid "_Open" msgstr "" @@ -391,76 +391,76 @@ msgstr "" msgid "%s :\n" msgstr "" -#: src/narrative_window.c:108 +#: src/narrative_window.c:109 msgid "Failed to save presentation" msgstr "" -#: src/narrative_window.c:126 +#: src/narrative_window.c:127 msgid "Save Presentation" msgstr "" -#: src/narrative_window.c:130 data/menus.ui:24 +#: src/narrative_window.c:131 data/menus.ui:24 msgid "_Save" msgstr "" -#: src/narrative_window.c:173 +#: src/narrative_window.c:174 #, c-format msgid "Not a slide!\n" msgstr "" -#: src/narrative_window.c:300 +#: src/narrative_window.c:301 #, c-format msgid "Not a style sheet\n" msgstr "" -#: src/narrative_window.c:303 +#: src/narrative_window.c:304 #, c-format msgid "Failed to load\n" msgstr "" -#: src/narrative_window.c:338 +#: src/narrative_window.c:337 msgid "Load stylesheet" msgstr "" -#: src/narrative_window.c:372 +#: src/narrative_window.c:371 #, c-format msgid "Failed to split paragraph\n" msgstr "" -#: src/narrative_window.c:505 +#: src/narrative_window.c:504 msgid "Export PDF" msgstr "" -#: src/narrative_window.c:509 +#: src/narrative_window.c:508 msgid "_Export" msgstr "" -#: src/narrative_window.c:803 +#: src/narrative_window.c:802 #, c-format msgid "Narrative window is already open!\n" msgstr "" -#: src/narrative_window.c:853 data/menus.ui:134 +#: src/narrative_window.c:852 data/menus.ui:134 msgid "Start slideshow" msgstr "" -#: src/narrative_window.c:864 +#: src/narrative_window.c:863 msgid "Add slide" msgstr "" -#: src/narrative_window.c:874 +#: src/narrative_window.c:873 msgid "First slide" msgstr "" -#: src/narrative_window.c:881 +#: src/narrative_window.c:880 msgid "Previous slide" msgstr "" -#: src/narrative_window.c:888 +#: src/narrative_window.c:887 msgid "Next slide" msgstr "" -#: src/narrative_window.c:895 +#: src/narrative_window.c:894 msgid "Last slide" msgstr "" @@ -969,7 +969,7 @@ msgstr "" msgid "Slide" msgstr "" -#: data/menus.ui:124 +#: data/menus.ui:124 data/stylesheeteditor.ui:822 data/stylesheeteditor.ui:902 msgid "Slide title" msgstr "" @@ -1004,3 +1004,102 @@ msgstr "" #: data/menus.ui:192 msgid "_About" msgstr "" + +#: data/stylesheeteditor.ui:7 +msgid "Stylesheet editor" +msgstr "" + +#: data/stylesheeteditor.ui:77 +msgid "" +"This style will be used in the narrative editor and for slides unless " +"overridden" +msgstr "" + +#: data/stylesheeteditor.ui:95 data/stylesheeteditor.ui:471 +msgid "Text:" +msgstr "" + +#: data/stylesheeteditor.ui:146 data/stylesheeteditor.ui:522 +msgid "Background:" +msgstr "" + +#: data/stylesheeteditor.ui:160 data/stylesheeteditor.ui:535 +msgid "Flat colour" +msgstr "" + +#: data/stylesheeteditor.ui:161 data/stylesheeteditor.ui:536 +msgid "Horizontal gradient" +msgstr "" + +#: data/stylesheeteditor.ui:162 data/stylesheeteditor.ui:537 +msgid "Vertical gradient" +msgstr "" + +#: data/stylesheeteditor.ui:227 data/stylesheeteditor.ui:603 +msgid "Top:" +msgstr "" + +#: data/stylesheeteditor.ui:264 data/stylesheeteditor.ui:640 +msgid "Left:" +msgstr "" + +#: data/stylesheeteditor.ui:301 data/stylesheeteditor.ui:678 +msgid "Right:" +msgstr "" + +#: data/stylesheeteditor.ui:327 data/stylesheeteditor.ui:704 +msgid "Bottom:" +msgstr "" + +#: data/stylesheeteditor.ui:364 data/stylesheeteditor.ui:740 +msgid "Paragraph spacing" +msgstr "" + +#: data/stylesheeteditor.ui:402 data/stylesheeteditor.ui:778 +#: data/stylesheeteditor.ui:858 data/stylesheeteditor.ui:938 +msgid "Storycode" +msgstr "" + +#: data/stylesheeteditor.ui:419 +msgid "Default style" +msgstr "" + +#: data/stylesheeteditor.ui:439 +msgid "This style will be used in the narrative editor" +msgstr "" + +#: data/stylesheeteditor.ui:450 +msgid "Use default style" +msgstr "" + +#: data/stylesheeteditor.ui:798 +msgid "Narrative style" +msgstr "" + +#: data/stylesheeteditor.ui:821 data/stylesheeteditor.ui:901 +msgid "Presentation title" +msgstr "" + +#: data/stylesheeteditor.ui:878 +msgid "Style definitions" +msgstr "" + +#: data/stylesheeteditor.ui:958 +msgid "Templates" +msgstr "" + +#: data/stylesheeteditor.ui:984 +msgid "Slide width:" +msgstr "" + +#: data/stylesheeteditor.ui:1010 +msgid "Slide height:" +msgstr "" + +#: data/stylesheeteditor.ui:1036 +msgid "(arbitrary units)" +msgstr "" + +#: data/stylesheeteditor.ui:1064 +msgid "Properties" +msgstr "" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: colloquium\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-04-22 12:15+0200\n" +"POT-Creation-Date: 2018-04-22 23:21+0200\n" "PO-Revision-Date: 2018-04-10 23:10+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -40,12 +40,12 @@ msgstr "" msgid "Open Presentation" msgstr "" -#: src/colloquium.c:198 src/narrative_window.c:129 src/narrative_window.c:341 -#: src/narrative_window.c:508 +#: src/colloquium.c:198 src/narrative_window.c:130 src/narrative_window.c:340 +#: src/narrative_window.c:507 msgid "_Cancel" msgstr "" -#: src/colloquium.c:199 src/narrative_window.c:342 +#: src/colloquium.c:199 src/narrative_window.c:341 msgid "_Open" msgstr "" @@ -391,76 +391,76 @@ msgstr "" msgid "%s :\n" msgstr "" -#: src/narrative_window.c:108 +#: src/narrative_window.c:109 msgid "Failed to save presentation" msgstr "" -#: src/narrative_window.c:126 +#: src/narrative_window.c:127 msgid "Save Presentation" msgstr "" -#: src/narrative_window.c:130 data/menus.ui:24 +#: src/narrative_window.c:131 data/menus.ui:24 msgid "_Save" msgstr "" -#: src/narrative_window.c:173 +#: src/narrative_window.c:174 #, c-format msgid "Not a slide!\n" msgstr "" -#: src/narrative_window.c:300 +#: src/narrative_window.c:301 #, c-format msgid "Not a style sheet\n" msgstr "" -#: src/narrative_window.c:303 +#: src/narrative_window.c:304 #, c-format msgid "Failed to load\n" msgstr "" -#: src/narrative_window.c:338 +#: src/narrative_window.c:337 msgid "Load stylesheet" msgstr "" -#: src/narrative_window.c:372 +#: src/narrative_window.c:371 #, c-format msgid "Failed to split paragraph\n" msgstr "" -#: src/narrative_window.c:505 +#: src/narrative_window.c:504 msgid "Export PDF" msgstr "" -#: src/narrative_window.c:509 +#: src/narrative_window.c:508 msgid "_Export" msgstr "" -#: src/narrative_window.c:803 +#: src/narrative_window.c:802 #, c-format msgid "Narrative window is already open!\n" msgstr "" -#: src/narrative_window.c:853 data/menus.ui:134 +#: src/narrative_window.c:852 data/menus.ui:134 msgid "Start slideshow" msgstr "" -#: src/narrative_window.c:864 +#: src/narrative_window.c:863 msgid "Add slide" msgstr "" -#: src/narrative_window.c:874 +#: src/narrative_window.c:873 msgid "First slide" msgstr "" -#: src/narrative_window.c:881 +#: src/narrative_window.c:880 msgid "Previous slide" msgstr "" -#: src/narrative_window.c:888 +#: src/narrative_window.c:887 msgid "Next slide" msgstr "" -#: src/narrative_window.c:895 +#: src/narrative_window.c:894 msgid "Last slide" msgstr "" @@ -969,7 +969,7 @@ msgstr "" msgid "Slide" msgstr "" -#: data/menus.ui:124 +#: data/menus.ui:124 data/stylesheeteditor.ui:822 data/stylesheeteditor.ui:902 msgid "Slide title" msgstr "" @@ -1004,3 +1004,102 @@ msgstr "" #: data/menus.ui:192 msgid "_About" msgstr "" + +#: data/stylesheeteditor.ui:7 +msgid "Stylesheet editor" +msgstr "" + +#: data/stylesheeteditor.ui:77 +msgid "" +"This style will be used in the narrative editor and for slides unless " +"overridden" +msgstr "" + +#: data/stylesheeteditor.ui:95 data/stylesheeteditor.ui:471 +msgid "Text:" +msgstr "" + +#: data/stylesheeteditor.ui:146 data/stylesheeteditor.ui:522 +msgid "Background:" +msgstr "" + +#: data/stylesheeteditor.ui:160 data/stylesheeteditor.ui:535 +msgid "Flat colour" +msgstr "" + +#: data/stylesheeteditor.ui:161 data/stylesheeteditor.ui:536 +msgid "Horizontal gradient" +msgstr "" + +#: data/stylesheeteditor.ui:162 data/stylesheeteditor.ui:537 +msgid "Vertical gradient" +msgstr "" + +#: data/stylesheeteditor.ui:227 data/stylesheeteditor.ui:603 +msgid "Top:" +msgstr "" + +#: data/stylesheeteditor.ui:264 data/stylesheeteditor.ui:640 +msgid "Left:" +msgstr "" + +#: data/stylesheeteditor.ui:301 data/stylesheeteditor.ui:678 +msgid "Right:" +msgstr "" + +#: data/stylesheeteditor.ui:327 data/stylesheeteditor.ui:704 +msgid "Bottom:" +msgstr "" + +#: data/stylesheeteditor.ui:364 data/stylesheeteditor.ui:740 +msgid "Paragraph spacing" +msgstr "" + +#: data/stylesheeteditor.ui:402 data/stylesheeteditor.ui:778 +#: data/stylesheeteditor.ui:858 data/stylesheeteditor.ui:938 +msgid "Storycode" +msgstr "" + +#: data/stylesheeteditor.ui:419 +msgid "Default style" +msgstr "" + +#: data/stylesheeteditor.ui:439 +msgid "This style will be used in the narrative editor" +msgstr "" + +#: data/stylesheeteditor.ui:450 +msgid "Use default style" +msgstr "" + +#: data/stylesheeteditor.ui:798 +msgid "Narrative style" +msgstr "" + +#: data/stylesheeteditor.ui:821 data/stylesheeteditor.ui:901 +msgid "Presentation title" +msgstr "" + +#: data/stylesheeteditor.ui:878 +msgid "Style definitions" +msgstr "" + +#: data/stylesheeteditor.ui:958 +msgid "Templates" +msgstr "" + +#: data/stylesheeteditor.ui:984 +msgid "Slide width:" +msgstr "" + +#: data/stylesheeteditor.ui:1010 +msgid "Slide height:" +msgstr "" + +#: data/stylesheeteditor.ui:1036 +msgid "(arbitrary units)" +msgstr "" + +#: data/stylesheeteditor.ui:1064 +msgid "Properties" +msgstr "" diff --git a/src/colloquium.c b/src/colloquium.c index 3b1caa3..66e3dcb 100644 --- a/src/colloquium.c +++ b/src/colloquium.c @@ -338,6 +338,7 @@ static void colloquium_startup(GApplication *papp) G_N_ELEMENTS(app_entries), app); app->builder = gtk_builder_new_from_resource("/uk/me/bitwiz/Colloquium/menus.ui"); + gtk_builder_add_from_resource(app->builder, "/uk/me/bitwiz/Colloquium/windows.ui", NULL); gtk_application_set_menubar(GTK_APPLICATION(app), G_MENU_MODEL(gtk_builder_get_object(app->builder, "menubar"))); diff --git a/src/narrative_window.c b/src/narrative_window.c index 33609eb..1d254b1 100644 --- a/src/narrative_window.c +++ b/src/narrative_window.c @@ -40,6 +40,7 @@ #include "pr_clock.h" #include "print.h" #include "utils.h" +#include "stylesheet_editor.h" struct _narrative_window @@ -313,6 +314,18 @@ static gint load_ss_response_sig(GtkWidget *d, gint response, } +static void edit_ss_sig(GSimpleAction *action, GVariant *parameter, + gpointer vp) +{ + NarrativeWindow *nw = vp; + StylesheetEditor *se; + + se = stylesheet_editor_new(nw->p); + gtk_window_set_transient_for(GTK_WINDOW(se), GTK_WINDOW(nw->window)); + gtk_widget_show_all(GTK_WIDGET(se)); +} + + static void load_ss_sig(GSimpleAction *action, GVariant *parameter, gpointer vp) { @@ -741,6 +754,7 @@ GActionEntry nw_entries[] = { { "deleteslide", delete_slide_sig, NULL, NULL, NULL }, { "slide", add_slide_sig, NULL, NULL, NULL }, { "loadstylesheet", load_ss_sig, NULL, NULL, NULL }, + { "stylesheet", edit_ss_sig, NULL, NULL, NULL }, { "startslideshow", start_slideshow_sig, NULL, NULL, NULL }, { "startslideshowhere", start_slideshow_here_sig, NULL, NULL, NULL }, { "startslideshownoslides", start_slideshow_noslides_sig, NULL, NULL, NULL }, diff --git a/src/stylesheet_editor.c b/src/stylesheet_editor.c new file mode 100644 index 0000000..85e053c --- /dev/null +++ b/src/stylesheet_editor.c @@ -0,0 +1,79 @@ +/* + * stylesheet_editor.c + * + * Copyright © 2013-2018 Thomas White <taw@bitwiz.org.uk> + * + * This file is part of Colloquium. + * + * Colloquium is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <stdlib.h> +#include <string.h> +#include <assert.h> +#include <gtk/gtk.h> + +#include "stylesheet_editor.h" +#include "presentation.h" + +G_DEFINE_TYPE_WITH_CODE(StylesheetEditor, stylesheet_editor, + GTK_TYPE_DIALOG, NULL) + +struct stylesheet_editor_private +{ + GtkDialog *default_style_ss; +}; + + +static void stylesheet_editor_init(StylesheetEditor *se) +{ + se->priv = G_TYPE_INSTANCE_GET_PRIVATE(se, COLLOQUIUM_TYPE_STYLESHEET_EDITOR, + struct stylesheet_editor_private); + gtk_widget_init_template(GTK_WIDGET(se)); +} + + +void stylesheet_editor_class_init(StylesheetEditorClass *klass) +{ + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass); + GObjectClass *gobject_class = G_OBJECT_CLASS(klass); + + gtk_widget_class_set_template_from_resource(widget_class, + "/uk/me/bitwiz/Colloquium/stylesheeteditor.ui"); + + gtk_widget_class_bind_template_child(widget_class, + struct stylesheet_editor_private, + default_style_ss); + + g_type_class_add_private(gobject_class, + sizeof(struct stylesheet_editor_private)); +} + + +StylesheetEditor *stylesheet_editor_new(struct presentation *p) +{ + StylesheetEditor *se; + + se = g_object_new(COLLOQUIUM_TYPE_STYLESHEET_EDITOR, NULL); + if ( se == NULL ) return NULL; + + return se; +} + diff --git a/src/stylesheet_editor.h b/src/stylesheet_editor.h new file mode 100644 index 0000000..ab2d65c --- /dev/null +++ b/src/stylesheet_editor.h @@ -0,0 +1,73 @@ +/* + * stylesheet_editor.h + * + * Copyright © 2013-2018 Thomas White <taw@bitwiz.org.uk> + * + * This file is part of Colloquium. + * + * Colloquium is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#ifndef STYLESHEET_EDITOR_H +#define STYLESHEET_EDITOR_H + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <gtk/gtk.h> + +#include "presentation.h" + +#define COLLOQUIUM_TYPE_STYLESHEET_EDITOR (stylesheet_editor_get_type()) + +#define COLLOQUIUM_STYLESHEET_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \ + COLLOQUIUM_TYPE_STYLESHEET_EDITOR, \ + StylesheetEditor)) + +#define COLLOQUIUM_IS_STYLESHEET_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \ + COLLOQUIUM_TYPE_STYLESHEET_EDITOR)) + +#define COLLOQUIUM_STYLESHEET_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((obj), \ + COLLOQUIUM_TYPE_STYLESHEET_EDITOR, \ + StylesheetEditorClass)) + +#define COLLOQUIUM_IS_STYLESHEET_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((obj), \ + COLLOQUIUM_TYPE_STYLESHEET_EDITOR)) + +#define COLLOQUIUM_STYLESHEET_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), \ + COLLOQUIUM_TYPE_STYLESHEET_EDITOR, \ + StylesheetEditorClass)) + +struct stylesheet_editor_private; + +struct _stylesheeteditor +{ + GtkDialog parent_instance; + struct stylesheet_editor_private *priv; +}; + + +struct _stylesheeteditorclass +{ + GtkDialogClass parent_class; +}; + +typedef struct _stylesheeteditor StylesheetEditor; +typedef struct _stylesheeteditorclass StylesheetEditorClass; + +extern StylesheetEditor *stylesheet_editor_new(struct presentation *p); + +#endif /* STYLESHEET_EDITOR_H */ |