[Xfce4-commits] r30109 - in terminal/trunk: . terminal

Nick Schermer nick at xfce.org
Sun Jun 28 13:31:37 CEST 2009


Author: nick
Date: 2009-06-28 11:31:37 +0000 (Sun, 28 Jun 2009)
New Revision: 30109

Added:
   terminal/trunk/Terminal.glade
Modified:
   terminal/trunk/Makefile.am
   terminal/trunk/configure.in.in
   terminal/trunk/terminal/Makefile.am
   terminal/trunk/terminal/terminal-preferences-dialog.c
   terminal/trunk/terminal/terminal-preferences-dialog.h
   terminal/trunk/terminal/terminal-preferences.c
   terminal/trunk/terminal/terminal-window.c
Log:
Convert the preferences dialog into GtkBuilder (bug #2399 and bug #5496).

The glade file is installed along the binary installation
to reduce the binary size and make editing easier. I've changes
a bunch of mnemonics so there are no conflics anymore. Some ATK
relation were not moved to glade yet, will do that later.


Modified: terminal/trunk/Makefile.am
===================================================================
--- terminal/trunk/Makefile.am	2009-06-27 21:49:56 UTC (rev 30108)
+++ terminal/trunk/Makefile.am	2009-06-28 11:31:37 UTC (rev 30109)
@@ -33,7 +33,8 @@
 
 uidir = $(datadir)/Terminal
 ui_DATA = 								\
-	Terminal-toolbars.ui
+	Terminal-toolbars.ui						\
+	Terminal.glade
 
 EXTRA_DIST =								\
 	HACKING								\

Added: terminal/trunk/Terminal.glade
===================================================================
--- terminal/trunk/Terminal.glade	                        (rev 0)
+++ terminal/trunk/Terminal.glade	2009-06-28 11:31:37 UTC (rev 30109)
@@ -0,0 +1,1852 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="gtk+" version="2.16"/>
+  <!-- interface-requires libxfce4ui 4.5 -->
+  <!-- interface-naming-policy project-wide -->
+  <object class="GtkListStore" id="liststore1">
+    <columns>
+      <!-- column-name title -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Replaces initial title</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Goes before initial title</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Goes after initial title</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Isn't displayed</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="liststore2">
+    <columns>
+      <!-- column-name title -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Disabled</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">On the left side</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">On the right side</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="liststore3">
+    <columns>
+      <!-- column-name title -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">None (use solid color)</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Background image</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Transparent background</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="liststore4">
+    <columns>
+      <!-- column-name title -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Auto-detect</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">ASCII DEL</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Escape sequence</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Control-H</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="liststore5">
+    <columns>
+      <!-- column-name title -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Auto-detect</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">ASCII DEL</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Escape sequence</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Control-H</col>
+      </row>
+    </data>
+  </object>
+  <object class="XfceTitledDialog" id="dialog">
+    <property name="title" translatable="yes">Terminal Preferences</property>
+    <property name="icon_name">Terminal</property>
+    <property name="type_hint">normal</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkNotebook" id="notebook1">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="border_width">6</property>
+            <child>
+              <object class="GtkVBox" id="vbox1">
+                <property name="visible">True</property>
+                <property name="border_width">6</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkFrame" id="frame1">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment1">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkTable" id="table1">
+                            <property name="visible">True</property>
+                            <property name="border_width">6</property>
+                            <property name="n_rows">2</property>
+                            <property name="n_columns">2</property>
+                            <property name="column_spacing">12</property>
+                            <property name="row_spacing">6</property>
+                            <child>
+                              <object class="GtkLabel" id="label5">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">_Initial title:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">title-initial</property>
+                              </object>
+                              <packing>
+                                <property name="x_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkEntry" id="title-initial">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="invisible_char">&#x2022;</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label6">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">_Dynamically-set title:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">title-mode</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="GtkComboBox" id="title-mode">
+                                <property name="visible">True</property>
+                                <property name="model">liststore1</property>
+                                <child>
+                                  <object class="GtkCellRendererText" id="cellrenderertext1"/>
+                                  <attributes>
+                                    <attribute name="text">0</attribute>
+                                  </attributes>
+                                </child>
+                              </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>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label4">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Title</property>
+                        <property name="use_markup">True</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame2">
+                    <property name="visible">True</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="left_padding">12</property>
+                        <child>
+                          <object class="GtkVBox" id="vbox2">
+                            <property name="visible">True</property>
+                            <property name="border_width">6</property>
+                            <property name="orientation">vertical</property>
+                            <property name="spacing">6</property>
+                            <child>
+                              <object class="GtkCheckButton" id="command-login-shell">
+                                <property name="label" translatable="yes">_Run command as login shell</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="tooltip_text" translatable="yes">Select this option to force Terminal to run your shell as a login shell when you open new terminals. See the documentation of your shell for details about differences between running it as interactive shell and running it as login shell.</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="command-update-records">
+                                <property name="label" translatable="yes">_Update utmp/wtmp records when command is launched</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label7">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Command</property>
+                        <property name="use_markup">True</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame3">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment3">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkVBox" id="vbox3">
+                            <property name="visible">True</property>
+                            <property name="border_width">6</property>
+                            <property name="orientation">vertical</property>
+                            <property name="spacing">6</property>
+                            <child>
+                              <object class="GtkCheckButton" id="scrolling-single-line">
+                                <property name="label" translatable="yes">Scroll single _line using Shift-Up/-Down keys</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="tooltip_text" translatable="yes">Enable this option to be able to scroll by a single line using the up/down arrow keys together with the Shift key.</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox" id="hbox1">
+                                <property name="visible">True</property>
+                                <property name="spacing">12</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <object class="GtkCheckButton" id="scrolling-on-output">
+                                    <property name="label" translatable="yes">Scroll on ou_tput</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="tooltip_text" translatable="yes">This option controls whether the terminal will scroll down automatically whenever new output is generated by the commands running inside the terminal.</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkCheckButton" id="scrolling-on-keystroke">
+                                    <property name="label" translatable="yes">Scroll on _keystroke</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="tooltip_text" translatable="yes">Enables you to press any key on the keyboard to scroll down the terminal window to the command prompt.</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkTable" id="table2">
+                                <property name="visible">True</property>
+                                <property name="n_rows">2</property>
+                                <property name="n_columns">2</property>
+                                <property name="column_spacing">12</property>
+                                <property name="row_spacing">6</property>
+                                <child>
+                                  <object class="GtkLabel" id="label9">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">_Scrollbar is:</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="mnemonic_widget">scrolling-bar</property>
+                                  </object>
+                                  <packing>
+                                    <property name="x_options">GTK_FILL</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label10">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">Scroll_back:</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="mnemonic_widget">scrolling-lines</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="GtkSpinButton" id="scrolling-lines">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip_text" translatable="yes">Specifies the number of lines that you can scroll back using the scrollbar.</property>
+                                    <property name="invisible_char">&#x2022;</property>
+                                    <property name="adjustment">scrolling-line</property>
+                                    <property name="numeric">True</property>
+                                    <property name="update_policy">if-valid</property>
+                                  </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>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkComboBox" id="scrolling-bar">
+                                    <property name="visible">True</property>
+                                    <property name="model">liststore2</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" id="cellrenderertext2"/>
+                                      <attributes>
+                                        <attribute name="text">0</attribute>
+                                      </attributes>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label8">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Scrolling</property>
+                        <property name="use_markup">True</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="label1">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_General</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox4">
+                <property name="visible">True</property>
+                <property name="border_width">6</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkFrame" id="frame4">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment4">
+                        <property name="visible">True</property>
+                        <property name="border_width">6</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkVBox" id="vbox5">
+                            <property name="visible">True</property>
+                            <property name="orientation">vertical</property>
+                            <property name="spacing">6</property>
+                            <child>
+                              <object class="GtkFontButton" id="font-name">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <property name="title" translatable="yes">Choose Terminal Font</property>
+                                <property name="font_name">Monospace 12</property>
+                                <property name="use_font">True</property>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="font-anti-alias">
+                                <property name="label" translatable="yes">Enab_le anti-aliasing for the terminal font</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="tooltip_text" translatable="yes">Enable this option if you want Terminal to use anti-aliasing when rendering text in terminal windows. Disabling this option can impressively speed up terminal rendering performance and reduce the overall system load on slow systems.</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="font-allow-bold">
+                                <property name="label" translatable="yes">Allow bold te_xt</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="tooltip_text" translatable="yes">Enable this option to allow applications running inside the terminal windows to use bold text.</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label11">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Font</property>
+                        <property name="use_markup">True</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame5">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment5">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkVBox" id="vbox6">
+                            <property name="visible">True</property>
+                            <property name="border_width">6</property>
+                            <property name="orientation">vertical</property>
+                            <property name="spacing">6</property>
+                            <child>
+                              <object class="GtkComboBox" id="background-mode">
+                                <property name="visible">True</property>
+                                <property name="model">liststore3</property>
+                                <child>
+                                  <object class="GtkCellRendererText" id="cellrenderertext3"/>
+                                  <attributes>
+                                    <attribute name="text">0</attribute>
+                                  </attributes>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkTable" id="box-file">
+                                <property name="visible">True</property>
+                                <property name="n_rows">2</property>
+                                <property name="n_columns">2</property>
+                                <property name="column_spacing">12</property>
+                                <property name="row_spacing">6</property>
+                                <child>
+                                  <object class="GtkLabel" id="file-label">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">_File:</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="mnemonic_widget">background-image-file</property>
+                                  </object>
+                                  <packing>
+                                    <property name="x_options">GTK_FILL</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="style-label">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">St_yle:</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="mnemonic_widget">background-image-style</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="GtkComboBox" id="background-image-style">
+                                    <property name="visible">True</property>
+                                    <property name="model">liststore6</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" id="cellrenderertext6"/>
+                                      <attributes>
+                                        <attribute name="text">0</attribute>
+                                      </attributes>
+                                    </child>
+                                  </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>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkFileChooserButton" id="background-image-file">
+                                    <property name="visible">True</property>
+                                    <property name="title" translatable="yes">Select Background Image File</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox" id="box-opacity">
+                                <property name="visible">True</property>
+                                <property name="spacing">12</property>
+                                <child>
+                                  <object class="GtkLabel" id="opacity-label">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">Transpare_ncy:</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="mnemonic_widget">trans-scale</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkHScale" id="trans-scale">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="update_policy">delayed</property>
+                                    <property name="adjustment">background-darkness</property>
+                                    <property name="digits">2</property>
+                                    <property name="value_pos">right</property>
+                                  </object>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label12">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Background</property>
+                        <property name="use_markup">True</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame6">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment6">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkVBox" id="vbox7">
+                            <property name="visible">True</property>
+                            <property name="border_width">6</property>
+                            <property name="orientation">vertical</property>
+                            <property name="spacing">6</property>
+                            <child>
+                              <object class="GtkCheckButton" id="misc-menubar-default">
+                                <property name="label" translatable="yes">Display _menubar in new windows</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="tooltip_text" translatable="yes">Enable this option to show the menubar in newly created terminal windows.</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="misc-toolbars-default">
+                                <property name="label" translatable="yes">Display _toolbars in new windows</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="tooltip_text" translatable="yes">Enable this option to show the toolbars in newly created terminal windows.</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="misc-borders-default">
+                                <property name="label" translatable="yes">Display _borders around new windows</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="tooltip_text" translatable="yes">Enable this option to show window decorations around newly created terminal windows.</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label13">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Opening New Windows</property>
+                        <property name="use_markup">True</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">2</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="label" translatable="yes">_Appearance</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="position">1</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox8">
+                <property name="visible">True</property>
+                <property name="border_width">6</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkFrame" id="frame7">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment7">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkTable" id="table3">
+                            <property name="visible">True</property>
+                            <property name="border_width">6</property>
+                            <property name="n_rows">3</property>
+                            <property name="n_columns">2</property>
+                            <property name="column_spacing">12</property>
+                            <property name="row_spacing">6</property>
+                            <child>
+                              <object class="GtkLabel" id="label15">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">_Text and cursor color:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">color-foreground</property>
+                              </object>
+                              <packing>
+                                <property name="x_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label16">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">_Background color:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">color-background</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="GtkLabel" id="label17">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Tab activit_y color:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">tab-activity-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="GtkAlignment" id="alignment8">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="xscale">0</property>
+                                <property name="yscale">0</property>
+                                <child>
+                                  <object class="GtkColorButton" id="tab-activity-color">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="title" translatable="yes">Choose tab activity color</property>
+                                    <property name="color">#000000000000</property>
+                                  </object>
+                                </child>
+                              </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>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkAlignment" id="alignment9">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="xscale">0</property>
+                                <property name="yscale">0</property>
+                                <child>
+                                  <object class="GtkColorButton" id="color-background">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="title" translatable="yes">Choose terminal background color</property>
+                                    <property name="color">#000000000000</property>
+                                  </object>
+                                </child>
+                              </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>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkAlignment" id="alignment10">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="xscale">0</property>
+                                <property name="yscale">0</property>
+                                <child>
+                                  <object class="GtkHBox" id="hbox2">
+                                    <property name="visible">True</property>
+                                    <property name="spacing">2</property>
+                                    <child>
+                                      <object class="GtkColorButton" id="color-foreground">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="title" translatable="yes">Choose terminal text color</property>
+                                        <property name="color">#000000000000</property>
+                                      </object>
+                                      <packing>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkColorButton" id="color-cursor">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="title" translatable="yes">Choose terminal cursor color</property>
+                                        <property name="color">#000000000000</property>
+                                      </object>
+                                      <packing>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label14">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">General</property>
+                        <property name="use_markup">True</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame8">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment11">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkVBox" id="vbox9">
+                            <property name="visible">True</property>
+                            <property name="border_width">6</property>
+                            <property name="orientation">vertical</property>
+                            <property name="spacing">6</property>
+                            <child>
+                              <object class="GtkRadioButton" id="color-selection-use-default">
+                                <property name="label" translatable="yes">Use _default color</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="tooltip_text" translatable="yes">Use the default text selection background color</property>
+                                <property name="use_underline">True</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox" id="hbox3">
+                                <property name="visible">True</property>
+                                <property name="spacing">12</property>
+                                <child>
+                                  <object class="GtkRadioButton" id="color-selection-use-color">
+                                    <property name="label" translatable="yes">Use c_ustom color:</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="tooltip_text" translatable="yes">Use a custom text selection background color</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="draw_indicator">True</property>
+                                    <property name="group">color-selection-use-default</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkColorButton" id="color-selection">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="title" translatable="yes">Choose terminal text selection background color</property>
+                                    <property name="color">#000000000000</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label18">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Text Selection</property>
+                        <property name="use_markup">True</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame9">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment12">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkVBox" id="vbox10">
+                            <property name="visible">True</property>
+                            <property name="border_width">6</property>
+                            <property name="orientation">vertical</property>
+                            <property name="spacing">6</property>
+                            <child>
+                              <object class="GtkLabel" id="label20">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Terminal applications have this color palette available to them:</property>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkTable" id="table4">
+                                <property name="visible">True</property>
+                                <property name="n_rows">2</property>
+                                <property name="n_columns">8</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <object class="GtkColorButton" id="color-palette1">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="tooltip_text" translatable="yes">Palette entry 1</property>
+                                    <property name="color">#000000000000</property>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkColorButton" id="color-palette2">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="tooltip_text" translatable="yes">Palette entry 2</property>
+                                    <property name="color">#000000000000</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkColorButton" id="color-palette12">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="tooltip_text" translatable="yes">Palette entry 12</property>
+                                    <property name="color">#000000000000</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">3</property>
+                                    <property name="right_attach">4</property>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkColorButton" id="color-palette9">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="tooltip_text" translatable="yes">Palette entry 9</property>
+                                    <property name="color">#000000000000</property>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkColorButton" id="color-palette10">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="tooltip_text" translatable="yes">Palette entry 10</property>
+                                    <property name="color">#000000000000</property>
+                                  </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>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkColorButton" id="color-palette11">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="tooltip_text" translatable="yes">Palette entry 11</property>
+                                    <property name="color">#000000000000</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">2</property>
+                                    <property name="right_attach">3</property>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkColorButton" id="color-palette3">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="tooltip_text" translatable="yes">Palette entry 3</property>
+                                    <property name="color">#000000000000</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">2</property>
+                                    <property name="right_attach">3</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkColorButton" id="color-palette4">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="tooltip_text" translatable="yes">Palette entry 4</property>
+                                    <property name="color">#000000000000</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">3</property>
+                                    <property name="right_attach">4</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkColorButton" id="color-palette5">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="tooltip_text" translatable="yes">Palette entry 5</property>
+                                    <property name="color">#000000000000</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">4</property>
+                                    <property name="right_attach">5</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkColorButton" id="color-palette13">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="tooltip_text" translatable="yes">Palette entry 13</property>
+                                    <property name="color">#000000000000</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">4</property>
+                                    <property name="right_attach">5</property>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkColorButton" id="color-palette14">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="tooltip_text" translatable="yes">Palette entry 14</property>
+                                    <property name="color">#000000000000</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">5</property>
+                                    <property name="right_attach">6</property>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkColorButton" id="color-palette6">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="tooltip_text" translatable="yes">Palette entry 6</property>
+                                    <property name="color">#000000000000</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">5</property>
+                                    <property name="right_attach">6</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkColorButton" id="color-palette7">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="tooltip_text" translatable="yes">Palette entry 7</property>
+                                    <property name="color">#000000000000</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">6</property>
+                                    <property name="right_attach">7</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkColorButton" id="color-palette15">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="tooltip_text" translatable="yes">Palette entry 15</property>
+                                    <property name="color">#000000000000</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">6</property>
+                                    <property name="right_attach">7</property>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkColorButton" id="color-palette16">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="tooltip_text" translatable="yes">Palette entry 16</property>
+                                    <property name="color">#000000000000</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">7</property>
+                                    <property name="right_attach">8</property>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkColorButton" id="color-palette8">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="tooltip_text" translatable="yes">Palette entry 8</property>
+                                    <property name="color">#000000000000</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">7</property>
+                                    <property name="right_attach">8</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label19">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Palette</property>
+                        <property name="use_markup">True</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">2</property>
+                  </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="label" translatable="yes">_Colors</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="position">2</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox11">
+                <property name="visible">True</property>
+                <property name="border_width">6</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkFrame" id="frame10">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment13">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkScrolledWindow" id="editor-container">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="border_width">6</property>
+                            <property name="hscrollbar_policy">automatic</property>
+                            <property name="vscrollbar_policy">automatic</property>
+                            <property name="shadow_type">etched-in</property>
+                            <child>
+                              <placeholder/>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label23">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Shortcut Keys</property>
+                        <property name="use_markup">True</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame11">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment14">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkVBox" id="vbox12">
+                            <property name="visible">True</property>
+                            <property name="border_width">6</property>
+                            <property name="orientation">vertical</property>
+                            <property name="spacing">6</property>
+                            <child>
+                              <object class="GtkCheckButton" id="shortcuts-no-mnemonics">
+                                <property name="label" translatable="yes">Disable all me_nu access keys (such as Alt+f)</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="shortcuts-no-menukey">
+                                <property name="label" translatable="yes">Disable m_enu shortcut keys (F10 by default)</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label24">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Menubar Access</property>
+                        <property name="use_markup">True</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="label21">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Shortcuts</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="position">3</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox13">
+                <property name="visible">True</property>
+                <property name="border_width">6</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkFrame" id="frame12">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment15">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkTable" id="table5">
+                            <property name="visible">True</property>
+                            <property name="border_width">6</property>
+                            <property name="n_rows">5</property>
+                            <property name="n_columns">2</property>
+                            <property name="column_spacing">12</property>
+                            <property name="row_spacing">6</property>
+                            <child>
+                              <object class="GtkLabel" id="label31">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">_Backspace key generates:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">binding-backspace</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="GtkLabel" id="label32">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">_Delete key generates:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">binding-delete</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="GtkLabel" id="label33">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">$TERM s_etting:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">term</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
+                                <property name="x_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkAlignment" id="alignment18">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="xscale">0</property>
+                                <child>
+                                  <object class="GtkButton" id="reset-compatibility">
+                                    <property name="label" translatable="yes">_Reset comparibility options to defaults</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="use_underline">True</property>
+                                  </object>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">4</property>
+                                <property name="bottom_attach">5</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkComboBox" id="binding-delete">
+                                <property name="visible">True</property>
+                                <property name="model">liststore5</property>
+                                <child>
+                                  <object class="GtkCellRendererText" id="cellrenderertext5"/>
+                                  <attributes>
+                                    <attribute name="text">0</attribute>
+                                  </attributes>
+                                </child>
+                              </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>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkComboBox" id="binding-backspace">
+                                <property name="visible">True</property>
+                                <property name="model">liststore4</property>
+                                <child>
+                                  <object class="GtkCellRendererText" id="cellrenderertext4"/>
+                                  <attributes>
+                                    <attribute name="text">0</attribute>
+                                  </attributes>
+                                </child>
+                              </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>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkEntry" id="term">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="tooltip_text" translatable="yes">This specifies the value the $TERM environment variable is set to, when a new terminal tab or terminal window is opened. The default should be ok for most systems. If you have problems with colors in some applications, try xterm-color here.</property>
+                                <property name="invisible_char">&#x2022;</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label34">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">These options may cause some applications to behave
+incorrectly. They are only here to allow you to work around
+certain applications and operating systems that expect
+different terminal behavior.</property>
+                                <property name="wrap">True</property>
+                              </object>
+                              <packing>
+                                <property name="right_attach">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label25">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Compatibility</property>
+                        <property name="use_markup">True</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame13">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment16">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkVBox" id="vbox14">
+                            <property name="visible">True</property>
+                            <property name="border_width">6</property>
+                            <property name="orientation">vertical</property>
+                            <property name="spacing">6</property>
+                            <child>
+                              <object class="GtkLabel" id="label30">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Consider the following characters part of a _word
+when double clicking:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">word-chars</property>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkEntry" id="word-chars">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="invisible_char">&#x2022;</property>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label26">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Double Click</property>
+                        <property name="use_markup">True</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame14">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment17">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkHBox" id="hbox4">
+                            <property name="visible">True</property>
+                            <property name="border_width">6</property>
+                            <property name="spacing">6</property>
+                            <child>
+                              <object class="GtkLabel" id="label28">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Reset tab activity _indicator after</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">spinbutton2</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkSpinButton" id="spinbutton2">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="invisible_char">&#x2022;</property>
+                                <property name="adjustment">tab-activity-timeout</property>
+                                <property name="numeric">True</property>
+                                <property name="update_policy">if-valid</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label29">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">seconds</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label27">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Tab Activity Indicator</property>
+                        <property name="use_markup">True</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">4</property>
+              </packing>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="label22">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Ad_vanced</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="position">4</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="button-help">
+                <property name="label" translatable="yes">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+                <property name="secondary">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="button-close">
+                <property name="label" translatable="yes">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>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="1">button-help</action-widget>
+      <action-widget response="0">button-close</action-widget>
+    </action-widgets>
+  </object>
+  <object class="GtkAdjustment" id="scrolling-line">
+    <property name="lower">48</property>
+    <property name="upper">5242880</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="tab-activity-timeout">
+    <property name="upper">30</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkListStore" id="liststore6">
+    <columns>
+      <!-- column-name title -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Titled</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Centered</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Scaled</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Stretched</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkAdjustment" id="background-darkness">
+    <property name="lower">0.050000000000000003</property>
+    <property name="upper">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">0.10000000000000001</property>
+  </object>
+  <object class="GtkSizeGroup" id="sizegroup1">
+    <widgets>
+      <widget name="opacity-label"/>
+      <widget name="style-label"/>
+    </widgets>
+  </object>
+</interface>

Modified: terminal/trunk/configure.in.in
===================================================================
--- terminal/trunk/configure.in.in	2009-06-27 21:49:56 UTC (rev 30108)
+++ terminal/trunk/configure.in.in	2009-06-28 11:31:37 UTC (rev 30109)
@@ -85,6 +85,7 @@
 XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0])
 XDT_CHECK_PACKAGE([VTE], [vte], [0.17.1])
 XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.16.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.5.0])
 
 dnl *************************************************
 dnl *** Optional support for startup notification ***

Modified: terminal/trunk/terminal/Makefile.am
===================================================================
--- terminal/trunk/terminal/Makefile.am	2009-06-27 21:49:56 UTC (rev 30108)
+++ terminal/trunk/terminal/Makefile.am	2009-06-28 11:31:37 UTC (rev 30109)
@@ -73,6 +73,7 @@
 	$(LIBSTARTUP_NOTIFICATION_CFLAGS)				\
 	$(LIBX11_CFLAGS)						\
 	$(VTE_CFLAGS)							\
+	$(LIBXFCE4UI_CFLAGS)						\
 	$(PLATFORM_CFLAGS)
 
 Terminal_LDFLAGS =							\
@@ -85,6 +86,7 @@
 	$(LIBX11_LDFLAGS)						\
 	$(LIBX11_LIBS)							\
 	$(VTE_LIBS)							\
+	$(LIBXFCE4UI_LIBS)						\
 	$(TERMINAL_LIBS)
 
 # install symlink to 'terminal'

Modified: terminal/trunk/terminal/terminal-preferences-dialog.c
===================================================================
--- terminal/trunk/terminal/terminal-preferences-dialog.c	2009-06-27 21:49:56 UTC (rev 30108)
+++ terminal/trunk/terminal/terminal-preferences-dialog.c	2009-06-28 11:31:37 UTC (rev 30109)
@@ -33,31 +33,26 @@
 
 
 
-/* Property identifiers */
-enum
-{
-  PIXBUF_COLUMN,
-  TEXT_COLUMN,
-  INDEX_COLUMN,
-  LAST_COLUMN,
-};
+static void terminal_preferences_dialog_finalize          (GObject                   *object);
+static void terminal_preferences_dialog_response          (GtkWidget                 *widget,
+                                                           gint                       response,
+                                                           TerminalPreferencesDialog *dialog);
+static void terminal_preferences_dialog_reset_compat      (GtkWidget                 *button,
+                                                           TerminalPreferencesDialog *dialog);
+static void terminal_preferences_dialog_background_mode   (GtkWidget                 *combobox,
+                                                           TerminalPreferencesDialog *dialog);
+static void terminal_preferences_dialog_background_notify (GObject                   *object,
+                                                           GParamSpec                *pspec,
+                                                           GObject                   *widget);
+static void terminal_preferences_dialog_background_set    (GtkFileChooserButton      *widget,
+                                                           TerminalPreferencesDialog *dialog);
 
 
 
-static void terminal_preferences_dialog_finalize     (GObject                        *object);
-static void terminal_preferences_dialog_response     (TerminalPreferencesDialog      *dialog,
-                                                      gint                            response);
-static void terminal_preferences_open_image_file     (GtkWidget                      *button,
-                                                      GtkWidget                      *entry);
-static void terminal_preferences_dialog_reset_compat (GtkWidget                      *button,
-                                                      TerminalPreferencesDialog      *dialog);
+G_DEFINE_TYPE (TerminalPreferencesDialog, terminal_preferences_dialog, GTK_TYPE_BUILDER)
 
 
 
-G_DEFINE_TYPE (TerminalPreferencesDialog, terminal_preferences_dialog, GTK_TYPE_DIALOG)
-
-
-
 static void
 terminal_preferences_dialog_class_init (TerminalPreferencesDialogClass *klass)
 {
@@ -69,1004 +64,148 @@
 
 
 
-/* Convert int -> boolean (i == 1) */
-static gboolean
-transform_is1 (const GValue *src_value,
-               GValue       *dst_value,
-               gpointer      user_data)
-{
-  g_value_set_boolean (dst_value, g_value_get_enum (src_value) == 1);
-  return TRUE;
-}
+#define BIND_PROPERTIES(name, property) \
+  { object = gtk_builder_get_object (GTK_BUILDER (dialog), name); \
+  _terminal_return_if_fail (G_IS_OBJECT (object)); \
+  exo_mutual_binding_new (G_OBJECT (dialog->preferences), name, \
+                          G_OBJECT (object), property); }
 
 
 
-/* Convert int -> boolean (i == 1 || i == 2) */
-static gboolean
-transform_is1_or_is2 (const GValue *src_value,
-                      GValue       *dst_value,
-                      gpointer      user_data)
-{
-  gint i;
-
-  i = g_value_get_enum (src_value);
-  g_value_set_boolean (dst_value, (i == 1 || i == 2));
-
-  return TRUE;
-}
-
-
-
 static void
 terminal_preferences_dialog_init (TerminalPreferencesDialog *dialog)
 {
-  GtkListStore      *store;
-  GtkTreeIter        iter;
-  GdkPixbuf         *icon;
-  GtkWidget         *button;
-  GtkWidget         *entry;
-  GtkWidget         *hbox;
-  GtkWidget         *swin;
-  GtkWidget         *box;
-  GtkWidget         *frame;
-  GtkWidget         *vbox;
-  GtkWidget         *table;
-  GtkWidget         *combo;
-  GtkWidget         *label;
-  GtkWidget         *image;
-  GtkWidget         *ibox;
-  GtkWidget         *align;
-  GtkWidget         *editor;
-  AtkRelationSet    *relations;
-  AtkRelation       *relation;
-  AtkObject         *object;
-  GSList            *group;
-  gchar             *name;
-  gint               idx;
-  gint               n;
-  gchar             *palette_tip;
+  GError        *error = NULL;
+  guint          i;
+  GObject       *object, *object2;
+  GtkWidget     *editor;
+  gchar          palette_name[16];
+  GtkFileFilter *filter;
+  gchar         *file;
+  const gchar   *props_active[] = { "title-mode", "command-login-shell",
+                                    "command-update-records", "scrolling-single-line",
+                                    "scrolling-on-output", "scrolling-on-keystroke",
+                                    "scrolling-bar", "font-allow-bold",
+                                    "misc-menubar-default", "misc-toolbars-default",
+                                    "misc-borders-default", "color-selection-use-default",
+                                    "shortcuts-no-mnemonics", "shortcuts-no-menukey",
+                                    "binding-backspace", "binding-delete",
+                                    "background-mode", "background-image-style" };
+  const gchar   *props_color[] =  { "color-foreground", "color-cursor",
+                                    "color-background", "tab-activity-color",
+                                    "color-selection" };
 
   dialog->preferences = terminal_preferences_get ();
 
-  /* initialize the dialog window */
-  gtk_dialog_add_buttons (GTK_DIALOG (dialog),
-                          GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL,
-                          GTK_STOCK_HELP, GTK_RESPONSE_HELP,
-                          NULL);
-  gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
-  gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
-  gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
-  gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
-  gtk_window_set_title (GTK_WINDOW (dialog), _("Terminal Preferences"));
+  /* hack to initialize the XfceTitledDialog class */
+  if (xfce_titled_dialog_get_type () == 0)
+    return;
 
-  g_signal_connect (G_OBJECT (dialog), "response",
-                    G_CALLBACK (terminal_preferences_dialog_response), NULL);
+  /* lookup the glade file */
+  xfce_resource_push_path (XFCE_RESOURCE_DATA, DATADIR);
+  file = xfce_resource_lookup (XFCE_RESOURCE_DATA, "Terminal/Terminal.glade");
+  xfce_resource_pop_path (XFCE_RESOURCE_DATA);
 
-  hbox = gtk_hbox_new (FALSE, 0);
-  gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, TRUE, TRUE, 0);
-  gtk_widget_show (hbox);
+  if (G_UNLIKELY (file == NULL))
+    {
+      g_set_error (&error, 0, 0, "file not found");
+      goto error;
+    }
 
-  swin = gtk_scrolled_window_new (NULL, NULL);
-  g_object_set (G_OBJECT (swin),
-                "hscrollbar-policy", GTK_POLICY_NEVER,
-                "shadow-type", GTK_SHADOW_IN,
-                "vscrollbar-policy", GTK_POLICY_NEVER,
-                NULL);
-  gtk_box_pack_start (GTK_BOX (hbox), swin, FALSE, FALSE, 0);
-  gtk_widget_show (swin);
+  /* load the builder data into the object */
+  if (gtk_builder_add_from_file (GTK_BUILDER (dialog), file, &error) == 0)
+    {
+error:
+      g_critical ("Failed to load glade file: %s.", error->message);
+      g_error_free (error);
+      return;
+    }
 
-  store = gtk_list_store_new (LAST_COLUMN, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_INT);
+  /* connect response to dialog */
+  object = gtk_builder_get_object (GTK_BUILDER (dialog), "dialog");
+  _terminal_return_if_fail (G_IS_OBJECT (object));
+  g_object_weak_ref (G_OBJECT (object), (GWeakNotify) g_object_unref, dialog);
+  g_signal_connect (G_OBJECT (object), "response",
+      G_CALLBACK (terminal_preferences_dialog_response), dialog);
 
-  dialog->icon_bar = exo_icon_bar_new_with_model (GTK_TREE_MODEL (store));
-  exo_icon_bar_set_pixbuf_column (EXO_ICON_BAR (dialog->icon_bar), PIXBUF_COLUMN);
-  exo_icon_bar_set_text_column (EXO_ICON_BAR (dialog->icon_bar), TEXT_COLUMN);
-  gtk_container_add (GTK_CONTAINER (swin), dialog->icon_bar);
-  gtk_widget_show (dialog->icon_bar);
+  /* bind active properties */
+  for (i = 0; i < G_N_ELEMENTS (props_active); i++)
+    BIND_PROPERTIES (props_active[i], "active");
 
-  dialog->notebook = gtk_notebook_new ();
-  g_object_set (G_OBJECT (dialog->notebook),
-                "show-border", FALSE,
-                "show-tabs", FALSE,
-                NULL);
-  gtk_box_pack_start (GTK_BOX (hbox), dialog->notebook, TRUE, TRUE, 0);
-  gtk_widget_show (dialog->notebook);
+  /* bind color properties */
+  for (i = 0; i < G_N_ELEMENTS (props_color); i++)
+    BIND_PROPERTIES (props_color[i], "color");
 
-
-  /*
-     General
-   */
-  box = gtk_vbox_new (FALSE, 12);
-  gtk_container_set_border_width (GTK_CONTAINER (box), 12);
-  idx = gtk_notebook_append_page (GTK_NOTEBOOK (dialog->notebook), box, NULL);
-  gtk_widget_show (box);
-
-  frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", GTK_SHADOW_NONE, NULL);
-  gtk_box_pack_start (GTK_BOX (box), frame, FALSE, TRUE, 0);
-  gtk_widget_show (frame);
-
-  label = g_object_new (GTK_TYPE_LABEL, "label", _("<b>Title</b>"), "use-markup", TRUE, NULL);
-  gtk_frame_set_label_widget (GTK_FRAME (frame), label);
-  gtk_widget_show (label);
-
-  table = gtk_table_new (2, 2, FALSE);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
-  gtk_container_set_border_width (GTK_CONTAINER (table), 12);
-  gtk_container_add (GTK_CONTAINER (frame), table);
-  gtk_widget_show (table);
-
-  label = g_object_new (GTK_TYPE_LABEL,
-                        "wrap", TRUE,
-                        "label", _("The command running inside the terminal may dynamically set a new title."),
-                        "xalign", 0.0,
-                        NULL);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-  gtk_widget_show (label);
-
-  label = gtk_label_new_with_mnemonic (_("_Initial title:"));
-  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
-  gtk_widget_show (label);
-
-  entry = gtk_entry_new ();
-  gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "title-initial", G_OBJECT (entry), "text");
-  gtk_table_attach (GTK_TABLE (table), entry, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-  gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
-  gtk_widget_show (entry);
-
-  /* set Atk label relation for the entry */
-  terminal_gtk_label_set_a11y_relation (GTK_LABEL (label), entry);
-
-  label = gtk_label_new_with_mnemonic (_("_Dynamically-set title:"));
-  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0);
-  gtk_widget_show (label);
-
-  hbox = gtk_hbox_new (FALSE, 0);
-  gtk_table_attach (GTK_TABLE (table), hbox, 1, 2, 2, 3, GTK_FILL, GTK_FILL, 0, 0);
-  gtk_widget_show (hbox);
-
-  combo = gtk_combo_box_new_text ();
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Replaces initial title"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Goes before initial title"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Goes after initial title"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Isn't displayed"));
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "title-mode", G_OBJECT (combo), "active");
-  gtk_box_pack_start (GTK_BOX (hbox), combo, FALSE, TRUE, 0);
-  gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo);
-  gtk_widget_show (combo);
-
-  /* set Atk label relation for the combo */
-  terminal_gtk_label_set_a11y_relation (GTK_LABEL (label), combo);
-
-  frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", GTK_SHADOW_NONE, NULL);
-  gtk_box_pack_start (GTK_BOX (box), frame, FALSE, TRUE, 0);
-  gtk_widget_show (frame);
-
-  label = g_object_new (GTK_TYPE_LABEL, "label", _("<b>Command</b>"), "use-markup", TRUE, NULL);
-  gtk_frame_set_label_widget (GTK_FRAME (frame), label);
-  gtk_widget_show (label);
-
-  vbox = gtk_vbox_new (FALSE, 6);
-  gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
-  gtk_container_add (GTK_CONTAINER (frame), vbox);
-  gtk_widget_show (vbox);
-
-  button = gtk_check_button_new_with_mnemonic (_("_Run command as login shell"));
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "command-login-shell", G_OBJECT (button), "active");
-  gtk_widget_set_tooltip_text (button,
-                               _("Select this option to force Terminal to run your shell as a login shell "
-                                 "when you open new terminals. See the documentation of your shell for "
-                                 "details about differences between running it as interactive shell and "
-                                 "running it as login shell."));
-  gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, TRUE, 0);
-  gtk_widget_show (button);
-
-  button = gtk_check_button_new_with_mnemonic (_("_Update utmp/wtmp records when command is launched"));
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "command-update-records", G_OBJECT (button), "active");
-  gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, TRUE, 0);
-  gtk_widget_show (button);
-
-  frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", GTK_SHADOW_NONE, NULL);
-  gtk_box_pack_start (GTK_BOX (box), frame, FALSE, TRUE, 0);
-  gtk_widget_show (frame);
-
-  label = g_object_new (GTK_TYPE_LABEL, "label", _("<b>Scrolling</b>"), "use-markup", TRUE, NULL);
-  gtk_frame_set_label_widget (GTK_FRAME (frame), label);
-  gtk_widget_show (label);
-
-  vbox = gtk_vbox_new (FALSE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
-  gtk_container_add (GTK_CONTAINER (frame), vbox);
-  gtk_widget_show (vbox);
-
-  table = gtk_table_new (4, 2, FALSE);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
-  gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, TRUE, 0);
-  gtk_widget_show (table);
-
-  button = gtk_check_button_new_with_mnemonic (_("Scroll single _line using Shift-Up/-Down keys"));
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "scrolling-single-line", G_OBJECT (button), "active");
-  gtk_widget_set_tooltip_text (button,
-                               _("Enable this option to be able to scroll by a single line "
-                                 "using the up/down arrow keys together with the Shift key."));
-  gtk_table_attach (GTK_TABLE (table), button, 0, 2, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
-  gtk_widget_show (button);
-
-  hbox = gtk_hbox_new (FALSE, 6);
-  gtk_table_attach (GTK_TABLE (table), hbox, 0, 2, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
-  gtk_widget_show (hbox);
-
-  button = gtk_check_button_new_with_mnemonic (_("Sc_roll on output"));
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "scrolling-on-output", G_OBJECT (button), "active");
-  gtk_widget_set_tooltip_text (button,
-                               _("This option controls whether the terminal will scroll "
-                                 "down automatically whenever new output is generated by "
-                                 "the commands running inside the terminal."));
-  gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
-  gtk_widget_show (button);
-
-  button = gtk_check_button_new_with_mnemonic (_("Scroll on _keystroke"));
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "scrolling-on-keystroke", G_OBJECT (button), "active");
-  gtk_widget_set_tooltip_text (button,
-                               _("Enables you to press any key on the "
-                                 "keyboard to scroll down the terminal "
-                                 "window to the command prompt."));
-  gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
-  gtk_widget_show (button);
-
-  label = gtk_label_new_with_mnemonic (_("_Scrollbar is:"));
-  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 6);
-  gtk_widget_show (label);
-
-  combo = gtk_combo_box_new_text ();
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Disabled"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("On the left side"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("On the right side"));
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "scrolling-bar", G_OBJECT (combo), "active");
-  gtk_table_attach (GTK_TABLE (table), combo, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-  gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo);
-  gtk_widget_show (combo);
-
-  /* set Atk label relation for the combo */
-  terminal_gtk_label_set_a11y_relation (GTK_LABEL (label), combo);
-
-  label = gtk_label_new_with_mnemonic (_("Scr_ollback:"));
-  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4, GTK_FILL, GTK_FILL, 0, 0);
-  gtk_widget_show (label);
-
-  button = gtk_spin_button_new_with_range (48.0, 5 * 1024.0 * 1024.0, 1.0);
-  gtk_entry_set_activates_default (GTK_ENTRY (button), TRUE);
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "scrolling-lines",
-                          G_OBJECT (gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (button))), "value");
-  gtk_widget_set_tooltip_text (button,
-                               _("Specifies the number of lines that you can "
-                                 "scroll back using the scrollbar."));
-  gtk_table_attach (GTK_TABLE (table), button, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-  gtk_label_set_mnemonic_widget (GTK_LABEL (label), button);
-  gtk_widget_show (button);
-
-  /* set Atk label relation for the spin button */
-  terminal_gtk_label_set_a11y_relation (GTK_LABEL (label), button);
-
-  icon = gtk_widget_render_icon (GTK_WIDGET (dialog->icon_bar),
-                                 TERMINAL_STOCK_GENERAL,
-                                 GTK_ICON_SIZE_DIALOG,
-                                 NULL);
-  gtk_list_store_append (store, &iter);
-  gtk_list_store_set (store, &iter,
-                      PIXBUF_COLUMN, icon,
-                      TEXT_COLUMN, _("General"),
-                      INDEX_COLUMN, idx,
-                      -1);
-  g_object_unref (G_OBJECT (icon));
-
-
-  /*
-     Appearance
-   */
-  box = gtk_vbox_new (FALSE, 12);
-  gtk_container_set_border_width (GTK_CONTAINER (box), 12);
-  idx = gtk_notebook_append_page (GTK_NOTEBOOK (dialog->notebook), box, NULL);
-  gtk_widget_show (box);
-
-  frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", GTK_SHADOW_NONE, NULL);
-  gtk_box_pack_start (GTK_BOX (box), frame, FALSE, TRUE, 0);
-  gtk_widget_show (frame);
-
-  label = g_object_new (GTK_TYPE_LABEL, "label", _("<b>Font</b>"), "use-markup", TRUE, NULL);
-  gtk_frame_set_label_widget (GTK_FRAME (frame), label);
-  gtk_widget_show (label);
-
-  vbox = gtk_vbox_new (FALSE, 6);
-  gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
-  gtk_container_add (GTK_CONTAINER (frame), vbox);
-  gtk_widget_show (vbox);
-
-  button = g_object_new (GTK_TYPE_FONT_BUTTON, "title", _("Choose Terminal Font"), "use-font", TRUE, NULL);
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "font-name", G_OBJECT (button), "font-name");
-  gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, TRUE, 0);
-  gtk_widget_show (button);
-
-#if TERMINAL_HAS_ANTI_ALIAS_SETTING
-  button = gtk_check_button_new_with_mnemonic (_("Enable anti-aliasing for the terminal font"));
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "font-anti-alias", G_OBJECT (button), "active");
-  gtk_widget_set_tooltip_text (button,
-                               _("Enable this option if you want Terminal to use anti-aliasing when "
-                                 "rendering text in terminal windows. Disabling this option can "
-                                 "impressively speed up terminal rendering performance and reduce "
-                                 "the overall system load on slow systems."));
-  gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, TRUE, 0);
-  gtk_widget_show (button);
-#endif
-
-  button = gtk_check_button_new_with_mnemonic (_("Allow bold text"));
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "font-allow-bold", G_OBJECT (button), "active");
-  gtk_widget_set_tooltip_text (button,
-                               _("Enable this option to allow applications running inside the "
-                                 "terminal windows to use bold text."));
-  gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, TRUE, 0);
-  gtk_widget_show (button);
-
-  frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", GTK_SHADOW_NONE, NULL);
-  gtk_box_pack_start (GTK_BOX (box), frame, FALSE, TRUE, 0);
-  gtk_widget_show (frame);
-
-  label = g_object_new (GTK_TYPE_LABEL, "label", _("<b>Background</b>"), "use-markup", TRUE, NULL);
-  gtk_frame_set_label_widget (GTK_FRAME (frame), label);
-  gtk_widget_show (label);
-
-  vbox = gtk_vbox_new (FALSE, 12);
-  gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
-  gtk_container_add (GTK_CONTAINER (frame), vbox);
-  gtk_widget_show (vbox);
-
-  combo = gtk_combo_box_new_text ();
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("None (use solid color)"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Background image"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Transparent background"));
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "background-mode", G_OBJECT (combo), "active");
-  gtk_box_pack_start (GTK_BOX (vbox), combo, FALSE, TRUE, 0);
-  gtk_widget_show (combo);
-
-  table = gtk_table_new (2, 2, FALSE);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
-  gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, TRUE, 0);
-  gtk_widget_show (table);
-
-  exo_binding_new_full (G_OBJECT (dialog->preferences), "background-mode", G_OBJECT (table), "visible",
-                        transform_is1, NULL, NULL);
-
-  label = gtk_label_new_with_mnemonic (_("_File:"));
-  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
-  gtk_widget_show (label);
-
-  hbox = gtk_hbox_new (FALSE, 1);
-  gtk_table_attach (GTK_TABLE (table), hbox, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-  gtk_widget_show (hbox);
-
-  entry = gtk_entry_new ();
-  gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "background-image-file", G_OBJECT (entry), "text");
-  gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
-  gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
-  gtk_widget_show (entry);
-
-  button = gtk_button_new ();
-  image = gtk_image_new_from_stock (GTK_STOCK_OPEN, GTK_ICON_SIZE_BUTTON);
-  gtk_container_add (GTK_CONTAINER (button), image);
-  g_signal_connect (G_OBJECT (button), "clicked",
-                    G_CALLBACK (terminal_preferences_open_image_file), entry);
-  gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, TRUE, 0);
-  gtk_widget_show (image);
-  gtk_widget_show (button);
-
-  label = gtk_label_new_with_mnemonic (_("_Style:"));
-  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
-  gtk_widget_show (label);
-
-  combo = gtk_combo_box_new_text ();
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Tiled"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Centered"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Scaled"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Stretched"));
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "background-image-style", G_OBJECT (combo), "active");
-  gtk_table_attach (GTK_TABLE (table), combo, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-  gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo);
-  gtk_widget_show (combo);
-
-  ibox = gtk_vbox_new (FALSE, 1);
-  gtk_box_pack_start (GTK_BOX (vbox), ibox, FALSE, TRUE, 0);
-  gtk_widget_show (ibox);
-
-  exo_binding_new_full (G_OBJECT (dialog->preferences), "background-mode", G_OBJECT (ibox), "visible",
-                        transform_is1_or_is2, NULL, NULL);
-
-  label = gtk_label_new (_("Shade transparent or image background:"));
-  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-  gtk_box_pack_start (GTK_BOX (ibox), label, FALSE, TRUE, 0);
-  gtk_widget_show (label);
-
-  hbox = gtk_hbox_new (FALSE, 6);
-  gtk_box_pack_start (GTK_BOX (ibox), hbox, FALSE, TRUE, 0);
-  gtk_widget_show (hbox);
-
-  label = g_object_new (GTK_TYPE_ALIGNMENT, "width-request", 12, NULL);
-  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
-  gtk_widget_show (label);
-
-  label = g_object_new (GTK_TYPE_LABEL, "label", _("<small><i>None</i></small>"), "use-markup", TRUE, NULL);
-  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
-  gtk_widget_show (label);
-
-  button = gtk_hscale_new_with_range (0.0, 1.0, 0.05);
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "background-darkness",
-                          G_OBJECT (gtk_range_get_adjustment (GTK_RANGE (button))), "value");
-  gtk_scale_set_draw_value (GTK_SCALE (button), FALSE);
-  gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
-  gtk_widget_show (button);
-
-  label = g_object_new (GTK_TYPE_LABEL, "label", _("<small><i>Maximum</i></small>"), "use-markup", TRUE, NULL);
-  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
-  gtk_widget_show (label);
-
-  frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", GTK_SHADOW_NONE, NULL);
-  gtk_box_pack_start (GTK_BOX (box), frame, FALSE, TRUE, 0);
-  gtk_widget_show (frame);
-
-  label = g_object_new (GTK_TYPE_LABEL, "label", _("<b>Opening New Windows</b>"), "use-markup", TRUE, NULL);
-  gtk_frame_set_label_widget (GTK_FRAME (frame), label);
-  gtk_widget_show (label);
-
-  vbox = gtk_vbox_new (FALSE, 6);
-  gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
-  gtk_container_add (GTK_CONTAINER (frame), vbox);
-  gtk_widget_show (vbox);
-
-  button = gtk_check_button_new_with_mnemonic (_("Display _menubar in new windows"));
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "misc-menubar-default", G_OBJECT (button), "active");
-  gtk_widget_set_tooltip_text (button,
-                               _("Enable this option to show the menubar in newly "
-                                 "created terminal windows."));
-  gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
-  gtk_widget_show (button);
-
-  button = gtk_check_button_new_with_mnemonic (_("Display _toolbars in new windows"));
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "misc-toolbars-default", G_OBJECT (button), "active");
-  gtk_widget_set_tooltip_text (button,
-                               _("Enable this option to show the toolbars in newly "
-                                 "created terminal windows."));
-  gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
-  gtk_widget_show (button);
-
-  button = gtk_check_button_new_with_mnemonic (_("Display _borders around new windows"));
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "misc-borders-default", G_OBJECT (button), "active");
-  gtk_widget_set_tooltip_text (button,
-                               _("Enable this option to show window decorations around newly "
-                                 "created terminal windows."));
-  gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
-  gtk_widget_show (button);
-
-  icon = gtk_widget_render_icon (GTK_WIDGET (dialog->icon_bar),
-                                 TERMINAL_STOCK_APPEARANCE,
-                                 GTK_ICON_SIZE_DIALOG,
-                                 NULL);
-  gtk_list_store_append (store, &iter);
-  gtk_list_store_set (store, &iter,
-                      PIXBUF_COLUMN, icon,
-                      TEXT_COLUMN, _("Appearance"),
-                      INDEX_COLUMN, idx,
-                      -1);
-  g_object_unref (icon);
-
-
-  /*
-     Colors
-   */
-  box = gtk_vbox_new (FALSE, 12);
-  gtk_container_set_border_width (GTK_CONTAINER (box), 12);
-  idx = gtk_notebook_append_page (GTK_NOTEBOOK (dialog->notebook), box, NULL);
-  gtk_widget_show (box);
-
-  frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", GTK_SHADOW_NONE, NULL);
-  gtk_box_pack_start (GTK_BOX (box), frame, FALSE, TRUE, 0);
-  gtk_widget_show (frame);
-
-  label = g_object_new (GTK_TYPE_LABEL, "label", _("<b>Foreground and Background</b>"), "use-markup", TRUE, NULL);
-  gtk_frame_set_label_widget (GTK_FRAME (frame), label);
-  gtk_widget_show (label);
-
-  table = gtk_table_new (3, 2, FALSE);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
-  gtk_container_set_border_width (GTK_CONTAINER (table), 12);
-  gtk_container_add (GTK_CONTAINER (frame), table);
-  gtk_widget_show (table);
-
-  label = g_object_new (GTK_TYPE_LABEL,
-                        "label", _("_Text and cursor color:"),
-                        "use-underline", TRUE,
-                        "xalign", 0.0,
-                        NULL);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
-  gtk_widget_show (label);
-
-  align = gtk_alignment_new (0.0, 0.5, 0.0, 0.0);
-  gtk_table_attach (GTK_TABLE (table), align, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-  gtk_widget_show (align);
-
-  hbox = gtk_hbox_new (FALSE, 0);
-  gtk_container_add (GTK_CONTAINER (align), hbox);
-  gtk_widget_show (hbox);
-
-  button = g_object_new (GTK_TYPE_COLOR_BUTTON, "title", _("Choose terminal text color"), NULL);
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "color-foreground", G_OBJECT (button), "color");
-  gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
-  gtk_label_set_mnemonic_widget (GTK_LABEL (label), button);
-  gtk_widget_show (button);
-
-  /* set Atk name/description and label relation for the button */
-  object = gtk_widget_get_accessible (button);
-  atk_object_set_name (object, _("Color Selector"));
-  atk_object_set_description (object, _("Open a dialog to specify the color"));
-  relations = atk_object_ref_relation_set (gtk_widget_get_accessible (label));
-  relation = atk_relation_new (&object, 1, ATK_RELATION_LABEL_FOR);
-  atk_relation_set_add (relations, relation);
-  g_object_unref (G_OBJECT (relation));
-
-  button = g_object_new (GTK_TYPE_COLOR_BUTTON, "title", _("Choose terminal cursor color"), NULL);
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "color-cursor", G_OBJECT (button), "color");
-  gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
-  gtk_label_set_mnemonic_widget (GTK_LABEL (label), button);
-  gtk_widget_show (button);
-
-  /* set Atk name/description and label relation for the button */
-  object = gtk_widget_get_accessible (button);
-  atk_object_set_name (object, _("Color Selector"));
-  atk_object_set_description (object, _("Open a dialog to specify the color"));
-  relations = atk_object_ref_relation_set (gtk_widget_get_accessible (label));
-  relation = atk_relation_new (&object, 1, ATK_RELATION_LABEL_FOR);
-  atk_relation_set_add (relations, relation);
-  g_object_unref (G_OBJECT (relation));
-
-  label = g_object_new (GTK_TYPE_LABEL,
-                        "label", _("_Background color:"),
-                        "use-underline", TRUE,
-                        "xalign", 0.0,
-                        NULL);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
-  gtk_widget_show (label);
-
-  align = gtk_alignment_new (0.0, 0.5, 0.0, 0.0);
-  gtk_table_attach (GTK_TABLE (table), align, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-  gtk_widget_show (align);
-
-  button = g_object_new (GTK_TYPE_COLOR_BUTTON,
-                         "title", _("Choose terminal background color"),
-                         NULL);
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "color-background", G_OBJECT (button), "color");
-  gtk_container_add (GTK_CONTAINER (align), button);
-  gtk_label_set_mnemonic_widget (GTK_LABEL (label), button);
-  gtk_widget_show (button);
-
-  /* set Atk name/description and label relation for the button */
-  object = gtk_widget_get_accessible (button);
-  atk_object_set_name (object, _("Color Selector"));
-  atk_object_set_description (object, _("Open a dialog to specify the color"));
-  relations = atk_object_ref_relation_set (gtk_widget_get_accessible (label));
-  relation = atk_relation_new (&object, 1, ATK_RELATION_LABEL_FOR);
-  atk_relation_set_add (relations, relation);
-  g_object_unref (G_OBJECT (relation));
-
-  frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", GTK_SHADOW_NONE, NULL);
-  gtk_box_pack_start (GTK_BOX (box), frame, FALSE, TRUE, 0);
-  gtk_widget_show (frame);
-
-  label = g_object_new (GTK_TYPE_LABEL, "label", _("<b>Text Selection</b>"), "use-markup", TRUE, NULL);
-  gtk_frame_set_label_widget (GTK_FRAME (frame), label);
-  gtk_widget_show (label);
-
-  table = gtk_table_new (2, 2, FALSE);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
-  gtk_container_set_border_width (GTK_CONTAINER (table), 12);
-  gtk_container_add (GTK_CONTAINER (frame), table);
-  gtk_widget_show (table);
-
-  button = gtk_radio_button_new_with_mnemonic (NULL, _("Use _default color"));
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "color-selection-use-default", G_OBJECT (button), "active");
-  gtk_widget_set_tooltip_text (button, _("Use the default text selection background color"));
-  gtk_table_attach (GTK_TABLE (table), button, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
-  group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
-  gtk_widget_show (button);
-
-  button = gtk_radio_button_new_with_mnemonic (group, _("Use _custom color"));
-  exo_mutual_binding_new_with_negation (G_OBJECT (dialog->preferences), "color-selection-use-default", G_OBJECT (button), "active");
-  gtk_widget_set_tooltip_text (button, _("Use a custom text selection background color"));
-  gtk_table_attach (GTK_TABLE (table), button, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
-  gtk_widget_show (button);
-
-  align = gtk_alignment_new (0.0, 0.5, 0.0, 0.0);
-  gtk_table_attach (GTK_TABLE (table), align, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-  gtk_widget_show (align);
-
-  button = g_object_new (GTK_TYPE_COLOR_BUTTON, "title", _("Choose terminal text selection background color"), NULL);
-  exo_binding_new_with_negation (G_OBJECT (dialog->preferences), "color-selection-use-default", G_OBJECT (button), "sensitive");
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "color-selection", G_OBJECT (button), "color");
-  gtk_container_add (GTK_CONTAINER (align), button);
-  gtk_widget_show (button);
-
-  /* set Atk name/description and label relation for the button */
-  object = gtk_widget_get_accessible (button);
-  atk_object_set_name (object, _("Color Selector"));
-  atk_object_set_description (object, _("Open a dialog to specify the color"));
-  relations = atk_object_ref_relation_set (gtk_widget_get_accessible (label));
-  relation = atk_relation_new (&object, 1, ATK_RELATION_LABEL_FOR);
-  atk_relation_set_add (relations, relation);
-  g_object_unref (G_OBJECT (relation));
-
-  frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", GTK_SHADOW_NONE, NULL);
-  gtk_box_pack_start (GTK_BOX (box), frame, FALSE, TRUE, 0);
-  gtk_widget_show (frame);
-
-  label = g_object_new (GTK_TYPE_LABEL, "label", _("<b>Palette</b>"), "use-markup", TRUE, NULL);
-  gtk_frame_set_label_widget (GTK_FRAME (frame), label);
-  gtk_widget_show (label);
-
-  vbox = gtk_vbox_new (FALSE, 12);
-  gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
-  gtk_container_add (GTK_CONTAINER (frame), vbox);
-  gtk_widget_show (vbox);
-
-  label = g_object_new (GTK_TYPE_LABEL,
-                        "label", _("Terminal applications have this color palette available to them:"),
-                        "wrap", TRUE,
-                        "xalign", 0.0f,
-                        NULL);
-  gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
-  gtk_widget_show (label);
-
-  table = gtk_table_new (3, 8, FALSE);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 0);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 0);
-  gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, TRUE, 0);
-  gtk_widget_show (table);
-
-  /* add the color buttons in 2 rows, with 8 buttons per row */
-  for (n = 0; n < 16; ++n)
+  /* bind color palette properties */
+  for (i = 1; i <= 16; i++)
     {
-      /* setup and add the button */
-      button = gtk_color_button_new ();
-      gtk_table_attach (GTK_TABLE (table), button, (n % 8), (n % 8) + 1, (n / 8), (n / 8) + 1, GTK_FILL, GTK_FILL, 0, 0);
-      gtk_widget_show (button);
-
-      /* setup a tooltip */
-      palette_tip = g_strdup_printf (_("Palette entry %d"), n + 1);
-      gtk_widget_set_tooltip_text (button, palette_tip);
-      g_free (palette_tip);
-
-      /* sync with the appropriate preference */
-      name = g_strdup_printf ("color-palette%d", (n + 1));
-      exo_mutual_binding_new (G_OBJECT (dialog->preferences), name, G_OBJECT (button), "color");
-      g_free (name);
+      g_snprintf (palette_name, sizeof (palette_name), "color-palette%d", i);
+      BIND_PROPERTIES (palette_name, "color");
     }
 
-  frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", GTK_SHADOW_NONE, NULL);
-  gtk_box_pack_start (GTK_BOX (box), frame, FALSE, TRUE, 0);
-  gtk_widget_show (frame);
+  /* other properties */
+  BIND_PROPERTIES ("font-name", "font-name");
+  BIND_PROPERTIES ("title-initial", "text");
+  BIND_PROPERTIES ("term", "text");
+  BIND_PROPERTIES ("word-chars", "text");
+  BIND_PROPERTIES ("scrolling-lines", "value");
+  BIND_PROPERTIES ("tab-activity-timeout", "value");
+  BIND_PROPERTIES ("background-darkness", "value");
 
-  label = g_object_new (GTK_TYPE_LABEL, "label", _("<b>Tab activity</b>"), "use-markup", TRUE, NULL);
-  gtk_frame_set_label_widget (GTK_FRAME (frame), label);
-  gtk_widget_show (label);
+  /* reset comparibility button */
+  object = gtk_builder_get_object (GTK_BUILDER (dialog), "reset-compatibility");
+  _terminal_return_if_fail (G_IS_OBJECT (object));
+  g_signal_connect (G_OBJECT (object), "clicked",
+      G_CALLBACK (terminal_preferences_dialog_reset_compat), dialog);
 
-  table = gtk_table_new (2, 1, FALSE);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
-  gtk_container_set_border_width (GTK_CONTAINER (table), 12);
-  gtk_container_add (GTK_CONTAINER (frame), table);
-  gtk_widget_show (table);
-
-  label = g_object_new (GTK_TYPE_LABEL,
-                        "label", _("T_ab activity color:"),
-                        "use-underline", TRUE,
-                        "xalign", 0.0,
-                        NULL);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
-  gtk_widget_show (label);
-
-  align = gtk_alignment_new (0.0, 0.5, 0.0, 0.0);
-  gtk_table_attach (GTK_TABLE (table), align, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-  gtk_widget_show (align);
-
-  hbox = gtk_hbox_new (FALSE, 0);
-  gtk_container_add (GTK_CONTAINER (align), hbox);
-  gtk_widget_show (hbox);
-
-  button = g_object_new (GTK_TYPE_COLOR_BUTTON, "title", _("Choose tab activity color"), NULL);
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "tab-activity-color", G_OBJECT (button), "color");
-  gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
-  gtk_label_set_mnemonic_widget (GTK_LABEL (label), button);
-  gtk_widget_show (button);
-
-  /* set Atk name/description and label relation for the button */
-  object = gtk_widget_get_accessible (button);
-  atk_object_set_name (object, _("Color Selector"));
-  atk_object_set_description (object, _("Open a dialog to specify the color"));
-  relations = atk_object_ref_relation_set (gtk_widget_get_accessible (label));
-  relation = atk_relation_new (&object, 1, ATK_RELATION_LABEL_FOR);
-  atk_relation_set_add (relations, relation);
-  g_object_unref (G_OBJECT (relation));
-
-  icon = gtk_widget_render_icon (GTK_WIDGET (dialog->icon_bar),
-                                 TERMINAL_STOCK_COLORS,
-                                 GTK_ICON_SIZE_DIALOG,
-                                 NULL);
-  gtk_list_store_append (store, &iter);
-  gtk_list_store_set (store, &iter,
-                      PIXBUF_COLUMN, icon,
-                      TEXT_COLUMN, _("Colors"),
-                      INDEX_COLUMN, idx,
-                      -1);
-  g_object_unref (G_OBJECT (icon));
-
-
-  /*
-     Shortcuts
-   */
-  box = gtk_vbox_new (FALSE, 12);
-  gtk_container_set_border_width (GTK_CONTAINER (box), 12);
-  idx = gtk_notebook_append_page (GTK_NOTEBOOK (dialog->notebook), box, NULL);
-  gtk_widget_show (box);
-
-  frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", GTK_SHADOW_NONE, NULL);
-  gtk_box_pack_start (GTK_BOX (box), frame, TRUE, TRUE, 0);
-  gtk_widget_show (frame);
-
-  label = g_object_new (GTK_TYPE_LABEL, "label", _("<b>Shortcut keys</b>"), "use-markup", TRUE, NULL);
-  gtk_frame_set_label_widget (GTK_FRAME (frame), label);
-  gtk_widget_show (label);
-
-  vbox = gtk_vbox_new (FALSE, 6);
-  gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
-  gtk_container_add (GTK_CONTAINER (frame), vbox);
-  gtk_widget_show (vbox);
-
-  ibox = gtk_scrolled_window_new (NULL, NULL);
-  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (ibox),
-                                  GTK_POLICY_NEVER,
-                                  GTK_POLICY_ALWAYS);
-  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (ibox),
-                                       GTK_SHADOW_ETCHED_IN);
-  gtk_box_pack_start (GTK_BOX (vbox), ibox, TRUE, TRUE, 0);
-  gtk_widget_show (ibox);
-
+  /* add shortcuts editor */
   editor = terminal_shortcut_editor_new ();
-  gtk_container_add (GTK_CONTAINER (ibox), editor);
+  object = gtk_builder_get_object (GTK_BUILDER (dialog), "editor-container");
+  _terminal_return_if_fail (G_IS_OBJECT (object));
+  gtk_container_add (GTK_CONTAINER (object), editor);
   gtk_widget_show (editor);
 
-  frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", GTK_SHADOW_NONE, NULL);
-  gtk_box_pack_start (GTK_BOX (box), frame, FALSE, TRUE, 0);
-  gtk_widget_show (frame);
+  /* inverted action between cursor color selections */
+  object = gtk_builder_get_object (GTK_BUILDER (dialog), "color-selection-use-color");
+  _terminal_return_if_fail (G_IS_OBJECT (object));
+  exo_binding_new_with_negation (G_OBJECT (dialog->preferences), "color-selection-use-default",
+                                 G_OBJECT (object), "active");
 
-  label = g_object_new (GTK_TYPE_LABEL, "label", _("<b>Menubar access</b>"), "use-markup", TRUE, NULL);
-  gtk_frame_set_label_widget (GTK_FRAME (frame), label);
-  gtk_widget_show (label);
+  /* sensitivity for custom selection color */
+  object = gtk_builder_get_object (GTK_BUILDER (dialog), "color-selection-use-color");
+  _terminal_return_if_fail (G_IS_OBJECT (object));
+  object2 = gtk_builder_get_object (GTK_BUILDER (dialog), "color-selection");
+  _terminal_return_if_fail (G_IS_OBJECT (object2));
+  exo_binding_new (G_OBJECT (object), "active", G_OBJECT (object2), "sensitive");
 
-  vbox = gtk_vbox_new (FALSE, 6);
-  gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
-  gtk_container_add (GTK_CONTAINER (frame), vbox);
-  gtk_widget_show (vbox);
+  /* background widgets visibility */
+  object = gtk_builder_get_object (GTK_BUILDER (dialog), "background-mode");
+  _terminal_return_if_fail (G_IS_OBJECT (object));
+  g_signal_connect (G_OBJECT (object), "changed",
+      G_CALLBACK (terminal_preferences_dialog_background_mode), dialog);
+  terminal_preferences_dialog_background_mode (GTK_WIDGET (object), dialog);
 
-  button = gtk_check_button_new_with_mnemonic (_("Disable all me_nu access keys (such as Alt+f)"));
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "shortcuts-no-mnemonics", G_OBJECT (button), "active");
-  gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 0);
-  gtk_widget_show (button);
+  /* background image file */
+  object = gtk_builder_get_object (GTK_BUILDER (dialog), "background-image-file");
+  _terminal_return_if_fail (G_IS_OBJECT (object));
+  dialog->signal_id = g_signal_connect (G_OBJECT (dialog->preferences),
+      "notify::background-image-file", G_CALLBACK (terminal_preferences_dialog_background_notify), object);
+  terminal_preferences_dialog_background_notify (G_OBJECT (dialog->preferences), NULL, object);
+  g_signal_connect (G_OBJECT (object), "file-set",
+      G_CALLBACK (terminal_preferences_dialog_background_set), dialog);
 
-  button = gtk_check_button_new_with_mnemonic (_("Disable m_enu shortcut key (F10 by default)"));
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "shortcuts-no-menukey", G_OBJECT (button), "active");
-  gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 0);
-  gtk_widget_show (button);
+  /* add file filters */
+  filter = gtk_file_filter_new ();
+  gtk_file_filter_set_name (filter, _("All Files"));
+  gtk_file_filter_add_pattern (filter, "*");
+  gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (object), filter);
 
-  icon = gtk_widget_render_icon (GTK_WIDGET (dialog->icon_bar),
-                                 TERMINAL_STOCK_SHORTCUTS,
-                                 GTK_ICON_SIZE_DIALOG,
-                                 NULL);
-  gtk_list_store_append (store, &iter);
-  gtk_list_store_set (store, &iter,
-                      PIXBUF_COLUMN, icon,
-                      TEXT_COLUMN, _("Shortcuts"),
-                      INDEX_COLUMN, idx,
-                      -1);
-  g_object_unref (icon);
-
-
-  /*
-     Advanced
-   */
-  box = gtk_vbox_new (FALSE, 12);
-  gtk_container_set_border_width (GTK_CONTAINER (box), 12);
-  idx = gtk_notebook_append_page (GTK_NOTEBOOK (dialog->notebook), box, NULL);
-  gtk_widget_show (box);
-
-  frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", GTK_SHADOW_NONE, NULL);
-  gtk_box_pack_start (GTK_BOX (box), frame, FALSE, TRUE, 0);
-  gtk_widget_show (frame);
-
-  label = g_object_new (GTK_TYPE_LABEL, "label", _("<b>Compatibility</b>"), "use-markup", TRUE, NULL);
-  gtk_frame_set_label_widget (GTK_FRAME (frame), label);
-  gtk_widget_show (label);
-
-  table = gtk_table_new (5, 3, FALSE);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 12);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
-  gtk_container_set_border_width (GTK_CONTAINER (table), 12);
-  gtk_container_add (GTK_CONTAINER (frame), table);
-  gtk_widget_show (table);
-
-  label = gtk_label_new (_("These options may cause some applications to behave incorrectly. They are only "
-                           "here to allow you to work around certain applications and operating systems "
-                           "that expect different terminal behavior."));
-  g_object_set (G_OBJECT (label), "wrap", TRUE, "xalign", 0.0, NULL);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 3, 0, 1,
-                    GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
-  gtk_widget_show (label);
-
-  label = gtk_label_new_with_mnemonic (_("_Backspace key generates:"));
-  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
-  gtk_widget_show (label);
-
-  combo = gtk_combo_box_new_text ();
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Auto-detect"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("ASCII DEL"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Escape sequence"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Control-H"));
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "binding-backspace", G_OBJECT (combo), "active");
-  gtk_table_attach (GTK_TABLE (table), combo, 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
-  gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo);
-  gtk_widget_show (combo);
-
-  /* set Atk label relation for the combo */
-  terminal_gtk_label_set_a11y_relation (GTK_LABEL (label), combo);
-
-  label = gtk_label_new_with_mnemonic (_("_Delete key generates:"));
-  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0);
-  gtk_widget_show (label);
-
-  combo = gtk_combo_box_new_text ();
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Auto-detect"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("ASCII DEL"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Escape sequence"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Control-H"));
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "binding-delete", G_OBJECT (combo), "active");
-  gtk_table_attach (GTK_TABLE (table), combo, 1, 2, 2, 3, GTK_FILL, GTK_FILL, 0, 0);
-  gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo);
-  gtk_widget_show (combo);
-
-  /* set Atk label relation for the combo */
-  terminal_gtk_label_set_a11y_relation (GTK_LABEL (label), combo);
-
-  label = g_object_new (GTK_TYPE_LABEL, "label", _("<tt>$TERM</tt> setting:"), "use-markup", TRUE, "xalign", 0.0f, NULL);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4, GTK_FILL, GTK_FILL, 0, 0);
-  gtk_widget_show (label);
-
-  entry = gtk_entry_new ();
-  gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "term", G_OBJECT (entry), "text");
-  gtk_widget_set_tooltip_text (entry,
-                               _("This specifies the value the $TERM environment variable is set "
-                                 "to, when a new terminal tab or terminal window is opened. The default "
-                                 "should be ok for most systems. If you have problems with colors in "
-                                 "some applications, try xterm-color here."));
-  gtk_table_attach (GTK_TABLE (table), entry, 1, 2, 3, 4, GTK_FILL, GTK_FILL, 0, 0);
-  gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
-  gtk_widget_show (entry);
-
-  /* set Atk label relation for the entry */
-  terminal_gtk_label_set_a11y_relation (GTK_LABEL (label), entry);
-
-  hbox = gtk_hbox_new (FALSE, 0);
-  gtk_table_attach (GTK_TABLE (table), hbox, 0, 2, 4, 5,
-                    GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
-  gtk_widget_show (hbox);
-
-  button = gtk_button_new_with_mnemonic (_("_Reset compatibility options to defaults"));
-  g_signal_connect (G_OBJECT (button), "clicked",
-                    G_CALLBACK (terminal_preferences_dialog_reset_compat), dialog);
-  gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
-  gtk_widget_show (button);
-
-  frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", GTK_SHADOW_NONE, NULL);
-  gtk_box_pack_start (GTK_BOX (box), frame, FALSE, TRUE, 0);
-  gtk_widget_show (frame);
-
-  label = g_object_new (GTK_TYPE_LABEL, "label", _("<b>Double click</b>"), "use-markup", TRUE, NULL);
-  gtk_frame_set_label_widget (GTK_FRAME (frame), label);
-  gtk_widget_show (label);
-
-  vbox = gtk_vbox_new (FALSE, 6);
-  gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
-  gtk_container_add (GTK_CONTAINER (frame), vbox);
-  gtk_widget_show (vbox);
-
-  label = gtk_label_new (_("Consider the following characters part of a word when double clicking:"));
-  g_object_set (G_OBJECT (label), "wrap", TRUE, "xalign", 0.0, NULL);
-  gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
-  gtk_widget_show (label);
-
-  entry = gtk_entry_new ();
-  gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "word-chars", G_OBJECT (entry), "text");
-  gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 0);
-  gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
-  gtk_widget_show (entry);
-
-  /* set Atk label relation for the entry */
-  terminal_gtk_label_set_a11y_relation (GTK_LABEL (label), entry);
-
-/* start */
-  frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", GTK_SHADOW_NONE, NULL);
-  gtk_box_pack_start (GTK_BOX (box), frame, FALSE, TRUE, 0);
-  gtk_widget_show (frame);
-
-  label = g_object_new (GTK_TYPE_LABEL, "label", _("<b>Tab activity indicator</b>"), "use-markup", TRUE, NULL);
-  gtk_frame_set_label_widget (GTK_FRAME (frame), label);
-  gtk_widget_show (label);
-
-  vbox = gtk_vbox_new (FALSE, 6);
-  gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
-  gtk_container_add (GTK_CONTAINER (frame), vbox);
-  gtk_widget_show (vbox);
-
-  hbox = gtk_hbox_new (FALSE, 6);
-  gtk_container_set_border_width (GTK_CONTAINER (hbox), 0);
-  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
-  gtk_widget_show (hbox);
-
-  label = gtk_label_new (_("Reset tab activity indicator after"));
-  g_object_set (G_OBJECT (label), "wrap", TRUE, "xalign", 0.0, NULL);
-  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-  gtk_widget_show (label);
-
-  button = gtk_spin_button_new_with_range (0.0, 30.0, 1.0);
-  gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(button), TRUE);
-  exo_mutual_binding_new (G_OBJECT (dialog->preferences), "tab-activity-timeout", G_OBJECT (button), "value");
-  gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
-  gtk_label_set_mnemonic_widget (GTK_LABEL (label), button);
-  gtk_widget_show (button);
-
-  /* set Atk label relation for the button */
-  terminal_gtk_label_set_a11y_relation (GTK_LABEL (label), button);
-
-  label = gtk_label_new (_("seconds"));
-  g_object_set (G_OBJECT (label), "wrap", TRUE, "xalign", 0.0, NULL);
-  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-  gtk_widget_show (label);
-
-/*end */
-  icon = gtk_widget_render_icon (GTK_WIDGET (dialog->icon_bar),
-                                 TERMINAL_STOCK_ADVANCED,
-                                 GTK_ICON_SIZE_DIALOG,
-                                 NULL);
-  gtk_list_store_append (store, &iter);
-  gtk_list_store_set (store, &iter,
-                      PIXBUF_COLUMN, icon,
-                      TEXT_COLUMN, _("Advanced"),
-                      INDEX_COLUMN, idx,
-                      -1);
-  g_object_unref (icon);
-
-  exo_mutual_binding_new (G_OBJECT (dialog->notebook), "page", G_OBJECT (dialog->icon_bar), "active");
-
-  g_object_unref (G_OBJECT (store));
+  /* add "Image Files" filter */
+  filter = gtk_file_filter_new ();
+  gtk_file_filter_set_name (filter, _("Image Files"));
+  gtk_file_filter_add_pixbuf_formats (filter);
+  gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (object), filter);
+  gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (object), filter);
 }
 
 
@@ -1076,6 +215,10 @@
 {
   TerminalPreferencesDialog *dialog = TERMINAL_PREFERENCES_DIALOG (object);
 
+  /* disconnect signal */
+  if (G_LIKELY (dialog->signal_id != 0))
+    g_signal_handler_disconnect (dialog->preferences, dialog->signal_id);
+
   /* release the preferences */
   g_object_unref (G_OBJECT (dialog->preferences));
 
@@ -1085,122 +228,105 @@
 
 
 static void
-terminal_preferences_dialog_response (TerminalPreferencesDialog *dialog,
-                                      gint                       response)
+terminal_preferences_dialog_response (GtkWidget                 *widget,
+                                      gint                       response,
+                                      TerminalPreferencesDialog *dialog)
 {
   /* check if we should open the user manual */
-  if (G_UNLIKELY (response == GTK_RESPONSE_HELP))
+  if (G_UNLIKELY (response == 1))
     {
       /* open the "Preferences" section of the user manual */
-      terminal_dialogs_show_help (GTK_WIDGET (dialog), "preferences", NULL);
+      terminal_dialogs_show_help (widget, "preferences", NULL);
     }
   else
     {
       /* close the preferences dialog */
-      gtk_widget_destroy (GTK_WIDGET (dialog));
+      gtk_widget_destroy (widget);
     }
 }
 
 
 
 static void
-terminal_preferences_open_image_file (GtkWidget *button,
-                                      GtkWidget *entry)
+terminal_preferences_dialog_reset_compat (GtkWidget                 *button,
+                                          TerminalPreferencesDialog *dialog)
 {
-  GtkFileFilter *filter;
-  GtkWidget     *toplevel;
-  GtkWidget     *dialog;
-  gchar         *filename;
+  GParamSpec  *spec;
+  GValue       value = { 0, };
+  const gchar *properties[] = { "binding-backspace", "binding-delete", "term" };
+  guint        i;
 
-  /* determine the toplevel window */
-  toplevel = gtk_widget_get_toplevel (entry);
-  if (toplevel == NULL || !GTK_WIDGET_TOPLEVEL (toplevel))
-    return;
+  for (i = 0; i < G_N_ELEMENTS (properties); i++)
+    {
+      spec = g_object_class_find_property (G_OBJECT_GET_CLASS (dialog->preferences),
+                                           properties[i]);
+      if (G_LIKELY (spec != NULL))
+        {
+          g_value_init (&value, spec->value_type);
+          g_param_value_set_default (spec, &value);
+          g_object_set_property (G_OBJECT (dialog->preferences), properties[i], &value);
+          g_value_unset (&value);
+        }
+    }
+}
 
-  /* allocate the file chooser window */
-  dialog = gtk_file_chooser_dialog_new (_("Select background image file"),
-                                        GTK_WINDOW (toplevel),
-                                        GTK_FILE_CHOOSER_ACTION_OPEN,
-                                        GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-                                        GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
-                                        NULL);
-  gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT, GTK_RESPONSE_CANCEL, -1);
-  gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
-  exo_gtk_file_chooser_add_thumbnail_preview (GTK_FILE_CHOOSER (dialog));
-  gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (dialog), TRUE);
 
-  /* add "All Files" filter */
-  filter = gtk_file_filter_new ();
-  gtk_file_filter_set_name (filter, _("All Files"));
-  gtk_file_filter_add_pattern (filter, "*");
-  gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
 
-  /* add "Image Files" filter */
-  filter = gtk_file_filter_new ();
-  gtk_file_filter_set_name (filter, _("Image Files"));
-  gtk_file_filter_add_pixbuf_formats (filter);
-  gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
-  gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (dialog), filter);
+static void
+terminal_preferences_dialog_background_mode (GtkWidget                 *combobox,
+                                             TerminalPreferencesDialog *dialog)
+{
+  GObject *object;
+  gint     active;
 
-  /* preselect the previous filename */
-  filename = gtk_editable_get_chars (GTK_EDITABLE (entry), 0, -1);
-  if (G_LIKELY (filename != NULL))
-    {
-      if (*filename != '\0')
-        gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog), filename);
-      g_free (filename);
-    }
+  _terminal_return_if_fail (TERMINAL_IS_PREFERENCES_DIALOG (dialog));
+  _terminal_return_if_fail (GTK_IS_COMBO_BOX (combobox));
 
-  /* run the chooser dialog */
-  if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
-    {
-      filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
-      gtk_entry_set_text (GTK_ENTRY (entry), filename);
-      g_free (filename);
-    }
+  active = gtk_combo_box_get_active (GTK_COMBO_BOX (combobox));
 
-  /* destroy the dialog */
-  gtk_widget_destroy (dialog);
+  object = gtk_builder_get_object (GTK_BUILDER (dialog), "box-file");
+  _terminal_return_if_fail (G_IS_OBJECT (object));
+  g_object_set (G_OBJECT (object), "visible", active == 1, NULL);
+
+  object = gtk_builder_get_object (GTK_BUILDER (dialog), "box-opacity");
+  _terminal_return_if_fail (G_IS_OBJECT (object));
+  g_object_set (G_OBJECT (object), "visible", active > 0, NULL);
 }
 
 
 
 static void
-terminal_preferences_dialog_reset_compat (GtkWidget                 *button,
-                                          TerminalPreferencesDialog *dialog)
+terminal_preferences_dialog_background_notify (GObject    *object,
+                                               GParamSpec *pspec,
+                                               GObject    *widget)
 {
-  GParamSpec *spec;
-  GValue      value = {0, };
+  gchar *button_file, *prop_file;
 
-  spec = g_object_class_find_property (G_OBJECT_GET_CLASS (dialog->preferences),
-                                       "binding-backspace");
-  if (G_LIKELY (spec != NULL))
-    {
-      g_value_init (&value, spec->value_type);
-      g_param_value_set_default (spec, &value);
-      g_object_set_property (G_OBJECT (dialog->preferences), "binding-backspace", &value);
-      g_value_unset (&value);
-    }
+  _terminal_return_if_fail (TERMINAL_IS_PREFERENCES (object));
+  _terminal_return_if_fail (GTK_IS_FILE_CHOOSER_BUTTON (widget));
 
-  spec = g_object_class_find_property (G_OBJECT_GET_CLASS (dialog->preferences),
-                                       "binding-delete");
-  if (G_LIKELY (spec != NULL))
-    {
-      g_value_init (&value, spec->value_type);
-      g_param_value_set_default (spec, &value);
-      g_object_set_property (G_OBJECT (dialog->preferences), "binding-delete", &value);
-      g_value_unset (&value);
-    }
+  button_file = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
+  g_object_get (G_OBJECT (object), "background-image-file", &prop_file, NULL);
+  if (!exo_str_is_equal (button_file, prop_file))
+    gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (widget), prop_file);
+  g_free (button_file);
+  g_free (prop_file);
+}
 
-  spec = g_object_class_find_property (G_OBJECT_GET_CLASS (dialog->preferences),
-                                       "term");
-  if (G_LIKELY (spec != NULL))
-    {
-      g_value_init (&value, spec->value_type);
-      g_param_value_set_default (spec, &value);
-      g_object_set_property (G_OBJECT (dialog->preferences), "term", &value);
-      g_value_unset (&value);
-    }
+
+
+static void
+terminal_preferences_dialog_background_set (GtkFileChooserButton      *widget,
+                                            TerminalPreferencesDialog *dialog)
+{
+  gchar *filename;
+
+  _terminal_return_if_fail (TERMINAL_IS_PREFERENCES_DIALOG (dialog));
+  _terminal_return_if_fail (GTK_IS_FILE_CHOOSER_BUTTON (widget));
+
+  filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
+  g_object_set (G_OBJECT (dialog->preferences), filename, NULL);
+  g_free (filename);
 }
 
 
@@ -1214,11 +340,13 @@
 GtkWidget*
 terminal_preferences_dialog_new (GtkWindow *parent)
 {
-  GtkWidget *dialog;
+  GtkBuilder *builder;
+  GObject    *dialog;
 
-  dialog = g_object_new (TERMINAL_TYPE_PREFERENCES_DIALOG, NULL);
-  if (parent != NULL)
+  builder = g_object_new (TERMINAL_TYPE_PREFERENCES_DIALOG, NULL);
+  dialog = gtk_builder_get_object (builder, "dialog");
+  if (parent != NULL && dialog != NULL)
     gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
 
-  return dialog;
+  return GTK_WIDGET (dialog);
 }

Modified: terminal/trunk/terminal/terminal-preferences-dialog.h
===================================================================
--- terminal/trunk/terminal/terminal-preferences-dialog.h	2009-06-27 21:49:56 UTC (rev 30108)
+++ terminal/trunk/terminal/terminal-preferences-dialog.h	2009-06-28 11:31:37 UTC (rev 30109)
@@ -23,6 +23,7 @@
 #define __TERMINAL_PREFERENCES_DIALOG_H__
 
 #include <exo/exo.h>
+#include <libxfce4ui/libxfce4ui.h>
 
 #include <terminal/terminal-preferences.h>
 
@@ -40,17 +41,15 @@
 
 struct _TerminalPreferencesDialogClass
 {
-  GtkDialogClass  __parent__;
+  GtkBuilderClass __parent__;
 };
 
 struct _TerminalPreferencesDialog
 {
-  GtkDialog            __parent__;
+  GtkBuilder           __parent__;
 
   TerminalPreferences *preferences;
-
-  GtkWidget           *icon_bar;
-  GtkWidget           *notebook;
+  guint                signal_id;
 };
 
 GType      terminal_preferences_dialog_get_type (void) G_GNUC_CONST;

Modified: terminal/trunk/terminal/terminal-preferences.c
===================================================================
--- terminal/trunk/terminal/terminal-preferences.c	2009-06-27 21:49:56 UTC (rev 30108)
+++ terminal/trunk/terminal/terminal-preferences.c	2009-06-28 11:31:37 UTC (rev 30109)
@@ -627,7 +627,7 @@
                                    g_param_spec_string ("background-image-file",
                                                         "background-image-file",
                                                         "BackgroundImageFile",
-                                                        "",
+                                                        NULL,
                                                         EXO_PARAM_READWRITE));
 
   /**

Modified: terminal/trunk/terminal/terminal-window.c
===================================================================
--- terminal/trunk/terminal/terminal-window.c	2009-06-27 21:49:56 UTC (rev 30108)
+++ terminal/trunk/terminal/terminal-window.c	2009-06-28 11:31:37 UTC (rev 30109)
@@ -1370,8 +1370,11 @@
     {
       /* allocate a new preferences dialog instance */
       window->preferences_dialog = terminal_preferences_dialog_new (GTK_WINDOW (window));
-      g_object_add_weak_pointer (G_OBJECT (window->preferences_dialog), (gpointer) &window->preferences_dialog);
-      gtk_widget_show (window->preferences_dialog);
+      if (G_LIKELY (window->preferences_dialog != NULL))
+        {
+          g_object_add_weak_pointer (G_OBJECT (window->preferences_dialog), (gpointer) &window->preferences_dialog);
+          gtk_widget_show (window->preferences_dialog);
+        }
     }
 }
 




More information about the Xfce4-commits mailing list