Get GUI mostly working again
authorP. F. Chimento <philip.chimento@gmail.com>
Tue, 21 Jun 2011 07:24:22 +0000 (09:24 +0200)
committerP. F. Chimento <philip.chimento@gmail.com>
Tue, 21 Jun 2011 07:24:22 +0000 (09:24 +0200)
Add the window properties to the initializers, properly construct the
windows from the Glade file

player/chimara.ui
player/player.c
player/preferences.c
player/preferences.h

index 84e6d956d61d8a363d0f2f9cddbaa78d9b599b82..fa62cc701e185a1eaa8140274aa6ee5af11f78cc 100644 (file)
@@ -233,20 +233,11 @@ Philip Chimento</property>
       <column type="gchararray"/>
     </columns>
   </object>
       <column type="gchararray"/>
     </columns>
   </object>
-  <object class="GtkWindow" id="chimara">
+  <object class="GtkVBox" id="player-vbox">
+    <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="can_focus">False</property>
-    <property name="title" translatable="yes">Chimara</property>
-    <property name="default_width">600</property>
-    <property name="default_height">800</property>
-    <signal name="delete-event" handler="on_window_delete_event" swapped="no"/>
     <child>
     <child>
-      <object class="GtkVBox" id="vbox">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <child>
-          <placeholder/>
-        </child>
-      </object>
+      <placeholder/>
     </child>
   </object>
   <object class="GtkListStore" id="interpreters">
     </child>
   </object>
   <object class="GtkListStore" id="interpreters">
@@ -257,722 +248,667 @@ Philip Chimento</property>
       <column type="gchararray"/>
     </columns>
   </object>
       <column type="gchararray"/>
     </columns>
   </object>
-  <object class="GtkDialog" id="prefswindow">
-    <property name="can_focus">False</property>
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">Chimara Preferences</property>
-    <property name="window_position">center</property>
-    <property name="type_hint">dialog</property>
-    <signal name="response" handler="gtk_widget_hide" swapped="no"/>
-    <signal name="delete-event" handler="gtk_widget_hide_on_delete" swapped="no"/>
-    <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox2">
+  <object class="GtkNotebook" id="prefs-notebook">
+    <property name="visible">True</property>
+    <property name="can_focus">True</property>
+    <child>
+      <object class="GtkVBox" id="vbox5">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="spacing">9</property>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area2">
+        <property name="border_width">6</property>
+        <property name="spacing">6</property>
+        <child>
+          <object class="GtkFrame" id="frame2">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="layout_style">end</property>
+            <property name="label_xalign">0</property>
+            <property name="shadow_type">none</property>
             <child>
             <child>
-              <object class="GtkButton" id="button-close">
-                <property name="label">gtk-close</property>
+              <object class="GtkAlignment" id="alignment2">
                 <property name="visible">True</property>
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
-                <signal name="clicked" handler="gtk_widget_hide" object="prefswindow" swapped="yes"/>
+                <property name="can_focus">False</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkCheckButton" id="flep">
+                    <property name="label" translatable="yes">Turn on _flepping</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="tooltip_text" translatable="yes">Whether to flep or not when gronking a bloop.</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label12">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">&lt;b&gt;General settings&lt;/b&gt;</property>
+                <property name="use_markup">True</property>
               </object>
               </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
             </child>
           </object>
           <packing>
             <property name="expand">False</property>
             </child>
           </object>
           <packing>
             <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="pack_type">end</property>
+            <property name="fill">False</property>
             <property name="position">0</property>
           </packing>
         </child>
         <child>
             <property name="position">0</property>
           </packing>
         </child>
         <child>
-          <object class="GtkNotebook" id="notebook1">
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+      </object>
+    </child>
+    <child type="tab">
+      <object class="GtkLabel" id="label1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">Environment</property>
+      </object>
+      <packing>
+        <property name="tab_fill">False</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="border_width">6</property>
+        <property name="spacing">6</property>
+        <child>
+          <object class="GtkTable" id="table1">
             <property name="visible">True</property>
             <property name="visible">True</property>
-            <property name="can_focus">True</property>
+            <property name="can_focus">False</property>
+            <property name="n_columns">2</property>
             <child>
             <child>
-              <object class="GtkVBox" id="vbox5">
+              <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="border_width">6</property>
-                <property name="spacing">6</property>
-                <child>
-                  <object class="GtkFrame" id="frame2">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label_xalign">0</property>
-                    <property name="shadow_type">none</property>
-                    <child>
-                      <object class="GtkAlignment" id="alignment2">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <object class="GtkCheckButton" id="flep">
-                            <property name="label" translatable="yes">Turn on _flepping</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="tooltip_text" translatable="yes">Whether to flep or not when gronking a bloop.</property>
-                            <property name="use_action_appearance">False</property>
-                            <property name="use_underline">True</property>
-                            <property name="draw_indicator">True</property>
-                          </object>
-                        </child>
-                      </object>
-                    </child>
-                    <child type="label">
-                      <object class="GtkLabel" id="label12">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">&lt;b&gt;General settings&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </object>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
+                <property name="xalign">1</property>
+                <property name="xpad">5</property>
+                <property name="label" translatable="yes">Load layout from this CSS file:</property>
               </object>
               </object>
+              <packing>
+                <property name="x_options">GTK_FILL</property>
+              </packing>
             </child>
             </child>
-            <child type="tab">
-              <object class="GtkLabel" id="label1">
+            <child>
+              <object class="GtkFileChooserButton" id="css-filechooser">
+                <property name="width_request">250</property>
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="title" translatable="yes">Select A CSS File</property>
+                <signal name="file-set" handler="on_css_filechooser_file_set" swapped="no"/>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHSeparator" id="hseparator1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+          </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="GtkVBox" id="vbox3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkLabel" id="label9">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Environment</property>
+                <property name="xalign">0</property>
+                <property name="xpad">5</property>
+                <property name="label" translatable="yes">Select a style to edit:</property>
               </object>
               <packing>
               </object>
               <packing>
-                <property name="tab_fill">False</property>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
               </packing>
             </child>
             <child>
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox1">
+              <object class="GtkHBox" id="hbox1">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="border_width">6</property>
-                <property name="spacing">6</property>
+                <property name="spacing">12</property>
                 <child>
                 <child>
-                  <object class="GtkTable" id="table1">
+                  <object class="GtkScrolledWindow" id="scrolledwindow1">
+                    <property name="width_request">163</property>
                     <property name="visible">True</property>
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="n_columns">2</property>
+                    <property name="can_focus">True</property>
+                    <property name="hscrollbar_policy">never</property>
+                    <property name="vscrollbar_policy">automatic</property>
                     <child>
                     <child>
-                      <object class="GtkLabel" id="label5">
+                      <object class="GtkTreeView" id="style-treeview">
                         <property name="visible">True</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="xalign">1</property>
-                        <property name="xpad">5</property>
-                        <property name="label" translatable="yes">Load layout from this CSS file:</property>
+                        <property name="sensitive">False</property>
+                        <property name="can_focus">True</property>
+                        <property name="model">style-list</property>
+                        <property name="headers_visible">False</property>
+                        <property name="headers_clickable">False</property>
+                        <child>
+                          <object class="GtkTreeViewColumn" id="style-name-column">
+                            <property name="title" translatable="yes">Style Name</property>
+                            <property name="expand">True</property>
+                            <child>
+                              <object class="GtkCellRendererText" id="style-name-renderer"/>
+                              <attributes>
+                                <attribute name="text">0</attribute>
+                              </attributes>
+                            </child>
+                          </object>
+                        </child>
                       </object>
                       </object>
-                      <packing>
-                        <property name="x_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkFileChooserButton" id="css-filechooser">
-                        <property name="width_request">250</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="title" translatable="yes">Select A CSS File</property>
-                        <signal name="file-set" handler="on_css_filechooser_file_set" swapped="no"/>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                      </packing>
                     </child>
                   </object>
                   <packing>
                     </child>
                   </object>
                   <packing>
-                    <property name="expand">False</property>
+                    <property name="expand">True</property>
                     <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
                     <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHSeparator" id="hseparator1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                  </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="GtkVBox" id="vbox3">
+                  <object class="GtkVBox" id="vbox4">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="spacing">6</property>
                     <child>
                     <child>
-                      <object class="GtkLabel" id="label9">
+                      <object class="GtkTable" id="table2">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
-                        <property name="xpad">5</property>
-                        <property name="label" translatable="yes">Select a style to edit:</property>
+                        <property name="n_rows">3</property>
+                        <property name="n_columns">2</property>
+                        <property name="column_spacing">6</property>
+                        <property name="row_spacing">6</property>
+                        <child>
+                          <object class="GtkLabel" id="label6">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Font:</property>
+                          </object>
+                          <packing>
+                            <property name="x_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkFontButton" id="fontbutton1">
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
+                            <signal name="font-set" handler="on_font_set" swapped="no"/>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label7">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Foreground color:</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkColorButton" id="colorbutton1">
+                            <property name="width_request">40</property>
+                            <property name="height_request">30</property>
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="color">#000000000000</property>
+                            <signal name="color-set" handler="on_foreground_color_set" swapped="no"/>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label8">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Background color:</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                            <property name="x_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkColorButton" id="colorbutton2">
+                            <property name="width_request">40</property>
+                            <property name="height_request">30</property>
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="color">#ffffffffffff</property>
+                            <signal name="color-set" handler="on_background_color_set" swapped="no"/>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                            <property name="x_options">GTK_FILL</property>
+                          </packing>
+                        </child>
                       </object>
                       <packing>
                       </object>
                       <packing>
-                        <property name="expand">False</property>
+                        <property name="expand">True</property>
                         <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
                         <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHBox" id="hbox1">
+                      <object class="GtkHButtonBox" id="hbuttonbox1">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="spacing">12</property>
+                        <property name="spacing">6</property>
+                        <property name="layout_style">start</property>
                         <child>
                         <child>
-                          <object class="GtkScrolledWindow" id="scrolledwindow1">
-                            <property name="width_request">163</property>
+                          <object class="GtkRadioButton" id="left">
+                            <property name="label">gtk-justify-left</property>
                             <property name="visible">True</property>
                             <property name="visible">True</property>
+                            <property name="sensitive">False</property>
                             <property name="can_focus">True</property>
                             <property name="can_focus">True</property>
-                            <property name="hscrollbar_policy">never</property>
-                            <property name="vscrollbar_policy">automatic</property>
-                            <child>
-                              <object class="GtkTreeView" id="style-treeview">
-                                <property name="visible">True</property>
-                                <property name="sensitive">False</property>
-                                <property name="can_focus">True</property>
-                                <property name="model">style-list</property>
-                                <property name="headers_visible">False</property>
-                                <property name="headers_clickable">False</property>
-                                <child>
-                                  <object class="GtkTreeViewColumn" id="style-name-column">
-                                    <property name="title" translatable="yes">Style Name</property>
-                                    <property name="expand">True</property>
-                                    <child>
-                                      <object class="GtkCellRendererText" id="style-name-renderer"/>
-                                      <attributes>
-                                        <attribute name="text">0</attribute>
-                                      </attributes>
-                                    </child>
-                                  </object>
-                                </child>
-                              </object>
-                            </child>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="use_stock">True</property>
+                            <property name="image_position">top</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">False</property>
+                            <signal name="toggled" handler="on_toggle_left" swapped="no"/>
                           </object>
                           <packing>
                           </object>
                           <packing>
-                            <property name="expand">True</property>
-                            <property name="fill">True</property>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
                         <child>
                             <property name="position">0</property>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkVBox" id="vbox4">
+                          <object class="GtkRadioButton" id="center">
+                            <property name="label">gtk-justify-center</property>
                             <property name="visible">True</property>
                             <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="spacing">6</property>
-                            <child>
-                              <object class="GtkTable" id="table2">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="n_rows">3</property>
-                                <property name="n_columns">2</property>
-                                <property name="column_spacing">6</property>
-                                <property name="row_spacing">6</property>
-                                <child>
-                                  <object class="GtkLabel" id="label6">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">Font:</property>
-                                  </object>
-                                  <packing>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkFontButton" id="fontbutton1">
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">True</property>
-                                    <property name="use_action_appearance">False</property>
-                                    <signal name="font-set" handler="on_font_set" swapped="no"/>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="label7">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">Foreground color:</property>
-                                  </object>
-                                  <packing>
-                                    <property name="top_attach">1</property>
-                                    <property name="bottom_attach">2</property>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkColorButton" id="colorbutton1">
-                                    <property name="width_request">40</property>
-                                    <property name="height_request">30</property>
-                                    <property name="visible">True</property>
-                                    <property name="sensitive">False</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">True</property>
-                                    <property name="use_action_appearance">False</property>
-                                    <property name="color">#000000000000</property>
-                                    <signal name="color-set" handler="on_foreground_color_set" swapped="no"/>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
-                                    <property name="top_attach">1</property>
-                                    <property name="bottom_attach">2</property>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="label8">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">Background color:</property>
-                                  </object>
-                                  <packing>
-                                    <property name="top_attach">2</property>
-                                    <property name="bottom_attach">3</property>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkColorButton" id="colorbutton2">
-                                    <property name="width_request">40</property>
-                                    <property name="height_request">30</property>
-                                    <property name="visible">True</property>
-                                    <property name="sensitive">False</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">True</property>
-                                    <property name="use_action_appearance">False</property>
-                                    <property name="color">#ffffffffffff</property>
-                                    <signal name="color-set" handler="on_background_color_set" swapped="no"/>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
-                                    <property name="top_attach">2</property>
-                                    <property name="bottom_attach">3</property>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                              </object>
-                              <packing>
-                                <property name="expand">True</property>
-                                <property name="fill">True</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkHButtonBox" id="hbuttonbox1">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="spacing">6</property>
-                                <property name="layout_style">start</property>
-                                <child>
-                                  <object class="GtkRadioButton" id="left">
-                                    <property name="label">gtk-justify-left</property>
-                                    <property name="visible">True</property>
-                                    <property name="sensitive">False</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="use_action_appearance">False</property>
-                                    <property name="use_stock">True</property>
-                                    <property name="image_position">top</property>
-                                    <property name="active">True</property>
-                                    <property name="draw_indicator">False</property>
-                                    <signal name="toggled" handler="on_toggle_left" swapped="no"/>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkRadioButton" id="center">
-                                    <property name="label">gtk-justify-center</property>
-                                    <property name="visible">True</property>
-                                    <property name="sensitive">False</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="use_action_appearance">False</property>
-                                    <property name="use_stock">True</property>
-                                    <property name="image_position">top</property>
-                                    <property name="draw_indicator">False</property>
-                                    <property name="group">left</property>
-                                    <signal name="toggled" handler="on_toggle_center" swapped="no"/>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkRadioButton" id="right">
-                                    <property name="label">gtk-justify-right</property>
-                                    <property name="visible">True</property>
-                                    <property name="sensitive">False</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="use_action_appearance">False</property>
-                                    <property name="use_stock">True</property>
-                                    <property name="image_position">top</property>
-                                    <property name="draw_indicator">False</property>
-                                    <property name="group">left</property>
-                                    <signal name="toggled" handler="on_toggle_right" swapped="no"/>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">2</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkRadioButton" id="justify">
-                                    <property name="label">gtk-justify-fill</property>
-                                    <property name="visible">True</property>
-                                    <property name="sensitive">False</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="use_action_appearance">False</property>
-                                    <property name="use_stock">True</property>
-                                    <property name="image_position">top</property>
-                                    <property name="draw_indicator">False</property>
-                                    <property name="group">left</property>
-                                    <signal name="toggled" handler="on_toggle_justify" swapped="no"/>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">3</property>
-                                  </packing>
-                                </child>
-                              </object>
-                              <packing>
-                                <property name="expand">True</property>
-                                <property name="fill">True</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkHButtonBox" id="hbuttonbox2">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="spacing">6</property>
-                                <property name="layout_style">start</property>
-                                <child>
-                                  <object class="GtkCheckButton" id="checkbutton1">
-                                    <property name="label">gtk-bold</property>
-                                    <property name="visible">True</property>
-                                    <property name="sensitive">False</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="use_action_appearance">False</property>
-                                    <property name="use_stock">True</property>
-                                    <property name="image_position">top</property>
-                                    <property name="draw_indicator">False</property>
-                                    <signal name="toggled" handler="on_toggle_bold" swapped="no"/>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="checkbutton2">
-                                    <property name="label">gtk-italic</property>
-                                    <property name="visible">True</property>
-                                    <property name="sensitive">False</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="use_action_appearance">False</property>
-                                    <property name="use_stock">True</property>
-                                    <property name="image_position">top</property>
-                                    <property name="draw_indicator">False</property>
-                                    <signal name="toggled" handler="on_toggle_italic" swapped="no"/>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="underline">
-                                    <property name="label">gtk-underline</property>
-                                    <property name="visible">True</property>
-                                    <property name="sensitive">False</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="use_action_appearance">False</property>
-                                    <property name="use_stock">True</property>
-                                    <property name="image_position">top</property>
-                                    <property name="draw_indicator">False</property>
-                                    <signal name="toggled" handler="on_toggle_underline" swapped="no"/>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">2</property>
-                                  </packing>
-                                </child>
-                              </object>
-                              <packing>
-                                <property name="expand">True</property>
-                                <property name="fill">True</property>
-                                <property name="position">2</property>
-                              </packing>
-                            </child>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="use_stock">True</property>
+                            <property name="image_position">top</property>
+                            <property name="draw_indicator">False</property>
+                            <property name="group">left</property>
+                            <signal name="toggled" handler="on_toggle_center" swapped="no"/>
                           </object>
                           <packing>
                           </object>
                           <packing>
-                            <property name="expand">True</property>
-                            <property name="fill">True</property>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
                             <property name="position">1</property>
                           </packing>
                         </child>
                             <property name="position">1</property>
                           </packing>
                         </child>
+                        <child>
+                          <object class="GtkRadioButton" id="right">
+                            <property name="label">gtk-justify-right</property>
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="use_stock">True</property>
+                            <property name="image_position">top</property>
+                            <property name="draw_indicator">False</property>
+                            <property name="group">left</property>
+                            <signal name="toggled" handler="on_toggle_right" swapped="no"/>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="justify">
+                            <property name="label">gtk-justify-fill</property>
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="use_stock">True</property>
+                            <property name="image_position">top</property>
+                            <property name="draw_indicator">False</property>
+                            <property name="group">left</property>
+                            <signal name="toggled" handler="on_toggle_justify" swapped="no"/>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">3</property>
+                          </packing>
+                        </child>
                       </object>
                       <packing>
                         <property name="expand">True</property>
                         <property name="fill">True</property>
                       </object>
                       <packing>
                         <property name="expand">True</property>
                         <property name="fill">True</property>
-                        <property name="padding">5</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
                         <property name="position">1</property>
                       </packing>
                     </child>
+                    <child>
+                      <object class="GtkHButtonBox" id="hbuttonbox2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">6</property>
+                        <property name="layout_style">start</property>
+                        <child>
+                          <object class="GtkCheckButton" id="checkbutton1">
+                            <property name="label">gtk-bold</property>
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="use_stock">True</property>
+                            <property name="image_position">top</property>
+                            <property name="draw_indicator">False</property>
+                            <signal name="toggled" handler="on_toggle_bold" swapped="no"/>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="checkbutton2">
+                            <property name="label">gtk-italic</property>
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="use_stock">True</property>
+                            <property name="image_position">top</property>
+                            <property name="draw_indicator">False</property>
+                            <signal name="toggled" handler="on_toggle_italic" swapped="no"/>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="underline">
+                            <property name="label">gtk-underline</property>
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="use_stock">True</property>
+                            <property name="image_position">top</property>
+                            <property name="draw_indicator">False</property>
+                            <signal name="toggled" handler="on_toggle_underline" swapped="no"/>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
                   </object>
                   <packing>
                     <property name="expand">True</property>
                     <property name="fill">True</property>
                   </object>
                   <packing>
                     <property name="expand">True</property>
                     <property name="fill">True</property>
-                    <property name="padding">5</property>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label4">
-                    <property name="height_request">30</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
-                    <property name="yalign">1</property>
-                    <property name="xpad">5</property>
-                    <property name="label" translatable="yes">Example text:</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">3</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkTextView" id="example-textview">
-                    <property name="height_request">100</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="editable">False</property>
-                    <property name="wrap_mode">word-char</property>
-                    <property name="left_margin">10</property>
-                    <property name="right_margin">10</property>
-                  </object>
-                  <packing>
-                    <property name="expand">True</property>
-                    <property name="fill">True</property>
-                    <property name="position">4</property>
+                    <property name="position">1</property>
                   </packing>
                 </child>
               </object>
               <packing>
                   </packing>
                 </child>
               </object>
               <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="padding">5</property>
                 <property name="position">1</property>
               </packing>
             </child>
                 <property name="position">1</property>
               </packing>
             </child>
-            <child type="tab">
-              <object class="GtkLabel" id="label2">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Layout</property>
-              </object>
-              <packing>
-                <property name="position">1</property>
-                <property name="tab_fill">False</property>
-              </packing>
-            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="padding">5</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label4">
+            <property name="height_request">30</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="yalign">1</property>
+            <property name="xpad">5</property>
+            <property name="label" translatable="yes">Example text:</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkTextView" id="example-textview">
+            <property name="height_request">100</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="editable">False</property>
+            <property name="wrap_mode">word-char</property>
+            <property name="left_margin">10</property>
+            <property name="right_margin">10</property>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">4</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child type="tab">
+      <object class="GtkLabel" id="label2">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">Layout</property>
+      </object>
+      <packing>
+        <property name="position">1</property>
+        <property name="tab_fill">False</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox2">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="border_width">6</property>
+        <property name="spacing">6</property>
+        <child>
+          <object class="GtkFrame" id="frame1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0</property>
+            <property name="shadow_type">none</property>
             <child>
             <child>
-              <object class="GtkVBox" id="vbox2">
+              <object class="GtkAlignment" id="alignment1">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="border_width">6</property>
-                <property name="spacing">6</property>
+                <property name="left_padding">12</property>
                 <child>
                 <child>
-                  <object class="GtkFrame" id="frame1">
+                  <object class="GtkScrolledWindow" id="scrolledwindow2">
                     <property name="visible">True</property>
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label_xalign">0</property>
-                    <property name="shadow_type">none</property>
+                    <property name="can_focus">True</property>
+                    <property name="hscrollbar_policy">automatic</property>
+                    <property name="vscrollbar_policy">automatic</property>
                     <child>
                     <child>
-                      <object class="GtkAlignment" id="alignment1">
+                      <object class="GtkTreeView" id="interpreters_view">
                         <property name="visible">True</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="left_padding">12</property>
+                        <property name="can_focus">True</property>
+                        <property name="tooltip_text" translatable="yes">Which interpreter to use by default for each story format</property>
+                        <property name="model">interpreters</property>
+                        <property name="headers_clickable">False</property>
+                        <property name="rules_hint">True</property>
                         <child>
                         <child>
-                          <object class="GtkScrolledWindow" id="scrolledwindow2">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="hscrollbar_policy">automatic</property>
-                            <property name="vscrollbar_policy">automatic</property>
+                          <object class="GtkTreeViewColumn" id="format_column">
+                            <property name="title">Format</property>
+                            <child>
+                              <object class="GtkCellRendererText" id="format_renderer"/>
+                              <attributes>
+                                <attribute name="text">0</attribute>
+                              </attributes>
+                            </child>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkTreeViewColumn" id="interpreter_column">
+                            <property name="title">Interpreter</property>
                             <child>
                             <child>
-                              <object class="GtkTreeView" id="interpreters_view">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="tooltip_text" translatable="yes">Which interpreter to use by default for each story format</property>
-                                <property name="model">interpreters</property>
-                                <property name="headers_clickable">False</property>
-                                <property name="rules_hint">True</property>
-                                <child>
-                                  <object class="GtkTreeViewColumn" id="format_column">
-                                    <property name="title">Format</property>
-                                    <child>
-                                      <object class="GtkCellRendererText" id="format_renderer"/>
-                                      <attributes>
-                                        <attribute name="text">0</attribute>
-                                      </attributes>
-                                    </child>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkTreeViewColumn" id="interpreter_column">
-                                    <property name="title">Interpreter</property>
-                                    <child>
-                                      <object class="GtkCellRendererCombo" id="interpreter_renderer">
-                                        <property name="editable">True</property>
-                                        <property name="has_entry">False</property>
-                                        <property name="model">available_interpreters</property>
-                                        <property name="text_column">0</property>
-                                        <signal name="changed" handler="on_interpreter_cell_changed" swapped="no"/>
-                                      </object>
-                                      <attributes>
-                                        <attribute name="text">1</attribute>
-                                      </attributes>
-                                    </child>
-                                  </object>
-                                </child>
+                              <object class="GtkCellRendererCombo" id="interpreter_renderer">
+                                <property name="editable">True</property>
+                                <property name="has_entry">False</property>
+                                <property name="model">available_interpreters</property>
+                                <property name="text_column">0</property>
+                                <signal name="changed" handler="on_interpreter_cell_changed" swapped="no"/>
                               </object>
                               </object>
+                              <attributes>
+                                <attribute name="text">1</attribute>
+                              </attributes>
                             </child>
                           </object>
                         </child>
                       </object>
                     </child>
                             </child>
                           </object>
                         </child>
                       </object>
                     </child>
-                    <child type="label">
-                      <object class="GtkLabel" id="label10">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Preferred interpreters&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </object>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="expand">True</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkHBox" id="hbox3">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="spacing">6</property>
-                    <child>
-                      <object class="GtkLabel" id="label11">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Look for _resource files in:</property>
-                        <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">blorb_file_chooser</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkFileChooserButton" id="blorb_file_chooser">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="tooltip_text" translatable="yes">Where to look for Blorb resource files containing graphics and sound; normally, these are part of the story file itself, but they are provided as separate files in some older games.</property>
-                        <property name="action">select-folder</property>
-                        <signal name="file-set" handler="on_resource_file_set" swapped="no"/>
-                      </object>
-                      <packing>
-                        <property name="expand">True</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
                   </object>
                   </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">1</property>
-                  </packing>
                 </child>
               </object>
                 </child>
               </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label10">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">&lt;b&gt;Preferred interpreters&lt;/b&gt;</property>
+                <property name="use_markup">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">6</property>
+            <child>
+              <object class="GtkLabel" id="label11">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Look for _resource files in:</property>
+                <property name="use_underline">True</property>
+                <property name="mnemonic_widget">blorb_file_chooser</property>
+              </object>
               <packing>
               <packing>
-                <property name="position">2</property>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
               </packing>
             </child>
               </packing>
             </child>
-            <child type="tab">
-              <object class="GtkLabel" id="label3">
+            <child>
+              <object class="GtkFileChooserButton" id="blorb_file_chooser">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Interpreters</property>
+                <property name="tooltip_text" translatable="yes">Where to look for Blorb resource files containing graphics and sound; normally, these are part of the story file itself, but they are provided as separate files in some older games.</property>
+                <property name="action">select-folder</property>
+                <signal name="file-set" handler="on_resource_file_set" swapped="no"/>
               </object>
               <packing>
               </object>
               <packing>
-                <property name="position">2</property>
-                <property name="tab_fill">False</property>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
               </packing>
             </child>
           </object>
           <packing>
               </packing>
             </child>
           </object>
           <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-            <property name="position">2</property>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
           </packing>
         </child>
       </object>
+      <packing>
+        <property name="position">2</property>
+      </packing>
+    </child>
+    <child type="tab">
+      <object class="GtkLabel" id="label3">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">Interpreters</property>
+      </object>
+      <packing>
+        <property name="position">2</property>
+        <property name="tab_fill">False</property>
+      </packing>
     </child>
     </child>
-    <action-widgets>
-      <action-widget response="0">button-close</action-widget>
-    </action-widgets>
   </object>
   <object class="GtkTreeStore" id="style-list">
     <columns>
   </object>
   <object class="GtkTreeStore" id="style-list">
     <columns>
index b59da1b374aa7d4921bcd3ddf856e61854e6d972..0d8d629d016dfe407cf458c20f4ddec889a27e74 100644 (file)
@@ -1,4 +1,5 @@
 #include <glib-object.h>
 #include <glib-object.h>
+#include <glib/gi18n.h>
 #include <libchimara/chimara-glk.h>
 #include <libchimara/chimara-if.h>
 #include "player.h"
 #include <libchimara/chimara-glk.h>
 #include <libchimara/chimara-if.h>
 #include "player.h"
@@ -92,11 +93,19 @@ static void
 chimara_player_init(ChimaraPlayer *self)
 {      
        GError *error = NULL;
 chimara_player_init(ChimaraPlayer *self)
 {      
        GError *error = NULL;
-       
+
+       /* Set parent properties */
+       g_object_set(self,
+               "title", _("Chimara"),
+               "default-width", 600,
+               "default-height", 800,
+               NULL);
+
+       /* Construct user interface */
        GtkBuilder *builder = gtk_builder_new();
        char *object_ids[] = {
                "actiongroup",
        GtkBuilder *builder = gtk_builder_new();
        char *object_ids[] = {
                "actiongroup",
-               "vbox",
+               "player-vbox",
                NULL
        };
        
                NULL
        };
        
@@ -159,7 +168,7 @@ chimara_player_init(ChimaraPlayer *self)
         chimara_glk_set_css_from_string(CHIMARA_GLK(glk),
         "buffer.normal { font-family: 'Comic Sans MS'; }");*/
        
         chimara_glk_set_css_from_string(CHIMARA_GLK(glk),
         "buffer.normal { font-family: 'Comic Sans MS'; }");*/
        
-       GtkBox *vbox = GTK_BOX(load_object(builder, "vbox"));                   
+       GtkBox *vbox = GTK_BOX(load_object(builder, "player-vbox"));    
 
        ChimaraApp *theapp = chimara_app_get();
 
 
        ChimaraApp *theapp = chimara_app_get();
 
@@ -301,10 +310,3 @@ on_quit_activate(GtkAction *action, ChimaraPlayer *player)
        chimara_glk_feed_line_input(CHIMARA_GLK(player->glk), "quit");
 }
 
        chimara_glk_feed_line_input(CHIMARA_GLK(player->glk), "quit");
 }
 
-gboolean 
-on_window_delete_event(GtkWidget *widget, GdkEvent *event, ChimaraPlayer *player) 
-{
-       gtk_main_quit();
-       return TRUE;
-}
-
index 2f764a745cd01f2b8f3c79d3b49e5cd371109e09..e03e81bee70fd23575208fce80e3ec4f3566d767 100644 (file)
@@ -49,7 +49,7 @@ typedef struct _ChimaraPrefsPrivate {
 #define CHIMARA_PREFS_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), CHIMARA_TYPE_PREFS, ChimaraPrefsPrivate))
 #define CHIMARA_PREFS_USE_PRIVATE ChimaraPrefsPrivate *priv = CHIMARA_PREFS_PRIVATE(self)
 
 #define CHIMARA_PREFS_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), CHIMARA_TYPE_PREFS, ChimaraPrefsPrivate))
 #define CHIMARA_PREFS_USE_PRIVATE ChimaraPrefsPrivate *priv = CHIMARA_PREFS_PRIVATE(self)
 
-G_DEFINE_TYPE(ChimaraPrefs, chimara_prefs, GTK_TYPE_WINDOW);
+G_DEFINE_TYPE(ChimaraPrefs, chimara_prefs, GTK_TYPE_DIALOG);
 
 static GtkTextTag *current_tag;
 static GtkListStore *preferred_list;
 
 static GtkTextTag *current_tag;
 static GtkListStore *preferred_list;
@@ -189,11 +189,22 @@ chimara_prefs_init(ChimaraPrefs *self)
 {
        GError *error = NULL;
        ChimaraApp *theapp = chimara_app_get();
 {
        GError *error = NULL;
        ChimaraApp *theapp = chimara_app_get();
+
+       /* Set parent properties */
+       g_object_set(self,
+               "title", _("Chimara Preferences"),
+               "window-position", GTK_WIN_POS_CENTER,
+               "type-hint", GDK_WINDOW_TYPE_HINT_DIALOG,
+               "border-width", 6,
+               NULL);
+       gtk_dialog_add_buttons(GTK_DIALOG(self),
+               GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
+               NULL);
        
        /* Build user interface */
        GtkBuilder *builder = gtk_builder_new();
        char *object_ids[] = {
        
        /* Build user interface */
        GtkBuilder *builder = gtk_builder_new();
        char *object_ids[] = {
-               "prefswindow",
+               "prefs-notebook",
                "available_interpreters",
                "interpreters",
                "style-list",
                "available_interpreters",
                "interpreters",
                "style-list",
@@ -212,6 +223,10 @@ chimara_prefs_init(ChimaraPrefs *self)
                }
 #endif /* DEBUG */
        }
                }
 #endif /* DEBUG */
        }
+
+       GtkWidget *notebook = GTK_WIDGET( load_object(builder, "prefs-notebook") );
+       GtkWidget *content_area = gtk_dialog_get_content_area( GTK_DIALOG(self) );
+       gtk_container_add( GTK_CONTAINER(content_area), notebook );
        
        /* Initialize the tree of style names */
        GtkTreeStore *style_list = GTK_TREE_STORE( load_object(builder, "style-list") );
        
        /* Initialize the tree of style names */
        GtkTreeStore *style_list = GTK_TREE_STORE( load_object(builder, "style-list") );
@@ -296,6 +311,13 @@ chimara_prefs_init(ChimaraPrefs *self)
        //              1, interpreter_to_display_string(chimara_if_get_preferred_interpreter(CHIMARA_IF(glk), count)),
        //              -1);
        //}
        //              1, interpreter_to_display_string(chimara_if_get_preferred_interpreter(CHIMARA_IF(glk), count)),
        //              -1);
        //}
+
+       gtk_builder_connect_signals(builder, self);
+       g_object_unref(builder);
+
+       /* Connect own signals */
+       g_signal_connect(self, "response", G_CALLBACK(gtk_widget_hide), NULL);
+       g_signal_connect(self, "delete-event", G_CALLBACK(gtk_widget_hide_on_delete), NULL);
 }
 
 /* PUBLIC FUNCTIONS */
 }
 
 /* PUBLIC FUNCTIONS */
@@ -331,7 +353,6 @@ style_tree_select_callback(GtkTreeSelection *selection)
        //      current_tag = chimara_glk_get_tag(glk, CHIMARA_GLK_TEXT_GRID, child_name);
 }
 
        //      current_tag = chimara_glk_get_tag(glk, CHIMARA_GLK_TEXT_GRID, child_name);
 }
 
-#if 0
 void
 on_toggle_left(GtkToggleButton *button, ChimaraGlk *glk) {
        /* No nothing if the button is deactivated */
 void
 on_toggle_left(GtkToggleButton *button, ChimaraGlk *glk) {
        /* No nothing if the button is deactivated */
@@ -421,7 +442,6 @@ on_font_set(GtkFontButton *button, ChimaraGlk *glk)
        g_object_set(current_tag, "font-desc", font_description, NULL);
        chimara_glk_update_style(glk);
 }
        g_object_set(current_tag, "font-desc", font_description, NULL);
        chimara_glk_update_style(glk);
 }
-#endif
 
 void
 on_css_filechooser_file_set(GtkFileChooserButton *button, ChimaraGlk *glk)
 
 void
 on_css_filechooser_file_set(GtkFileChooserButton *button, ChimaraGlk *glk)
index cf357df13e4939315eb5a60611c6f18a88f8641a..144a98599373b1bd6ddec693e00d08aa94fdd73b 100644 (file)
@@ -15,13 +15,13 @@ G_BEGIN_DECLS
 #define CHIMARA_PREFS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), CHIMARA_TYPE_PREFS, ChimaraPrefsClass))
 
 typedef struct _ChimaraPrefs {
 #define CHIMARA_PREFS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), CHIMARA_TYPE_PREFS, ChimaraPrefsClass))
 
 typedef struct _ChimaraPrefs {
-       GtkWindow parent_instance;
+       GtkDialog parent_instance;
        
        /* Public pointers */
 } ChimaraPrefs;
 
 typedef struct _ChimaraPrefsClass {
        
        /* Public pointers */
 } ChimaraPrefs;
 
 typedef struct _ChimaraPrefsClass {
-       GtkWindowClass parent_class;
+       GtkDialogClass parent_class;
 } ChimaraPrefsClass;
 
 GType chimara_prefs_get_type(void) G_GNUC_CONST;
 } ChimaraPrefsClass;
 
 GType chimara_prefs_get_type(void) G_GNUC_CONST;