diff --git a/src/Makefile.am b/src/Makefile.am
index 101367db..836a36f8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -365,7 +365,6 @@ EXTRA_DIST = \
 	nautilus.symbols \
 	search-popover.ui \
 	preferences.ui \
-	profile-preferences.ui \
 	terminal.common.css \
 	$(about_DATA) \
 	$(builder_DATA) \
diff --git a/src/migration.c b/src/migration.c
index 68acd419..72b79d76 100644
--- a/src/migration.c
+++ b/src/migration.c
@@ -539,7 +539,6 @@ migrate_accels (GSettings *global_settings,
   static const const struct { const char *gconf_key; const char *settings_key; } const data[] = {
     { "new_tab",          "new-tab"            },
     { "new_window",       "new-window"         },
-    { "new_profile",      "new-profile"        },
     { "close_tab",        "close-tab"          },
     { "close_window",     "close-window"       },
     { "copy",             "copy"               },
diff --git a/src/org.gnome.Terminal.gschema.xml b/src/org.gnome.Terminal.gschema.xml
index c07b1158..861c206f 100644
--- a/src/org.gnome.Terminal.gschema.xml
+++ b/src/org.gnome.Terminal.gschema.xml
@@ -413,10 +413,6 @@
       <default>'&lt;Ctrl&gt;&lt;Shift&gt;n'</default>
       <summary>Keyboard shortcut to open a new window</summary>
     </key>
-    <key name="new-profile" type="s">
-      <default>'disabled'</default>
-      <summary>Keyboard shortcut to create a new profile</summary>
-    </key>
     <key name="save-contents" type="s">
       <default>'disabled'</default>
       <summary>Keyboard shortcut to save the current tab contents to file</summary>
@@ -457,10 +453,6 @@
       <default>'disabled'</default>
       <summary>Keyboard shortcut to open the Preferences dialog</summary>
     </key>
-    <key name="profile-preferences" type="s">
-      <default>'disabled'</default>
-      <summary>Keyboard shortcut to open the current profile’s Preferences dialog</summary>
-    </key>
     <key name="full-screen" type="s">
       <default>'F11'</default>
       <summary>Keyboard shortcut to toggle full screen mode</summary>
diff --git a/src/preferences.ui b/src/preferences.ui
index 33776470..6201c812 100644
--- a/src/preferences.ui
+++ b/src/preferences.ui
@@ -42,393 +42,2027 @@
       </row>
     </data>
   </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="lower">16</property>
+    <property name="upper">511</property>
+    <property name="value">80</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="lower">4</property>
+    <property name="upper">511</property>
+    <property name="value">24</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment4">
+    <property name="lower">1</property>
+    <property name="upper">2147483647</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">100</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment5">
+    <property name="lower">1.0</property>
+    <property name="upper">2.0</property>
+    <property name="value">1.0</property>
+    <property name="step_increment">0.05</property>
+    <property name="page_increment">0.25</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment6">
+    <property name="lower">1.0</property>
+    <property name="upper">2.0</property>
+    <property name="value">1.0</property>
+    <property name="step_increment">0.05</property>
+    <property name="page_increment">0.25</property>
+  </object>
+  <object class="GtkListStore" id="cjk-ambiguous-width-model">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+      <!-- column-name gchararray1 -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes" comments="ambiguous-width characers are">Narrow</col>
+        <col id="1">narrow</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="ambiguous-width characers are">Wide</col>
+        <col id="1">wide</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model1">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes" comments="Cursor shape">Block</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="Cursor shape">I-Beam</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="Cursor shape">Underline</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model7">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes" comments="Cursor blink mode">Default</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="Cursor blink mode">Enabled</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="Cursor blink mode">Disabled</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model5">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes" comments="Text blink mode">Never</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="Text blink mode">When focused</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="Text blink mode">When unfocused</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="Text blink mode">Always</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model2">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes" comments="When terminal commands set their own titles">Replace initial title</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="When terminal commands set their own titles">Append initial title</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="When terminal commands set their own titles">Prepend initial title</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="When terminal commands set their own titles">Keep initial title</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model3">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes" comments="When command exits">Exit the terminal</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="When command exits">Restart the command</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="When command exits">Hold the terminal open</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model4">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes" comments="This is the name of a colour scheme">Tango</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="This is the name of a colour scheme">Linux console</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="This is the name of a colour scheme">XTerm</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="This is the name of a colour scheme">Rxvt</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="This is the name of a colour scheme">Solarized</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="This is the name of a colour scheme">Custom</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model6">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes" comments="This refers to the Delete keybinding option">Automatic</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="This refers to the Delete keybinding option">Control-H</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="This refers to the Delete keybinding option">ASCII DEL</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="This refers to the Delete keybinding option">Escape sequence</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="This refers to the Delete keybinding option">TTY Erase</col>
+      </row>
+    </data>
+  </object>
   <object class="GtkApplicationWindow" id="preferences-dialog">
     <property name="can_focus">False</property>
     <property name="show_menubar">False</property>
-    <property name="border_width">0</property>
-    <property name="title" translatable="yes">Preferences</property>
     <property name="role">gnome-terminal-preferences</property>
+    <property name="resizable">False</property>
     <child>
       <object class="GtkBox" id="dialogue-content-box">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="margin_left">12</property>
-        <property name="margin_right">12</property>
-        <property name="margin_top">12</property>
-        <property name="margin_bottom">12</property>
+        <property name="margin">12</property>
         <property name="orientation">vertical</property>
         <property name="spacing">12</property>
         <child>
-          <object class="GtkNotebook" id="notebook1">
+          <object class="GtkHBox" id="main-hbox">
             <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="border_width">0</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">12</property>
             <child>
-              <object class="GtkBox" id="general">
+              <object class="GtkScrolledWindow">
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="border_width">12</property>
-                <property name="orientation">vertical</property>
-                <property name="spacing">6</property>
+                <property name="can_focus">True</property>
+                <property name="hscrollbar_policy">never</property>
                 <child>
-                  <object class="GtkCheckButton" id="default-show-menubar-checkbutton">
-                    <property name="label" translatable="yes">Show _menubar by default in new terminals</property>
+                  <object class="GtkViewport">
                     <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="xalign">0</property>
-                    <property name="draw_indicator">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkListBox" id="the-listbox">
+                        <property name="visible">True</property>
+                      </object>
+                    </child>
                   </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
                 </child>
+              </object>
+            </child>
+            <child>
+              <object class="GtkStack" id="the-stack">
+                <property name="visible">True</property>
                 <child>
-                  <object class="GtkCheckButton" id="disable-mnemonics-checkbutton">
-                    <property name="label" translatable="yes">_Enable mnemonics (such as Alt+F to open the File menu)</property>
-                    <property name="use_action_appearance">False</property>
+                  <object class="GtkFrame" id="general">
                     <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="xalign">0</property>
-                    <property name="draw_indicator">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkBox">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="orientation">vertical</property>
+                        <property name="border_width">12</property>
+                        <property name="spacing">6</property>
+                        <child>
+                          <object class="GtkCheckButton" id="default-show-menubar-checkbutton">
+                            <property name="label" translatable="yes">Show _menubar by default in new terminals</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="xalign">0</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="disable-mnemonics-checkbutton">
+                            <property name="label" translatable="yes">_Enable mnemonics (such as Alt+F to open the File menu)</property>
+                            <property name="use_action_appearance">False</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="xalign">0</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="disable-menu-accel-checkbutton">
+                            <property name="label" translatable="yes">Enable the _menu accelerator key (F10 by default)</property>
+                            <property name="use_action_appearance">False</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="xalign">0</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkGrid" id="grid1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="row_spacing">6</property>
+                            <property name="column_spacing">12</property>
+                            <child>
+                              <object class="GtkLabel" id="theme-variant-label">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" translatable="yes">Theme _variant:</property>
+                                <property name="use_underline">True</property>
+                                <property name="ellipsize">middle</property>
+                                <property name="xalign">0</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">0</property>
+                                <property name="top_attach">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="new-terminal-mode-label">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" translatable="yes">Open _new terminals in:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">new-terminal-mode-combobox</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">0</property>
+                                <property name="top_attach">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkComboBox" id="theme-variant-combobox">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="model">theme-variant-liststore</property>
+                                <property name="id_column">1</property>
+                                <child>
+                                  <object class="GtkCellRendererText" id="renderer1a"/>
+                                  <attributes>
+                                    <attribute name="text">0</attribute>
+                                  </attributes>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="top_attach">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkComboBox" id="new-terminal-mode-combobox">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="model">new-terminal-mode-liststore</property>
+                                <property name="id_column">1</property>
+                                <child>
+                                  <object class="GtkCellRendererText" id="renderer2a"/>
+                                  <attributes>
+                                    <attribute name="text">0</attribute>
+                                  </attributes>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="top_attach">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">3</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
                   </object>
                   <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
+                    <property name="name">general-prefs</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkCheckButton" id="disable-menu-accel-checkbutton">
-                    <property name="label" translatable="yes">Enable the _menu accelerator key (F10 by default)</property>
-                    <property name="use_action_appearance">False</property>
+                  <object class="GtkFrame" id="keybindings">
                     <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="xalign">0</property>
-                    <property name="draw_indicator">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkGrid">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="border_width">12</property>
+                        <property name="column_spacing">12</property>
+                        <property name="row_spacing">6</property>
+                        <child>
+                          <object class="GtkCheckButton" id="disable-shortcuts-checkbutton">
+                            <property name="label" translatable="yes">_Enable shortcuts</property>
+                            <property name="use_action_appearance">False</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="xalign">0</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">0</property>
+                            <property name="left_attach">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkScrolledWindow" id="scrolledwindow1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="hscrollbar_policy">never</property>
+                            <property name="shadow_type">in</property>
+                            <property name="hexpand">True</property>
+                            <property name="vexpand">True</property>
+                            <child>
+                              <object class="GtkTreeView" id="accelerators-treeview">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="rules_hint">True</property>
+                                <child internal-child="selection">
+                                  <object class="GtkTreeSelection" id="treeview-selection"/>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="left_attach">0</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
                   </object>
                   <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">2</property>
+                    <property name="name">shortcut-prefs</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkGrid" id="grid1">
+                  <object class="GtkNotebook" id="profile-editor-notebook">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="row_spacing">6</property>
-                    <property name="column_spacing">12</property>
+                    <property name="can_focus">True</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox3">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="border_width">12</property>
+                        <property name="spacing">6</property>
+                        <child>
+                          <object class="GtkGrid" id="general-table">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="column_spacing">12</property>
+                            <property name="row_spacing">6</property>
+                            <child>
+                              <object class="GtkHBox">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="spacing">6</property>
+                                <property name="valign">end</property>
+                                <property name="vexpand">True</property>
+                                <child>
+                                  <object class="GtkLabel" id="profile-uuid-label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Profile ID:</property>
+                                    <property name="xalign">0</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="pack_type">end</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="profile-uuid">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="selectable">True</property>
+                                    <property name="xalign">0</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="pack_type">end</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="top_attach">100</property>
+                                <property name="left_attach">0</property>
+                                <property name="width">4</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="default-size-label">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" translatable="yes">Initial terminal si_ze:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">default-size-columns-spinbutton</property>
+                                <property name="xalign">0</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">2</property>
+                                <property name="left_attach">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox" id="default-size-columns-box">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="spacing">6</property>
+                                <child>
+                                  <object class="GtkSpinButton" id="default-size-columns-spinbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="adjustment">adjustment1</property>
+                                    <property name="climb_rate">1</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="default-size-columns-label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">columns</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="top_attach">2</property>
+                                <property name="left_attach">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox" id="default-size-rows-box">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="spacing">6</property>
+                                <child>
+                                  <object class="GtkSpinButton" id="default-size-rows-spinbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="adjustment">adjustment2</property>
+                                    <property name="climb_rate">1</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="default-size-rows-label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">rows</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="top_attach">2</property>
+                                <property name="left_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkButtonBox" id="buttonbox1">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="layout_style">end</property>
+                                <child>
+                                  <object class="GtkButton" id="default-size-reset-button">
+                                    <property name="label" translatable="yes">Rese_t</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="focus_on_click">False</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="top_attach">2</property>
+                                <property name="left_attach">3</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label480">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" translatable="yes">Cursor _shape:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">cursor-shape-combobox</property>
+                                <property name="xalign">0</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">3</property>
+                                <property name="left_attach">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkComboBox" id="cursor-shape-combobox">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="model">model1</property>
+                                <property name="focus_on_click">False</property>
+                                <child>
+                                  <object class="GtkCellRendererText" id="renderer1"/>
+                                  <attributes>
+                                    <attribute name="text">0</attribute>
+                                  </attributes>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="top_attach">3</property>
+                                <property name="left_attach">1</property>
+                                <property name="width">3</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" translatable="yes">Cursor blin_king:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">cursor-blink-mode-combobox</property>
+                                <property name="xalign">0</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">4</property>
+                                <property name="left_attach">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkComboBox" id="cursor-blink-mode-combobox">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="model">model7</property>
+                                <property name="focus_on_click">False</property>
+                                <child>
+                                  <object class="GtkCellRendererText" id="renderer5"/>
+                                  <attributes>
+                                    <attribute name="text">0</attribute>
+                                  </attributes>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="top_attach">4</property>
+                                <property name="left_attach">1</property>
+                                <property name="width">3</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="bell-checkbutton">
+                                <property name="label" translatable="yes">Terminal _bell</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="xalign">0.5</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">5</property>
+                                <property name="left_attach">0</property>
+                                <property name="width">4</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="text-appearance-heading">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="margin_top">12</property>
+                                <property name="label" translatable="yes">Text Appearance</property>
+                                <property name="xalign">0</property>
+                                <attributes>
+                                  <attribute name="weight" value="bold"/>
+                                </attributes>
+                              </object>
+                              <packing>
+                                <property name="top_attach">6</property>
+                                <property name="left_attach">0</property>
+                                <property name="width">4</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label481">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" translatable="yes">Allow b_linking text:</property>
+                                <property name="use_underline">True</property>
+                                <property name="margin_start">12</property>
+                                <property name="mnemonic_widget">text-blink-mode-combobox</property>
+                                <property name="xalign">0</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">7</property>
+                                <property name="left_attach">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkComboBox" id="text-blink-mode-combobox">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="model">model5</property>
+                                <property name="focus_on_click">False</property>
+                                <child>
+                                  <object class="GtkCellRendererText" id="renderer2"/>
+                                  <attributes>
+                                    <attribute name="text">0</attribute>
+                                  </attributes>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="top_attach">7</property>
+                                <property name="left_attach">1</property>
+                                <property name="width">3</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="rewrap-on-resize-checkbutton">
+                                <property name="label" translatable="yes">_Rewrap on resize</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="margin_start">12</property>
+                                <property name="use_underline">True</property>
+                                <property name="xalign">0</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">8</property>
+                                <property name="left_attach">0</property>
+                                <property name="width">4</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="custom-font-checkbutton">
+                                <property name="label" translatable="yes">_Custom font:</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="margin_start">12</property>
+                                <property name="use_underline">True</property>
+                                <property name="xalign">0</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">9</property>
+                                <property name="left_attach">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkFontButton" id="font-selector">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="focus_on_click">False</property>
+                                <property name="font">Sans 12</property>
+                                <property name="title" translatable="yes">Choose A Terminal Font</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">9</property>
+                                <property name="left_attach">1</property>
+                                <property name="width">3</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" translatable="yes">Cell spaci_ng:</property>
+                                <property name="use_underline">True</property>
+                                <property name="margin_start">12</property>
+                                <property name="mnemonic_widget">cell-width-scale-spinbutton</property>
+                                <property name="xalign">0</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">10</property>
+                                <property name="left_attach">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="spacing">6</property>
+                                <child>
+                                  <object class="GtkSpinButton" id="cell-width-scale-spinbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="adjustment">adjustment5</property>
+                                    <property name="digits">2</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="cell-width-scale-label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="top_attach">10</property>
+                                <property name="left_attach">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="spacing">6</property>
+                                <child>
+                                  <object class="GtkSpinButton" id="cell-height-scale-spinbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="adjustment">adjustment6</property>
+                                    <property name="digits">2</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="cell-height-scale-label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="top_attach">10</property>
+                                <property name="left_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkButtonBox">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="layout_style">end</property>
+                                <child>
+                                  <object class="GtkButton" id="cell-scale-reset-button">
+                                    <property name="label" translatable="yes">R_eset</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="focus_on_click">False</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="top_attach">10</property>
+                                <property name="left_attach">3</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="tab">
+                      <object class="GtkLabel" id="label32">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">General</property>
+                        <property name="use_underline">True</property>
+                        <property name="justify">center</property>
+                      </object>
+                      <packing>
+                        <property name="tab_fill">False</property>
+                      </packing>
+                    </child>
                     <child>
-                      <object class="GtkLabel" id="theme-variant-label">
+                      <object class="GtkGrid">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Theme _variant:</property>
+                        <property name="border_width">12</property>
+                        <property name="column_spacing">12</property>
+                        <property name="row_spacing">6</property>
+                        <child>
+                          <object class="GtkCheckButton" id="login-shell-checkbutton">
+                            <property name="label" translatable="yes">_Run command as a login shell</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="top_attach">0</property>
+                            <property name="left_attach">0</property>
+                            <property name="width">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="use-custom-command-checkbutton">
+                            <property name="label" translatable="yes">Ru_n a custom command instead of my shell</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="top_attach">1</property>
+                            <property name="left_attach">0</property>
+                            <property name="width">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="custom-command-entry-label">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Custom co_mmand:</property>
+                            <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">custom-command-entry</property>
+                            <property name="xalign">0</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">2</property>
+                            <property name="left_attach">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkEntry" id="custom-command-entry">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="hexpand">True</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">2</property>
+                            <property name="left_attach">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="exit-action-combobox-label">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">When command _exits:</property>
+                            <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">exit-action-combobox</property>
+                            <property name="xalign">0</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">3</property>
+                            <property name="left_attach">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkComboBox" id="exit-action-combobox">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="model">model3</property>
+                            <property name="focus_on_click">False</property>
+                            <property name="halign">start</property>
+                            <child>
+                              <object class="GtkCellRendererText" id="renderer3"/>
+                              <attributes>
+                                <attribute name="text">0</attribute>
+                              </attributes>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="top_attach">3</property>
+                            <property name="left_attach">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child type="tab">
+                      <object class="GtkLabel" id="label38">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Command</property>
                         <property name="use_underline">True</property>
-                        <property name="ellipsize">middle</property>
-                        <property name="xalign">0</property>
+                        <property name="justify">center</property>
                       </object>
                       <packing>
-                        <property name="top_attach">0</property>
-                        <property name="left_attach">0</property>
+                        <property name="position">1</property>
+                        <property name="tab_fill">False</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkComboBox" id="theme-variant-combobox">
+                      <object class="GtkVBox" id="vbox90">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="model">theme-variant-liststore</property>
-                        <property name="id_column">1</property>
+                        <property name="border_width">12</property>
+                        <property name="spacing">18</property>
                         <child>
-                          <object class="GtkCellRendererText" id="renderer1"/>
-                          <attributes>
-                            <attribute name="text">0</attribute>
-                          </attributes>
+                          <object class="GtkVBox" id="vbox82">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="spacing">6</property>
+                            <child>
+                              <object class="GtkLabel" id="label39">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" translatable="yes">Text and Background Color</property>
+                                <property name="xalign">0</property>
+                                <attributes>
+                                  <attribute name="weight" value="bold"/>
+                                </attributes>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkAlignment" id="alignment10105">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="left_padding">12</property>
+                                <child>
+                                  <object class="GtkVBox" id="vbox94">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="spacing">6</property>
+                                    <child>
+                                      <object class="GtkCheckButton" id="use-theme-colors-checkbutton">
+                                        <property name="label" translatable="yes">_Use colors from system theme</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="xalign">0.5</property>
+                                        <property name="draw_indicator">True</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkBox" id="colors-box">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="orientation">vertical</property>
+                                        <property name="spacing">6</property>
+                                        <child>
+                                          <object class="GtkHBox" id="builtin-color-schemes-box">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="spacing">12</property>
+                                            <child>
+                                              <object class="GtkLabel" id="color-scheme-combobox-label">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label" translatable="yes">Built-in sche_mes:</property>
+                                                <property name="use_underline">True</property>
+                                                <property name="justify">center</property>
+                                                <property name="mnemonic_widget">color-scheme-combobox</property>
+                                                <property name="xalign">0</property>
+                                              </object>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="position">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkComboBox" id="color-scheme-combobox">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="focus_on_click">False</property>
+                                              </object>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">True</property>
+                                                <property name="position">1</property>
+                                              </packing>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkGrid">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="row_spacing">6</property>
+                                            <property name="column_spacing">12</property>
+                                            <child>
+                                              <object class="GtkLabel">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label" translatable="yes">Text</property>
+                                                <property name="xalign">0</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">0</property>
+                                                <property name="left_attach">1</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkLabel">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label" translatable="yes">Background</property>
+                                                <property name="xalign">0</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">0</property>
+                                                <property name="left_attach">2</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkLabel" id="foreground-colorpicker-label">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="halign">start</property>
+                                                <property name="label" translatable="yes">_Default color:</property>
+                                                <property name="use_underline">True</property>
+                                                <property name="justify">center</property>
+                                                <property name="mnemonic_widget">foreground-colorpicker</property>
+                                                <property name="xalign">0</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">1</property>
+                                                <property name="left_attach">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="foreground-colorpicker">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="halign">start</property>
+                                                <property name="title" translatable="yes">Choose Terminal Text Color</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">1</property>
+                                                <property name="left_attach">1</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="background-colorpicker">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="halign">start</property>
+                                                <property name="title" translatable="yes">Choose Terminal Background Color</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">1</property>
+                                                <property name="left_attach">2</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkCheckButton" id="bold-color-checkbutton">
+                                                <property name="label" translatable="yes">Bo_ld color:</property>
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="halign">start</property>
+                                                <property name="use_underline">True</property>
+                                                <property name="xalign">0</property>
+                                                <property name="draw_indicator">True</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">2</property>
+                                                <property name="left_attach">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="bold-colorpicker">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="halign">start</property>
+                                                <property name="title" translatable="yes">Choose Terminal Bold Text Color</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">2</property>
+                                                <property name="left_attach">1</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkCheckButton" id="underline-color-checkbutton">
+                                                <property name="label" translatable="yes">_Underline color:</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="halign">start</property>
+                                                <property name="use_underline">True</property>
+                                                <property name="xalign">0</property>
+                                                <property name="draw_indicator">True</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">3</property>
+                                                <property name="left_attach">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="underline-colorpicker">
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="halign">start</property>
+                                                <property name="title" translatable="yes">Choose Terminal Underlined Text Color</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">3</property>
+                                                <property name="left_attach">1</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkCheckButton" id="cursor-colors-checkbutton">
+                                                <property name="label" translatable="yes">Cu_rsor color:</property>
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="halign">start</property>
+                                                <property name="use_underline">True</property>
+                                                <property name="xalign">0</property>
+                                                <property name="draw_indicator">True</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">4</property>
+                                                <property name="left_attach">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="cursor-foreground-colorpicker">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">True</property>
+                                                <property name="halign">start</property>
+                                                <property name="title" translatable="yes">Choose Terminal Cursor Foreground Color</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">4</property>
+                                                <property name="left_attach">1</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="cursor-background-colorpicker">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">True</property>
+                                                <property name="halign">start</property>
+                                                <property name="title" translatable="yes">Choose Terminal Cursor Background Color</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">4</property>
+                                                <property name="left_attach">2</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkCheckButton" id="highlight-colors-checkbutton">
+                                                <property name="label" translatable="yes">_Highlight color:</property>
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="halign">start</property>
+                                                <property name="use_underline">True</property>
+                                                <property name="draw_indicator">True</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">5</property>
+                                                <property name="left_attach">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="highlight-foreground-colorpicker">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">True</property>
+                                                <property name="halign">start</property>
+                                                <property name="title" translatable="yes">Choose Terminal Highlight Foreground Color</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">5</property>
+                                                <property name="left_attach">1</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="highlight-background-colorpicker">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">True</property>
+                                                <property name="halign">start</property>
+                                                <property name="title" translatable="yes">Choose Terminal Highlight Background Color</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">5</property>
+                                                <property name="left_attach">2</property>
+                                              </packing>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">True</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkVBox" id="palette-box">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="spacing">6</property>
+                            <child>
+                              <object class="GtkLabel" id="label42">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" translatable="yes">Palette</property>
+                                <property name="xalign">0</property>
+                                <attributes>
+                                  <attribute name="weight" value="bold"/>
+                                </attributes>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkAlignment" id="alignment10106">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="left_padding">12</property>
+                                <child>
+                                  <object class="GtkVBox" id="vbox8">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="spacing">6</property>
+                                    <child>
+                                      <object class="GtkGrid" id="table25">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="column_spacing">12</property>
+                                        <property name="row_spacing">6</property>
+                                        <child>
+                                          <object class="GtkLabel" id="palette-optionmenu-label">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="label" translatable="yes">Built-in _schemes:</property>
+                                            <property name="use_underline">True</property>
+                                            <property name="justify">center</property>
+                                            <property name="mnemonic_widget">palette-combobox</property>
+                                            <property name="xalign">0</property>
+                                          </object>
+                                          <packing>
+                                            <property name="top_attach">0</property>
+                                            <property name="left_attach">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkComboBox" id="palette-combobox">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="model">model4</property>
+                                            <property name="focus_on_click">False</property>
+                                            <child>
+                                              <object class="GtkCellRendererText" id="renderer4"/>
+                                              <attributes>
+                                                <attribute name="text">0</attribute>
+                                              </attributes>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="top_attach">0</property>
+                                            <property name="left_attach">1</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel" id="label43">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="label" translatable="yes">Color p_alette:</property>
+                                            <property name="use_underline">True</property>
+                                            <property name="justify">center</property>
+                                            <property name="mnemonic_widget">palette-colorpicker-0</property>
+                                            <property name="xalign">0</property>
+                                            <property name="yalign">0</property>
+                                          </object>
+                                          <packing>
+                                            <property name="top_attach">1</property>
+                                            <property name="left_attach">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkGrid" id="palette-table">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="column_spacing">6</property>
+                                            <property name="row_spacing">6</property>
+                                            <child>
+                                              <object class="GtkColorButton" id="palette-colorpicker-0">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="tooltip_text">dummy</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">0</property>
+                                                <property name="left_attach">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="palette-colorpicker-1">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="tooltip_text">dummy</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">0</property>
+                                                <property name="left_attach">1</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="palette-colorpicker-2">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="tooltip_text">dummy</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">0</property>
+                                                <property name="left_attach">2</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="palette-colorpicker-3">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="tooltip_text">dummy</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">0</property>
+                                                <property name="left_attach">3</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="palette-colorpicker-4">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="tooltip_text">dummy</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">0</property>
+                                                <property name="left_attach">4</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="palette-colorpicker-5">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="tooltip_text">dummy</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">0</property>
+                                                <property name="left_attach">5</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="palette-colorpicker-6">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="tooltip_text">dummy</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">0</property>
+                                                <property name="left_attach">6</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="palette-colorpicker-7">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="tooltip_text">dummy</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">0</property>
+                                                <property name="left_attach">7</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="palette-colorpicker-8">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="tooltip_text">dummy</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">1</property>
+                                                <property name="left_attach">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="palette-colorpicker-9">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="tooltip_text">dummy</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">1</property>
+                                                <property name="left_attach">1</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="palette-colorpicker-10">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="tooltip_text">dummy</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">1</property>
+                                                <property name="left_attach">2</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="palette-colorpicker-11">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="tooltip_text">dummy</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">1</property>
+                                                <property name="left_attach">3</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="palette-colorpicker-12">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="tooltip_text">dummy</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">1</property>
+                                                <property name="left_attach">4</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="palette-colorpicker-13">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="tooltip_text">dummy</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">1</property>
+                                                <property name="left_attach">5</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="palette-colorpicker-14">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="tooltip_text">dummy</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">1</property>
+                                                <property name="left_attach">6</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkColorButton" id="palette-colorpicker-15">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="tooltip_text">dummy</property>
+                                              </object>
+                                              <packing>
+                                                <property name="top_attach">1</property>
+                                                <property name="left_attach">7</property>
+                                              </packing>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="top_attach">1</property>
+                                            <property name="left_attach">1</property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="bold-is-bright-checkbutton">
+                                        <property name="label" translatable="yes">Show _bold text in bright colors</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="xalign">0.5</property>
+                                        <property name="draw_indicator">True</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">True</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
                         </child>
                       </object>
                       <packing>
-                        <property name="top_attach">0</property>
-                        <property name="left_attach">1</property>
+                        <property name="position">2</property>
                       </packing>
                     </child>
-                    <child>
-                      <object class="GtkLabel" id="new-terminal-mode-label">
+                    <child type="tab">
+                      <object class="GtkLabel" id="label45">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Open _new terminals in:</property>
+                        <property name="label" translatable="yes">Colors</property>
                         <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">new-terminal-mode-combobox</property>
+                        <property name="justify">center</property>
                       </object>
                       <packing>
-                        <property name="top_attach">1</property>
-                        <property name="left_attach">0</property>
+                        <property name="position">2</property>
+                        <property name="tab_fill">False</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkComboBox" id="new-terminal-mode-combobox">
+                      <object class="GtkGrid" id="table27">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="model">new-terminal-mode-liststore</property>
-                        <property name="id_column">1</property>
+                        <property name="border_width">12</property>
+                        <property name="column_spacing">12</property>
+                        <property name="row_spacing">6</property>
+                        <child>
+                          <object class="GtkCheckButton" id="scrollbar-checkbutton">
+                            <property name="label" translatable="yes">_Show scrollbar</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="xalign">0.5</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="hexpand">True</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">0</property>
+                            <property name="left_attach">0</property>
+                            <property name="width">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="scroll-on-output-checkbutton">
+                            <property name="label" translatable="yes">Scroll on _output</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="xalign">0.5</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="hexpand">True</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="left_attach">0</property>
+                            <property name="width">2</property>
+                          </packing>
+                        </child>
                         <child>
-                          <object class="GtkCellRendererText" id="renderer2"/>
-                          <attributes>
-                            <attribute name="text">0</attribute>
-                          </attributes>
+                          <object class="GtkCheckButton" id="scroll-on-keystroke-checkbutton">
+                            <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="use_underline">True</property>
+                            <property name="xalign">0.5</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="hexpand">True</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">2</property>
+                            <property name="left_attach">0</property>
+                            <property name="width">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="scrollback-limited-checkbutton">
+                            <property name="label" translatable="yes">_Limit scrollback to:</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="xalign">0.5</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="hexpand">False</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">3</property>
+                            <property name="left_attach">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHBox" id="scrollback-box">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="spacing">6</property>
+                            <property name="hexpand">True</property>
+                            <child>
+                              <object class="GtkSpinButton" id="scrollback-lines-spinbutton">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="adjustment">adjustment4</property>
+                                <property name="climb_rate">1</property>
+                                <property name="numeric">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">True</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="scrollback-lines-spinbutton-label">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" translatable="yes">lines</property>
+                                <property name="justify">center</property>
+                                <property name="mnemonic_widget">scrollback-lines-spinbutton</property>
+                                <property name="xalign">0</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="top_attach">3</property>
+                            <property name="left_attach">1</property>
+                          </packing>
                         </child>
                       </object>
                       <packing>
-                        <property name="top_attach">1</property>
-                        <property name="left_attach">1</property>
+                        <property name="position">3</property>
                       </packing>
                     </child>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">3</property>
-                  </packing>
-                </child>
-              </object>
-            </child>
-            <child type="tab">
-              <object class="GtkLabel" id="label1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">General</property>
-              </object>
-              <packing>
-                <property name="tab_fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkGrid" id="keybindings">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="border_width">12</property>
-                <property name="column_spacing">12</property>
-                <property name="row_spacing">6</property>
-                <child>
-                  <object class="GtkCheckButton" id="disable-shortcuts-checkbutton">
-                    <property name="label" translatable="yes">_Enable shortcuts</property>
-                    <property name="use_action_appearance">False</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="xalign">0</property>
-                    <property name="draw_indicator">True</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">0</property>
-                    <property name="left_attach">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkScrolledWindow" id="scrolledwindow1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="hscrollbar_policy">never</property>
-                    <property name="shadow_type">in</property>
-                    <property name="hexpand">True</property>
-                    <property name="vexpand">True</property>
-                    <child>
-                      <object class="GtkTreeView" id="accelerators-treeview">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="rules_hint">True</property>
-                        <child internal-child="selection">
-                          <object class="GtkTreeSelection" id="treeview-selection"/>
-                        </child>
-                      </object>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="left_attach">0</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child type="tab">
-              <object class="GtkLabel" id="label2">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Shortcuts</property>
-              </object>
-              <packing>
-                <property name="position">1</property>
-                <property name="tab_fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkVBox" id="profiles">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="border_width">12</property>
-                <property name="spacing">6</property>
-                <child>
-                  <object class="GtkHBox" id="hbox25">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="spacing">6</property>
-                    <child>
-                      <object class="GtkScrolledWindow" id="profiles-treeview-container">
+                    <child type="tab">
+                      <object class="GtkLabel" id="label60">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="hscrollbar_policy">never</property>
-                        <property name="shadow_type">in</property>
-                        <child>
-                          <placeholder/>
-                        </child>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Scrolling</property>
+                        <property name="use_underline">True</property>
                       </object>
                       <packing>
-                        <property name="expand">True</property>
-                        <property name="fill">True</property>
-                        <property name="position">0</property>
+                        <property name="position">3</property>
+                        <property name="tab_fill">False</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkVButtonBox" id="vbuttonbox1">
+                      <object class="GtkGrid" id="table30">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="spacing">6</property>
-                        <property name="layout_style">start</property>
+                        <property name="border_width">12</property>
+                        <property name="column_spacing">12</property>
+                        <property name="row_spacing">6</property>
                         <child>
-                          <object class="GtkButton" id="new-profile-button">
-                            <property name="label">gtk-new</property>
+                          <object class="GtkLabel" id="backspace-binding-combobox-label">
                             <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="can_default">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="use_stock">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">_Backspace key generates:</property>
+                            <property name="use_underline">True</property>
+                            <property name="justify">center</property>
+                            <property name="mnemonic_widget">backspace-binding-combobox</property>
+                            <property name="xalign">0</property>
                           </object>
                           <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
+                            <property name="top_attach">0</property>
+                            <property name="left_attach">0</property>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkButton" id="clone-profile-button">
-                            <property name="label" translatable="yes">_Clone</property>
+                          <object class="GtkComboBox" id="backspace-binding-combobox">
                             <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="can_default">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="use_stock">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="model">model6</property>
+                            <property name="focus_on_click">False</property>
+                            <child>
+                              <object class="GtkCellRendererText" id="renderer6"/>
+                              <attributes>
+                                <attribute name="text">0</attribute>
+                              </attributes>
+                            </child>
                           </object>
                           <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">1</property>
+                            <property name="top_attach">0</property>
+                            <property name="left_attach">1</property>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkButton" id="edit-profile-button">
-                            <property name="label">gtk-edit</property>
+                          <object class="GtkLabel" id="delete-binding-combobox-label">
                             <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="can_default">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="use_stock">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">_Delete key generates:</property>
+                            <property name="use_underline">True</property>
+                            <property name="justify">center</property>
+                            <property name="mnemonic_widget">delete-binding-combobox</property>
+                            <property name="xalign">0</property>
                           </object>
                           <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">2</property>
+                            <property name="top_attach">1</property>
+                            <property name="left_attach">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkComboBox" id="delete-binding-combobox">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="model">model6</property>
+                            <property name="focus_on_click">False</property>
+                            <child>
+                              <object class="GtkCellRendererText" id="renderer7"/>
+                              <attributes>
+                                <attribute name="text">0</attribute>
+                              </attributes>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="left_attach">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="encoding-label">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">_Encoding:</property>
+                            <property name="use_underline">True</property>
+                            <property name="xalign">0</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">2</property>
+                            <property name="left_attach">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkComboBox" id="encoding-combobox">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="focus_on_click">False</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">2</property>
+                            <property name="left_attach">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="cjk-ambiguous-width-label">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Ambiguous-_width characters:</property>
+                            <property name="use_underline">True</property>
+                            <property name="justify">center</property>
+                            <property name="mnemonic_widget">cjk-ambiguous-width-combobox</property>
+                            <property name="xalign">0</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">3</property>
+                            <property name="left_attach">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkComboBox" id="cjk-ambiguous-width-combobox">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="model">cjk-ambiguous-width-model</property>
+                            <property name="focus_on_click">False</property>
+                            <property name="id_column">1</property>
+                            <child>
+                              <object class="GtkCellRendererText" id="cjk-ambiguous-width-renderer"/>
+                              <attributes>
+                                <attribute name="text">0</attribute>
+                              </attributes>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="top_attach">3</property>
+                            <property name="left_attach">1</property>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkButton" id="delete-profile-button">
-                            <property name="label">gtk-delete</property>
+                          <object class="GtkButton" id="reset-compat-defaults-button">
+                            <property name="label" translatable="yes">_Reset Compatibility Options to Defaults</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="can_default">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="use_stock">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="focus_on_click">False</property>
+                            <property name="halign">start</property>
                           </object>
                           <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">3</property>
+                            <property name="top_attach">4</property>
+                            <property name="left_attach">0</property>
+                            <property name="width">2</property>
                           </packing>
                         </child>
                       </object>
                       <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
+                        <property name="position">4</property>
                       </packing>
                     </child>
-                  </object>
-                  <packing>
-                    <property name="expand">True</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkHBox" id="default-profile-hbox">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="spacing">12</property>
-                    <child>
-                      <object class="GtkLabel" id="default-profile-label">
+                    <child type="tab">
+                      <object class="GtkLabel" id="label54">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">_Profile used when launching a new terminal:</property>
+                        <property name="label" translatable="yes">Compatibility</property>
                         <property name="use_underline">True</property>
-                        <property name="xalign">0</property>
+                        <property name="justify">center</property>
                       </object>
                       <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">0</property>
+                        <property name="position">4</property>
+                        <property name="tab_fill">False</property>
                       </packing>
                     </child>
-                    <child>
-                      <placeholder/>
-                    </child>
                   </object>
                   <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
+                    <property name="name">profile-prefs</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="can_focus">False</property>
-                <property name="label" translatable="yes">Profiles</property>
-              </object>
-              <packing>
-                <property name="position">2</property>
-                <property name="tab_fill">False</property>
-              </packing>
             </child>
           </object>
-          <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-            <property name="position">0</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButtonBox" id="dialogue-buttonbox">
@@ -479,4 +2113,152 @@
       </object>
     </child>
   </object>
+  <object class="GtkPopoverMenu" id="popover-menu">
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="margin">6</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkModelButton">
+            <property name="visible">True</property>
+            <property name="action-name">win.new</property>
+            <property name="text" translatable="yes">New</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkModelButton">
+            <property name="visible">True</property>
+            <property name="action-name">win.clone</property>
+            <property name="text" translatable="yes">Clone</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkModelButton">
+            <property name="visible">True</property>
+            <property name="action-name">win.rename</property>
+            <property name="text" translatable="yes">Rename</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkModelButton">
+            <property name="visible">True</property>
+            <property name="action-name">win.delete</property>
+            <property name="text" translatable="yes">Delete</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkSeparator">
+            <property name="visible">True</property>
+            <property name="orientation">horizontal</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkModelButton">
+            <property name="visible">True</property>
+            <property name="action-name">win.make-default</property>
+            <property name="text" translatable="yes">Make default</property>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkPopover" id="popover-dialog">
+    <property name="can_focus">False</property>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="border_width">12</property>
+        <property name="spacing">6</property>
+        <child>
+          <object class="GtkLabel" id="popover-dialog-label1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">label</property>
+            <property name="xalign">0</property>
+            <property name="margin_bottom">6</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="popover-dialog-label2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">label</property>
+            <property name="xalign">0</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="popover-dialog-entry">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="activates_default">True</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButtonBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">start</property>
+            <property name="margin_top">6</property>
+            <property name="spacing">6</property>
+            <child>
+              <object class="GtkButton" id="popover-dialog-cancel">
+                <property name="label" translatable="yes">Cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="pack_type">end</property>
+                <property name="position">0</property>
+                <property name="secondary">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="popover-dialog-ok">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="pack_type">end</property>
+                <property name="position">1</property>
+                <property name="secondary">True</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
 </interface>
diff --git a/src/profile-editor.c b/src/profile-editor.c
index 1c949afa..64e255d0 100644
--- a/src/profile-editor.c
+++ b/src/profile-editor.c
@@ -30,12 +30,119 @@
 #include "terminal-encoding.h"
 #include "terminal-enums.h"
 #include "profile-editor.h"
+#include "terminal-prefs.h"
 #include "terminal-schemas.h"
 #include "terminal-type-builtins.h"
 #include "terminal-util.h"
 #include "terminal-profiles-list.h"
 #include "terminal-libgsystem.h"
 
+
+/* Wrapper around g_signal_connect that maintains a list of the
+ * handlers installed, and can disconnect them all. */
+typedef struct {
+  gpointer instance;
+  gulong handler_id;
+} ProfilePrefsSignal;
+
+static void
+profile_prefs_register_signal_handler (gpointer instance,
+                                       gulong handler_id)
+{
+  ProfilePrefsSignal sig;
+  sig.instance = instance;
+  sig.handler_id = handler_id;
+  g_array_append_val (the_pref_data->profile_signals, sig);
+}
+
+static gulong
+profile_prefs_signal_connect (gpointer instance,
+                              const gchar *detailed_signal,
+                              GCallback c_handler,
+                              gpointer data)
+{
+  gulong handler_id = g_signal_connect(instance, detailed_signal, c_handler, data);
+  profile_prefs_register_signal_handler (instance, handler_id);
+  return handler_id;
+}
+
+static void
+profile_prefs_signal_handlers_disconnect_all (void)
+{
+  for (guint i = 0; i < the_pref_data->profile_signals->len; i++) {
+    ProfilePrefsSignal *sig = &g_array_index (the_pref_data->profile_signals, ProfilePrefsSignal, i);
+    g_signal_handler_disconnect (sig->instance, sig->handler_id);
+  }
+  g_array_set_size (the_pref_data->profile_signals, 0);
+}
+
+
+/* Wrappers around g_settings_bind and friends that maintain a list of the
+ * bindings installed, and can unbind them all. */
+typedef struct {
+  gpointer object;
+  char *property;
+} ProfilePrefsBinding;
+
+static void
+profile_prefs_register_settings_binding (gpointer object,
+                                         const char *property)
+{
+  ProfilePrefsBinding bind;
+  bind.object = object;
+  bind.property = g_strdup (property);
+  g_array_append_val (the_pref_data->profile_bindings, bind);
+}
+
+static void
+profile_prefs_settings_bind (GSettings *settings,
+                             const gchar *key,
+                             gpointer object,
+                             const gchar *property,
+                             GSettingsBindFlags flags)
+{
+  profile_prefs_register_settings_binding (object, property);
+  g_settings_bind (settings, key, object, property, flags);
+}
+
+static void
+profile_prefs_settings_bind_with_mapping (GSettings *settings,
+                                          const gchar *key,
+                                          gpointer object,
+                                          const gchar *property,
+                                          GSettingsBindFlags flags,
+                                          GSettingsBindGetMapping get_mapping,
+                                          GSettingsBindSetMapping set_mapping,
+                                          gpointer user_data,
+                                          GDestroyNotify destroy)
+{
+  profile_prefs_register_settings_binding (object, property);
+  g_settings_bind_with_mapping (settings, key, object, property, flags, get_mapping, set_mapping, user_data, destroy);
+}
+
+static void
+profile_prefs_settings_bind_writable (GSettings *settings,
+                                      const gchar *key,
+                                      gpointer object,
+                                      const gchar *property,
+                                      gboolean inverted)
+{
+  profile_prefs_register_settings_binding (object, property);
+  g_settings_bind_writable (settings, key, object, property, inverted);
+}
+
+static void
+profile_prefs_settings_unbind_all (void)
+{
+  for (guint i = 0; i < the_pref_data->profile_bindings->len; i++) {
+    ProfilePrefsBinding *bind = &g_array_index (the_pref_data->profile_bindings, ProfilePrefsBinding, i);
+    g_settings_unbind (bind->object, bind->property);
+    g_free (bind->property);
+  }
+  g_array_set_size (the_pref_data->profile_bindings, 0);
+}
+
+
 typedef struct _TerminalColorScheme TerminalColorScheme;
 
 struct _TerminalColorScheme
@@ -217,7 +324,7 @@ static void profile_palette_notify_scheme_combo_cb (GSettings *profile,
 
 static void profile_palette_notify_colorpickers_cb (GSettings *profile,
                                                     const char *key,
-                                                    GtkWidget *editor);
+                                                    gpointer user_data);
 
 
 /* gdk_rgba_equal is too strict! */
@@ -381,34 +488,29 @@ palette_color_notify_cb (GtkColorButton *button,
                          GParamSpec *pspec,
                          GSettings *profile)
 {
-  GtkWidget *editor;
   GdkRGBA color;
   guint i;
 
   gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (button), &color);
   i = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (button), "palette-entry-index"));
 
-  editor = gtk_widget_get_toplevel (GTK_WIDGET (button));
-  g_signal_handlers_block_by_func (profile, G_CALLBACK (profile_palette_notify_colorpickers_cb), editor);
+  g_signal_handlers_block_by_func (profile, G_CALLBACK (profile_palette_notify_colorpickers_cb), NULL);
   modify_palette_entry (profile, i, &color);
-  g_signal_handlers_unblock_by_func (profile, G_CALLBACK (profile_palette_notify_colorpickers_cb), editor);
+  g_signal_handlers_unblock_by_func (profile, G_CALLBACK (profile_palette_notify_colorpickers_cb), NULL);
 }
 
 static void
 profile_palette_notify_colorpickers_cb (GSettings *profile,
                                         const char *key,
-                                        GtkWidget *editor)
+                                        gpointer user_data)
 {
   GtkWidget *w;
-  GtkBuilder *builder;
+  GtkBuilder *builder = the_pref_data->builder;
   gs_free GdkRGBA *colors;
   gsize n_colors, i;
 
   g_assert (strcmp (key, TERMINAL_PROFILE_PALETTE_KEY) == 0);
 
-  builder = g_object_get_data (G_OBJECT (editor), "builder");
-  g_assert (builder != NULL);
-
   colors = terminal_g_settings_get_rgba_palette (profile, TERMINAL_PROFILE_PALETTE_KEY, &n_colors);
 
   n_colors = MIN (n_colors, TERMINAL_PALETTE_SIZE);
@@ -417,7 +519,7 @@ profile_palette_notify_colorpickers_cb (GSettings *profile,
       char name[32];
 
       g_snprintf (name, sizeof (name), "palette-colorpicker-%" G_GSIZE_FORMAT, i);
-      w = (GtkWidget *) gtk_builder_get_object  (builder, name);
+      w = (GtkWidget *) gtk_builder_get_object (builder, name);
 
       g_signal_handlers_block_by_func (w, G_CALLBACK (palette_color_notify_cb), profile);
       gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (w), &colors[i]);
@@ -529,36 +631,6 @@ init_encodings_combo (GtkWidget *widget)
                                   "text", ENCODINGS_COLUMN_TEXT, NULL);
 }
 
-static void
-editor_help_button_clicked_cb (GtkWidget *button,
-                               GtkWidget *editor)
-{
-  terminal_util_show_help ("profile");
-}
-
-static void
-editor_close_button_clicked_cb (GtkWidget *button,
-                                GtkWidget *editor)
-{
-  gtk_widget_destroy (editor);
-}
-
-static void
-profile_editor_destroyed (GtkWidget *editor,
-                          GSettings *profile)
-{
-  g_signal_handlers_disconnect_matched (profile, G_SIGNAL_MATCH_FUNC, 0, 0, NULL,
-                                        G_CALLBACK (profile_colors_notify_scheme_combo_cb), NULL);
-  g_signal_handlers_disconnect_matched (profile, G_SIGNAL_MATCH_FUNC, 0, 0, NULL,
-                                        G_CALLBACK (profile_palette_notify_scheme_combo_cb), NULL);
-  g_signal_handlers_disconnect_matched (profile, G_SIGNAL_MATCH_FUNC, 0, 0, NULL,
-                                        G_CALLBACK (profile_palette_notify_colorpickers_cb), NULL);
-
-  g_object_set_data (G_OBJECT (profile), "editor-window", NULL);
-  g_object_set_data (G_OBJECT (editor), "builder", NULL);
-}
-
-
 /* Tab scrolling was removed from GtkNotebook in gtk 3, so reimplement it here */
 static gboolean
 scroll_event_cb (GtkWidget      *widget,
@@ -625,19 +697,6 @@ scroll_event_cb (GtkWidget      *widget,
   return FALSE;
 }
 
-static gboolean
-string_to_window_title (GValue *value,
-                        GVariant *variant,
-                        gpointer user_data)
-{
-  const char *visible_name;
-
-  g_variant_get (variant, "&s", &visible_name);
-  g_value_take_string (value, g_strdup_printf (_("Editing Profile “%s”"), visible_name));
-
-  return TRUE;
-}
-
 
 static gboolean
 s_to_rgba (GValue *value,
@@ -803,83 +862,41 @@ monospace_filter (const PangoFontFamily *family,
   return pango_font_family_is_monospace ((PangoFontFamily *) family);
 }
 
-/**
- * terminal_profile_edit:
- * @profile: a #GSettings
- * @widget_name: a widget name in the profile editor's UI, or %NULL
- *
- * Shows the profile editor with @profile, anchored to @transient_parent.
- * If @widget_name is non-%NULL, focuses the corresponding widget and
- * switches the notebook to its containing page.
- */
+/* Called once per Preferences window, to destroy stuff that doesn't depend on the profile being edited */
 void
-terminal_profile_edit (GSettings  *profile,
-                       const char *widget_name)
+profile_prefs_destroy (void)
 {
-  TerminalSettingsList *profiles_list;
-  GtkBuilder *builder;
-  GError *error = NULL;
-  GtkWidget *editor, *w;
-  gs_free char *uuid = NULL;
-  char *text;
-  guint i;
+  profile_prefs_signal_handlers_disconnect_all ();
+  profile_prefs_settings_unbind_all ();
 
-  editor = g_object_get_data (G_OBJECT (profile), "editor-window");
-  if (editor)
-    {
-      terminal_util_dialog_focus_widget (editor, widget_name);
+  g_array_free (the_pref_data->profile_signals, TRUE);
+  g_array_free (the_pref_data->profile_bindings, TRUE);
+}
 
-      gtk_window_present (GTK_WINDOW (editor));
-      return;
-    }
+/* Called once per Preferences window, to initialize stuff that doesn't depend on the profile being edited */
+void
+profile_prefs_init (void)
+{
+  GtkWidget *w;
+  GtkBuilder *builder = the_pref_data->builder;
+  char *text;
+
+  the_pref_data->profile_signals = g_array_new (FALSE, FALSE, sizeof (ProfilePrefsSignal));
+  the_pref_data->profile_bindings = g_array_new (FALSE, FALSE, sizeof (ProfilePrefsBinding));
 
 #if !GTK_CHECK_VERSION (3, 19, 8)
   fixup_color_chooser_button ();
 #endif
 
-  profiles_list = terminal_app_get_profiles_list (terminal_app_get ());
-
-  builder = gtk_builder_new ();
-  gtk_builder_add_from_resource (builder, "/org/gnome/terminal/ui/profile-preferences.ui", &error);
-  g_assert_no_error (error);
-
-  editor = (GtkWidget *) gtk_builder_get_object  (builder, "profile-editor-dialog");
-  g_object_set_data_full (G_OBJECT (editor), "builder",
-                          builder, (GDestroyNotify) g_object_unref);
-
-  gtk_window_set_application (GTK_WINDOW (editor), GTK_APPLICATION (terminal_app_get ()));
-
-  /* Store the dialogue on the profile, so we can acccess it above to check if
-   * there's already a profile editor for this profile.
-   */
-  g_object_set_data (G_OBJECT (profile), "editor-window", editor);
-
-  g_signal_connect (editor, "destroy",
-                    G_CALLBACK (profile_editor_destroyed),
-                    profile);
-
-  w = (GtkWidget *) gtk_builder_get_object  (builder, "close-button");
-  g_signal_connect (w, "clicked", G_CALLBACK (editor_close_button_clicked_cb), editor);
-
-  w = (GtkWidget *) gtk_builder_get_object  (builder, "help-button");
-  g_signal_connect (w, "clicked", G_CALLBACK (editor_help_button_clicked_cb), editor);
-
-  w = (GtkWidget *) gtk_builder_get_object  (builder, "profile-editor-notebook");
+  w = (GtkWidget *) gtk_builder_get_object (builder, "profile-editor-notebook");
   gtk_widget_add_events (w, GDK_BUTTON_PRESS_MASK | GDK_SCROLL_MASK);
   g_signal_connect (w, "scroll-event", G_CALLBACK (scroll_event_cb), NULL);
 
-  uuid = terminal_settings_list_dup_uuid_from_child (profiles_list, profile);
-  gtk_label_set_text (GTK_LABEL (gtk_builder_get_object (builder, "profile-uuid")),
-                      uuid);
+  w = (GtkWidget *) gtk_builder_get_object (builder, "color-scheme-combobox");
+  init_color_scheme_menu (w);
 
-  g_signal_connect (gtk_builder_get_object  (builder, "default-size-reset-button"),
-                    "clicked",
-                    G_CALLBACK (default_size_reset_cb),
-                    profile);
-  g_signal_connect (gtk_builder_get_object  (builder, "cell-scale-reset-button"),
-                    "clicked",
-                    G_CALLBACK (cell_scale_reset_cb),
-                    profile);
+  w = (GtkWidget *) gtk_builder_get_object (builder, "encoding-combobox");
+  init_encodings_combo (w);
 
   /* Translators: Appears as: [numeric entry] × width */
   text = g_strdup_printf ("× %s", _("width"));
@@ -891,18 +908,47 @@ terminal_profile_edit (GSettings  *profile,
   gtk_label_set_text ((GtkLabel *) gtk_builder_get_object (builder, "cell-height-scale-label"),
                       text);
   g_free (text);
+}
 
-  w = (GtkWidget *) gtk_builder_get_object  (builder, "color-scheme-combobox");
-  init_color_scheme_menu (w);
+/* Called each time the user switches away from a profile, so it's no longer being edited */
+void
+profile_prefs_unload (void)
+{
+  profile_prefs_signal_handlers_disconnect_all ();
+  profile_prefs_settings_unbind_all ();
+}
+
+/* Called each time the user selects a new profile to edit */
+void
+profile_prefs_load (const char *uuid, GSettings *profile)
+{
+  GtkWidget *w;
+  GtkBuilder *builder = the_pref_data->builder;
+  guint i;
+
+  profile_prefs_unload ();
+
+  gtk_label_set_text (GTK_LABEL (gtk_builder_get_object (builder, "profile-uuid")),
+                      uuid);
+
+  profile_prefs_signal_connect (gtk_builder_get_object (builder, "default-size-reset-button"),
+                                "clicked",
+                                G_CALLBACK (default_size_reset_cb),
+                                profile);
+  profile_prefs_signal_connect (gtk_builder_get_object (builder, "cell-scale-reset-button"),
+                                "clicked",
+                                G_CALLBACK (cell_scale_reset_cb),
+                                profile);
 
   /* Hook up the palette colorpickers and combo box */
 
   for (i = 0; i < TERMINAL_PALETTE_SIZE; ++i)
     {
       char name[32];
+      char *text;
 
       g_snprintf (name, sizeof (name), "palette-colorpicker-%u", i);
-      w = (GtkWidget *) gtk_builder_get_object  (builder, name);
+      w = (GtkWidget *) gtk_builder_get_object (builder, name);
 
 #if GTK_CHECK_VERSION (3, 19, 8)
       g_object_set (w, "show-editor", TRUE, NULL);
@@ -918,387 +964,367 @@ terminal_profile_edit (GSettings  *profile,
       gtk_widget_set_tooltip_text (w, text);
       g_free (text);
 
-      g_signal_connect (w, "notify::rgba",
-                        G_CALLBACK (palette_color_notify_cb),
-                        profile);
+      profile_prefs_signal_connect (w, "notify::rgba",
+                                    G_CALLBACK (palette_color_notify_cb),
+                                    profile);
     }
 
-  profile_palette_notify_colorpickers_cb (profile, TERMINAL_PROFILE_PALETTE_KEY, editor);
-  g_signal_connect (profile, "changed::" TERMINAL_PROFILE_PALETTE_KEY,
-                    G_CALLBACK (profile_palette_notify_colorpickers_cb),
-                    editor);
+  profile_palette_notify_colorpickers_cb (profile, TERMINAL_PROFILE_PALETTE_KEY, NULL);
+  profile_prefs_signal_connect (profile, "changed::" TERMINAL_PROFILE_PALETTE_KEY,
+                                G_CALLBACK (profile_palette_notify_colorpickers_cb),
+                                NULL);
 
-  w = (GtkWidget *) gtk_builder_get_object  (builder, "palette-combobox");
-  g_signal_connect (w, "notify::active",
-                    G_CALLBACK (palette_scheme_combo_changed_cb),
-                    profile);
+  w = (GtkWidget *) gtk_builder_get_object (builder, "palette-combobox");
+  profile_prefs_signal_connect (w, "notify::active",
+                                G_CALLBACK (palette_scheme_combo_changed_cb),
+                                profile);
 
   profile_palette_notify_scheme_combo_cb (profile, TERMINAL_PROFILE_PALETTE_KEY, GTK_COMBO_BOX (w));
-  g_signal_connect (profile, "changed::" TERMINAL_PROFILE_PALETTE_KEY,
-                    G_CALLBACK (profile_palette_notify_scheme_combo_cb),
-                    w);
+  profile_prefs_signal_connect (profile, "changed::" TERMINAL_PROFILE_PALETTE_KEY,
+                                G_CALLBACK (profile_palette_notify_scheme_combo_cb),
+                                w);
 
   /* Hook up the color scheme pickers and combo box */
-  w = (GtkWidget *) gtk_builder_get_object  (builder, "color-scheme-combobox");
-  g_signal_connect (w, "notify::active",
-                    G_CALLBACK (color_scheme_combo_changed_cb),
-                    profile);
+  w = (GtkWidget *) gtk_builder_get_object (builder, "color-scheme-combobox");
+  profile_prefs_signal_connect (w, "notify::active",
+                                G_CALLBACK (color_scheme_combo_changed_cb),
+                                profile);
 
   profile_colors_notify_scheme_combo_cb (profile, NULL, GTK_COMBO_BOX (w));
-  g_signal_connect (profile, "changed::" TERMINAL_PROFILE_FOREGROUND_COLOR_KEY,
-                    G_CALLBACK (profile_colors_notify_scheme_combo_cb),
-                    w);
-  g_signal_connect (profile, "changed::" TERMINAL_PROFILE_BACKGROUND_COLOR_KEY,
-                    G_CALLBACK (profile_colors_notify_scheme_combo_cb),
-                    w);
+  profile_prefs_signal_connect (profile, "changed::" TERMINAL_PROFILE_FOREGROUND_COLOR_KEY,
+                                G_CALLBACK (profile_colors_notify_scheme_combo_cb),
+                                w);
+  profile_prefs_signal_connect (profile, "changed::" TERMINAL_PROFILE_BACKGROUND_COLOR_KEY,
+                                G_CALLBACK (profile_colors_notify_scheme_combo_cb),
+                                w);
 
   w = GTK_WIDGET (gtk_builder_get_object (builder, "custom-command-entry"));
   custom_command_entry_changed_cb (GTK_ENTRY (w));
-  g_signal_connect (w, "changed",
-                    G_CALLBACK (custom_command_entry_changed_cb), NULL);
-
-  g_signal_connect (gtk_builder_get_object  (builder, "reset-compat-defaults-button"),
-                    "clicked",
-                    G_CALLBACK (reset_compat_defaults_cb),
-                    profile);
-
-  g_settings_bind_with_mapping (profile,
-                                TERMINAL_PROFILE_VISIBLE_NAME_KEY,
-                                editor,
-                                "title",
-                                G_SETTINGS_BIND_GET |
-                                G_SETTINGS_BIND_NO_SENSITIVITY,
-                                (GSettingsBindGetMapping)
-                                string_to_window_title, NULL, NULL, NULL);
+  profile_prefs_signal_connect (w, "changed",
+                                G_CALLBACK (custom_command_entry_changed_cb), NULL);
+
+  profile_prefs_signal_connect (gtk_builder_get_object (builder, "reset-compat-defaults-button"),
+                                "clicked",
+                                G_CALLBACK (reset_compat_defaults_cb),
+                                profile);
 
   w = GTK_WIDGET (gtk_builder_get_object (builder, "background-colorpicker"));
 #if GTK_CHECK_VERSION (3, 19, 8)
   g_object_set (w, "show-editor", TRUE, NULL);
 #endif
-  g_settings_bind_with_mapping (profile,
-                                TERMINAL_PROFILE_BACKGROUND_COLOR_KEY,
-                                w,
-                                "rgba",
-                                G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET,
-                                (GSettingsBindGetMapping) s_to_rgba,
-                                (GSettingsBindSetMapping) rgba_to_s,
-                                NULL, NULL);
-
-  g_settings_bind_with_mapping (profile,
-                                TERMINAL_PROFILE_BACKSPACE_BINDING_KEY,
-                                gtk_builder_get_object (builder,
-                                                        "backspace-binding-combobox"),
-                                "active",
-                                G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET,
-                                (GSettingsBindGetMapping) string_to_enum,
-                                (GSettingsBindSetMapping) enum_to_string,
-                                vte_erase_binding_get_type, NULL);
-  g_settings_bind (profile,
-                   TERMINAL_PROFILE_BOLD_IS_BRIGHT_KEY,
-                   gtk_builder_get_object (builder, "bold-is-bright-checkbutton"),
-                   "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
-  g_settings_bind (profile, TERMINAL_PROFILE_BOLD_COLOR_SAME_AS_FG_KEY,
-                   gtk_builder_get_object (builder,
-                                           "bold-color-checkbutton"),
-                   "active",
-                   G_SETTINGS_BIND_GET |
-                   G_SETTINGS_BIND_INVERT_BOOLEAN |
-                   G_SETTINGS_BIND_SET);
+  profile_prefs_settings_bind_with_mapping (profile,
+                                            TERMINAL_PROFILE_BACKGROUND_COLOR_KEY,
+                                            w,
+                                            "rgba",
+                                            G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET,
+                                            (GSettingsBindGetMapping) s_to_rgba,
+                                            (GSettingsBindSetMapping) rgba_to_s,
+                                            NULL, NULL);
+
+  profile_prefs_settings_bind_with_mapping (profile,
+                                            TERMINAL_PROFILE_BACKSPACE_BINDING_KEY,
+                                            gtk_builder_get_object (builder,
+                                                                    "backspace-binding-combobox"),
+                                            "active",
+                                            G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET,
+                                            (GSettingsBindGetMapping) string_to_enum,
+                                            (GSettingsBindSetMapping) enum_to_string,
+                                            vte_erase_binding_get_type, NULL);
+  profile_prefs_settings_bind (profile,
+                               TERMINAL_PROFILE_BOLD_IS_BRIGHT_KEY,
+                               gtk_builder_get_object (builder, "bold-is-bright-checkbutton"),
+                               "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_BOLD_COLOR_SAME_AS_FG_KEY,
+                               gtk_builder_get_object (builder,
+                                                       "bold-color-checkbutton"),
+                               "active",
+                               G_SETTINGS_BIND_GET |
+                               G_SETTINGS_BIND_INVERT_BOOLEAN |
+                               G_SETTINGS_BIND_SET);
 
   w = GTK_WIDGET (gtk_builder_get_object (builder, "bold-colorpicker"));
 #if GTK_CHECK_VERSION (3, 19, 8)
   g_object_set (w, "show-editor", TRUE, NULL);
 #endif
-  g_settings_bind (profile, TERMINAL_PROFILE_BOLD_COLOR_SAME_AS_FG_KEY,
-                   w,
-                   "sensitive",
-                   G_SETTINGS_BIND_GET |
-                   G_SETTINGS_BIND_INVERT_BOOLEAN |
-                   G_SETTINGS_BIND_NO_SENSITIVITY);
-  g_settings_bind_with_mapping (profile, TERMINAL_PROFILE_BOLD_COLOR_KEY,
-                                w,
-                                "rgba",
-                                G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET | G_SETTINGS_BIND_NO_SENSITIVITY,
-                                (GSettingsBindGetMapping) s_to_rgba,
-                                (GSettingsBindSetMapping) rgba_to_s,
-                                NULL, NULL);
-
-  g_settings_bind (profile, TERMINAL_PROFILE_CELL_HEIGHT_SCALE_KEY,
-                   gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON
-                                                   (gtk_builder_get_object
-                                                    (builder,
-                                                     "cell-height-scale-spinbutton"))),
-                   "value", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
-  g_settings_bind (profile, TERMINAL_PROFILE_CELL_WIDTH_SCALE_KEY,
-                   gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON
-                                                   (gtk_builder_get_object
-                                                    (builder,
-                                                     "cell-width-scale-spinbutton"))),
-                   "value", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
-  g_settings_bind (profile, TERMINAL_PROFILE_CURSOR_COLORS_SET_KEY,
-                   gtk_builder_get_object (builder,
-                                           "cursor-colors-checkbutton"),
-                   "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_BOLD_COLOR_SAME_AS_FG_KEY,
+                               w,
+                               "sensitive",
+                               G_SETTINGS_BIND_GET |
+                               G_SETTINGS_BIND_INVERT_BOOLEAN |
+                               G_SETTINGS_BIND_NO_SENSITIVITY);
+  profile_prefs_settings_bind_with_mapping (profile, TERMINAL_PROFILE_BOLD_COLOR_KEY,
+                                            w,
+                                            "rgba",
+                                            G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET | G_SETTINGS_BIND_NO_SENSITIVITY,
+                                            (GSettingsBindGetMapping) s_to_rgba,
+                                            (GSettingsBindSetMapping) rgba_to_s,
+                                            NULL, NULL);
+
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_CELL_HEIGHT_SCALE_KEY,
+                               gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON
+                                                               (gtk_builder_get_object
+                                                                (builder,
+                                                                 "cell-height-scale-spinbutton"))),
+                               "value", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_CELL_WIDTH_SCALE_KEY,
+                               gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON
+                                                               (gtk_builder_get_object
+                                                                (builder,
+                                                                 "cell-width-scale-spinbutton"))),
+                               "value", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_CURSOR_COLORS_SET_KEY,
+                               gtk_builder_get_object (builder,
+                                                       "cursor-colors-checkbutton"),
+                               "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
 
   w = GTK_WIDGET (gtk_builder_get_object (builder, "cursor-foreground-colorpicker"));
 #if GTK_CHECK_VERSION (3, 19, 8)
   g_object_set (w, "show-editor", TRUE, NULL);
 #endif
-  g_settings_bind (profile, TERMINAL_PROFILE_CURSOR_COLORS_SET_KEY,
-                   w,
-                   "sensitive",
-                   G_SETTINGS_BIND_GET |
-                   G_SETTINGS_BIND_NO_SENSITIVITY);
-  g_settings_bind_with_mapping (profile, TERMINAL_PROFILE_CURSOR_FOREGROUND_COLOR_KEY,
-                                w,
-                                "rgba",
-                                G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET | G_SETTINGS_BIND_NO_SENSITIVITY,
-                                (GSettingsBindGetMapping) s_to_rgba,
-                                (GSettingsBindSetMapping) rgba_to_s,
-                                NULL, NULL);
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_CURSOR_COLORS_SET_KEY,
+                               w,
+                               "sensitive",
+                               G_SETTINGS_BIND_GET |
+                               G_SETTINGS_BIND_NO_SENSITIVITY);
+  profile_prefs_settings_bind_with_mapping (profile, TERMINAL_PROFILE_CURSOR_FOREGROUND_COLOR_KEY,
+                                            w,
+                                            "rgba",
+                                            G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET | G_SETTINGS_BIND_NO_SENSITIVITY,
+                                            (GSettingsBindGetMapping) s_to_rgba,
+                                            (GSettingsBindSetMapping) rgba_to_s,
+                                            NULL, NULL);
 
   w = GTK_WIDGET (gtk_builder_get_object (builder, "cursor-background-colorpicker"));
 #if GTK_CHECK_VERSION (3, 19, 8)
   g_object_set (w, "show-editor", TRUE, NULL);
 #endif
-  g_settings_bind (profile, TERMINAL_PROFILE_CURSOR_COLORS_SET_KEY,
-                   w,
-                   "sensitive",
-                   G_SETTINGS_BIND_GET |
-                   G_SETTINGS_BIND_NO_SENSITIVITY);
-  g_settings_bind_with_mapping (profile, TERMINAL_PROFILE_CURSOR_BACKGROUND_COLOR_KEY,
-                                w,
-                                "rgba",
-                                G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET | G_SETTINGS_BIND_NO_SENSITIVITY,
-                                (GSettingsBindGetMapping) s_to_rgba,
-                                (GSettingsBindSetMapping) rgba_to_s,
-                                NULL, NULL);
-
-  g_settings_bind (profile, TERMINAL_PROFILE_HIGHLIGHT_COLORS_SET_KEY,
-                   gtk_builder_get_object (builder,
-                                           "highlight-colors-checkbutton"),
-                   "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_CURSOR_COLORS_SET_KEY,
+                               w,
+                               "sensitive",
+                               G_SETTINGS_BIND_GET |
+                               G_SETTINGS_BIND_NO_SENSITIVITY);
+  profile_prefs_settings_bind_with_mapping (profile, TERMINAL_PROFILE_CURSOR_BACKGROUND_COLOR_KEY,
+                                            w,
+                                            "rgba",
+                                            G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET | G_SETTINGS_BIND_NO_SENSITIVITY,
+                                            (GSettingsBindGetMapping) s_to_rgba,
+                                            (GSettingsBindSetMapping) rgba_to_s,
+                                            NULL, NULL);
+
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_HIGHLIGHT_COLORS_SET_KEY,
+                               gtk_builder_get_object (builder,
+                                                       "highlight-colors-checkbutton"),
+                               "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
 
   w = GTK_WIDGET (gtk_builder_get_object (builder, "highlight-foreground-colorpicker"));
 #if GTK_CHECK_VERSION (3, 19, 8)
   g_object_set (w, "show-editor", TRUE, NULL);
 #endif
-  g_settings_bind (profile, TERMINAL_PROFILE_HIGHLIGHT_COLORS_SET_KEY,
-                   w,
-                   "sensitive",
-                   G_SETTINGS_BIND_GET |
-                   G_SETTINGS_BIND_NO_SENSITIVITY);
-  g_settings_bind_with_mapping (profile, TERMINAL_PROFILE_HIGHLIGHT_FOREGROUND_COLOR_KEY,
-                                w,
-                                "rgba",
-                                G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET | G_SETTINGS_BIND_NO_SENSITIVITY,
-                                (GSettingsBindGetMapping) s_to_rgba,
-                                (GSettingsBindSetMapping) rgba_to_s,
-                                NULL, NULL);
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_HIGHLIGHT_COLORS_SET_KEY,
+                               w,
+                               "sensitive",
+                               G_SETTINGS_BIND_GET |
+                               G_SETTINGS_BIND_NO_SENSITIVITY);
+  profile_prefs_settings_bind_with_mapping (profile, TERMINAL_PROFILE_HIGHLIGHT_FOREGROUND_COLOR_KEY,
+                                            w,
+                                            "rgba",
+                                            G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET | G_SETTINGS_BIND_NO_SENSITIVITY,
+                                            (GSettingsBindGetMapping) s_to_rgba,
+                                            (GSettingsBindSetMapping) rgba_to_s,
+                                            NULL, NULL);
 
   w = GTK_WIDGET (gtk_builder_get_object (builder, "highlight-background-colorpicker"));
 #if GTK_CHECK_VERSION (3, 19, 8)
   g_object_set (w, "show-editor", TRUE, NULL);
 #endif
-  g_settings_bind (profile, TERMINAL_PROFILE_HIGHLIGHT_COLORS_SET_KEY,
-                   w,
-                   "sensitive",
-                   G_SETTINGS_BIND_GET |
-                   G_SETTINGS_BIND_NO_SENSITIVITY);
-  g_settings_bind_with_mapping (profile, TERMINAL_PROFILE_HIGHLIGHT_BACKGROUND_COLOR_KEY,
-                                w,
-                                "rgba",
-                                G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET | G_SETTINGS_BIND_NO_SENSITIVITY,
-                                (GSettingsBindGetMapping) s_to_rgba,
-                                (GSettingsBindSetMapping) rgba_to_s,
-                                NULL, NULL);
-
-  g_settings_bind_with_mapping (profile, TERMINAL_PROFILE_CURSOR_SHAPE_KEY,
-                                gtk_builder_get_object (builder,
-                                                        "cursor-shape-combobox"),
-                                "active",
-                                G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET,
-                                (GSettingsBindGetMapping) string_to_enum,
-                                (GSettingsBindSetMapping) enum_to_string,
-                                vte_cursor_shape_get_type, NULL);
-  g_settings_bind_with_mapping (profile, TERMINAL_PROFILE_CURSOR_BLINK_MODE_KEY,
-                                gtk_builder_get_object (builder,
-                                                        "cursor-blink-mode-combobox"),
-                                "active",
-                                G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET,
-                                (GSettingsBindGetMapping) string_to_enum,
-                                (GSettingsBindSetMapping) enum_to_string,
-                                vte_cursor_blink_mode_get_type, NULL);
-  g_settings_bind_with_mapping (profile, TERMINAL_PROFILE_TEXT_BLINK_MODE_KEY,
-                                gtk_builder_get_object (builder,
-                                                        "text-blink-mode-combobox"),
-                                "active",
-                                G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET,
-                                (GSettingsBindGetMapping) string_to_enum,
-                                (GSettingsBindSetMapping) enum_to_string,
-                                vte_text_blink_mode_get_type, NULL);
-  g_settings_bind (profile, TERMINAL_PROFILE_CUSTOM_COMMAND_KEY,
-                   gtk_builder_get_object (builder, "custom-command-entry"),
-                   "text", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
-  g_settings_bind (profile, TERMINAL_PROFILE_DEFAULT_SIZE_COLUMNS_KEY,
-                   gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON
-                                                   (gtk_builder_get_object
-                                                    (builder,
-                                                     "default-size-columns-spinbutton"))),
-                   "value", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
-  g_settings_bind (profile, TERMINAL_PROFILE_DEFAULT_SIZE_ROWS_KEY,
-                   gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON
-                                                   (gtk_builder_get_object
-                                                    (builder,
-                                                     "default-size-rows-spinbutton"))),
-                   "value", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
-  g_settings_bind_with_mapping (profile, TERMINAL_PROFILE_DELETE_BINDING_KEY,
-                                gtk_builder_get_object (builder,
-                                                        "delete-binding-combobox"),
-                                "active",
-                                G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET,
-                                (GSettingsBindGetMapping) string_to_enum,
-                                (GSettingsBindSetMapping) enum_to_string,
-                                vte_erase_binding_get_type, NULL);
-  g_settings_bind_with_mapping (profile, TERMINAL_PROFILE_EXIT_ACTION_KEY,
-                                gtk_builder_get_object (builder,
-                                                        "exit-action-combobox"),
-                                "active",
-                                G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET,
-                                (GSettingsBindGetMapping) string_to_enum,
-                                (GSettingsBindSetMapping) enum_to_string,
-                                terminal_exit_action_get_type, NULL);
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_HIGHLIGHT_COLORS_SET_KEY,
+                               w,
+                               "sensitive",
+                               G_SETTINGS_BIND_GET |
+                               G_SETTINGS_BIND_NO_SENSITIVITY);
+  profile_prefs_settings_bind_with_mapping (profile, TERMINAL_PROFILE_HIGHLIGHT_BACKGROUND_COLOR_KEY,
+                                            w,
+                                            "rgba",
+                                            G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET | G_SETTINGS_BIND_NO_SENSITIVITY,
+                                            (GSettingsBindGetMapping) s_to_rgba,
+                                            (GSettingsBindSetMapping) rgba_to_s,
+                                            NULL, NULL);
+
+  profile_prefs_settings_bind_with_mapping (profile, TERMINAL_PROFILE_CURSOR_SHAPE_KEY,
+                                            gtk_builder_get_object (builder,
+                                                                    "cursor-shape-combobox"),
+                                            "active",
+                                            G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET,
+                                            (GSettingsBindGetMapping) string_to_enum,
+                                            (GSettingsBindSetMapping) enum_to_string,
+                                            vte_cursor_shape_get_type, NULL);
+  profile_prefs_settings_bind_with_mapping (profile, TERMINAL_PROFILE_CURSOR_BLINK_MODE_KEY,
+                                            gtk_builder_get_object (builder,
+                                                                    "cursor-blink-mode-combobox"),
+                                            "active",
+                                            G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET,
+                                            (GSettingsBindGetMapping) string_to_enum,
+                                            (GSettingsBindSetMapping) enum_to_string,
+                                            vte_cursor_blink_mode_get_type, NULL);
+  profile_prefs_settings_bind_with_mapping (profile, TERMINAL_PROFILE_TEXT_BLINK_MODE_KEY,
+                                            gtk_builder_get_object (builder,
+                                                                    "text-blink-mode-combobox"),
+                                            "active",
+                                            G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET,
+                                            (GSettingsBindGetMapping) string_to_enum,
+                                            (GSettingsBindSetMapping) enum_to_string,
+                                            vte_text_blink_mode_get_type, NULL);
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_CUSTOM_COMMAND_KEY,
+                               gtk_builder_get_object (builder, "custom-command-entry"),
+                               "text", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_DEFAULT_SIZE_COLUMNS_KEY,
+                               gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON
+                                                               (gtk_builder_get_object
+                                                                (builder,
+                                                                 "default-size-columns-spinbutton"))),
+                               "value", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_DEFAULT_SIZE_ROWS_KEY,
+                               gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON
+                                                               (gtk_builder_get_object
+                                                                (builder,
+                                                                 "default-size-rows-spinbutton"))),
+                               "value", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+  profile_prefs_settings_bind_with_mapping (profile, TERMINAL_PROFILE_DELETE_BINDING_KEY,
+                                            gtk_builder_get_object (builder,
+                                                                    "delete-binding-combobox"),
+                                            "active",
+                                            G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET,
+                                            (GSettingsBindGetMapping) string_to_enum,
+                                            (GSettingsBindSetMapping) enum_to_string,
+                                            vte_erase_binding_get_type, NULL);
+  profile_prefs_settings_bind_with_mapping (profile, TERMINAL_PROFILE_EXIT_ACTION_KEY,
+                                            gtk_builder_get_object (builder,
+                                                                    "exit-action-combobox"),
+                                            "active",
+                                            G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET,
+                                            (GSettingsBindGetMapping) string_to_enum,
+                                            (GSettingsBindSetMapping) enum_to_string,
+                                            terminal_exit_action_get_type, NULL);
   w = (GtkWidget*) gtk_builder_get_object (builder, "font-selector");
   gtk_font_chooser_set_filter_func (GTK_FONT_CHOOSER (w), monospace_filter, NULL, NULL);
-  g_settings_bind (profile, TERMINAL_PROFILE_FONT_KEY,
-                   w,
-                   "font-name", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_FONT_KEY,
+                               w,
+                               "font-name", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
 
   w = GTK_WIDGET (gtk_builder_get_object (builder, "foreground-colorpicker"));
 #if GTK_CHECK_VERSION (3, 19, 8)
       g_object_set (w, "show-editor", TRUE, NULL);
 #endif
-  g_settings_bind_with_mapping (profile,
-                                TERMINAL_PROFILE_FOREGROUND_COLOR_KEY,
-                                w,
-                                "rgba",
-                                G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET,
-                                (GSettingsBindGetMapping) s_to_rgba,
-                                (GSettingsBindSetMapping) rgba_to_s,
-                                NULL, NULL);
-
-  g_settings_bind (profile, TERMINAL_PROFILE_LOGIN_SHELL_KEY,
-                   gtk_builder_get_object (builder,
-                                           "login-shell-checkbutton"),
-                   "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
-  g_settings_bind (profile, TERMINAL_PROFILE_VISIBLE_NAME_KEY,
-                   gtk_builder_get_object (builder, "profile-name-entry"),
-                   "text", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
-  g_settings_bind (profile, TERMINAL_PROFILE_SCROLLBACK_LINES_KEY,
-                   gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON
-                                                   (gtk_builder_get_object
-                                                    (builder,
-                                                     "scrollback-lines-spinbutton"))),
-                   "value", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
-  g_settings_bind (profile, TERMINAL_PROFILE_SCROLLBACK_UNLIMITED_KEY,
-                   gtk_builder_get_object (builder,
-                                           "scrollback-limited-checkbutton"),
-                   "active",
-                   G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET |
-                   G_SETTINGS_BIND_INVERT_BOOLEAN);
-  g_settings_bind (profile, TERMINAL_PROFILE_SCROLLBACK_UNLIMITED_KEY,
-                   gtk_builder_get_object (builder,
-                                           "scrollback-box"),
-                   "sensitive", 
-                   G_SETTINGS_BIND_GET |
-                   G_SETTINGS_BIND_INVERT_BOOLEAN |
-                   G_SETTINGS_BIND_NO_SENSITIVITY);
-  g_settings_bind_with_mapping (profile,
-                                TERMINAL_PROFILE_SCROLLBAR_POLICY_KEY,
-                                gtk_builder_get_object (builder,
-                                                        "scrollbar-checkbutton"),
-                                "active",
-                                G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET,
-                                (GSettingsBindGetMapping) scrollbar_policy_to_bool,
-                                (GSettingsBindSetMapping) bool_to_scrollbar_policy,
-                                NULL, NULL);
-  g_settings_bind (profile, TERMINAL_PROFILE_SCROLL_ON_KEYSTROKE_KEY,
-                   gtk_builder_get_object (builder,
-                                           "scroll-on-keystroke-checkbutton"),
-                   "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
-  g_settings_bind (profile, TERMINAL_PROFILE_SCROLL_ON_OUTPUT_KEY,
-                   gtk_builder_get_object (builder,
-                                           "scroll-on-output-checkbutton"),
-                   "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
-  g_settings_bind (profile, TERMINAL_PROFILE_USE_SYSTEM_FONT_KEY,
-                   gtk_builder_get_object (builder,
-                                           "custom-font-checkbutton"),
-                   "active",
-                   G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET |
-                   G_SETTINGS_BIND_INVERT_BOOLEAN);
-  g_settings_bind (profile, TERMINAL_PROFILE_USE_CUSTOM_COMMAND_KEY,
-                   gtk_builder_get_object (builder,
-                                           "use-custom-command-checkbutton"),
-                   "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
-  g_settings_bind (profile, TERMINAL_PROFILE_USE_THEME_COLORS_KEY,
-                   gtk_builder_get_object (builder,
-                                           "use-theme-colors-checkbutton"),
-                   "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
-  g_settings_bind (profile, TERMINAL_PROFILE_AUDIBLE_BELL_KEY,
-                   gtk_builder_get_object (builder, "bell-checkbutton"),
-                   "active",
-                   G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
-
-  g_settings_bind (profile,
-                   TERMINAL_PROFILE_USE_CUSTOM_COMMAND_KEY,
-                   gtk_builder_get_object (builder, "custom-command-entry-label"),
-                   "sensitive",
-                   G_SETTINGS_BIND_GET | G_SETTINGS_BIND_NO_SENSITIVITY);
-  g_settings_bind (profile,
-                   TERMINAL_PROFILE_USE_CUSTOM_COMMAND_KEY,
-                   gtk_builder_get_object (builder, "custom-command-entry"),
-                   "sensitive",
-                   G_SETTINGS_BIND_GET | G_SETTINGS_BIND_NO_SENSITIVITY);
-  g_settings_bind (profile,
-                   TERMINAL_PROFILE_USE_SYSTEM_FONT_KEY,
-                   gtk_builder_get_object (builder, "font-selector"),
-                   "sensitive",
-                   G_SETTINGS_BIND_GET | G_SETTINGS_BIND_INVERT_BOOLEAN |
-                   G_SETTINGS_BIND_NO_SENSITIVITY);
-  g_settings_bind (profile,
-                   TERMINAL_PROFILE_USE_THEME_COLORS_KEY,
-                   gtk_builder_get_object (builder, "colors-box"),
-                   "sensitive",
-                   G_SETTINGS_BIND_GET | G_SETTINGS_BIND_INVERT_BOOLEAN |
-                   G_SETTINGS_BIND_NO_SENSITIVITY);
-  g_settings_bind_writable (profile,
-                            TERMINAL_PROFILE_PALETTE_KEY,
-                            gtk_builder_get_object (builder, "palette-box"),
-                            "sensitive",
-                            FALSE);
-  g_settings_bind (profile,
-                   TERMINAL_PROFILE_REWRAP_ON_RESIZE_KEY,
-                   gtk_builder_get_object (builder, "rewrap-on-resize-checkbutton"),
-                   "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+  profile_prefs_settings_bind_with_mapping (profile,
+                                            TERMINAL_PROFILE_FOREGROUND_COLOR_KEY,
+                                            w,
+                                            "rgba",
+                                            G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET,
+                                            (GSettingsBindGetMapping) s_to_rgba,
+                                            (GSettingsBindSetMapping) rgba_to_s,
+                                            NULL, NULL);
+
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_LOGIN_SHELL_KEY,
+                               gtk_builder_get_object (builder,
+                                                       "login-shell-checkbutton"),
+                               "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_SCROLLBACK_LINES_KEY,
+                               gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON
+                                                               (gtk_builder_get_object
+                                                                (builder,
+                                                                 "scrollback-lines-spinbutton"))),
+                               "value", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_SCROLLBACK_UNLIMITED_KEY,
+                               gtk_builder_get_object (builder,
+                                                       "scrollback-limited-checkbutton"),
+                               "active",
+                               G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET |
+                               G_SETTINGS_BIND_INVERT_BOOLEAN);
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_SCROLLBACK_UNLIMITED_KEY,
+                               gtk_builder_get_object (builder,
+                                                       "scrollback-box"),
+                               "sensitive",
+                               G_SETTINGS_BIND_GET |
+                               G_SETTINGS_BIND_INVERT_BOOLEAN |
+                               G_SETTINGS_BIND_NO_SENSITIVITY);
+  profile_prefs_settings_bind_with_mapping (profile,
+                                            TERMINAL_PROFILE_SCROLLBAR_POLICY_KEY,
+                                            gtk_builder_get_object (builder,
+                                                                    "scrollbar-checkbutton"),
+                                            "active",
+                                            G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET,
+                                            (GSettingsBindGetMapping) scrollbar_policy_to_bool,
+                                            (GSettingsBindSetMapping) bool_to_scrollbar_policy,
+                                            NULL, NULL);
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_SCROLL_ON_KEYSTROKE_KEY,
+                               gtk_builder_get_object (builder,
+                                                       "scroll-on-keystroke-checkbutton"),
+                               "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_SCROLL_ON_OUTPUT_KEY,
+                               gtk_builder_get_object (builder,
+                                                       "scroll-on-output-checkbutton"),
+                               "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_USE_SYSTEM_FONT_KEY,
+                               gtk_builder_get_object (builder,
+                                                       "custom-font-checkbutton"),
+                               "active",
+                               G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET |
+                               G_SETTINGS_BIND_INVERT_BOOLEAN);
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_USE_CUSTOM_COMMAND_KEY,
+                               gtk_builder_get_object (builder,
+                                                       "use-custom-command-checkbutton"),
+                               "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_USE_THEME_COLORS_KEY,
+                               gtk_builder_get_object (builder,
+                                                       "use-theme-colors-checkbutton"),
+                               "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_AUDIBLE_BELL_KEY,
+                               gtk_builder_get_object (builder, "bell-checkbutton"),
+                               "active",
+                               G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+
+  profile_prefs_settings_bind (profile,
+                               TERMINAL_PROFILE_USE_CUSTOM_COMMAND_KEY,
+                               gtk_builder_get_object (builder, "custom-command-entry-label"),
+                               "sensitive",
+                               G_SETTINGS_BIND_GET | G_SETTINGS_BIND_NO_SENSITIVITY);
+  profile_prefs_settings_bind (profile,
+                               TERMINAL_PROFILE_USE_CUSTOM_COMMAND_KEY,
+                               gtk_builder_get_object (builder, "custom-command-entry"),
+                               "sensitive",
+                               G_SETTINGS_BIND_GET | G_SETTINGS_BIND_NO_SENSITIVITY);
+  profile_prefs_settings_bind (profile,
+                               TERMINAL_PROFILE_USE_SYSTEM_FONT_KEY,
+                               gtk_builder_get_object (builder, "font-selector"),
+                               "sensitive",
+                               G_SETTINGS_BIND_GET | G_SETTINGS_BIND_INVERT_BOOLEAN |
+                               G_SETTINGS_BIND_NO_SENSITIVITY);
+  profile_prefs_settings_bind (profile,
+                               TERMINAL_PROFILE_USE_THEME_COLORS_KEY,
+                               gtk_builder_get_object (builder, "colors-box"),
+                               "sensitive",
+                               G_SETTINGS_BIND_GET | G_SETTINGS_BIND_INVERT_BOOLEAN |
+                               G_SETTINGS_BIND_NO_SENSITIVITY);
+  profile_prefs_settings_bind_writable (profile,
+                                        TERMINAL_PROFILE_PALETTE_KEY,
+                                        gtk_builder_get_object (builder, "palette-box"),
+                                        "sensitive",
+                                        FALSE);
+  profile_prefs_settings_bind (profile,
+                               TERMINAL_PROFILE_REWRAP_ON_RESIZE_KEY,
+                               gtk_builder_get_object (builder, "rewrap-on-resize-checkbutton"),
+                               "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
 
   /* Compatibility options */
-  w = (GtkWidget *) gtk_builder_get_object  (builder, "encoding-combobox");
-  init_encodings_combo (w);
-  g_settings_bind (profile,
-                   TERMINAL_PROFILE_ENCODING_KEY,
-                   w,
-                   "active-id", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
-
-  w = (GtkWidget *) gtk_builder_get_object  (builder, "cjk-ambiguous-width-combobox");
-  g_settings_bind (profile, TERMINAL_PROFILE_CJK_UTF8_AMBIGUOUS_WIDTH_KEY,
-                   w,
-                   "active-id",
-                   G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
-
-  /* Finished! */
-  terminal_util_bind_mnemonic_label_sensitivity (editor);
-
-  terminal_util_dialog_focus_widget (editor, widget_name);
-
-  gtk_window_present (GTK_WINDOW (editor));
+  w = (GtkWidget *) gtk_builder_get_object (builder, "encoding-combobox");
+  profile_prefs_settings_bind (profile,
+                               TERMINAL_PROFILE_ENCODING_KEY,
+                               w,
+                               "active-id", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
+
+  w = (GtkWidget *) gtk_builder_get_object (builder, "cjk-ambiguous-width-combobox");
+  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_CJK_UTF8_AMBIGUOUS_WIDTH_KEY,
+                               w,
+                               "active-id",
+                               G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
 }
diff --git a/src/profile-editor.h b/src/profile-editor.h
index bddb95cd..e83d3931 100644
--- a/src/profile-editor.h
+++ b/src/profile-editor.h
@@ -23,8 +23,14 @@
 
 G_BEGIN_DECLS
 
-void terminal_profile_edit (GSettings  *profile,
-                            const char *widget_name);
+void profile_prefs_init (void);
+
+void profile_prefs_destroy (void);
+
+void profile_prefs_unload (void);
+
+void profile_prefs_load (const char *uuid,
+                         GSettings *profile);
 
 G_END_DECLS
 
diff --git a/src/profile-preferences.ui b/src/profile-preferences.ui
deleted file mode 100644
index b1384633..00000000
--- a/src/profile-preferences.ui
+++ /dev/null
@@ -1,1860 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.19.0 -->
-<interface>
-  <requires lib="gtk+" version="3.0"/>
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="lower">16</property>
-    <property name="upper">511</property>
-    <property name="value">80</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment2">
-    <property name="lower">4</property>
-    <property name="upper">511</property>
-    <property name="value">24</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment4">
-    <property name="lower">1</property>
-    <property name="upper">2147483647</property>
-    <property name="value">1</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">100</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment5">
-    <property name="lower">1.0</property>
-    <property name="upper">2.0</property>
-    <property name="value">1.0</property>
-    <property name="step_increment">0.05</property>
-    <property name="page_increment">0.25</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment6">
-    <property name="lower">1.0</property>
-    <property name="upper">2.0</property>
-    <property name="value">1.0</property>
-    <property name="step_increment">0.05</property>
-    <property name="page_increment">0.25</property>
-  </object>
-  <object class="GtkListStore" id="cjk-ambiguous-width-model">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-      <!-- column-name gchararray1 -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes" comments="ambiguous-width characers are">Narrow</col>
-        <col id="1">narrow</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="ambiguous-width characers are">Wide</col>
-        <col id="1">wide</col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkListStore" id="model1">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes" comments="Cursor shape">Block</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="Cursor shape">I-Beam</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="Cursor shape">Underline</col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkListStore" id="model7">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes" comments="Cursor blink mode">Default</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="Cursor blink mode">Enabled</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="Cursor blink mode">Disabled</col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkListStore" id="model5">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes" comments="Text blink mode">Never</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="Text blink mode">When focused</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="Text blink mode">When unfocused</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="Text blink mode">Always</col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkListStore" id="model2">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes" comments="When terminal commands set their own titles">Replace initial title</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="When terminal commands set their own titles">Append initial title</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="When terminal commands set their own titles">Prepend initial title</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="When terminal commands set their own titles">Keep initial title</col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkListStore" id="model3">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes" comments="When command exits">Exit the terminal</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="When command exits">Restart the command</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="When command exits">Hold the terminal open</col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkListStore" id="model4">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes" comments="This is the name of a colour scheme">Tango</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="This is the name of a colour scheme">Linux console</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="This is the name of a colour scheme">XTerm</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="This is the name of a colour scheme">Rxvt</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="This is the name of a colour scheme">Solarized</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="This is the name of a colour scheme">Custom</col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkListStore" id="model6">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes" comments="This refers to the Delete keybinding option">Automatic</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="This refers to the Delete keybinding option">Control-H</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="This refers to the Delete keybinding option">ASCII DEL</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="This refers to the Delete keybinding option">Escape sequence</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="This refers to the Delete keybinding option">TTY Erase</col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkApplicationWindow" id="profile-editor-dialog">
-    <property name="can_focus">False</property>
-    <property name="show_menubar">False</property>
-    <property name="title" translatable="yes">Profile Editor</property>
-    <property name="role">gnome-terminal-profile-editor</property>
-    <property name="resizable">False</property>
-    <child>
-      <object class="GtkBox" id="dialogue-content-box">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="margin_left">12</property>
-        <property name="margin_right">12</property>
-        <property name="margin_top">12</property>
-        <property name="margin_bottom">12</property>
-        <property name="orientation">vertical</property>
-        <property name="spacing">12</property>
-        <child>
-          <object class="GtkNotebook" id="profile-editor-notebook">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <child>
-              <object class="GtkVBox" id="vbox3">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="border_width">12</property>
-                <property name="spacing">6</property>
-                <child>
-                  <object class="GtkGrid" id="general-table">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="column_spacing">12</property>
-                    <property name="row_spacing">6</property>
-                    <child>
-                      <object class="GtkLabel" id="profile-name-label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">_Profile name:</property>
-                        <property name="use_underline">True</property>
-                        <property name="justify">center</property>
-                        <property name="mnemonic_widget">profile-name-entry</property>
-                        <property name="xalign">0</property>
-                      </object>
-                      <packing>
-                        <property name="top_attach">0</property>
-                        <property name="left_attach">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkEntry" id="profile-name-entry">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="invisible_char">•</property>
-                      </object>
-                      <packing>
-                        <property name="top_attach">0</property>
-                        <property name="left_attach">1</property>
-                        <property name="width">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="profile-uuid-label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Profile ID:</property>
-                        <property name="xalign">0</property>
-                      </object>
-                      <packing>
-                        <property name="top_attach">1</property>
-                        <property name="left_attach">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="profile-uuid">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="selectable">True</property>
-                        <property name="xalign">0</property>
-                      </object>
-                      <packing>
-                        <property name="top_attach">1</property>
-                        <property name="left_attach">1</property>
-                        <property name="width">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="default-size-label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Initial terminal si_ze:</property>
-                        <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">default-size-columns-spinbutton</property>
-                        <property name="xalign">0</property>
-                      </object>
-                      <packing>
-                        <property name="top_attach">2</property>
-                        <property name="left_attach">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkHBox" id="default-size-columns-box">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="spacing">6</property>
-                        <child>
-                          <object class="GtkSpinButton" id="default-size-columns-spinbutton">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="adjustment">adjustment1</property>
-                            <property name="climb_rate">1</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="default-size-columns-label">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" translatable="yes">columns</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="top_attach">2</property>
-                        <property name="left_attach">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkHBox" id="default-size-rows-box">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="spacing">6</property>
-                        <child>
-                          <object class="GtkSpinButton" id="default-size-rows-spinbutton">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="adjustment">adjustment2</property>
-                            <property name="climb_rate">1</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="default-size-rows-label">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" translatable="yes">rows</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="top_attach">2</property>
-                        <property name="left_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkButtonBox" id="buttonbox1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="layout_style">end</property>
-                        <child>
-                          <object class="GtkButton" id="default-size-reset-button">
-                            <property name="label" translatable="yes">Rese_t</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="use_underline">True</property>
-                            <property name="focus_on_click">False</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="top_attach">2</property>
-                        <property name="left_attach">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="label480">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Cursor _shape:</property>
-                        <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">cursor-shape-combobox</property>
-                        <property name="xalign">0</property>
-                      </object>
-                      <packing>
-                        <property name="top_attach">3</property>
-                        <property name="left_attach">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkComboBox" id="cursor-shape-combobox">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="model">model1</property>
-                        <property name="focus_on_click">False</property>
-                        <child>
-                          <object class="GtkCellRendererText" id="renderer1"/>
-                          <attributes>
-                            <attribute name="text">0</attribute>
-                          </attributes>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="top_attach">3</property>
-                        <property name="left_attach">1</property>
-                        <property name="width">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Cursor blin_king:</property>
-                        <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">cursor-blink-mode-combobox</property>
-                        <property name="xalign">0</property>
-                      </object>
-                      <packing>
-                        <property name="top_attach">4</property>
-                        <property name="left_attach">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkComboBox" id="cursor-blink-mode-combobox">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="model">model7</property>
-                        <property name="focus_on_click">False</property>
-                        <child>
-                          <object class="GtkCellRendererText" id="renderer5"/>
-                          <attributes>
-                            <attribute name="text">0</attribute>
-                          </attributes>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="top_attach">4</property>
-                        <property name="left_attach">1</property>
-                        <property name="width">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkCheckButton" id="bell-checkbutton">
-                        <property name="label" translatable="yes">Terminal _bell</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="xalign">0.5</property>
-                        <property name="draw_indicator">True</property>
-                      </object>
-                      <packing>
-                        <property name="top_attach">5</property>
-                        <property name="left_attach">0</property>
-                        <property name="width">4</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="text-appearance-heading">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="margin_top">12</property>
-                        <property name="label" translatable="yes">Text Appearance</property>
-                        <property name="xalign">0</property>
-                        <attributes>
-                          <attribute name="weight" value="bold"/>
-                        </attributes>
-                      </object>
-                      <packing>
-                        <property name="top_attach">6</property>
-                        <property name="left_attach">0</property>
-                        <property name="width">4</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="label481">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Allow b_linking text:</property>
-                        <property name="use_underline">True</property>
-                        <property name="margin_left">12</property>
-                        <property name="mnemonic_widget">text-blink-mode-combobox</property>
-                        <property name="xalign">0</property>
-                      </object>
-                      <packing>
-                        <property name="top_attach">7</property>
-                        <property name="left_attach">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkComboBox" id="text-blink-mode-combobox">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="model">model5</property>
-                        <property name="focus_on_click">False</property>
-                        <child>
-                          <object class="GtkCellRendererText" id="renderer2"/>
-                          <attributes>
-                            <attribute name="text">0</attribute>
-                          </attributes>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="top_attach">7</property>
-                        <property name="left_attach">1</property>
-                        <property name="width">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkCheckButton" id="rewrap-on-resize-checkbutton">
-                        <property name="label" translatable="yes">_Rewrap on resize</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="margin_left">12</property>
-                        <property name="use_underline">True</property>
-                        <property name="xalign">0</property>
-                        <property name="draw_indicator">True</property>
-                      </object>
-                      <packing>
-                        <property name="top_attach">8</property>
-                        <property name="left_attach">0</property>
-                        <property name="width">4</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkCheckButton" id="custom-font-checkbutton">
-                        <property name="label" translatable="yes">_Custom font:</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="margin_left">12</property>
-                        <property name="use_underline">True</property>
-                        <property name="xalign">0</property>
-                        <property name="draw_indicator">True</property>
-                      </object>
-                      <packing>
-                        <property name="top_attach">9</property>
-                        <property name="left_attach">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkFontButton" id="font-selector">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="focus_on_click">False</property>
-                        <property name="font">Sans 12</property>
-                        <property name="title" translatable="yes">Choose A Terminal Font</property>
-                      </object>
-                      <packing>
-                        <property name="top_attach">9</property>
-                        <property name="left_attach">1</property>
-                        <property name="width">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Cell spaci_ng:</property>
-                        <property name="use_underline">True</property>
-                        <property name="margin_left">12</property>
-                        <property name="mnemonic_widget">cell-width-scale-spinbutton</property>
-                        <property name="xalign">0</property>
-                      </object>
-                      <packing>
-                        <property name="top_attach">10</property>
-                        <property name="left_attach">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkHBox">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="spacing">6</property>
-                        <child>
-                          <object class="GtkSpinButton" id="cell-width-scale-spinbutton">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="adjustment">adjustment5</property>
-                            <property name="digits">2</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="cell-width-scale-label">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="top_attach">10</property>
-                        <property name="left_attach">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkHBox">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="spacing">6</property>
-                        <child>
-                          <object class="GtkSpinButton" id="cell-height-scale-spinbutton">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="adjustment">adjustment6</property>
-                            <property name="digits">2</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="cell-height-scale-label">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="top_attach">10</property>
-                        <property name="left_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkButtonBox">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="layout_style">end</property>
-                        <child>
-                          <object class="GtkButton" id="cell-scale-reset-button">
-                            <property name="label" translatable="yes">R_eset</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="use_underline">True</property>
-                            <property name="focus_on_click">False</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="top_attach">10</property>
-                        <property name="left_attach">3</property>
-                      </packing>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-              </object>
-            </child>
-            <child type="tab">
-              <object class="GtkLabel" id="label32">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">General</property>
-                <property name="use_underline">True</property>
-                <property name="justify">center</property>
-              </object>
-              <packing>
-                <property name="tab_fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkGrid">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="border_width">12</property>
-                <property name="column_spacing">12</property>
-                <property name="row_spacing">6</property>
-                <child>
-                  <object class="GtkCheckButton" id="login-shell-checkbutton">
-                    <property name="label" translatable="yes">_Run command as a login shell</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="top_attach">0</property>
-                    <property name="left_attach">0</property>
-                    <property name="width">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkCheckButton" id="use-custom-command-checkbutton">
-                    <property name="label" translatable="yes">Ru_n a custom command instead of my shell</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="top_attach">1</property>
-                    <property name="left_attach">0</property>
-                    <property name="width">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="custom-command-entry-label">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">Custom co_mmand:</property>
-                    <property name="use_underline">True</property>
-                    <property name="mnemonic_widget">custom-command-entry</property>
-                    <property name="xalign">0</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">2</property>
-                    <property name="left_attach">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkEntry" id="custom-command-entry">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="hexpand">True</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">2</property>
-                    <property name="left_attach">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="exit-action-combobox-label">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">When command _exits:</property>
-                    <property name="use_underline">True</property>
-                    <property name="mnemonic_widget">exit-action-combobox</property>
-                    <property name="xalign">0</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">3</property>
-                    <property name="left_attach">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkComboBox" id="exit-action-combobox">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="model">model3</property>
-                    <property name="focus_on_click">False</property>
-                    <property name="halign">start</property>
-                    <child>
-                      <object class="GtkCellRendererText" id="renderer3"/>
-                      <attributes>
-                        <attribute name="text">0</attribute>
-                      </attributes>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="top_attach">3</property>
-                    <property name="left_attach">1</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child type="tab">
-              <object class="GtkLabel" id="label38">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Command</property>
-                <property name="use_underline">True</property>
-                <property name="justify">center</property>
-              </object>
-              <packing>
-                <property name="position">1</property>
-                <property name="tab_fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkVBox" id="vbox90">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="border_width">12</property>
-                <property name="spacing">18</property>
-                <child>
-                  <object class="GtkVBox" id="vbox82">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="spacing">6</property>
-                    <child>
-                      <object class="GtkLabel" id="label39">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Text and Background Color</property>
-                        <property name="xalign">0</property>
-                        <attributes>
-                          <attribute name="weight" value="bold"/>
-                        </attributes>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkAlignment" id="alignment10105">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <object class="GtkVBox" id="vbox94">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="spacing">6</property>
-                            <child>
-                              <object class="GtkCheckButton" id="use-theme-colors-checkbutton">
-                                <property name="label" translatable="yes">_Use colors from system theme</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="xalign">0.5</property>
-                                <property name="draw_indicator">True</property>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkBox" id="colors-box">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="orientation">vertical</property>
-                                <property name="spacing">6</property>
-                                <child>
-                                  <object class="GtkHBox" id="builtin-color-schemes-box">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="spacing">12</property>
-                                    <child>
-                                      <object class="GtkLabel" id="color-scheme-combobox-label">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="label" translatable="yes">Built-in sche_mes:</property>
-                                        <property name="use_underline">True</property>
-                                        <property name="justify">center</property>
-                                        <property name="mnemonic_widget">color-scheme-combobox</property>
-                                        <property name="xalign">0</property>
-                                      </object>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkComboBox" id="color-scheme-combobox">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="focus_on_click">False</property>
-                                      </object>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">True</property>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkGrid">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="row_spacing">6</property>
-                                    <property name="column_spacing">12</property>
-                                    <child>
-                                      <object class="GtkLabel">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="label" translatable="yes">Text</property>
-                                        <property name="xalign">0</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">0</property>
-                                        <property name="left_attach">1</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkLabel">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="label" translatable="yes">Background</property>
-                                        <property name="xalign">0</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">0</property>
-                                        <property name="left_attach">2</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkLabel" id="foreground-colorpicker-label">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="halign">start</property>
-                                        <property name="label" translatable="yes">_Default color:</property>
-                                        <property name="use_underline">True</property>
-                                        <property name="justify">center</property>
-                                        <property name="mnemonic_widget">foreground-colorpicker</property>
-                                        <property name="xalign">0</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">1</property>
-                                        <property name="left_attach">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="foreground-colorpicker">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="halign">start</property>
-                                        <property name="title" translatable="yes">Choose Terminal Text Color</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">1</property>
-                                        <property name="left_attach">1</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="background-colorpicker">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="halign">start</property>
-                                        <property name="title" translatable="yes">Choose Terminal Background Color</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">1</property>
-                                        <property name="left_attach">2</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkCheckButton" id="bold-color-checkbutton">
-                                        <property name="label" translatable="yes">Bo_ld color:</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="halign">start</property>
-                                        <property name="use_underline">True</property>
-                                        <property name="xalign">0</property>
-                                        <property name="draw_indicator">True</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">2</property>
-                                        <property name="left_attach">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="bold-colorpicker">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="halign">start</property>
-                                        <property name="title" translatable="yes">Choose Terminal Bold Text Color</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">2</property>
-                                        <property name="left_attach">1</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkCheckButton" id="underline-color-checkbutton">
-                                        <property name="label" translatable="yes">_Underline color:</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="halign">start</property>
-                                        <property name="use_underline">True</property>
-                                        <property name="xalign">0</property>
-                                        <property name="draw_indicator">True</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">3</property>
-                                        <property name="left_attach">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="underline-colorpicker">
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="halign">start</property>
-                                        <property name="title" translatable="yes">Choose Terminal Underlined Text Color</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">3</property>
-                                        <property name="left_attach">1</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkCheckButton" id="cursor-colors-checkbutton">
-                                        <property name="label" translatable="yes">Cu_rsor color:</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="halign">start</property>
-                                        <property name="use_underline">True</property>
-                                        <property name="xalign">0</property>
-                                        <property name="draw_indicator">True</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">4</property>
-                                        <property name="left_attach">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="cursor-foreground-colorpicker">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="halign">start</property>
-                                        <property name="title" translatable="yes">Choose Terminal Cursor Foreground Color</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">4</property>
-                                        <property name="left_attach">1</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="cursor-background-colorpicker">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="halign">start</property>
-                                        <property name="title" translatable="yes">Choose Terminal Cursor Background Color</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">4</property>
-                                        <property name="left_attach">2</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkCheckButton" id="highlight-colors-checkbutton">
-                                        <property name="label" translatable="yes">_Highlight color:</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="halign">start</property>
-                                        <property name="use_underline">True</property>
-                                        <property name="draw_indicator">True</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">5</property>
-                                        <property name="left_attach">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="highlight-foreground-colorpicker">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="halign">start</property>
-                                        <property name="title" translatable="yes">Choose Terminal Highlight Foreground Color</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">5</property>
-                                        <property name="left_attach">1</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="highlight-background-colorpicker">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="halign">start</property>
-                                        <property name="title" translatable="yes">Choose Terminal Highlight Background Color</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">5</property>
-                                        <property name="left_attach">2</property>
-                                      </packing>
-                                    </child>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </object>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkVBox" id="palette-box">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="spacing">6</property>
-                    <child>
-                      <object class="GtkLabel" id="label42">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Palette</property>
-                        <property name="xalign">0</property>
-                        <attributes>
-                          <attribute name="weight" value="bold"/>
-                        </attributes>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkAlignment" id="alignment10106">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <object class="GtkVBox" id="vbox8">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="spacing">6</property>
-                            <child>
-                              <object class="GtkGrid" id="table25">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="column_spacing">12</property>
-                                <property name="row_spacing">6</property>
-                                <child>
-                                  <object class="GtkLabel" id="palette-optionmenu-label">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="label" translatable="yes">Built-in _schemes:</property>
-                                    <property name="use_underline">True</property>
-                                    <property name="justify">center</property>
-                                    <property name="mnemonic_widget">palette-combobox</property>
-                                    <property name="xalign">0</property>
-                                  </object>
-                                  <packing>
-                                    <property name="top_attach">0</property>
-                                    <property name="left_attach">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkComboBox" id="palette-combobox">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="model">model4</property>
-                                    <property name="focus_on_click">False</property>
-                                    <child>
-                                      <object class="GtkCellRendererText" id="renderer4"/>
-                                      <attributes>
-                                        <attribute name="text">0</attribute>
-                                      </attributes>
-                                    </child>
-                                  </object>
-                                  <packing>
-                                    <property name="top_attach">0</property>
-                                    <property name="left_attach">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="label43">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="label" translatable="yes">Color p_alette:</property>
-                                    <property name="use_underline">True</property>
-                                    <property name="justify">center</property>
-                                    <property name="mnemonic_widget">palette-colorpicker-0</property>
-                                    <property name="xalign">0</property>
-                                    <property name="yalign">0</property>
-                                  </object>
-                                  <packing>
-                                    <property name="top_attach">1</property>
-                                    <property name="left_attach">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkGrid" id="palette-table">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="column_spacing">6</property>
-                                    <property name="row_spacing">6</property>
-                                    <child>
-                                      <object class="GtkColorButton" id="palette-colorpicker-0">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="tooltip_text">dummy</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">0</property>
-                                        <property name="left_attach">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="palette-colorpicker-1">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="tooltip_text">dummy</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">0</property>
-                                        <property name="left_attach">1</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="palette-colorpicker-2">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="tooltip_text">dummy</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">0</property>
-                                        <property name="left_attach">2</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="palette-colorpicker-3">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="tooltip_text">dummy</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">0</property>
-                                        <property name="left_attach">3</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="palette-colorpicker-4">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="tooltip_text">dummy</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">0</property>
-                                        <property name="left_attach">4</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="palette-colorpicker-5">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="tooltip_text">dummy</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">0</property>
-                                        <property name="left_attach">5</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="palette-colorpicker-6">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="tooltip_text">dummy</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">0</property>
-                                        <property name="left_attach">6</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="palette-colorpicker-7">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="tooltip_text">dummy</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">0</property>
-                                        <property name="left_attach">7</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="palette-colorpicker-8">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="tooltip_text">dummy</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">1</property>
-                                        <property name="left_attach">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="palette-colorpicker-9">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="tooltip_text">dummy</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">1</property>
-                                        <property name="left_attach">1</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="palette-colorpicker-10">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="tooltip_text">dummy</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">1</property>
-                                        <property name="left_attach">2</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="palette-colorpicker-11">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="tooltip_text">dummy</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">1</property>
-                                        <property name="left_attach">3</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="palette-colorpicker-12">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="tooltip_text">dummy</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">1</property>
-                                        <property name="left_attach">4</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="palette-colorpicker-13">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="tooltip_text">dummy</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">1</property>
-                                        <property name="left_attach">5</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="palette-colorpicker-14">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="tooltip_text">dummy</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">1</property>
-                                        <property name="left_attach">6</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkColorButton" id="palette-colorpicker-15">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="tooltip_text">dummy</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">1</property>
-                                        <property name="left_attach">7</property>
-                                      </packing>
-                                    </child>
-                                  </object>
-                                  <packing>
-                                    <property name="top_attach">1</property>
-                                    <property name="left_attach">1</property>
-                                  </packing>
-                                </child>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkCheckButton" id="bold-is-bright-checkbutton">
-                                <property name="label" translatable="yes">Show _bold text in bright colors</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="xalign">0.5</property>
-                                <property name="draw_indicator">True</property>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </object>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child type="tab">
-              <object class="GtkLabel" id="label45">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Colors</property>
-                <property name="use_underline">True</property>
-                <property name="justify">center</property>
-              </object>
-              <packing>
-                <property name="position">2</property>
-                <property name="tab_fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkGrid" id="table27">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="border_width">12</property>
-                <property name="column_spacing">12</property>
-                <property name="row_spacing">6</property>
-                <child>
-                  <object class="GtkCheckButton" id="scrollbar-checkbutton">
-                    <property name="label" translatable="yes">_Show scrollbar</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="xalign">0.5</property>
-                    <property name="draw_indicator">True</property>
-                    <property name="hexpand">True</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">0</property>
-                    <property name="left_attach">0</property>
-                    <property name="width">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkCheckButton" id="scroll-on-output-checkbutton">
-                    <property name="label" translatable="yes">Scroll on _output</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="xalign">0.5</property>
-                    <property name="draw_indicator">True</property>
-                    <property name="hexpand">True</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="left_attach">0</property>
-                    <property name="width">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkCheckButton" id="scroll-on-keystroke-checkbutton">
-                    <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="use_underline">True</property>
-                    <property name="xalign">0.5</property>
-                    <property name="draw_indicator">True</property>
-                    <property name="hexpand">True</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">2</property>
-                    <property name="left_attach">0</property>
-                    <property name="width">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkCheckButton" id="scrollback-limited-checkbutton">
-                    <property name="label" translatable="yes">_Limit scrollback to:</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="xalign">0.5</property>
-                    <property name="draw_indicator">True</property>
-                    <property name="hexpand">False</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">3</property>
-                    <property name="left_attach">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkHBox" id="scrollback-box">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="spacing">6</property>
-                    <property name="hexpand">True</property>
-                    <child>
-                      <object class="GtkSpinButton" id="scrollback-lines-spinbutton">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="adjustment">adjustment4</property>
-                        <property name="climb_rate">1</property>
-                        <property name="numeric">True</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="scrollback-lines-spinbutton-label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">lines</property>
-                        <property name="justify">center</property>
-                        <property name="mnemonic_widget">scrollback-lines-spinbutton</property>
-                        <property name="xalign">0</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="top_attach">3</property>
-                    <property name="left_attach">1</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="position">3</property>
-              </packing>
-            </child>
-            <child type="tab">
-              <object class="GtkLabel" id="label60">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Scrolling</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="GtkGrid" id="table30">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="border_width">12</property>
-                <property name="column_spacing">12</property>
-                <property name="row_spacing">6</property>
-                <child>
-                  <object class="GtkLabel" id="backspace-binding-combobox-label">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">_Backspace key generates:</property>
-                    <property name="use_underline">True</property>
-                    <property name="justify">center</property>
-                    <property name="mnemonic_widget">backspace-binding-combobox</property>
-                    <property name="xalign">0</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">0</property>
-                    <property name="left_attach">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkComboBox" id="backspace-binding-combobox">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="model">model6</property>
-                    <property name="focus_on_click">False</property>
-                    <child>
-                      <object class="GtkCellRendererText" id="renderer6"/>
-                      <attributes>
-                        <attribute name="text">0</attribute>
-                      </attributes>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="top_attach">0</property>
-                    <property name="left_attach">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="delete-binding-combobox-label">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">_Delete key generates:</property>
-                    <property name="use_underline">True</property>
-                    <property name="justify">center</property>
-                    <property name="mnemonic_widget">delete-binding-combobox</property>
-                    <property name="xalign">0</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="left_attach">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkComboBox" id="delete-binding-combobox">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="model">model6</property>
-                    <property name="focus_on_click">False</property>
-                    <child>
-                      <object class="GtkCellRendererText" id="renderer7"/>
-                      <attributes>
-                        <attribute name="text">0</attribute>
-                      </attributes>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="left_attach">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="encoding-label">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">_Encoding:</property>
-                    <property name="use_underline">True</property>
-                    <property name="xalign">0</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">2</property>
-                    <property name="left_attach">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkComboBox" id="encoding-combobox">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="focus_on_click">False</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">2</property>
-                    <property name="left_attach">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="cjk-ambiguous-width-label">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">Ambiguous-_width characters:</property>
-                    <property name="use_underline">True</property>
-                    <property name="justify">center</property>
-                    <property name="mnemonic_widget">cjk-ambiguous-width-combobox</property>
-                    <property name="xalign">0</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">3</property>
-                    <property name="left_attach">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkComboBox" id="cjk-ambiguous-width-combobox">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="model">cjk-ambiguous-width-model</property>
-                    <property name="focus_on_click">False</property>
-                    <property name="id_column">1</property>
-                    <child>
-                      <object class="GtkCellRendererText" id="cjk-ambiguous-width-renderer"/>
-                      <attributes>
-                        <attribute name="text">0</attribute>
-                      </attributes>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="top_attach">3</property>
-                    <property name="left_attach">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkButton" id="reset-compat-defaults-button">
-                    <property name="label" translatable="yes">_Reset Compatibility Options to Defaults</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="focus_on_click">False</property>
-                    <property name="halign">start</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">4</property>
-                    <property name="left_attach">0</property>
-                    <property name="width">2</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="position">4</property>
-              </packing>
-            </child>
-            <child type="tab">
-              <object class="GtkLabel" id="label54">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Compatibility</property>
-                <property name="use_underline">True</property>
-                <property name="justify">center</property>
-              </object>
-              <packing>
-                <property name="position">4</property>
-                <property name="tab_fill">False</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButtonBox" id="dialogue-buttonbox">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="spacing">12</property>
-            <property name="layout_style">start</property>
-            <child>
-              <object class="GtkButton" id="help-button">
-                <property name="label">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>
-                <property name="focus_on_click">False</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="close-button">
-                <property name="label">gtk-close</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-                <property name="focus_on_click">False</property>
-              </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="pack_type">end</property>
-                <property name="position">1</property>
-                <property name="secondary">True</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="pack_type">end</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-  </object>
-</interface>
diff --git a/src/terminal-accels.c b/src/terminal-accels.c
index 1ea02ce8..c0a6b051 100644
--- a/src/terminal-accels.c
+++ b/src/terminal-accels.c
@@ -63,7 +63,6 @@
 #define KEY_HELP                "help"
 #define KEY_MOVE_TAB_LEFT       "move-tab-left"
 #define KEY_MOVE_TAB_RIGHT      "move-tab-right"
-#define KEY_NEW_PROFILE         "new-profile"
 #define KEY_NEW_TAB             "new-tab"
 #define KEY_NEW_WINDOW          "new-window"
 #define KEY_NEXT_TAB            "next-tab"
@@ -71,7 +70,6 @@
 #define KEY_PREFERENCES         "preferences"
 #define KEY_PREV_TAB            "prev-tab"
 #define KEY_PRINT               "print"
-#define KEY_PROFILE_PREFERENCES "profile-preferences"
 #define KEY_READ_ONLY           "read-only"
 #define KEY_RESET_AND_CLEAR     "reset-and-clear"
 #define KEY_RESET               "reset"
@@ -125,7 +123,6 @@ typedef struct
 static KeyEntry file_entries[] = {
   ENTRY (N_("New Tab"),       KEY_NEW_TAB,       "new-terminal",  "(ss)",  "('tab','current')"   ),
   ENTRY (N_("New Window"),    KEY_NEW_WINDOW,    "new-terminal",  "(ss)",  "('window','current')"),
-  ENTRY (N_("New Profile"),   KEY_NEW_PROFILE,   "new-profile",   NULL,    NULL                  ),
 #ifdef ENABLE_SAVE
   ENTRY (N_("Save Contents"), KEY_SAVE_CONTENTS, "save-contents", NULL,    NULL                  ),
 #endif
@@ -145,7 +142,6 @@ static KeyEntry edit_entries[] = {
   ENTRY (N_("Paste"),               KEY_PASTE,               "paste-text",   NULL, NULL      ),
   ENTRY (N_("Select All"),          KEY_SELECT_ALL,          "select-all",   NULL, NULL      ),
   ENTRY (N_("Preferences"),         KEY_PREFERENCES,         "edit-preferences",  NULL, NULL      ),
-  ENTRY (N_("Profile Preferences"), KEY_PROFILE_PREFERENCES, "edit-profile", NULL, NULL      ),
 };
 
 static KeyEntry find_entries[] = {
diff --git a/src/terminal-app.c b/src/terminal-app.c
index 5e782d9f..86a516a0 100644
--- a/src/terminal-app.c
+++ b/src/terminal-app.c
@@ -310,12 +310,13 @@ app_load_css (GApplication *application)
   add_css_provider (application, TRUE);
 }
 
-void
+char *
 terminal_app_new_profile (TerminalApp *app,
-                          GSettings   *base_profile)
+                          GSettings   *base_profile,
+                          const char  *name)
 {
   gs_unref_object GSettings *profile = NULL;
-  gs_free char *uuid;
+  char *uuid;
 
   if (base_profile) {
     gs_free char *base_uuid;
@@ -327,13 +328,13 @@ terminal_app_new_profile (TerminalApp *app,
   }
 
   if (uuid == NULL)
-    return;
+    return NULL;
 
   profile = terminal_settings_list_ref_child (app->profiles_list, uuid);
-  if (profile == NULL)
-    return;
 
-  terminal_profile_edit (profile, "profile-name-entry");
+  g_settings_set_string (profile, TERMINAL_PROFILE_VISIBLE_NAME_KEY, name);
+
+  return uuid;
 }
 
 void
@@ -625,7 +626,7 @@ app_menu_preferences_cb (GSimpleAction *action,
 {
   TerminalApp *app = user_data;
 
-  terminal_app_edit_preferences (app);
+  terminal_app_edit_preferences (app, NULL, NULL);
 }
 
 static void
@@ -1093,17 +1094,11 @@ terminal_app_get_clipboard_targets (TerminalApp *app,
 }
 
 void
-terminal_app_edit_profile (TerminalApp     *app,
-                           GSettings       *profile,
-                           const char      *widget_name)
-{
-  terminal_profile_edit (profile, widget_name);
-}
-
-void
-terminal_app_edit_preferences (TerminalApp *app)
+terminal_app_edit_preferences (TerminalApp     *app,
+                               GSettings       *profile,
+                               const char      *widget_name)
 {
-  terminal_prefs_show_preferences ("general");
+  terminal_prefs_show_preferences (profile, widget_name);
 }
 
 /**
diff --git a/src/terminal-app.h b/src/terminal-app.h
index c88fe937..f29d766b 100644
--- a/src/terminal-app.h
+++ b/src/terminal-app.h
@@ -56,12 +56,13 @@ GdkAtom *terminal_app_get_clipboard_targets (TerminalApp *app,
                                              GtkClipboard *clipboard,
                                              int *n_targets);
 
-void terminal_app_edit_profile (TerminalApp *app,
-                                GSettings   *profile,
-                                const char  *widget_name);
+void terminal_app_edit_preferences (TerminalApp *app,
+                                    GSettings   *profile,
+                                    const char  *widget_name);
 
-void terminal_app_new_profile (TerminalApp *app,
-                               GSettings   *default_base_profile);
+char *terminal_app_new_profile (TerminalApp *app,
+                                GSettings   *default_base_profile,
+                                const char  *name);
 
 void terminal_app_remove_profile (TerminalApp *app,
                                   GSettings *profile);
@@ -94,8 +95,6 @@ void terminal_app_register_screen (TerminalApp *app,
 void terminal_app_unregister_screen (TerminalApp *app,
                                      TerminalScreen *screen);
 
-void terminal_app_edit_preferences (TerminalApp *app);
-
 TerminalSettingsList *terminal_app_get_profiles_list (TerminalApp *app);
 
 /* Menus */
diff --git a/src/terminal-menubar.ui b/src/terminal-menubar.ui
index eb96cc94..920294c7 100644
--- a/src/terminal-menubar.ui
+++ b/src/terminal-menubar.ui
@@ -21,10 +21,6 @@
       <attribute name="label" translatable="yes">_File</attribute>
       <section id="new-terminal-section" />
       <section>
-        <item>
-          <attribute name="label" translatable="yes">New _Profile</attribute>
-          <attribute name="action">win.new-profile</attribute>
-        </item>
         <item>
           <attribute name="label" translatable="yes">_Save Contents…</attribute>
           <attribute name="action">win.save-contents</attribute>
@@ -88,10 +84,6 @@
           <attribute name="label" translatable="yes">P_references</attribute>
           <attribute name="action">win.edit-preferences</attribute>
         </item>
-        <item>
-          <attribute name="label" translatable="yes">Pr_ofile Preferences</attribute>
-          <attribute name="action">win.edit-profile</attribute>
-        </item>
       </section>
     </submenu>
     <submenu>
diff --git a/src/terminal-prefs.c b/src/terminal-prefs.c
index 8df280dc..3fdae251 100644
--- a/src/terminal-prefs.c
+++ b/src/terminal-prefs.c
@@ -27,6 +27,7 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 
+#include "profile-editor.h"
 #include "terminal-prefs.h"
 #include "terminal-accels.h"
 #include "terminal-app.h"
@@ -36,25 +37,13 @@
 #include "terminal-profiles-list.h"
 #include "terminal-libgsystem.h"
 
-typedef struct {
-  TerminalSettingsList *profiles_list;
-  GtkWidget *dialog;
-  GtkWindow *parent;
-
-  GtkTreeView *manage_profiles_list;
-  GtkWidget *manage_profiles_new_button;
-  GtkWidget *manage_profiles_edit_button;
-  GtkWidget *manage_profiles_clone_button;
-  GtkWidget *manage_profiles_delete_button;
-  GtkWidget *profiles_default_combo;
-} PrefData;
-
-static GtkWidget *prefs_dialog = NULL;
+PrefData *the_pref_data = NULL;
 
 static void
 prefs_dialog_help_button_clicked_cb (GtkWidget *button,
                                      PrefData *data)
 {
+  // FIXME merge the "profile" and "pref" help pages
   terminal_util_show_help ("pref");
 }
 
@@ -65,373 +54,647 @@ prefs_dialog_close_button_clicked_cb (GtkWidget *button,
   gtk_widget_destroy (data->dialog);
 }
 
-/* Profiles tab */
+/* Sidebar */
+
+// FIXME copied from terminal-window.c, maybe move to terminal-util.c.
+static inline GSimpleAction *
+lookup_action (GtkWindow *window,
+               const char *name)
+{
+  GAction *action;
 
-enum
+  action = g_action_map_lookup_action (G_ACTION_MAP (window), name);
+  g_return_val_if_fail (action != NULL, NULL);
+
+  return G_SIMPLE_ACTION (action);
+}
+
+static gint
+listbox_compare_cb (GtkListBoxRow *row1,
+                    GtkListBoxRow *row2,
+                    gpointer user_data)
 {
-  COL_PROFILE,
-  NUM_PROFILE_COLUMNS
-};
+  gpointer sort_order_1 = g_object_get_data (G_OBJECT (row1), "sort_order");
+  gpointer sort_order_2 = g_object_get_data (G_OBJECT (row2), "sort_order");
+
+  if (sort_order_1 != sort_order_2)
+    return sort_order_1 < sort_order_2 ? -1 : 1;
+
+  GtkLabel *label1 = g_object_get_data (G_OBJECT (row1), "label");
+  const char *text1 = gtk_label_get_text (label1);
+  GtkLabel *label2 = g_object_get_data (G_OBJECT (row2), "label");
+  const char *text2 = gtk_label_get_text (label2);
+
+  return g_utf8_collate (text1, text2);
+}
 
 static void
-profile_cell_data_func (GtkTreeViewColumn *tree_column,
-                        GtkCellRenderer *cell,
-                        GtkTreeModel *tree_model,
-                        GtkTreeIter *iter,
-                        PrefData *data)
+listbox_update (GtkListBox *box)
 {
-  gs_unref_object GSettings *profile;
-  gs_free char *text;
-  GValue value = { 0, };
+  int i;
+  GtkListBoxRow *row;
+  GSettings *profile;
+  GtkStack *stack;
+
+  the_pref_data->default_profile = terminal_settings_list_ref_default_child (the_pref_data->profiles_list);  // maybe not here?
 
-  gtk_tree_model_get (tree_model, iter, (int) COL_PROFILE, &profile, (int) -1);
-  text = g_settings_get_string (profile, TERMINAL_PROFILE_VISIBLE_NAME_KEY);
+  for (i = 0; (row = gtk_list_box_get_row_at_index (box, i)) != NULL; i++) {
+    profile = g_object_get_data (G_OBJECT (row), "gsettings");
 
-  g_value_init (&value, G_TYPE_STRING);
-  if (text[0])
-    g_value_set_string (&value, text);
-  else
-    g_value_set_static_string (&value, _("Unnamed"));
+    gboolean is_selected_profile = (profile != NULL && profile == the_pref_data->selected_profile);
+    gboolean is_default_profile = (profile != NULL && profile == the_pref_data->default_profile);
 
-  g_object_set_property (G_OBJECT (cell), "text", &value);
-  g_value_unset (&value);
+    stack = g_object_get_data (G_OBJECT (row), "home-stack");
+    gtk_stack_set_visible_child_name (stack, is_default_profile ? "home" : "placeholder");
+
+    stack = g_object_get_data (G_OBJECT (row), "popover-stack");
+    gtk_stack_set_visible_child_name (stack, is_selected_profile ? "button" : "placeholder");
+    if (is_selected_profile) {
+      g_simple_action_set_enabled (lookup_action (GTK_WINDOW (the_pref_data->dialog), "delete"), !is_default_profile);
+      g_simple_action_set_enabled (lookup_action (GTK_WINDOW (the_pref_data->dialog), "make-default"), !is_default_profile);
+    }
+  }
 }
 
-static int
-profile_sort_func (GtkTreeModel *model,
-                   GtkTreeIter *a,
-                   GtkTreeIter *b,
-                   gpointer user_data)
+static void
+update_window_title (void)
 {
-  gs_unref_object GSettings *profile_a;
-  gs_unref_object GSettings *profile_b;
+  GtkListBoxRow *row = the_pref_data->selected_list_box_row;
+  if (row == NULL)
+    return;
 
-  gtk_tree_model_get (model, a, (int) COL_PROFILE, &profile_a, (int) -1);
-  gtk_tree_model_get (model, b, (int) COL_PROFILE, &profile_b, (int) -1);
+  GSettings *profile = g_object_get_data (G_OBJECT (row), "gsettings");
+  GtkLabel *label = g_object_get_data (G_OBJECT (row), "label");
+  const char *text = gtk_label_get_text (label);
+  gs_free char *subtitle;
+  gs_free char *title;
 
-  return terminal_profiles_compare (profile_a, profile_b);
+  if (profile == NULL) {
+    subtitle = g_strdup (text);
+  } else {
+    subtitle = g_strdup_printf (_("Profile “%s“"), text);
+  }
+
+  title = g_strdup_printf (_("GNOME Terminal Preferences – %s"), subtitle);
+  gtk_window_set_title (GTK_WINDOW (the_pref_data->dialog), title);
 }
 
-static /* ref */ GtkTreeModel *
-profile_liststore_new (PrefData *data,
-                       GSettings *selected_profile,
-                       GtkTreeIter *selected_profile_iter,
-                       gboolean *selected_profile_iter_set)
+static void
+listbox_row_selected_cb (GtkListBox *box,
+                         GtkListBoxRow *row,
+                         GtkStack *stack)
 {
-  GtkListStore *store;
-  GtkTreeIter iter;
-  GList *list, *l;
+  GSettings *profile;
+  char *uuid;
 
-  G_STATIC_ASSERT (NUM_PROFILE_COLUMNS == 1);
-  store = gtk_list_store_new (NUM_PROFILE_COLUMNS, G_TYPE_SETTINGS);
+  profile_prefs_unload ();
 
-  if (selected_profile_iter)
-    *selected_profile_iter_set = FALSE;
+  /* row can be NULL intermittently during a profile meta operations */
+  if (row != NULL) {
+    the_pref_data->selected_profile = g_object_get_data (G_OBJECT (row), "gsettings");
+  } else {
+    the_pref_data->selected_profile = NULL;
+  }
+  the_pref_data->selected_list_box_row = row;
 
-  list = terminal_settings_list_ref_children (data->profiles_list);
-  for (l = list; l != NULL; l = l->next)
-    {
-      GSettings *profile = (GSettings *) l->data;
-
-      gtk_list_store_insert_with_values (store, &iter, 0,
-                                         (int) COL_PROFILE, profile,
-                                         (int) -1);
-
-      if (selected_profile_iter && profile == selected_profile)
-        {
-          *selected_profile_iter = iter;
-          *selected_profile_iter_set = TRUE;
-        }
-    }
+  listbox_update (box);
 
-  g_list_free_full (list, (GDestroyNotify) g_object_unref);
+  if (row != NULL) {
+    uuid = g_object_get_data (G_OBJECT (row), "uuid");
+    profile = g_object_get_data (G_OBJECT (row), "gsettings");
+    if (profile != NULL && uuid != NULL) {
+      profile_prefs_load (uuid, profile);
+    }
 
-  /* Now turn on sorting */
-  gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (store),
-                                   COL_PROFILE,
-                                   profile_sort_func,
-                                   NULL, NULL);
-  gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (store),
-                                        COL_PROFILE, GTK_SORT_ASCENDING);
+    char *stack_child_name = g_object_get_data (G_OBJECT (row), "stack_child_name");
+    gtk_stack_set_visible_child_name (stack, stack_child_name);
+  }
 
-  return GTK_TREE_MODEL (store);
+  update_window_title ();
 }
 
-static /* ref */ GSettings*
-profile_combo_box_ref_selected (GtkComboBox *combo)
-{
-  GSettings *profile;
-  GtkTreeIter iter;
+/* Profiles tab */
+
+static void
+profile_list_new_cb (GtkButton *button,
+                     gpointer   user_data);  // shuffle methods' order so that no declaration is required
 
-  if (gtk_combo_box_get_active_iter (combo, &iter))
-    gtk_tree_model_get (gtk_combo_box_get_model (combo), &iter,
-                        (int) COL_PROFILE, &profile, (int) -1);
-  else
-    profile = NULL;
+static GtkWidget *
+rowheader (const char *text,
+           gboolean show_button)
+{
+  GtkBox *hbox = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
+  gtk_widget_set_margin_start (GTK_WIDGET (hbox), 6);
+  gtk_widget_set_margin_end (GTK_WIDGET (hbox), 6);
+  gtk_widget_set_margin_top (GTK_WIDGET (hbox), 6);
+  gtk_widget_set_margin_bottom (GTK_WIDGET (hbox), 6);
+
+  GtkLabel *label = GTK_LABEL (gtk_label_new (NULL));
+  gs_free char *markup = g_markup_printf_escaped ("<b>%s</b>", text);
+  gtk_label_set_markup (label, markup);
+  gtk_label_set_xalign (label, 0);
+  gtk_box_pack_start (hbox, GTK_WIDGET (label), TRUE, TRUE, 0);
+
+  GtkStack *stack = GTK_STACK (gtk_stack_new ());
+  GtkButton *button = GTK_BUTTON (gtk_button_new_from_icon_name ("list-add-symbolic", GTK_ICON_SIZE_BUTTON));
+  gtk_button_set_relief (button, GTK_RELIEF_NONE);
+  gtk_stack_add_named (stack, GTK_WIDGET (button), "button");
+  GtkLabel *labelx = GTK_LABEL (gtk_label_new (""));
+  gtk_stack_add_named (stack, GTK_WIDGET (labelx), "placeholder");
+
+  gtk_box_pack_end (hbox, GTK_WIDGET (stack), FALSE, FALSE, 0);
+
+  gtk_widget_show_all (GTK_WIDGET (hbox));
+
+  if (show_button) {
+    gtk_stack_set_visible_child_name (stack, "button");
+    g_signal_connect (button, "clicked", G_CALLBACK (profile_list_new_cb), NULL);
+    the_pref_data->new_profile_button = GTK_WIDGET (button);
+  } else {
+    gtk_stack_set_visible_child_name (stack, "placeholder");
+  }
 
-  return profile;
+  return GTK_WIDGET (hbox);
 }
 
 static void
-profile_combo_box_refill (PrefData *data)
+updateheaderfunc              (GtkListBoxRow *row,
+                               GtkListBoxRow *before,
+                               gpointer user_data)
 {
-  GtkComboBox *combo = GTK_COMBO_BOX (data->profiles_default_combo);
-  GtkTreeIter iter;
-  gboolean iter_set;
-  gs_unref_object GSettings *selected_profile;
-  gs_unref_object GtkTreeModel *model;
+  if (before == NULL) {
+    if (gtk_list_box_row_get_header (row) == NULL) {
+      gtk_list_box_row_set_header (row, rowheader (_("Global"), FALSE));
+    }
+    return;
+  }
 
-  selected_profile = profile_combo_box_ref_selected (combo);
+  GSettings *profile = g_object_get_data (G_OBJECT (row), "gsettings");
+  if (profile != NULL) {
+    GSettings *profile_before = g_object_get_data (G_OBJECT (before), "gsettings");
+    if (profile_before != NULL) {
+      gtk_list_box_row_set_header (row, NULL);
+    } else {
+      if (gtk_list_box_row_get_header (row) == NULL) {
+        gtk_list_box_row_set_header (row, rowheader(_("Profiles"), TRUE));
+      }
+    }
+  }
+}
+
+/* FIXME This is a nasty hack. Just the straightforward string mapping,
+ * plus as a side effect trigger sorting the sidebar and updating
+ * the window title. Is there a better place to hook up?
+ * Maybe the "changed" signal of GSettings? */
+static gboolean
+profile_name_get_mapping (GValue *value,
+                          GVariant *variant,
+                          gpointer user_data)
+{
+  g_assert (g_variant_is_of_type (variant, G_VARIANT_TYPE_STRING));
+  g_assert (G_VALUE_HOLDS_STRING (value));
+  g_value_set_string (value, g_variant_get_string (variant, NULL));
 
-  model = profile_liststore_new (data,
-                                 selected_profile,
-                                 &iter,
-                                 &iter_set);
-  gtk_combo_box_set_model (combo, model);
+  gtk_list_box_invalidate_sort (the_pref_data->listbox);  // the following doesn't work, why?  gtk_list_box_row_changed (GTK_LIST_BOX_ROW (user_data));
+  update_window_title ();
 
-  if (iter_set)
-    gtk_combo_box_set_active_iter (combo, &iter);
+  return TRUE;
 }
 
-static GtkWidget*
-profile_combo_box_new (PrefData *data)
+static GtkListBoxRow *
+listbox_create_row (const char *name,
+                    const char *stack_child_name,
+                    const char *uuid,
+                    GSettings *gsettings,
+                    gpointer sort_order)
 {
-  GtkWidget *combo_widget;
-  GtkComboBox *combo;
-  GtkCellRenderer *renderer;
-  GtkTreeIter iter;
-  gboolean iter_set;
-  gs_unref_object GSettings *default_profile;
-  gs_unref_object GtkTreeModel *model;
+  GtkListBoxRow *row = GTK_LIST_BOX_ROW (gtk_list_box_row_new ());
+
+  g_object_set_data_full (G_OBJECT (row), "stack_child_name", g_strdup (stack_child_name), g_free);
+  g_object_set_data_full (G_OBJECT (row), "uuid", g_strdup (uuid), g_free);
+  g_object_set_data (G_OBJECT (row), "gsettings", gsettings);
+  g_object_set_data (G_OBJECT (row), "sort_order", sort_order);
+
+  GtkBox *hbox = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
+  gtk_widget_set_margin_start (GTK_WIDGET (hbox), 6);
+  gtk_widget_set_margin_end (GTK_WIDGET (hbox), 6);
+  gtk_widget_set_margin_top (GTK_WIDGET (hbox), 6);
+  gtk_widget_set_margin_bottom (GTK_WIDGET (hbox), 6);
+
+  GtkLabel *label = GTK_LABEL (gtk_label_new (name));
+  if (gsettings != NULL) {
+    g_settings_bind_with_mapping (gsettings,
+                     TERMINAL_PROFILE_VISIBLE_NAME_KEY,
+                     label,
+                     "label",
+                     G_SETTINGS_BIND_GET,
+                     profile_name_get_mapping,
+                     NULL,
+                     NULL,  // row? see comment in profile_name_get_mapping
+                     NULL);
+  }
+  gtk_label_set_xalign (label, 0);
+  gtk_box_pack_start (hbox, GTK_WIDGET (label), TRUE, TRUE, 0);
+  g_object_set_data (G_OBJECT (row), "label", label);
+
+  GtkStack *popover_stack = GTK_STACK (gtk_stack_new ());
+  gtk_widget_set_margin_start (GTK_WIDGET (popover_stack), 6);
+  GtkMenuButton *popover_button = GTK_MENU_BUTTON (gtk_menu_button_new ());
+  gtk_button_set_relief (GTK_BUTTON (popover_button), GTK_RELIEF_NONE);
+  gtk_stack_add_named (popover_stack, GTK_WIDGET (popover_button), "button");
+  GtkLabel *popover_label = GTK_LABEL (gtk_label_new (""));
+  gtk_stack_add_named (popover_stack, GTK_WIDGET (popover_label), "placeholder");
+  g_object_set_data (G_OBJECT (row), "popover-stack", popover_stack);
+  g_object_set_data (G_OBJECT (row), "popover-button", popover_button);
+
+  gtk_box_pack_end (hbox, GTK_WIDGET (popover_stack), FALSE, FALSE, 0);
+
+  GtkStack *home_stack = GTK_STACK (gtk_stack_new ());
+  gtk_widget_set_margin_start (GTK_WIDGET (home_stack), 12);
+  GtkImage *home_image = GTK_IMAGE (gtk_image_new_from_icon_name ("emblem-default-symbolic", GTK_ICON_SIZE_BUTTON));
+  gtk_widget_set_tooltip_text (GTK_WIDGET (home_image), _("This is the default profile"));
+  gtk_stack_add_named (home_stack, GTK_WIDGET (home_image), "home");
+  GtkLabel *home_label = GTK_LABEL (gtk_label_new (""));
+  gtk_stack_add_named (home_stack, GTK_WIDGET (home_label), "placeholder");
+  g_object_set_data (G_OBJECT (row), "home-stack", home_stack);
+
+  gtk_box_pack_end (hbox, GTK_WIDGET (home_stack), FALSE, FALSE, 0);
 
-  combo_widget = gtk_combo_box_new ();
-  combo = GTK_COMBO_BOX (combo_widget);
-  terminal_util_set_atk_name_description (combo_widget, NULL, _("Click button to choose profile"));
+  gtk_container_add (GTK_CONTAINER (row), GTK_WIDGET (hbox));
 
-  renderer = gtk_cell_renderer_text_new ();
-  gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE);
-  gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combo), renderer,
-                                      (GtkCellLayoutDataFunc) profile_cell_data_func,
-                                      data, NULL);
+  gtk_widget_show_all (GTK_WIDGET (row));
 
-  default_profile = terminal_settings_list_ref_default_child (data->profiles_list);
-  model = profile_liststore_new (data,
-                                 default_profile,
-                                 &iter,
-                                 &iter_set);
-  gtk_combo_box_set_model (combo, model);
+  gtk_stack_set_visible_child_name (popover_stack, "placeholder");
+  gtk_stack_set_visible_child_name (home_stack, "placeholder");
 
-  if (iter_set)
-    gtk_combo_box_set_active_iter (combo, &iter);
+  GMenu *model = g_menu_new ();
+  GMenu *model_section = g_menu_new ();
+  g_menu_append (model_section, _("Clone…"), "win.clone");
+  g_menu_append (model_section, _("Rename…"), "win.rename");
+  g_menu_append (model_section, _("Delete…"), "win.delete");
+  g_menu_append_section (model, NULL, G_MENU_MODEL (model_section));
 
-  gtk_widget_show (combo_widget);
-  return combo_widget;
+  model_section = g_menu_new ();
+  g_menu_append (model_section, _("Set as default"), "win.make-default");
+  g_menu_append_section (model, NULL, G_MENU_MODEL (model_section));
+
+  GtkPopover *popover = GTK_POPOVER (gtk_popover_new (GTK_WIDGET (popover_button)));
+  gtk_popover_bind_model (popover, G_MENU_MODEL (model), NULL);
+  gtk_menu_button_set_popover (popover_button, GTK_WIDGET (popover));
+
+
+  // is this really needed? what for?
+  if (gsettings != NULL)
+    g_object_set_data (G_OBJECT (gsettings), "listboxrow", row);
+
+  return row;
 }
 
+#if !GTK_CHECK_VERSION (3, 22, 27)
+/* Avoid crash on PageUp: bug 791549 */
+static gboolean
+listbox_key_press (GtkListBox *box,
+                   GdkEventKey *event,
+                   gpointer user_data)
+{
+  switch (event->keyval) {
+  case GDK_KEY_Page_Up:
+  case GDK_KEY_Page_Down:
+  case GDK_KEY_KP_Page_Up:
+  case GDK_KEY_KP_Page_Down:
+    return TRUE;
+  default:
+    return FALSE;
+  }
+}
+#endif
+
+/* Add the non-profile rows */
 static void
-profile_combo_box_changed_cb (GtkWidget *widget,
-                              PrefData *data)
+listbox_init (PrefData *data)
 {
-  gs_unref_object GSettings *profile;
-  gs_free char *uuid = NULL;
+  GtkListBoxRow *row;
 
-  profile = profile_combo_box_ref_selected (GTK_COMBO_BOX (data->profiles_default_combo));
-  if (!profile)
-    return;
+  gtk_list_box_set_sort_func (data->listbox, listbox_compare_cb, NULL, NULL);
+#if !GTK_CHECK_VERSION (3, 22, 27)
+  g_signal_connect (data->listbox, "key-press-event", G_CALLBACK (listbox_key_press), NULL);
+#endif
 
-  uuid = terminal_settings_list_dup_uuid_from_child (data->profiles_list, profile);
-  terminal_settings_list_set_default_child (data->profiles_list, uuid);
+  row = listbox_create_row (_("General"),
+                            "general-prefs",
+                            NULL, NULL, (gpointer) 0);
+  gtk_list_box_insert (data->listbox, GTK_WIDGET (row), -1);
+
+  row = listbox_create_row (_("Shortcuts"),
+                            "shortcut-prefs",
+                            NULL, NULL, (gpointer) 1);
+  gtk_list_box_insert (data->listbox, GTK_WIDGET (row), -1);
 }
 
-static GSettings *
-profile_list_ref_selected (PrefData *data)
+/* Remove all the profile rows */
+static void
+listbox_remove_profiles (PrefData *data)
 {
-  GtkTreeSelection *selection;
-  GtkTreeIter iter;
-  GtkTreeModel *model;
-  GSettings *selected_profile;
+  int i = 0;
+  GtkListBoxRow *row;
+
+  data->selected_profile = NULL;
+  profile_prefs_unload ();
 
-  selection = gtk_tree_view_get_selection (data->manage_profiles_list);
-  if (!gtk_tree_selection_get_selected (selection, NULL, &iter))
-    return NULL;
+  // FIXME
+  GtkListBoxRow *lbr = gtk_list_box_get_row_at_index (GTK_LIST_BOX (the_pref_data->listbox), 0);
+  g_signal_emit_by_name (lbr, "activate");
 
-  model = gtk_tree_view_get_model (data->manage_profiles_list);
-  gtk_tree_model_get (model, &iter, (int) COL_PROFILE, &selected_profile, (int) -1);
-  return selected_profile;
+  while ((row = gtk_list_box_get_row_at_index (data->listbox, i)) != NULL) {
+    if (g_object_get_data (G_OBJECT (row), "gsettings") != NULL) {
+      gtk_widget_destroy (GTK_WIDGET (row));
+    } else {
+      i++;
+    }
+  }
+}
+
+static gboolean
+listbox_select_profile (const char *uuid)
+{
+  GtkListBoxRow *row;
+  for (int i = 0; (row = gtk_list_box_get_row_at_index (the_pref_data->listbox, i)) != NULL; i++) {
+    char *rowuuid = g_object_get_data (G_OBJECT (row), "uuid");
+    if (g_strcmp0 (rowuuid, uuid) == 0) {
+      g_signal_emit_by_name (row, "activate");
+      return TRUE;
+    }
+  }
+  return FALSE;
+}
+
+static void
+listbox_add_profiles (PrefData *data)
+{
+  GList *list, *l;
+  GtkListBoxRow *row;
+
+  list = terminal_settings_list_ref_children (data->profiles_list);
+
+  data->default_profile = terminal_settings_list_ref_default_child (data->profiles_list);  // maybe not here?
+
+  for (l = list; l != NULL; l = l->next) {
+    GSettings *profile = (GSettings *) l->data;
+    gchar *text = g_settings_get_string (profile, TERMINAL_PROFILE_VISIBLE_NAME_KEY);
+    gchar *uuid = terminal_settings_list_dup_uuid_from_child (data->profiles_list, profile);
+
+    row = listbox_create_row (NULL,
+                              "profile-prefs",
+                              uuid,
+                              profile,
+                              (gpointer) 42);
+    gtk_list_box_insert (data->listbox, GTK_WIDGET (row), -1);
+
+    g_free (uuid);
+    g_free (text);
+  }
+
+  listbox_update (data->listbox);  // needed?
 }
 
 static void
-profile_list_treeview_refill (PrefData *data)
+listbox_readd_profiles (PrefData *data)
 {
-  GtkTreeView *tree_view = data->manage_profiles_list;
-  GtkTreeIter iter;
-  gboolean iter_set;
-  gs_unref_object GSettings *selected_profile;
-  gs_unref_object GtkTreeModel *model;
+  gs_free char *uuid = NULL;
 
-  selected_profile = profile_list_ref_selected (data);
-  model = profile_liststore_new (data,
-                                 selected_profile,
-                                 &iter,
-                                 &iter_set);
-  gtk_tree_view_set_model (tree_view, model);
+  if (data->selected_profile != NULL)
+    uuid = terminal_settings_list_dup_uuid_from_child (data->profiles_list, data->selected_profile);
 
-  if (!iter_set)
-    iter_set = gtk_tree_model_get_iter_first (model, &iter);
+  listbox_remove_profiles (data);
+  listbox_add_profiles (data);
 
-  if (iter_set)
-    gtk_tree_selection_select_iter (gtk_tree_view_get_selection (tree_view), &iter);
+  if (uuid != NULL)
+    listbox_select_profile (uuid);
 }
 
 static void
-profile_list_row_activated_cb (GtkTreeView *tree_view,
-                               GtkTreePath *path,
-                               GtkTreeViewColumn *column,
-                               PrefData *data)
+profile_new_cb (const char *name)
 {
-  gs_unref_object GSettings *selected_profile;
+  gs_free char *uuid = NULL;
 
-  selected_profile = profile_list_ref_selected (data);
-  if (selected_profile == NULL)
+  if (name[0] == '\0')
     return;
 
-  terminal_app_edit_profile (terminal_app_get (), selected_profile, NULL);
+  uuid = terminal_app_new_profile (terminal_app_get (), NULL, name);
+  gtk_list_box_invalidate_sort (the_pref_data->listbox);  // explain
+  listbox_select_profile (uuid);
 }
 
-static GtkTreeView *
-profile_list_treeview_new (PrefData *data)
+static void
+profile_clone_cb (const char *name)
 {
-  GtkWidget *tree_view;
-  GtkTreeSelection *selection;
-  GtkCellRenderer *renderer;
-  GtkTreeViewColumn *column;
+  gs_free char *uuid = NULL;
 
-  tree_view = gtk_tree_view_new ();
-  terminal_util_set_atk_name_description (tree_view, _("Profile list"), NULL);
-  gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (tree_view), FALSE);
+  if (name[0] == '\0' || the_pref_data->selected_profile == NULL)
+    return;
 
-  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
-  gtk_tree_selection_set_mode (GTK_TREE_SELECTION (selection),
-                               GTK_SELECTION_BROWSE);
+  uuid = terminal_app_new_profile (terminal_app_get (), the_pref_data->selected_profile, name);
+  gtk_list_box_invalidate_sort (the_pref_data->listbox);  // explain
+  listbox_select_profile (uuid);
+}
 
-  column = gtk_tree_view_column_new ();
-  renderer = gtk_cell_renderer_text_new ();
-  gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (column), renderer, TRUE);
-  gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (column), renderer,
-                                      (GtkCellLayoutDataFunc) profile_cell_data_func,
-                                      data, NULL);
-  gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view),
-                               GTK_TREE_VIEW_COLUMN (column));
+static void
+profile_rename_cb (const char *name)
+{
+  if (name[0] == '\0' || the_pref_data->selected_profile == NULL)
+    return;
 
-  g_signal_connect (tree_view, "row-activated",
-                    G_CALLBACK (profile_list_row_activated_cb), data);
+  g_settings_set_string (the_pref_data->selected_profile, TERMINAL_PROFILE_VISIBLE_NAME_KEY, name);
 
-  return GTK_TREE_VIEW (tree_view);
+  gtk_list_box_row_changed (the_pref_data->selected_list_box_row);
+  update_window_title ();
 }
 
 static void
-profile_list_delete_confirm_response_cb (GtkWidget *dialog,
-                                         int response,
-                                         PrefData *data)
+profile_delete_cb (const char *dummy)
 {
-  GSettings *profile;
+  if (the_pref_data->selected_profile == NULL)
+    return;
 
-  profile = (GSettings *) g_object_get_data (G_OBJECT (dialog), "profile");
-  g_assert (profile != NULL);
+  int index = gtk_list_box_row_get_index (the_pref_data->selected_list_box_row);
+  GtkListBoxRow *new_selected_row = gtk_list_box_get_row_at_index (the_pref_data->listbox, index + 1);
+  if (new_selected_row == NULL)
+    new_selected_row = gtk_list_box_get_row_at_index (the_pref_data->listbox, index - 1);
+  GSettings *new_selected_profile = g_object_get_data (G_OBJECT (new_selected_row), "gsettings");
+  gs_free char *uuid = NULL;
+  if (new_selected_profile != NULL)
+    uuid = terminal_settings_list_dup_uuid_from_child (the_pref_data->profiles_list, new_selected_profile);
 
-  if (response == GTK_RESPONSE_ACCEPT)
-    terminal_app_remove_profile (terminal_app_get (), profile);
+  terminal_app_remove_profile (terminal_app_get (), the_pref_data->selected_profile);
 
-  gtk_widget_destroy (dialog);
+  listbox_select_profile (uuid);
 }
 
 static void
-profile_list_delete_button_clicked_cb (GtkWidget *button,
-                                       PrefData *data)
+profile_list_make_default_cb (GSimpleAction *simple,
+                              GVariant      *parameter,
+                              gpointer       user_data)
 {
-  GtkWidget *dialog;
-  gs_unref_object GSettings *selected_profile;
-  gs_free char *name = NULL;
+  gs_unref_object GSettings *profile;
+  gs_free char *uuid = NULL;
 
-  selected_profile = profile_list_ref_selected (data);
-  if (selected_profile == NULL)
+  profile = the_pref_data->selected_profile;
+  if (!profile)
     return;
 
-  name = g_settings_get_string (selected_profile, TERMINAL_PROFILE_VISIBLE_NAME_KEY);
-  dialog = gtk_message_dialog_new (GTK_WINDOW (data->dialog),
-                                   GTK_DIALOG_DESTROY_WITH_PARENT,
-                                   GTK_MESSAGE_QUESTION,
-                                   GTK_BUTTONS_NONE,
-                                   _("Delete profile “%s”?"),
-                                   name);
+  the_pref_data->default_profile = profile;  // FIXME update the icon in the sidebar, the popovers etc.
+  uuid = terminal_settings_list_dup_uuid_from_child (the_pref_data->profiles_list, profile);
+  terminal_settings_list_set_default_child (the_pref_data->profiles_list, uuid);
 
-  gtk_dialog_add_buttons (GTK_DIALOG (dialog),
-                          _("_Cancel"),
-                          GTK_RESPONSE_REJECT,
-                          _("_Delete"),
-                          GTK_RESPONSE_ACCEPT,
-                          NULL);
-  gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
-                                           GTK_RESPONSE_ACCEPT,
-                                           GTK_RESPONSE_REJECT,
-                                           -1);
-  gtk_dialog_set_default_response (GTK_DIALOG (dialog),
-                                   GTK_RESPONSE_ACCEPT);
+  listbox_update (GTK_LIST_BOX (the_pref_data->listbox));
+}
 
-  gtk_window_set_title (GTK_WINDOW (dialog), _("Delete Profile"));
-  gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
+static void
+popover_dialog_ok_clicked_cb (GtkButton *button,
+                              void (*fn) (const char *));
 
-  g_object_set_data_full (G_OBJECT (dialog), "profile", g_object_ref (selected_profile), g_object_unref);
+static void
+popover_dialog_cancel_clicked_cb (GtkButton *button,
+                                  gpointer user_data)
+{
+  GtkEntry *entry = GTK_ENTRY (gtk_builder_get_object (the_pref_data->builder, "popover-dialog-entry"));
+  gtk_entry_set_text (entry, "");
 
-  g_signal_connect (dialog, "response",
-                    G_CALLBACK (profile_list_delete_confirm_response_cb),
-                    data);
+  GtkButton *ok = GTK_BUTTON (gtk_builder_get_object (the_pref_data->builder, "popover-dialog-ok"));
+  GtkButton *cancel = GTK_BUTTON (gtk_builder_get_object (the_pref_data->builder, "popover-dialog-cancel"));
 
-  gtk_window_present (GTK_WINDOW (dialog));
+  g_signal_handlers_disconnect_matched (ok, G_SIGNAL_MATCH_FUNC, 0, 0, NULL,
+                                        G_CALLBACK (popover_dialog_ok_clicked_cb), NULL);
+  g_signal_handlers_disconnect_matched (cancel, G_SIGNAL_MATCH_FUNC, 0, 0, NULL,
+                                        G_CALLBACK (popover_dialog_cancel_clicked_cb), NULL);
+
+  GtkPopover *popover_dialog = GTK_POPOVER (gtk_builder_get_object (the_pref_data->builder, "popover-dialog"));
+  gtk_widget_hide (GTK_WIDGET (popover_dialog));  // FIXME popdown if >= 3.22
 }
 
 static void
-profile_list_new_button_clicked_cb (GtkWidget *button,
-                                    PrefData *data)
+popover_dialog_ok_clicked_cb (GtkButton *button,
+                              void (*fn) (const char *))
 {
-  terminal_app_new_profile (terminal_app_get (), NULL);
+  GtkEntry *entry = GTK_ENTRY (gtk_builder_get_object (the_pref_data->builder, "popover-dialog-entry"));
+  const char *name = gtk_entry_get_text (entry);
+
+  /* Perform what we came for */
+  (*fn) (name);
+
+  /* Do anything we'd do if "cancel" was clicked */
+  popover_dialog_cancel_clicked_cb (button, NULL);
 }
 
+/* Common dialog for entering new profile name, or confirming deletion */
 static void
-profile_list_clone_button_clicked_cb (GtkWidget *button,
-                                      PrefData *data)
+profile_list_popup_dialog (GtkWidget *relative_to,
+                           const char *header,
+                           const char *body,
+                           const char *entry_text,
+                           const char *ok_text,
+                           void (*fn) (const char *))
 {
-  gs_unref_object GSettings *selected_profile;
+  GtkLabel *label1 = GTK_LABEL (gtk_builder_get_object (the_pref_data->builder, "popover-dialog-label1"));
+  gtk_label_set_text (label1, header);
 
-  selected_profile = profile_list_ref_selected (data);
-  if (selected_profile == NULL)
-    return;
+  GtkLabel *label2 = GTK_LABEL (gtk_builder_get_object (the_pref_data->builder, "popover-dialog-label2"));
+  gtk_label_set_text (label2, body);
 
-  terminal_app_new_profile (terminal_app_get (), selected_profile);
+  GtkEntry *entry = GTK_ENTRY (gtk_builder_get_object (the_pref_data->builder, "popover-dialog-entry"));
+  if (entry_text != NULL) {
+    gtk_entry_set_text (entry, entry_text);
+    gtk_widget_show (GTK_WIDGET (entry));
+  } else {
+    gtk_widget_hide (GTK_WIDGET (entry));
+  }
+
+  GtkButton *ok = GTK_BUTTON (gtk_builder_get_object (the_pref_data->builder, "popover-dialog-ok"));
+  gtk_button_set_label (ok, ok_text);
+  GtkButton *cancel = GTK_BUTTON (gtk_builder_get_object (the_pref_data->builder, "popover-dialog-cancel"));
+
+  GtkPopover *popover_dialog = GTK_POPOVER (gtk_builder_get_object (the_pref_data->builder, "popover-dialog"));
+
+  g_signal_connect (ok, "clicked", G_CALLBACK (popover_dialog_ok_clicked_cb), fn);
+  g_signal_connect (cancel, "clicked", G_CALLBACK (popover_dialog_cancel_clicked_cb), NULL);
+
+  gtk_popover_set_relative_to (popover_dialog, relative_to);
+  gtk_popover_set_position (popover_dialog, GTK_POS_BOTTOM);
+  gtk_popover_set_default_widget (popover_dialog, GTK_WIDGET (ok));
+  gtk_widget_show (GTK_WIDGET (popover_dialog));  // FIXME popup if >= 3.22
+
+  gtk_widget_grab_focus (entry_text != NULL ? GTK_WIDGET (entry) : GTK_WIDGET (cancel));
 }
 
+// FIXME find better name
 static void
-profile_list_edit_button_clicked_cb (GtkWidget *button,
-                                     PrefData *data)
+profile_list_new_cb (GtkButton *button,
+                     gpointer   user_data)
 {
-  gs_unref_object GSettings *selected_profile;
+  profile_list_popup_dialog (GTK_WIDGET (the_pref_data->new_profile_button),
+                             _("New Profile"),
+                             _("Enter name for new profile with default settings:"),
+                             "",
+                             _("Create"),
+                             profile_new_cb);
+}
 
-  selected_profile = profile_list_ref_selected (data);
-  if (selected_profile == NULL)
+static void
+profile_list_clone_cb (GSimpleAction *simple,
+                       GVariant      *parameter,
+                       gpointer       user_data)
+{
+  const char *name = g_settings_get_string (the_pref_data->selected_profile, TERMINAL_PROFILE_VISIBLE_NAME_KEY);
+
+  gs_free char *label = g_strdup_printf (_("Enter name for new profile created as a clone of profile “%s”:"), name);
+  gs_free char *clone_name = g_strdup_printf (_("%s (Copy)"), name);
+
+  profile_list_popup_dialog (GTK_WIDGET (the_pref_data->selected_list_box_row),
+                             _("Clone Profile"),
+                             label,
+                             clone_name,
+                             _("Clone"),
+                             profile_clone_cb);
+}
+
+static void
+profile_list_rename_cb (GSimpleAction *simple,
+                        GVariant      *parameter,
+                        gpointer       user_data)
+{
+  if (the_pref_data->selected_profile == NULL)
     return;
 
-  terminal_app_edit_profile (terminal_app_get (), selected_profile, NULL);
+  const char *name = g_settings_get_string (the_pref_data->selected_profile, TERMINAL_PROFILE_VISIBLE_NAME_KEY);
+
+  gs_free char *label = g_strdup_printf (_("Enter new name for profile “%s”:"), name);
+
+  profile_list_popup_dialog (GTK_WIDGET (the_pref_data->selected_list_box_row),
+                             _("Rename Profile"),
+                             label,
+                             name,
+                             _("Rename"),
+                             profile_rename_cb);
 }
 
 static void
-profile_list_selection_changed_cb (GtkTreeSelection *selection,
-                                   PrefData *data)
+profile_list_delete_cb (GSimpleAction *simple,
+                        GVariant      *parameter,
+                        gpointer       user_data)
 {
-  gboolean selected = gtk_tree_selection_get_selected (selection, NULL, NULL);
+  if (the_pref_data->selected_profile == NULL)
+    return;
 
-  gtk_widget_set_sensitive (data->manage_profiles_edit_button, selected);
-  gtk_widget_set_sensitive (data->manage_profiles_clone_button, selected);
-  gtk_widget_set_sensitive (data->manage_profiles_delete_button, selected);
+  const char *name = g_settings_get_string (the_pref_data->selected_profile, TERMINAL_PROFILE_VISIBLE_NAME_KEY);
+
+  gs_free char *label = g_strdup_printf (_("Really delete profile “%s”?"), name);
+
+  profile_list_popup_dialog (GTK_WIDGET (the_pref_data->selected_list_box_row),
+                             _("Delete Profile"),
+                             label,
+                             NULL,
+                             _("Delete"),
+                             profile_delete_cb);
 }
 
 /* Keybindings tab */
@@ -452,37 +715,50 @@ static void
 prefs_dialog_destroy_cb (GtkWidget *widget,
                          PrefData *data)
 {
-  g_signal_handlers_disconnect_by_func (data->profiles_list, G_CALLBACK (profile_combo_box_refill), data);
-  g_signal_handlers_disconnect_by_func (data->profiles_list, G_CALLBACK (profile_list_treeview_refill), data);
-
   /* Don't run this handler again */
   g_signal_handlers_disconnect_by_func (widget, G_CALLBACK (prefs_dialog_destroy_cb), data);
+
+  g_signal_handlers_disconnect_by_func (data->profiles_list,
+                                        G_CALLBACK (listbox_readd_profiles), data);
+  g_signal_handlers_disconnect_by_func (data->profiles_list,
+                                        G_CALLBACK (listbox_update), data->listbox);
+
+  profile_prefs_destroy ();
+
+  g_object_unref (data->builder);
+
   g_free (data);
 }
 
+// FIXME implement switching the tab to widget_name
 void
-terminal_prefs_show_preferences (const char *page)
+terminal_prefs_show_preferences (GSettings *profile, const char *widget_name)
 {
   TerminalApp *app = terminal_app_get ();
   PrefData *data;
   GtkWidget *dialog, *tree_view;
   GtkWidget *show_menubar_button, *disable_mnemonics_button, *disable_menu_accel_button;
   GtkWidget *disable_shortcuts_button;
-  GtkWidget *tree_view_container, *new_button, *edit_button, *clone_button, *remove_button;
   GtkWidget *theme_variant_label, *theme_variant_combo;
   GtkWidget *new_terminal_mode_label, *new_terminal_mode_combo;
-  GtkWidget *default_hbox, *default_label;
   GtkWidget *close_button, *help_button;
-  GtkTreeSelection *selection;
   GSettings *settings;
 
-  if (prefs_dialog != NULL)
+  const GActionEntry action_entries[] = {
+    { "clone",        profile_list_clone_cb,        NULL, NULL, NULL },
+    { "rename",       profile_list_rename_cb,       NULL, NULL, NULL },
+    { "delete",       profile_list_delete_cb,       NULL, NULL, NULL },
+    { "make-default", profile_list_make_default_cb, NULL, NULL, NULL },
+  };
+
+  if (the_pref_data != NULL)
     goto done;
 
   data = g_new0 (PrefData, 1);
+  the_pref_data = data;  // FIXME move it to below
   data->profiles_list = terminal_app_get_profiles_list (app);
 
-  terminal_util_load_widgets_resource ("/org/gnome/terminal/ui/preferences.ui",
+  data->builder = terminal_util_load_widgets_resource ("/org/gnome/terminal/ui/preferences.ui",
                                        "preferences-dialog",
                                        "preferences-dialog", &dialog,
                                        "close-button", &close_button,
@@ -496,13 +772,8 @@ terminal_prefs_show_preferences (const char *page)
                                        "disable-shortcuts-checkbutton", &disable_shortcuts_button,
                                        "disable-menu-accel-checkbutton", &disable_menu_accel_button,
                                        "accelerators-treeview", &tree_view,
-                                       "profiles-treeview-container", &tree_view_container,
-                                       "new-profile-button", &new_button,
-                                       "edit-profile-button", &edit_button,
-                                       "clone-profile-button", &clone_button,
-                                       "delete-profile-button", &remove_button,
-                                       "default-profile-hbox", &default_hbox,
-                                       "default-profile-label", &default_label,
+                                       "the-stack", &data->stack,
+                                       "the-listbox", &data->listbox,
                                        NULL);
 
   data->dialog = dialog;
@@ -513,6 +784,18 @@ terminal_prefs_show_preferences (const char *page)
 
   settings = terminal_app_get_global_settings (app);
 
+  g_action_map_add_action_entries (G_ACTION_MAP (dialog),
+                                   action_entries, G_N_ELEMENTS (action_entries),
+                                   data);
+
+  /* Sidebar */
+
+  gtk_list_box_set_header_func (GTK_LIST_BOX (data->listbox),
+                                updateheaderfunc,
+                                NULL,
+                                NULL /* destroy! */);
+  g_signal_connect (data->listbox, "row-selected", G_CALLBACK (listbox_row_selected_cb), data->stack);
+
   /* General tab */
 
   gboolean shell_shows_menubar;
@@ -574,48 +857,15 @@ terminal_prefs_show_preferences (const char *page)
 
   terminal_accels_fill_treeview (tree_view, disable_shortcuts_button);
 
-  /* Profiles tab */
-
-  data->manage_profiles_new_button = GTK_WIDGET (new_button);
-  data->manage_profiles_edit_button = GTK_WIDGET (edit_button);
-  data->manage_profiles_clone_button = GTK_WIDGET (clone_button);
-  data->manage_profiles_delete_button  = GTK_WIDGET (remove_button);
-
-  data->manage_profiles_list = profile_list_treeview_new (data);
-  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (data->manage_profiles_list));
-  g_signal_connect (selection, "changed", G_CALLBACK (profile_list_selection_changed_cb), data);
+  /* Profiles tab  FIXME */
 
-  profile_list_treeview_refill (data);
+  listbox_init (data);
+  listbox_add_profiles (data);
   g_signal_connect_swapped (data->profiles_list, "children-changed",
-                            G_CALLBACK (profile_list_treeview_refill), data);
-
-  gtk_container_add (GTK_CONTAINER (tree_view_container), GTK_WIDGET (data->manage_profiles_list));
-  gtk_widget_show (GTK_WIDGET (data->manage_profiles_list));
-
-  g_signal_connect (new_button, "clicked",
-                    G_CALLBACK (profile_list_new_button_clicked_cb),
-                    data);
-  g_signal_connect (edit_button, "clicked",
-                    G_CALLBACK (profile_list_edit_button_clicked_cb),
-                    data);
-  g_signal_connect (clone_button, "clicked",
-                    G_CALLBACK (profile_list_clone_button_clicked_cb),
-                    data);
-  g_signal_connect (remove_button, "clicked",
-                    G_CALLBACK (profile_list_delete_button_clicked_cb),
-                    data);
-
-  data->profiles_default_combo = profile_combo_box_new (data);
-  g_signal_connect_swapped (data->profiles_list, "children-changed",
-                            G_CALLBACK (profile_combo_box_refill), data);
-  g_signal_connect (data->profiles_default_combo, "changed",
-                    G_CALLBACK (profile_combo_box_changed_cb), data);
-
-  gtk_box_pack_start (GTK_BOX (default_hbox), data->profiles_default_combo, FALSE, FALSE, 0);
-  gtk_widget_show (data->profiles_default_combo);
+                            G_CALLBACK (listbox_readd_profiles), data);
 
-  // FIXMEchpe
-  gtk_label_set_mnemonic_widget (GTK_LABEL (default_label), data->profiles_default_combo);
+  g_signal_connect_swapped (data->profiles_list, "default-changed",
+                            G_CALLBACK (listbox_update), data->listbox);
 
   /* misc */
 
@@ -624,11 +874,24 @@ terminal_prefs_show_preferences (const char *page)
   g_signal_connect (dialog, "destroy", G_CALLBACK (prefs_dialog_destroy_cb), data);
   gtk_window_set_default_size (GTK_WINDOW (dialog), -1, 350);
 
-  prefs_dialog = dialog;
-  g_object_add_weak_pointer (G_OBJECT (dialog), (gpointer *) &prefs_dialog);
+//  the_pref_data = data;
+  g_object_add_weak_pointer (G_OBJECT (dialog), (gpointer *) &the_pref_data);
+
+  /* profile prefs */
+  profile_prefs_init ();
 
 done:
-  terminal_util_dialog_focus_widget (prefs_dialog, page);
+  ;
+  GtkListBoxRow* lbr;
+  if (profile != NULL) {
+    lbr = g_object_get_data (G_OBJECT (profile), "listboxrow");
+  } else {
+    lbr = gtk_list_box_get_row_at_index (GTK_LIST_BOX (the_pref_data->listbox), 0);
+  }
+  g_signal_emit_by_name (lbr, "activate");  // wow does this really work before the window is presented?
+
+//  terminal_util_dialog_focus_widget (prefs_dialog, page);
+// TODO switch to the given notebook tab within the profile!
 
-  gtk_window_present (GTK_WINDOW (prefs_dialog));
+  gtk_window_present (GTK_WINDOW (the_pref_data->dialog));
 }
diff --git a/src/terminal-prefs.h b/src/terminal-prefs.h
index 1a4bc2df..ea95eeb5 100644
--- a/src/terminal-prefs.h
+++ b/src/terminal-prefs.h
@@ -20,9 +20,36 @@
 
 #include <gtk/gtk.h>
 
+#include "terminal-profiles-list.h"
+
 G_BEGIN_DECLS
 
-void terminal_prefs_show_preferences (const char *page);
+// FIXME move back to the .c file if profile-editor.c is also merged there,
+// also remove the profiles-list.h incude above.
+// FIXME PrefData is a very bad name, rename to PrefsDialog maybe?
+/* Everything about a preferences dialog */
+typedef struct {
+  TerminalSettingsList *profiles_list;
+  GSettings *default_profile;
+  GSettings *selected_profile;
+  GtkListBoxRow *selected_list_box_row;
+  GtkListBox *listbox;
+  GtkWidget *stack;
+
+  GtkWidget *dialog;
+  GtkWindow *parent;
+
+  GtkBuilder *builder;
+
+  GtkWidget *new_profile_button;
+
+  GArray *profile_signals;
+  GArray *profile_bindings;
+} PrefData;
+
+extern PrefData *the_pref_data;  // global?
+
+void terminal_prefs_show_preferences (GSettings *profile, const char *widget_name);
 
 G_END_DECLS
 
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index 117315e1..0151637a 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -1253,7 +1253,7 @@ get_child_environment (TerminalScreen *screen,
 
 enum {
   RESPONSE_RELAUNCH,
-  RESPONSE_EDIT_PROFILE
+  RESPONSE_EDIT_PREFERENCES
 };
 
 static void
@@ -1272,10 +1272,11 @@ info_bar_response_cb (GtkWidget *info_bar,
       gtk_widget_destroy (info_bar);
       _terminal_screen_launch_child_on_idle (screen);
       break;
-    case RESPONSE_EDIT_PROFILE:
-      terminal_app_edit_profile (terminal_app_get (),
-                                 terminal_screen_get_profile (screen),
-                                 "custom-command-entry");
+    case RESPONSE_EDIT_PREFERENCES:
+      // FIXME double check that swtiching to that tab works!!!
+      terminal_app_edit_preferences (terminal_app_get (),
+                                     terminal_screen_get_profile (screen),
+                                     "custom-command-entry");
       break;
     default:
       gtk_widget_destroy (info_bar);
@@ -1389,7 +1390,7 @@ spawn_result_cb (VteTerminal *terminal,
 
     vte_terminal_set_pty (terminal, NULL);
     info_bar = terminal_info_bar_new (GTK_MESSAGE_ERROR,
-                                      _("_Profile Preferences"), RESPONSE_EDIT_PROFILE,
+                                      _("_Preferences"), RESPONSE_EDIT_PREFERENCES,
                                       _("_Relaunch"), RESPONSE_RELAUNCH,
                                       NULL);
     terminal_info_bar_format_text (TERMINAL_INFO_BAR (info_bar),
diff --git a/src/terminal-util.c b/src/terminal-util.c
index 6813f9e7..38d76027 100644
--- a/src/terminal-util.c
+++ b/src/terminal-util.c
@@ -407,13 +407,13 @@ main_object_destroy_cb (GtkWidget *widget)
   g_object_set_data (G_OBJECT (widget), "builder", NULL);
 }
 
-void
+GtkBuilder *
 terminal_util_load_widgets_resource (const char *path,
                                      const char *main_object_name,
                                      const char *object_name,
                                      ...)
 {
-  gs_unref_object GtkBuilder *builder;
+  GtkBuilder *builder;
   GError *error = NULL;
   va_list args;
 
@@ -453,6 +453,7 @@ terminal_util_load_widgets_resource (const char *path,
       gtk_widget_set_margin_bottom (action_area, 5);
     }
   }
+  return builder;
 }
 
 void
diff --git a/src/terminal-util.h b/src/terminal-util.h
index c49460e9..f5a2035a 100644
--- a/src/terminal-util.h
+++ b/src/terminal-util.h
@@ -51,10 +51,10 @@ char *terminal_util_concat_uris (char **uris,
 
 char *terminal_util_get_licence_text (void);
 
-void terminal_util_load_widgets_resource (const char *path,
-                                          const char *main_object_name,
-                                          const char *object_name,
-                                          ...);
+GtkBuilder *terminal_util_load_widgets_resource (const char *path,
+                                                 const char *main_object_name,
+                                                 const char *object_name,
+                                                 ...);
 
 void terminal_util_load_objects_resource (const char *path,
                                           const char *object_name,
diff --git a/src/terminal-window.c b/src/terminal-window.c
index 8a1bf178..e4c2d4b7 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -413,18 +413,6 @@ action_new_terminal_cb (GSimpleAction *action,
     gtk_window_present (GTK_WINDOW (window));
 }
 
-static void
-action_new_profile_cb (GSimpleAction *action,
-                       GVariant *parameter,
-                       gpointer user_data)
-{
-  TerminalWindow *window = user_data;
-  TerminalWindowPrivate *priv = window->priv;
-
-  terminal_app_new_profile (terminal_app_get (),
-                            terminal_screen_get_profile (priv->active_screen));
-}
-
 #ifdef ENABLE_SAVE
 
 static void
@@ -969,21 +957,13 @@ static void
 action_edit_preferences_cb (GSimpleAction *action,
                             GVariant *parameter,
                             gpointer user_data)
-{
-  terminal_app_edit_preferences (terminal_app_get ());
-}
-
-static void
-action_edit_profile_cb (GSimpleAction *action,
-                        GVariant *parameter,
-                        gpointer user_data)
 {
   TerminalWindow *window = user_data;
   TerminalWindowPrivate *priv = window->priv;
 
-  terminal_app_edit_profile (terminal_app_get (),
-                             terminal_screen_get_profile (priv->active_screen),
-                             NULL);
+  terminal_app_edit_preferences (terminal_app_get (),
+                                 terminal_screen_get_profile (priv->active_screen),
+                                 NULL);
 }
 
 static void
@@ -1829,7 +1809,7 @@ screen_show_popup_menu_cb (TerminalScreen *screen,
     g_menu_append_section (submenu5, NULL, profiles_menu);
 
     gs_unref_object GMenu *section51 = g_menu_new ();
-    g_menu_append (section51, _("_Profile Preferences"), "win.edit-profile");
+    g_menu_append (section51, _("_Preferences"), "win.edit-preferences");
     g_menu_append_section (submenu5, NULL, G_MENU_MODEL (section51));
 
     gs_unref_object GMenuItem *item5 = g_menu_item_new (_("P_rofiles"), NULL);
@@ -1839,7 +1819,7 @@ screen_show_popup_menu_cb (TerminalScreen *screen,
     /* If there's only a single profile, put the Profile Preferences item in the
      * context menu itself.
      */
-    g_menu_append (section5, _("_Profile Preferences"), "win.edit-profile");
+    g_menu_append (section5, _("_Preferences"), "win.edit-preferences");
   }
 
   g_menu_append_section (menu, NULL, G_MENU_MODEL (section5));
@@ -2124,7 +2104,6 @@ terminal_window_init (TerminalWindow *window)
     { "copy",                action_copy_cb,             "s",    NULL, NULL },
     { "copy-hyperlink",      action_copy_hyperlink_cb,   NULL,   NULL, NULL },
     { "copy-match",          action_copy_match_cb,       NULL,   NULL, NULL },
-    { "edit-profile",        action_edit_profile_cb,     NULL,   NULL, NULL },
     { "edit-preferences",    action_edit_preferences_cb, NULL,   NULL, NULL },
     { "find",                action_find_cb,             NULL,   NULL, NULL },
     { "find-backward",       action_find_backward_cb,    NULL,   NULL, NULL },
@@ -2133,7 +2112,6 @@ terminal_window_init (TerminalWindow *window)
     { "help",                action_help_cb,             NULL,   NULL, NULL },
     { "inspector",           action_inspector_cb,        NULL,   NULL, NULL },
     { "leave-fullscreen",    action_leave_fullscreen_cb, NULL,   NULL, NULL },
-    { "new-profile",         action_new_profile_cb,      NULL,   NULL, NULL },
     { "new-terminal",        action_new_terminal_cb,     "(ss)", NULL, NULL },
     { "open-match",          action_open_match_cb,       NULL,   NULL, NULL },
     { "open-hyperlink",      action_open_hyperlink_cb,   NULL,   NULL, NULL },
diff --git a/src/terminal.gresource.xml b/src/terminal.gresource.xml
index 411c570a..503e1a5c 100644
--- a/src/terminal.gresource.xml
+++ b/src/terminal.gresource.xml
@@ -22,7 +22,6 @@
     <file alias="ui/menubar.ui" compressed="true" preprocess="xml-stripblanks">terminal-menubar.ui</file>
     <file alias="ui/notebook-menu.ui" compressed="true" preprocess="xml-stripblanks">terminal-notebook-menu.ui</file>
     <file alias="ui/preferences.ui" compressed="true" preprocess="xml-stripblanks">preferences.ui</file>
-    <file alias="ui/profile-preferences.ui" compressed="true" preprocess="xml-stripblanks">profile-preferences.ui</file>
     <file alias="ui/search-popover.ui" compressed="true" preprocess="xml-stripblanks">search-popover.ui</file>
     <file alias="ui/terminal.about" compressed="true">terminal.about</file>
     <file alias="ui/window.ui" compressed="true" preprocess="xml-stripblanks">terminal-window.ui</file>
