[gnumeric] Make gnumeric build against Gtk+-3.0.



commit f6312f6431e8d6770fb76f3f21e320da3e6ca4d9
Author: Jean Brefort <jean brefort normalesup org>
Date:   Mon Aug 1 17:34:17 2011 +0200

    Make gnumeric build against Gtk+-3.0.

 ChangeLog                                       |    4 +
 NEWS                                            |    3 +
 configure.in                                    |    7 +-
 libspreadsheet.pc.in                            |    4 +-
 plugins/openoffice/openoffice-read.c            |   44 +-
 plugins/python-loader/py-console.c              |    8 +-
 src/Makefile.am                                 |    1 +
 src/dialogs/advanced-filter.ui                  |  141 +-
 src/dialogs/anova-one.ui                        |  174 +-
 src/dialogs/anova-two.ui                        |  161 +-
 src/dialogs/autofilter-expression.ui            |  329 +-
 src/dialogs/autofilter-top10.ui                 |  254 +-
 src/dialogs/autoformat.ui                       |  193 +-
 src/dialogs/autosave.ui                         |  146 +-
 src/dialogs/cell-comment.ui                     |  134 +-
 src/dialogs/cell-format.ui                      |  301 +-
 src/dialogs/cell-sort.ui                        |  164 +-
 src/dialogs/chi-squared.ui                      |  173 +-
 src/dialogs/col-width.ui                        |  168 +-
 src/dialogs/colrow.ui                           |   95 +-
 src/dialogs/consolidate.ui                      |  241 +-
 src/dialogs/correlation.ui                      |  147 +-
 src/dialogs/covariance.ui                       |  147 +-
 src/dialogs/dao.ui                              |   52 +-
 src/dialogs/data-slicer.ui                      |  146 +-
 src/dialogs/data-table.ui                       |  112 +-
 src/dialogs/define-name.ui                      |  149 +-
 src/dialogs/delete-cells.ui                     |  139 +-
 src/dialogs/descriptive-stats.ui                |  170 +-
 src/dialogs/dialog-about.c                      |   28 +-
 src/dialogs/dialog-autoformat.c                 |    4 +-
 src/dialogs/dialog-cell-format.c                |    6 +-
 src/dialogs/dialog-cell-sort.c                  |    2 +-
 src/dialogs/dialog-formula-guru.c               |   12 +-
 src/dialogs/dialog-password.c                   |    3 +-
 src/dialogs/dialog-preferences.c                |    2 +-
 src/dialogs/dialog-printer-setup.c              |   12 +-
 src/dialogs/dialog-quit.c                       |   13 +-
 src/dialogs/dialog-sheet-order.c                |   34 +-
 src/dialogs/dialog-sheet-resize.c               |    5 +-
 src/dialogs/dialog-solver.c                     |    7 +-
 src/dialogs/dialog-stf-export.c                 |    4 +-
 src/dialogs/dialog-stf-export.ui                |  314 +-
 src/dialogs/dialog-stf-format-page.c            |    8 +-
 src/dialogs/dialog-stf.ui                       |  450 +-
 src/dialogs/dialog-zoom.ui                      |  179 +-
 src/dialogs/doc-meta-data.ui                    |   92 +-
 src/dialogs/exp-smoothing.ui                    |  258 +-
 src/dialogs/fill-series.ui                      |  154 +-
 src/dialogs/font-sel.ui                         |   31 +-
 src/dialogs/formula-guru.ui                     |  143 +-
 src/dialogs/fourier-analysis.ui                 |  153 +-
 src/dialogs/frequency.ui                        |  197 +-
 src/dialogs/function-select.ui                  |  238 +-
 src/dialogs/goalseek.ui                         |  176 +-
 src/dialogs/goto.ui                             |    9 +-
 src/dialogs/hf-config.ui                        |  182 +-
 src/dialogs/hf-dt-format.ui                     |  130 +-
 src/dialogs/histogram.ui                        |  235 +-
 src/dialogs/hyperlink.ui                        |  162 +-
 src/dialogs/insert-cells.ui                     |  139 +-
 src/dialogs/kaplan-meier.ui                     |  195 +-
 src/dialogs/mean-tests.ui                       |  157 +-
 src/dialogs/merge.ui                            |  138 +-
 src/dialogs/moving-averages.ui                  |  225 +-
 src/dialogs/normality-tests.ui                  |  174 +-
 src/dialogs/paste-special.ui                    |  222 +-
 src/dialogs/plugin-manager.ui                   |  164 +-
 src/dialogs/preferences.ui                      |  105 +-
 src/dialogs/principal-components.ui             |  147 +-
 src/dialogs/print.ui                            |   83 +-
 src/dialogs/random-generation-cor.ui            |  156 +-
 src/dialogs/random-generation.ui                |  176 +-
 src/dialogs/rank.ui                             |  157 +-
 src/dialogs/regression.ui                       |  164 +-
 src/dialogs/row-height.ui                       |  168 +-
 src/dialogs/sampling.ui                         |  161 +-
 src/dialogs/scenario-add.ui                     |  162 +-
 src/dialogs/scenario-manager.ui                 |  162 +-
 src/dialogs/search-replace.ui                   | 1044 ++--
 src/dialogs/search.ui                           |  255 +-
 src/dialogs/sheet-order.ui                      |  123 +-
 src/dialogs/sheet-resize.ui                     |  141 +-
 src/dialogs/sheetobject-size.ui                 |  196 +-
 src/dialogs/shuffle.ui                          |  141 +-
 src/dialogs/sign-test-two.ui                    |  161 +-
 src/dialogs/sign-test.ui                        |  172 +-
 src/dialogs/simulation.ui                       |  243 +-
 src/dialogs/so-button.ui                        |  132 +-
 src/dialogs/so-checkbox.ui                      |  132 +-
 src/dialogs/so-frame.ui                         |   97 +-
 src/dialogs/so-list.ui                          |  134 +-
 src/dialogs/so-radiobutton.ui                   |  135 +-
 src/dialogs/so-scrollbar.ui                     |  181 +-
 src/dialogs/solver.ui                           |  293 +-
 src/dialogs/tabulate.ui                         |  161 +-
 src/dialogs/variance-tests.ui                   |  143 +-
 src/dialogs/view.ui                             |  154 +-
 src/dialogs/wilcoxon-mann-whitney.ui            |  147 +-
 src/dialogs/workbook-attr.ui                    |  152 +-
 src/gnm-graph-window.c                          |    8 +-
 src/gnm-pane.c                                  |   64 +-
 src/gnm-plugin.c                                |    1 +
 src/gnm-so-filled.c                             |    4 +-
 src/gui-clipboard.c                             |   28 +-
 src/gui-file.c                                  |    9 +-
 src/gui-util.c                                  |   39 +-
 src/gui-util.h                                  |    2 +-
 src/gutils.c                                    |   13 +
 src/gutils.h                                    |    1 +
 src/io-context-gtk.c                            |    8 +-
 src/item-bar.c                                  |   91 +-
 src/item-cursor.c                               |  187 +-
 src/item-edit.c                                 |    4 +
 src/item-grid.c                                 |   18 +-
 src/pattern.c                                   |   30 +-
 src/pattern.h                                   |    6 +-
 src/print.c                                     |    2 +-
 src/sheet-control-gui.c                         |   86 +-
 src/sheet-object-graph.c                        |    8 +-
 src/sheet-object-widget.c                       |  616 +--
 src/style-border.c                              |    4 -
 src/style-color.c                               |   24 +-
 src/style-color.h                               |   14 +-
 src/wbc-gtk.c                                   |  105 +-
 src/widgets/gnm-cell-combo-view.c               |   25 +-
 src/widgets/gnm-dao.c                           |   10 +-
 src/widgets/gnm-filter-combo-view.c             |    4 +-
 src/widgets/gnm-notebook.c                      | 8286 +----------------------
 src/widgets/gnumeric-cell-renderer-expr-entry.c |    8 +-
 src/widgets/gnumeric-cell-renderer-text.c       |   33 +-
 src/widgets/gnumeric-cell-renderer-toggle.c     |   31 +-
 src/widgets/gnumeric-expr-entry.c               |   47 +-
 src/widgets/gnumeric-expr-entry.h               |   10 +-
 src/widgets/gnumeric-text-view.c                |    9 +-
 src/widgets/widget-editable-label.c             |   62 +-
 src/widgets/widget-editable-label.h             |    6 +-
 src/widgets/widget-font-selector.c              |   19 +-
 src/xml-sax-write.c                             |    6 +-
 139 files changed, 8968 insertions(+), 15402 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4fc8400..fc17496 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -53,6 +53,10 @@
 	* src/workbook-view.c (wb_view_auto_expr_recalc): use
 	format_value_layout
 
+2011-08-01  Jean Brefort  <jean brefort normalesup org>
+
+	* all: make things build against gtk+-3.0.
+
 2011-07-31  Morten Welinder <terra gnome org>
 
 	* configure.in: Post-release bump.
diff --git a/NEWS b/NEWS
index 0712679..cea1028 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,9 @@ Andreas:
 	[#584380][#651561]
 	* Clarify the distinction beween open/save and import/export.
 
+Jean:
+	* Make things build against gtk+-3.0.
+
 --------------------------------------------------------------------------
 Gnumeric 1.10.17
 
diff --git a/configure.in b/configure.in
index 4d31f7a..6690bcf 100644
--- a/configure.in
+++ b/configure.in
@@ -159,7 +159,7 @@ gnumeric_reqs="$libspreadsheet_reqs
 	pangocairo		>= 1.10.0
 "
 libspreadsheet_gtk_reqs="
-	gtk+-2.0		>= 2.12.0
+	gtk+-3.0		>= 3.0.0
 "
 
 gnumeric_gtk_reqs="$libspreadsheet_gtk_reqs"
@@ -271,7 +271,7 @@ fi
 AC_SUBST(GNUMERIC_PLUGIN_LDFLAGS)
 
 dnl disable for in stable release, enable for development series
-if test XXX$gnumeric_devel = yes; then
+if test $gnumeric_devel = yes; then
     CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED"
     CFLAGS="$CFLAGS -DPANGO_DISABLE_DEPRECATED"
     if test "x$gnumeric_with_gtk" = xtrue; then
@@ -1092,6 +1092,7 @@ AC_SUBST(gnumeric_icondir, '${datadir}/pixmaps/gnumeric')
 AC_SUBST(gnumeric_localedir, '${prefix}/${DATADIRNAME}/locale')
 dnl
 AC_SUBST(gnumeric_plugindir, '${gnumeric_libdir}/plugins')
+AC_SUBST(gnumeric_externplugindir, '${libdir}/gnumeric/${GNUMERIC_API_VER}/plugins')
 
 AC_SUBST(YYYYMMDD, `date +%Y%m%d`)
 
@@ -1106,6 +1107,8 @@ AC_DEFINE(GNM_VERSION_MINOR, gnumeric_version_minor,
 	[The Minor version number of this release])
 AC_DEFINE(GNM_VERSION_EXTRA, "gnumeric_version_extra",
 	[Extra, possibly empty tag for this release])
+AC_DEFINE(GNM_API_VERSION, "GNUMERIC_API_VER",
+	[The API version number of this release])
 
 AC_OUTPUT([
 gnumeric.spec
diff --git a/libspreadsheet.pc.in b/libspreadsheet.pc.in
index f1ae88b..d85cf34 100644
--- a/libspreadsheet.pc.in
+++ b/libspreadsheet.pc.in
@@ -12,11 +12,11 @@ Name: libspreadsheet
 Description: The spreadsheet internals of Gnumeric (DEVELOPMENT VERSION)
 Version: @VERSION@
 URL: http://www.gnumeric.org
-Requires: glib-2.0 gobject-2.0 libgsf-1 libxml-2.0 gtk+-2.0 ${libgoffice}
+Requires: glib-2.0 gobject-2.0 libgsf-1 libxml-2.0 gtk+-3.0 ${libgoffice}
 Requires.private:
 Libs: -L${libdir} -lspreadsheet-${VERSION}
 
 # for now include both the directory and the child, until we rename the includes in svn
 Cflags: -I${includedir}/libspreadsheet- GNUMERIC_API_VER@/spreadsheet -I${includedir}/libspreadsheet- GNUMERIC_API_VER@ -I${gnumeric_libdir}/include
 
-PluginDir= gnumeric_plugindir@
+PluginDir= gnumeric_externplugindir@
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 10ff2f1..bc4b7b5 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -711,18 +711,18 @@ odf_apply_style_props (GsfXMLIn *xin, GSList *props, GOStyle *style)
 				fill_type = OO_FILL_TYPE_NONE;
 			}
 		} else if (0 == strcmp (prop->name, "fill-color")) {
-			GdkColor gdk_color;
+			GdkRGBA rgba;
 			gchar const *color = g_value_get_string (&prop->value);
-			if (gdk_color_parse (color, &gdk_color)) {
-				style->fill.pattern.back = GO_COLOR_FROM_GDK (gdk_color);
+			if (gdk_rgba_parse (&rgba, color)) {
+				style->fill.pattern.back = GO_COLOR_FROM_GDK_RGBA (rgba);
 				style->fill.auto_back = FALSE;
 			}
 		} else if (0 == strcmp (prop->name, "stroke-color")) {
-			GdkColor gdk_color;
+			GdkRGBA rgba;
 			gchar const *color = g_value_get_string (&prop->value);
-			if (gdk_color_parse (color, &gdk_color)) {
-				style->line.color = GO_COLOR_FROM_GDK (gdk_color);
-				style->line.fore = GO_COLOR_FROM_GDK (gdk_color);
+			if (gdk_rgba_parse (&rgba, color)) {
+				style->line.color = GO_COLOR_FROM_GDK_RGBA (rgba);
+				style->line.fore = GO_COLOR_FROM_GDK_RGBA (rgba);
 				style->line.auto_color = FALSE;
 				style->line.auto_fore = FALSE;
 				style->line.pattern = GO_PATTERN_SOLID;
@@ -3239,15 +3239,15 @@ oo_gradient (GsfXMLIn *xin, xmlChar const **attrs)
 		if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_DRAW, "name"))
 			name = CXML2C (attrs[1]);
 		else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_DRAW, "start-color")) {
-			GdkColor gdk_color;
-			if (gdk_color_parse (CXML2C (attrs[1]), &gdk_color))
-				info->from = GO_COLOR_FROM_GDK (gdk_color);
+			GdkRGBA rgba;
+			if (gdk_rgba_parse (&rgba, CXML2C (attrs[1])))
+				info->from = GO_COLOR_FROM_GDK_RGBA (rgba);
 			else
 				oo_warning (xin, _("Unable to parse gradient color: %s"), CXML2C (attrs[1]));
 		} else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_DRAW, "end-color")) {
-			GdkColor gdk_color;
-			if (gdk_color_parse (CXML2C (attrs[1]), &gdk_color))
-				info->to = GO_COLOR_FROM_GDK (gdk_color);
+			GdkRGBA rgba;
+			if (gdk_rgba_parse (&rgba, CXML2C (attrs[1])))
+				info->to = GO_COLOR_FROM_GDK_RGBA (rgba);
 			else
 				oo_warning (xin, _("Unable to parse gradient color: %s"), CXML2C (attrs[1]));
 		} else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_DRAW, "style"))
@@ -3286,9 +3286,9 @@ oo_hatch (GsfXMLIn *xin, xmlChar const **attrs)
 
 	for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
 		if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_DRAW, "color")) {
-			GdkColor gdk_color;
-			if (gdk_color_parse (CXML2C (attrs[1]), &gdk_color))
-				hatch->fore = GO_COLOR_FROM_GDK (gdk_color);
+			GdkRGBA rgba;
+			if (gdk_rgba_parse (&rgba, CXML2C (attrs[1])))
+				hatch->fore = GO_COLOR_FROM_GDK_RGBA (rgba);
 			else
 				oo_warning (xin, _("Unable to parse hatch color: %s"), CXML2C (attrs[1]));
 		} else if (NULL != oo_attr_distance (xin, attrs, OO_NS_DRAW, "distance", &distance))
@@ -5235,10 +5235,10 @@ oo_style_prop_table (GsfXMLIn *xin, xmlChar const **attrs)
 			style->is_rtl = tmp_i;
 		else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]),
 					       OO_GNUM_NS_EXT, "tab-color")) {
-			GdkColor gdk_color;
-			if (gdk_color_parse (CXML2C (attrs[1]), &gdk_color)) {
+			GdkRGBA rgba;
+			if (gdk_rgba_parse (&rgba, CXML2C (attrs[1]))) {
 				style->tab_color
-					= GO_COLOR_FROM_GDK (gdk_color);
+					= GO_COLOR_FROM_GDK_RGBA (rgba);
 				style->tab_color_set = TRUE;
 			} else
 				oo_warning (xin, _("Unable to parse "
@@ -5247,10 +5247,10 @@ oo_style_prop_table (GsfXMLIn *xin, xmlChar const **attrs)
 		} else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]),
 					       OO_GNUM_NS_EXT,
 					       "tab-text-color")) {
-			GdkColor gdk_color;
-			if (gdk_color_parse (CXML2C (attrs[1]), &gdk_color)) {
+			GdkRGBA rgba;
+			if (gdk_rgba_parse (&rgba, CXML2C (attrs[1]))) {
 				style->tab_text_color
-					= GO_COLOR_FROM_GDK (gdk_color);
+					= GO_COLOR_FROM_GDK_RGBA (rgba);
 				style->tab_text_color_set = TRUE;
 			} else
 				oo_warning (xin, _("Unable to parse tab "
diff --git a/plugins/python-loader/py-console.c b/plugins/python-loader/py-console.c
index 319a10c..6a87d12 100644
--- a/plugins/python-loader/py-console.c
+++ b/plugins/python-loader/py-console.c
@@ -164,9 +164,9 @@ show_python_console (GnmAction const *action, WorkbookControl *wbc)
 	g_signal_connect_object (
 		G_OBJECT (sel), "interpreter_changed",
 		G_CALLBACK (app_interpreter_changed), app->win, 0);
-	vbox = gtk_vbox_new (FALSE, 0);
+	vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 
-	hbox = gtk_hbox_new (FALSE, 0);
+	hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
 	w = gtk_label_new_with_mnemonic (_("E_xecute in:"));
 	gtk_label_set_mnemonic_widget (GTK_LABEL (w), sel);
 	gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, TRUE, 4);
@@ -199,7 +199,7 @@ show_python_console (GnmAction const *action, WorkbookControl *wbc)
 						     &enditer,
 						     FALSE);
 	font_desc = pango_font_description_from_string ("Fixed");
-	gtk_widget_modify_font (GTK_WIDGET (app->text_view), font_desc);
+	gtk_widget_override_font (GTK_WIDGET (app->text_view), font_desc);
 	pango_font_description_free (font_desc);
 	gtk_text_view_set_editable (GTK_TEXT_VIEW (app->text_view), FALSE);
 	gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (app->text_view),
@@ -208,7 +208,7 @@ show_python_console (GnmAction const *action, WorkbookControl *wbc)
 			   GTK_WIDGET (app->text_view));
 	gtk_box_pack_start (GTK_BOX (vbox), sc_win, TRUE, TRUE, 0);
 
-	hbox = gtk_hbox_new (FALSE, 0);
+	hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
 	cline = gnm_py_command_line_new ();
 	g_signal_connect (G_OBJECT (cline), "entered",
 			  G_CALLBACK (app_cline_entered), NULL);
diff --git a/src/Makefile.am b/src/Makefile.am
index c2a1a9f..b6647de 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -430,6 +430,7 @@ gnumeric-paths.h: Makefile
 	echo '#define GNUMERIC_LIBDIR		"$(gnumeric_libdir)"'; \
 	echo '#define GNUMERIC_ICONDIR		"$(gnumeric_icondir)"'; \
 	echo '#define GNUMERIC_LOCALEDIR	"$(gnumeric_localedir)"'; \
+	echo '#define GNUMERIC_EXTERNPLUGINDIR		"$(gnumeric_externplugindir)"'; \
 	echo ''; \
 	echo '#endif /* GNUMERIC_PATHS_H */'; \
 	) >$@
diff --git a/src/dialogs/advanced-filter.ui b/src/dialogs/advanced-filter.ui
index a5f2a05..c51c41d 100644
--- a/src/dialogs/advanced-filter.ui
+++ b/src/dialogs/advanced-filter.ui
@@ -1,18 +1,80 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Filter">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Advanced Filter</property>
     <property name="window_position">mouse</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">6</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
@@ -21,6 +83,7 @@
             <child>
               <object class="GtkTable" id="input-table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">3</property>
                 <property name="n_columns">2</property>
@@ -32,6 +95,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -45,6 +109,7 @@
                 <child>
                   <object class="GtkLabel" id="var2-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">_Criteria range:</property>
                     <property name="use_underline">True</property>
@@ -59,6 +124,7 @@
                 <child>
                   <object class="GtkLabel" id="var1-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">_List range:</property>
                     <property name="use_underline">True</property>
@@ -80,6 +146,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Input</property>
                 <property name="justify">center</property>
               </object>
@@ -88,8 +155,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -101,6 +169,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Output</property>
                 <property name="justify">center</property>
               </object>
@@ -111,12 +180,15 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkLabel" id="warnings">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="xpad">5</property>
             <property name="ypad">5</property>
             <property name="wrap">True</property>
@@ -127,63 +199,6 @@
             <property name="position">2</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/src/dialogs/anova-one.ui b/src/dialogs/anova-one.ui
index 5bfefd0..c4d40ac 100644
--- a/src/dialogs/anova-one.ui
+++ b/src/dialogs/anova-one.ui
@@ -1,23 +1,79 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="value">0.050000000000000003</property>
-    <property name="upper">1</property>
-    <property name="step_increment">0.01</property>
-    <property name="page_increment">10</property>
-  </object>
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="ANOVA">
+    <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">ANOVA - Single Factor</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
@@ -26,6 +82,7 @@
             <child>
               <object class="GtkTable" id="input-table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">5</property>
                 <property name="n_columns">2</property>
@@ -34,6 +91,7 @@
                 <child>
                   <object class="GtkLabel" id="var1-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">_Input range:</property>
                     <property name="use_underline">True</property>
@@ -47,6 +105,7 @@
                 <child>
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Grouped by:</property>
                     <property name="justify">center</property>
@@ -67,6 +126,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -78,14 +138,16 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="vbox2">
+                  <object class="GtkBox" id="vbox2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <object class="GtkRadioButton" id="grouped_by_col">
                         <property name="label" translatable="yes">_Columns</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -114,6 +176,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">grouped_by_col</property>
@@ -133,6 +196,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">grouped_by_col</property>
@@ -163,6 +227,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Input</property>
               </object>
               <packing>
@@ -170,11 +235,14 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox3">
+              <object class="GtkBox" id="vbox3">
                 <property name="visible">True</property>
+                <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkTable" id="table2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <property name="n_columns">2</property>
                     <property name="column_spacing">12</property>
@@ -182,6 +250,7 @@
                     <child>
                       <object class="GtkLabel" id="label3">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">_Alpha:</property>
                         <property name="use_underline">True</property>
@@ -211,6 +280,8 @@
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
@@ -222,6 +293,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label6">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Options</property>
               </object>
               <packing>
@@ -230,8 +302,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -243,6 +316,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label7">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Output</property>
               </object>
               <packing>
@@ -252,12 +326,15 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkLabel" id="warnings">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="use_markup">True</property>
             <property name="wrap">True</property>
           </object>
@@ -267,63 +344,6 @@
             <property name="position">2</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
@@ -332,4 +352,16 @@
       <action-widget response="0">okbutton</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">1</property>
+    <property name="value">0.050000000000000003</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">1</property>
+    <property name="value">0.050000000000000003</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
 </interface>
diff --git a/src/dialogs/anova-two.ui b/src/dialogs/anova-two.ui
index ded6a70..b4f14a9 100644
--- a/src/dialogs/anova-two.ui
+++ b/src/dialogs/anova-two.ui
@@ -1,23 +1,79 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="value">0.050000000000000003</property>
-    <property name="upper">1</property>
-    <property name="step_increment">0.01</property>
-    <property name="page_increment">0.050000000000000003</property>
-  </object>
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="ANOVA">
+    <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">ANOVA - Two-Factor</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
@@ -26,6 +82,7 @@
             <child>
               <object class="GtkTable" id="input-table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">3</property>
                 <property name="n_columns">2</property>
@@ -34,6 +91,7 @@
                 <child>
                   <object class="GtkLabel" id="var1-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Input _range:</property>
                     <property name="use_underline">True</property>
@@ -49,6 +107,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -62,6 +121,7 @@
                 <child>
                   <object class="GtkLabel" id="label4">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Rows per _sample:</property>
                     <property name="use_underline">True</property>
@@ -106,6 +166,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label6">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Input</property>
               </object>
               <packing>
@@ -113,12 +174,14 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox2">
+              <object class="GtkBox" id="vbox2">
                 <property name="visible">True</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkTable" id="table2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <property name="n_columns">2</property>
                     <property name="column_spacing">12</property>
@@ -126,6 +189,7 @@
                     <child>
                       <object class="GtkLabel" id="label3">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">_Alpha: </property>
                         <property name="use_underline">True</property>
@@ -154,6 +218,8 @@
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
@@ -165,6 +231,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label7">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Options</property>
               </object>
               <packing>
@@ -173,8 +240,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -186,6 +254,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label8">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Output</property>
               </object>
               <packing>
@@ -195,12 +264,15 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkLabel" id="warnings">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="xpad">5</property>
             <property name="use_markup">True</property>
             <property name="wrap">True</property>
@@ -211,63 +283,6 @@
             <property name="position">2</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
@@ -276,4 +291,10 @@
       <action-widget response="0">okbutton</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">1</property>
+    <property name="value">0.050000000000000003</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">0.050000000000000003</property>
+  </object>
 </interface>
diff --git a/src/dialogs/autofilter-expression.ui b/src/dialogs/autofilter-expression.ui
index b282f3b..1ae027c 100644
--- a/src/dialogs/autofilter-expression.ui
+++ b/src/dialogs/autofilter-expression.ui
@@ -1,121 +1,91 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkListStore" id="model1">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes"></col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">equals</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">does not equal</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">is greater than</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">is greater than or equal to</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">is less than</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">is less than or equal to</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">begins with</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">does not begin with</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">ends with</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">does not end with</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">contains</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">does not contain</col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkListStore" id="model2">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes"></col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">equals</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">does not equal</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">is greater than</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">is greater than or equal to</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">is less than</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">is less than or equal to</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">begins with</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">does not begin with</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">ends with</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">does not end with</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">contains</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">does not contain</col>
-      </row>
-    </data>
-  </object>
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="dialog">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Gnumeric : AutoFilter</property>
     <property name="window_position">mouse</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox2">
+      <object class="GtkBox" id="dialog-vbox2">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">6</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkTable" id="table2">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="border_width">5</property>
             <property name="n_rows">4</property>
             <property name="n_columns">4</property>
             <child>
               <object class="GtkComboBox" id="op0">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="model">model1</property>
                 <child>
                   <object class="GtkCellRendererText" id="renderer1"/>
@@ -136,6 +106,7 @@
             <child>
               <object class="GtkComboBox" id="op1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="model">model2</property>
                 <child>
                   <object class="GtkCellRendererText" id="renderer2"/>
@@ -156,6 +127,7 @@
             <child>
               <object class="GtkLabel" id="label2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="xpad">5</property>
                 <property name="ypad">5</property>
@@ -168,14 +140,16 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="hbox2">
+              <object class="GtkBox" id="hbox2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkRadioButton" id="and_button">
                     <property name="label" translatable="yes">_And</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -192,6 +166,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">and_button</property>
@@ -241,6 +216,7 @@
             <child>
               <object class="GtkLabel" id="col-label1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xpad">5</property>
               </object>
               <packing>
@@ -251,6 +227,7 @@
             <child>
               <object class="GtkLabel" id="col-label2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xpad">5</property>
               </object>
               <packing>
@@ -272,66 +249,10 @@
           </object>
           <packing>
             <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area2">
-            <property name="visible">True</property>
-            <property name="layout_style">end</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="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
@@ -340,4 +261,98 @@
       <action-widget response="-5">ok_button</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkListStore" id="model1">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes"></col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">equals</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">does not equal</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">is greater than</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">is greater than or equal to</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">is less than</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">is less than or equal to</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">begins with</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">does not begin with</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">ends with</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">does not end with</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">contains</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">does not contain</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model2">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes"></col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">equals</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">does not equal</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">is greater than</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">is greater than or equal to</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">is less than</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">is less than or equal to</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">begins with</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">does not begin with</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">ends with</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">does not end with</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">contains</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">does not contain</col>
+      </row>
+    </data>
+  </object>
 </interface>
diff --git a/src/dialogs/autofilter-top10.ui b/src/dialogs/autofilter-top10.ui
index dafd5d5..c465bf6 100644
--- a/src/dialogs/autofilter-top10.ui
+++ b/src/dialogs/autofilter-top10.ui
@@ -1,67 +1,129 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkAdjustment" id="adjustment1">
-    <property name="value">10</property>
     <property name="lower">1</property>
     <property name="upper">500</property>
+    <property name="value">10</property>
     <property name="step_increment">1</property>
   </object>
-  <object class="GtkListStore" id="model1">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes">Top</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Bottom</col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkListStore" id="model2">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes">Items</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Percentage</col>
-      </row>
-    </data>
-  </object>
   <object class="GtkDialog" id="dialog">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Gnumeric : AutoFilter</property>
     <property name="window_position">mouse</property>
     <property name="type_hint">normal</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">6</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkLabel" id="col-label">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="ypad">2</property>
           </object>
           <packing>
             <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkRadioButton" id="items-largest">
             <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">False</property>
-            <property name="active">True</property>
-            <property name="draw_indicator">True</property>
+            <property name="can_focus">False</property>
+            <property name="border_width">6</property>
+            <property name="spacing">12</property>
+            <child>
+              <object class="GtkLabel" id="label1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Count or percentage:</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSpinButton" id="item_count">
+                <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">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
           </object>
           <packing>
             <property name="expand">False</property>
@@ -74,6 +136,7 @@
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">False</property>
+            <property name="use_action_appearance">False</property>
             <property name="active">True</property>
             <property name="draw_indicator">True</property>
             <property name="group">items-largest</property>
@@ -89,6 +152,7 @@
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">False</property>
+            <property name="use_action_appearance">False</property>
             <property name="active">True</property>
             <property name="draw_indicator">True</property>
             <property name="group">items-largest</property>
@@ -104,6 +168,7 @@
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">False</property>
+            <property name="use_action_appearance">False</property>
             <property name="active">True</property>
             <property name="draw_indicator">True</property>
             <property name="group">items-largest</property>
@@ -115,32 +180,14 @@
           </packing>
         </child>
         <child>
-          <object class="GtkHBox" id="hbox1">
+          <object class="GtkBox" id="hbox1">
             <property name="visible">True</property>
-            <property name="border_width">6</property>
-            <property name="spacing">12</property>
-            <property name="homogeneous">True</property>
-            <child>
-              <object class="GtkLabel" id="cp-label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Count or Percentage:</property>
-              </object>
-              <packing>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkSpinButton" id="item_count">
-                <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="position">1</property>
-              </packing>
-            </child>
+            <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
+            <property name="use_action_appearance">False</property>
+            <property name="active">True</property>
+            <property name="draw_indicator">True</property>
+            <property name="group">items-largest</property>
           </object>
           <packing>
             <property name="expand">False</property>
@@ -148,63 +195,6 @@
             <property name="position">6</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
@@ -213,4 +203,32 @@
       <action-widget response="-5">ok_button</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkListStore" id="model1">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Top</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Bottom</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model2">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Items</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Percentage</col>
+      </row>
+    </data>
+  </object>
 </interface>
diff --git a/src/dialogs/autoformat.ui b/src/dialogs/autoformat.ui
index 701d0a3..e2c4d13 100644
--- a/src/dialogs/autoformat.ui
+++ b/src/dialogs/autoformat.ui
@@ -1,35 +1,100 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkAdjustment" id="adjustment1"/>
   <object class="GtkDialog" id="dialog">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Autoformat</property>
     <property name="modal">True</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="format_cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="format_ok">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <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="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <child>
-              <object class="GtkVBox" id="vbox1">
+              <object class="GtkBox" id="vbox1">
                 <property name="visible">True</property>
-                <property name="border_width">4</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">4</property>
                 <property name="spacing">4</property>
                 <child>
-                  <object class="GtkHBox" id="category-box">
+                  <object class="GtkBox" id="category-box">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="spacing">5</property>
                     <child>
                       <object class="GtkLabel" id="label13">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="xpad">5</property>
                         <property name="label" translatable="yes">C_ategory:</property>
@@ -39,17 +104,21 @@
                       </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkComboBox" id="format_category">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <accessibility>
                           <relation type="labelled-by" target="label13"/>
                         </accessibility>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
@@ -59,19 +128,23 @@
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="hbox1">
+                  <object class="GtkBox" id="hbox1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <child>
-                      <object class="GtkHBox" id="hbox4">
+                      <object class="GtkBox" id="hbox4">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">4</property>
                         <child>
                           <object class="GtkAlignment" id="alignment7">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="yalign">0</property>
                             <property name="xscale">0</property>
@@ -79,6 +152,7 @@
                             <child>
                               <object class="GtkTable" id="table5">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="n_rows">3</property>
                                 <property name="n_columns">2</property>
                                 <property name="column_spacing">4</property>
@@ -87,11 +161,13 @@
                                 <child>
                                   <object class="GtkAlignment" id="alignment1">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="xscale">0</property>
                                     <property name="yscale">0</property>
                                     <child>
                                       <object class="GtkFrame" id="format_frame1">
                                         <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
                                         <property name="label_xalign">0</property>
                                         <child>
                                           <placeholder/>
@@ -103,11 +179,13 @@
                                 <child>
                                   <object class="GtkAlignment" id="alignment2">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="xscale">0</property>
                                     <property name="yscale">0</property>
                                     <child>
                                       <object class="GtkFrame" id="format_frame2">
                                         <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
                                         <property name="label_xalign">0</property>
                                         <child>
                                           <placeholder/>
@@ -124,11 +202,13 @@
                                 <child>
                                   <object class="GtkAlignment" id="alignment3">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="xscale">0</property>
                                     <property name="yscale">0</property>
                                     <child>
                                       <object class="GtkFrame" id="format_frame3">
                                         <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
                                         <property name="label_xalign">0</property>
                                         <child>
                                           <placeholder/>
@@ -145,11 +225,13 @@
                                 <child>
                                   <object class="GtkAlignment" id="alignment4">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="xscale">0</property>
                                     <property name="yscale">0</property>
                                     <child>
                                       <object class="GtkFrame" id="format_frame4">
                                         <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
                                         <property name="label_xalign">0</property>
                                         <child>
                                           <placeholder/>
@@ -169,11 +251,13 @@
                                 <child>
                                   <object class="GtkAlignment" id="alignment5">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="xscale">0</property>
                                     <property name="yscale">0</property>
                                     <child>
                                       <object class="GtkFrame" id="format_frame5">
                                         <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
                                         <property name="label_xalign">0</property>
                                         <child>
                                           <placeholder/>
@@ -190,11 +274,13 @@
                                 <child>
                                   <object class="GtkAlignment" id="alignment6">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="xscale">0</property>
                                     <property name="yscale">0</property>
                                     <child>
                                       <object class="GtkFrame" id="format_frame6">
                                         <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
                                         <property name="label_xalign">0</property>
                                         <child>
                                           <placeholder/>
@@ -215,35 +301,47 @@
                             </child>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkVScrollbar" id="format_scroll">
+                          <object class="GtkScrollbar" id="format_scroll">
+                            <property name="can_focus">False</property>
+                            <property name="orientation">vertical</property>
                             <property name="adjustment">adjustment1</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">True</property>
+                        <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHButtonBox" id="hbuttonbox1">
+                  <object class="GtkButtonBox" id="hbuttonbox1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="spacing">30</property>
                     <property name="layout_style">end</property>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">2</property>
                   </packing>
                 </child>
@@ -252,6 +350,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label9">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Preview</property>
                 <property name="justify">center</property>
               </object>
@@ -262,6 +361,7 @@
             <child>
               <object class="GtkTable" id="table4">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">4</property>
                 <property name="n_rows">4</property>
                 <property name="n_columns">2</property>
@@ -272,11 +372,11 @@
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="hscrollbar_policy">never</property>
-                    <property name="vscrollbar_policy">automatic</property>
                     <property name="shadow_type">in</property>
                     <child>
                       <object class="GtkTextView" id="format_info_descr">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="tooltip_text" translatable="yes">A short description of the template</property>
                         <property name="editable">False</property>
                         <property name="wrap_mode">word</property>
@@ -298,6 +398,7 @@
                 <child>
                   <object class="GtkEntry" id="format_info_cat">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="tooltip_text" translatable="yes">The category this template belongs to</property>
                     <property name="editable">False</property>
                     <accessibility>
@@ -315,6 +416,7 @@
                 <child>
                   <object class="GtkEntry" id="format_info_author">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="tooltip_text" translatable="yes">The group/individual that made the template</property>
                     <property name="editable">False</property>
                     <accessibility>
@@ -332,6 +434,7 @@
                 <child>
                   <object class="GtkEntry" id="format_info_name">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="tooltip_text" translatable="yes">Name of template</property>
                     <property name="editable">False</property>
                     <accessibility>
@@ -348,6 +451,7 @@
                 <child>
                   <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Name:</property>
                     <accessibility>
@@ -362,6 +466,7 @@
                 <child>
                   <object class="GtkLabel" id="label10">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Author:</property>
                     <accessibility>
@@ -378,6 +483,7 @@
                 <child>
                   <object class="GtkLabel" id="label11">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Category:</property>
                     <accessibility>
@@ -394,6 +500,7 @@
                 <child>
                   <object class="GtkLabel" id="label12">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="yalign">0.10000000149011612</property>
                     <property name="label" translatable="yes">Description:</property>
@@ -416,6 +523,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Template Details</property>
                 <property name="justify">center</property>
               </object>
@@ -426,64 +534,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="format_cancel">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="format_ok">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <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="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/autosave.ui b/src/dialogs/autosave.ui
index a63a1ed..3d943fa 100644
--- a/src/dialogs/autosave.ui
+++ b/src/dialogs/autosave.ui
@@ -1,23 +1,86 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="AutoSave">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Auto Save</property>
     <property name="window_position">mouse</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="button3">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="button2">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="button1">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
-          <object class="GtkVBox" id="vbox1">
+          <object class="GtkBox" id="vbox1">
             <property name="visible">True</property>
-            <property name="border_width">6</property>
+            <property name="can_focus">False</property>
             <property name="orientation">vertical</property>
+            <property name="border_width">6</property>
             <property name="spacing">6</property>
             <child>
               <object class="GtkCheckButton" id="autosave_on_off">
@@ -26,6 +89,7 @@
                 <property name="can_focus">True</property>
                 <property name="has_focus">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
                 <property name="draw_indicator">True</property>
               </object>
@@ -36,16 +100,19 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="hbox2">
+              <object class="GtkBox" id="hbox2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="spacing">6</property>
                 <child>
                   <object class="GtkLabel" id="label2">
                     <property name="height_request">14</property>
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="padding">5</property>
                     <property name="position">0</property>
                   </packing>
@@ -64,6 +131,7 @@
                 <child>
                   <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xpad">4</property>
                     <property name="label" translatable="yes">_minutes</property>
                     <property name="use_underline">True</property>
@@ -78,6 +146,8 @@
                 </child>
               </object>
               <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
                 <property name="position">1</property>
               </packing>
             </child>
@@ -87,6 +157,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
                 <property name="draw_indicator">True</property>
               </object>
@@ -98,64 +169,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="button3">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="button2">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="button1">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/cell-comment.ui b/src/dialogs/cell-comment.ui
index 967bad8..4ae5444 100644
--- a/src/dialogs/cell-comment.ui
+++ b/src/dialogs/cell-comment.ui
@@ -1,22 +1,84 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="comment_dialog">
+    <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Cell Comment</property>
     <property name="default_width">300</property>
     <property name="default_height">300</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox">
+      <object class="GtkBox" id="dialog-vbox">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkTable" id="table1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="n_rows">2</property>
             <property name="n_columns">2</property>
             <property name="column_spacing">12</property>
@@ -25,7 +87,7 @@
               <object class="GtkEntry" id="new-author-entry">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="invisible_char">&#x2022;</property>
+                <property name="invisible_char">â</property>
               </object>
               <packing>
                 <property name="left_attach">1</property>
@@ -37,6 +99,7 @@
             <child>
               <object class="GtkLabel" id="old-author-entry">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="ellipsize">end</property>
               </object>
@@ -49,6 +112,7 @@
             <child>
               <object class="GtkLabel" id="new-author-label">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">&lt;b&gt;New Author:&lt;/b&gt;</property>
                 <property name="use_markup">True</property>
@@ -64,6 +128,7 @@
             <child>
               <object class="GtkLabel" id="old-author-label">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">&lt;b&gt;Old Author:&lt;/b&gt;</property>
                 <property name="use_markup">True</property>
@@ -87,6 +152,7 @@
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">False</property>
+            <property name="use_action_appearance">False</property>
             <property name="use_underline">True</property>
             <property name="active">True</property>
             <property name="draw_indicator">True</property>
@@ -98,62 +164,6 @@
             <property name="position">2</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/src/dialogs/cell-format.ui b/src/dialogs/cell-format.ui
index 75009fe..f4a3543 100644
--- a/src/dialogs/cell-format.ui
+++ b/src/dialogs/cell-format.ui
@@ -1,19 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="CellFormat">
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Format Cells</property>
     <property name="type_hint">dialog</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">6</property>
         <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
+          <object class="GtkButtonBox" id="hbuttonbox1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
@@ -97,19 +97,21 @@
             <property name="border_width">5</property>
             <property name="scrollable">True</property>
             <child>
-              <object class="GtkHBox" id="alignment_box">
+              <object class="GtkBox" id="alignment_box">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="spacing">24</property>
                 <child>
-                  <object class="GtkVBox" id="vbox12">
+                  <object class="GtkBox" id="vbox12">
                     <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
                     <property name="can_focus">False</property>
                     <property name="spacing">12</property>
                     <child>
-                      <object class="GtkVBox" id="vbox54">
+                      <object class="GtkBox" id="vbox54">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
@@ -127,7 +129,7 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkHBox" id="hbox41">
+                          <object class="GtkBox" id="hbox41">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <child>
@@ -355,8 +357,9 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkVBox" id="vbox55">
+                      <object class="GtkBox" id="vbox55">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
@@ -374,7 +377,7 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkHBox" id="hbox42">
+                          <object class="GtkBox" id="hbox42">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <child>
@@ -514,8 +517,9 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkVBox" id="vbox56">
+                      <object class="GtkBox" id="vbox56">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
@@ -533,7 +537,7 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkHBox" id="hbox43">
+                          <object class="GtkBox" id="hbox43">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <child>
@@ -549,8 +553,9 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkVBox" id="vbox38">
+                              <object class="GtkBox" id="vbox38">
                                 <property name="visible">True</property>
+                                <property name="orientation">vertical</property>
                                 <property name="can_focus">False</property>
                                 <property name="spacing">6</property>
                                 <child>
@@ -631,14 +636,16 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="font_box">
+              <object class="GtkBox" id="font_box">
                 <property name="visible">True</property>
+                <property name="orientation">vertical</property>
                 <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="spacing">18</property>
                 <child>
-                  <object class="GtkVBox" id="vbox58">
+                  <object class="GtkBox" id="vbox58">
                     <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
                     <property name="can_focus">False</property>
                     <property name="spacing">12</property>
                     <child>
@@ -656,7 +663,7 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHBox" id="hbox45">
+                      <object class="GtkBox" id="hbox45">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <child>
@@ -680,7 +687,7 @@
                             <property name="column_spacing">24</property>
                             <property name="row_spacing">6</property>
                             <child>
-                              <object class="GtkHBox" id="font_color_hbox">
+                              <object class="GtkBox" id="font_color_hbox">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="spacing">12</property>
@@ -698,7 +705,13 @@
                                     <property name="position">0</property>
                                   </packing>
                                 </child>
+                                <child>
+                                  <placeholder/>
+                                </child>
                               </object>
+                              <packing>
+                                <property name="y_options">GTK_EXPAND</property>
+                              </packing>
                             </child>
                             <child>
                               <object class="GtkCheckButton" id="strikethrough_button">
@@ -718,7 +731,7 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkHBox" id="hbox48">
+                              <object class="GtkBox" id="hbox48">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="spacing">24</property>
@@ -764,7 +777,7 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkHBox" id="underline-box">
+                              <object class="GtkBox" id="underline-box">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="spacing">12</property>
@@ -790,7 +803,7 @@
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
                                 <property name="x_options">GTK_FILL</property>
-                                <property name="y_options">GTK_FILL</property>
+                                <property name="y_options"></property>
                               </packing>
                             </child>
                           </object>
@@ -832,7 +845,7 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="border_box">
+              <object class="GtkBox" id="border_box">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="border_width">12</property>
@@ -843,18 +856,20 @@
                     <property name="can_focus">False</property>
                     <property name="xscale">0</property>
                     <child>
-                      <object class="GtkVBox" id="vbox4">
+                      <object class="GtkBox" id="vbox4">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <property name="can_focus">False</property>
                         <property name="spacing">6</property>
                         <child>
-                          <object class="GtkHBox" id="hbox32">
+                          <object class="GtkBox" id="hbox32">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="spacing">6</property>
                             <child>
-                              <object class="GtkVBox" id="vbox34">
+                              <object class="GtkBox" id="vbox34">
                                 <property name="visible">True</property>
+                                <property name="orientation">vertical</property>
                                 <property name="can_focus">False</property>
                                 <property name="spacing">4</property>
                                 <child>
@@ -921,8 +936,9 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkVBox" id="vbox36">
+                              <object class="GtkBox" id="vbox36">
                                 <property name="visible">True</property>
+                                <property name="orientation">vertical</property>
                                 <property name="can_focus">False</property>
                                 <property name="spacing">4</property>
                                 <child>
@@ -1008,8 +1024,9 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkVBox" id="vbox35">
+                              <object class="GtkBox" id="vbox35">
                                 <property name="visible">True</property>
+                                <property name="orientation">vertical</property>
                                 <property name="can_focus">False</property>
                                 <property name="spacing">4</property>
                                 <child>
@@ -1083,7 +1100,7 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkHBox" id="hbox30">
+                          <object class="GtkBox" id="hbox30">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="spacing">6</property>
@@ -1235,8 +1252,9 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkVBox" id="vbox59">
+                  <object class="GtkBox" id="vbox59">
                     <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
                     <property name="can_focus">False</property>
                     <property name="spacing">12</property>
                     <child>
@@ -1254,7 +1272,7 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHBox" id="hbox51">
+                      <object class="GtkBox" id="hbox51">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <child>
@@ -1270,13 +1288,15 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkVBox" id="vbox60">
+                          <object class="GtkBox" id="vbox60">
                             <property name="visible">True</property>
+                            <property name="orientation">vertical</property>
                             <property name="can_focus">False</property>
                             <property name="spacing">12</property>
                             <child>
-                              <object class="GtkVBox" id="vbox61">
+                              <object class="GtkBox" id="vbox61">
                                 <property name="visible">True</property>
+                                <property name="orientation">vertical</property>
                                 <property name="can_focus">False</property>
                                 <property name="spacing">6</property>
                                 <child>
@@ -1300,7 +1320,7 @@
                                     <property name="label_xalign">0</property>
                                     <property name="shadow_type">out</property>
                                     <child>
-                                      <object class="GtkHBox" id="hbox14">
+                                      <object class="GtkBox" id="hbox14">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                         <child>
@@ -1584,7 +1604,7 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkHBox" id="border_color_hbox">
+                              <object class="GtkBox" id="border_color_hbox">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="spacing">12</property>
@@ -1648,19 +1668,21 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="background_box">
+              <object class="GtkBox" id="background_box">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="spacing">24</property>
                 <child>
-                  <object class="GtkVBox" id="vbox25">
+                  <object class="GtkBox" id="vbox25">
                     <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
                     <property name="can_focus">False</property>
                     <property name="spacing">18</property>
                     <child>
-                      <object class="GtkVBox" id="vbox65">
+                      <object class="GtkBox" id="vbox65">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
@@ -1678,7 +1700,7 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkHBox" id="hbox55">
+                          <object class="GtkBox" id="hbox55">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <child>
@@ -1694,7 +1716,7 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkHBox" id="back_color_hbox">
+                              <object class="GtkBox" id="back_color_hbox">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="spacing">12</property>
@@ -1734,8 +1756,9 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkVBox" id="vbox66">
+                      <object class="GtkBox" id="vbox66">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
@@ -1753,7 +1776,7 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkHBox" id="hbox56">
+                          <object class="GtkBox" id="hbox56">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <child>
@@ -1769,12 +1792,13 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkVBox" id="vbox67">
+                              <object class="GtkBox" id="vbox67">
                                 <property name="visible">True</property>
+                                <property name="orientation">vertical</property>
                                 <property name="can_focus">False</property>
                                 <property name="spacing">6</property>
                                 <child>
-                                  <object class="GtkHBox" id="pattern_color_hbox">
+                                  <object class="GtkBox" id="pattern_color_hbox">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="spacing">12</property>
@@ -1800,8 +1824,9 @@
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkVBox" id="vbox62">
+                                  <object class="GtkBox" id="vbox62">
                                     <property name="visible">True</property>
+                                    <property name="orientation">vertical</property>
                                     <property name="can_focus">False</property>
                                     <property name="spacing">6</property>
                                     <child>
@@ -2360,8 +2385,9 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkVBox" id="vbox68">
+                  <object class="GtkBox" id="vbox68">
                     <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
                     <property name="can_focus">False</property>
                     <property name="spacing">12</property>
                     <child>
@@ -2379,7 +2405,7 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHBox" id="hbox57">
+                      <object class="GtkBox" id="hbox57">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <child>
@@ -2444,8 +2470,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="protection_box">
+              <object class="GtkBox" id="protection_box">
                 <property name="visible">True</property>
+                <property name="orientation">vertical</property>
                 <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="spacing">6</property>
@@ -2531,14 +2558,16 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="validation_box">
+              <object class="GtkBox" id="validation_box">
                 <property name="visible">True</property>
+                <property name="orientation">vertical</property>
                 <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="spacing">12</property>
                 <child>
-                  <object class="GtkVBox" id="vbox63">
+                  <object class="GtkBox" id="vbox63">
                     <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
                     <property name="can_focus">False</property>
                     <property name="spacing">12</property>
                     <child>
@@ -2556,7 +2585,7 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHBox" id="hbox52">
+                      <object class="GtkBox" id="hbox52">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <child>
@@ -2612,7 +2641,7 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkHBox" id="hbox40">
+                              <object class="GtkBox" id="hbox40">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="spacing">12</property>
@@ -2752,8 +2781,9 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkVBox" id="vbox64">
+                  <object class="GtkBox" id="vbox64">
                     <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
                     <property name="can_focus">False</property>
                     <property name="spacing">12</property>
                     <child>
@@ -2771,7 +2801,7 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHBox" id="hbox53">
+                      <object class="GtkBox" id="hbox53">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <child>
@@ -2795,7 +2825,7 @@
                             <property name="column_spacing">12</property>
                             <property name="row_spacing">6</property>
                             <child>
-                              <object class="GtkHBox" id="hbox38">
+                              <object class="GtkBox" id="hbox38">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="spacing">4</property>
@@ -2803,8 +2833,6 @@
                                   <object class="GtkScrolledWindow" id="scrolledwindow14">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="hscrollbar_policy">automatic</property>
-                                    <property name="vscrollbar_policy">automatic</property>
                                     <property name="shadow_type">in</property>
                                     <child>
                                       <object class="GtkTextView" id="validation_error_msg">
@@ -2959,8 +2987,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="input_msg_box">
+              <object class="GtkBox" id="input_msg_box">
                 <property name="visible">True</property>
+                <property name="orientation">vertical</property>
                 <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="spacing">6</property>
@@ -3022,8 +3051,6 @@
                       <object class="GtkScrolledWindow" id="scrolledwindow15">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="hscrollbar_policy">automatic</property>
-                        <property name="vscrollbar_policy">automatic</property>
                         <property name="shadow_type">in</property>
                         <child>
                           <object class="GtkTextView" id="input_msg_msg">
@@ -3082,6 +3109,164 @@
                 <property name="tab_fill">False</property>
               </packing>
             </child>
+<<<<<<< HEAD
+=======
+            <child>
+              <object class="GtkTable" id="table8">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">12</property>
+                <property name="n_rows">3</property>
+                <child>
+                  <object class="GtkLabel" id="conditions_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="xpad">5</property>
+                    <property name="ypad">5</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="y_options">GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="shadow_type">in</property>
+                    <child>
+                      <object class="GtkTreeView" id="conditions_treeview">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="border_width">5</property>
+                        <property name="headers_visible">False</property>
+                        <property name="headers_clickable">False</property>
+                        <property name="enable_search">False</property>
+                        <property name="level_indentation">5</property>
+                        <child internal-child="selection">
+                          <object class="GtkTreeSelection" id="treeview-selection1"/>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkBox" id="hbox1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkButtonBox" id="hbuttonbox2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="layout_style">start</property>
+                        <child>
+                          <object class="GtkButton" id="conditions_add">
+                            <property name="label">gtk-add</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="use_stock">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="conditions_remove">
+                            <property name="label">gtk-remove</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="use_stock">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="conditions_clear">
+                            <property name="label">gtk-clear</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="use_stock">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="conditions_expand">
+                            <property name="label" translatable="yes">E_xpand</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="conditions_edit">
+                            <property name="label">gtk-edit</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="use_stock">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</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>
+                  </object>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="y_options">GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">7</property>
+              </packing>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="condition_tab_label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Conditions</property>
+              </object>
+              <packing>
+                <property name="position">7</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+>>>>>>> eradicate Gtk[H,V]*
           </object>
           <packing>
             <property name="expand">True</property>
diff --git a/src/dialogs/cell-sort.ui b/src/dialogs/cell-sort.ui
index d5cb62d..8359c95 100644
--- a/src/dialogs/cell-sort.ui
+++ b/src/dialogs/cell-sort.ui
@@ -1,20 +1,84 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="CellSort">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Sort...</property>
     <property name="window_position">mouse</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox2">
+      <object class="GtkBox" id="dialog-vbox2">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">6</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkTable" id="cell_sort_table">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="border_width">5</property>
             <property name="n_rows">2</property>
             <property name="n_columns">2</property>
@@ -23,6 +87,7 @@
             <child>
               <object class="GtkTable" id="cell_sort_options_table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="n_rows">6</property>
                 <property name="n_columns">3</property>
                 <property name="column_spacing">12</property>
@@ -30,6 +95,7 @@
                 <child>
                   <object class="GtkLabel" id="var1-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="ypad">5</property>
                     <property name="label" translatable="yes">Range:</property>
@@ -48,6 +114,7 @@
                 <child>
                   <object class="GtkLabel" id="label4">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Direction:</property>
                     <accessibility>
@@ -66,6 +133,7 @@
                 <child>
                   <object class="GtkLabel" id="label7">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">&lt;span weight="bold"&gt;Sort Options&lt;/span&gt;</property>
                     <property name="use_markup">True</property>
@@ -83,6 +151,7 @@
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="tooltip_text" translatable="yes">The first row or column of the range is excluded from sorting and assumed to contain column or row headers.</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -98,6 +167,7 @@
                 <child>
                   <object class="GtkLabel" id="label8">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                   </object>
                   <packing>
@@ -114,6 +184,7 @@
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="tooltip_text" translatable="yes">When this checkbox is checked, cell formatting such as borders, hyperlinks, fore and background colors will remain in the original location. Uncheck this checkbox to have these formats move with the content. </property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -127,8 +198,9 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="hbox2">
+                  <object class="GtkBox" id="hbox2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="spacing">12</property>
                     <child>
                       <object class="GtkRadioButton" id="cell_sort_row_rb">
@@ -137,6 +209,7 @@
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">Sort columns by the specified rows</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <accessibility>
@@ -144,6 +217,8 @@
                         </accessibility>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
@@ -154,6 +229,7 @@
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">Sort rows by the specified columns</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -163,6 +239,8 @@
                         </accessibility>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
@@ -178,6 +256,7 @@
                 <child>
                   <object class="GtkLabel" id="label9">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Locale:</property>
                     <property name="use_underline">True</property>
@@ -210,6 +289,7 @@
             <child>
               <object class="GtkTable" id="cell_sort_spec_table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="n_rows">3</property>
                 <property name="n_columns">3</property>
                 <property name="column_spacing">6</property>
@@ -217,6 +297,7 @@
                 <child>
                   <object class="GtkLabel" id="label5">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">&lt;span weight="bold"&gt;Sort Specification&lt;/span&gt;</property>
                     <property name="use_markup">True</property>
@@ -228,8 +309,10 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkVButtonBox" id="vbuttonbox1">
+                  <object class="GtkButtonBox" id="vbuttonbox1">
                     <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
+                    <property name="can_focus">False</property>
                     <property name="spacing">6</property>
                     <property name="layout_style">start</property>
                     <child>
@@ -239,6 +322,7 @@
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">Move selected field up in the sort order</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_stock">True</property>
                       </object>
                       <packing>
@@ -254,6 +338,7 @@
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">Move the selected field down in the sort order</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_stock">True</property>
                       </object>
                       <packing>
@@ -270,6 +355,7 @@
                         <property name="can_default">True</property>
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">Clear all fields from the sort specification</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_stock">True</property>
                       </object>
                       <packing>
@@ -285,6 +371,7 @@
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">Remove the selected field from the sort specification</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_stock">True</property>
                       </object>
                       <packing>
@@ -309,8 +396,6 @@
                     <property name="height_request">200</property>
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="hscrollbar_policy">automatic</property>
-                    <property name="vscrollbar_policy">automatic</property>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
@@ -323,6 +408,7 @@
                   <object class="GtkLabel" id="label6">
                     <property name="width_request">6</property>
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                   </object>
                   <packing>
@@ -339,6 +425,7 @@
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="tooltip_text" translatable="yes">Adds any fields in the range box to the left to the sort criteria or allows selection of fields from a menu.</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_stock">True</property>
                   </object>
                   <packing>
@@ -362,64 +449,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area2">
-            <property name="visible">True</property>
-            <property name="layout_style">end</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="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/chi-squared.ui b/src/dialogs/chi-squared.ui
index 41c1769..f3f5057 100644
--- a/src/dialogs/chi-squared.ui
+++ b/src/dialogs/chi-squared.ui
@@ -1,23 +1,79 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="value">0.050000000000000003</property>
-    <property name="upper">1</property>
-    <property name="step_increment">0.01</property>
-    <property name="page_increment">10</property>
-  </object>
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Chi-Squared Tests">
+    <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Contingency Table Analysis</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
@@ -26,6 +82,7 @@
             <child>
               <object class="GtkTable" id="input-table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">5</property>
                 <property name="n_columns">2</property>
@@ -34,6 +91,7 @@
                 <child>
                   <object class="GtkLabel" id="var1-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">_Contingency Table:</property>
                     <property name="use_underline">True</property>
@@ -47,6 +105,7 @@
                 <child>
                   <object class="GtkLabel" id="label2">
                     <property name="sensitive">False</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Grouped by:</property>
                     <property name="justify">center</property>
@@ -67,6 +126,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -78,14 +138,15 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="vbox2">
+                  <object class="GtkBox" id="vbox2">
                     <property name="sensitive">False</property>
-                    <property name="orientation">vertical</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <object class="GtkRadioButton" id="grouped_by_col">
                         <property name="label" translatable="yes">_Columns</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -114,6 +175,7 @@
                     <property name="sensitive">False</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">grouped_by_col</property>
@@ -133,6 +195,7 @@
                     <property name="sensitive">False</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">grouped_by_col</property>
@@ -163,6 +226,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Input</property>
               </object>
               <packing>
@@ -170,12 +234,14 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox3">
+              <object class="GtkBox" id="vbox3">
                 <property name="visible">True</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkTable" id="table2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <property name="n_rows">4</property>
                     <property name="n_columns">2</property>
@@ -184,6 +250,7 @@
                     <child>
                       <object class="GtkLabel" id="label3">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">_Alpha:</property>
                         <property name="use_underline">True</property>
@@ -217,6 +284,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -234,6 +302,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -247,8 +316,9 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHSeparator" id="hseparator1">
+                      <object class="GtkSeparator" id="hseparator1">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                       </object>
                       <packing>
                         <property name="right_attach">2</property>
@@ -259,6 +329,8 @@
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
@@ -270,6 +342,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label6">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Options</property>
               </object>
               <packing>
@@ -278,8 +351,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -291,6 +365,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label7">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Output</property>
               </object>
               <packing>
@@ -300,12 +375,15 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkLabel" id="warnings">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="use_markup">True</property>
             <property name="wrap">True</property>
           </object>
@@ -315,63 +393,6 @@
             <property name="position">2</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
@@ -380,4 +401,10 @@
       <action-widget response="0">okbutton</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">1</property>
+    <property name="value">0.050000000000000003</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
 </interface>
diff --git a/src/dialogs/col-width.ui b/src/dialogs/col-width.ui
index 552b053..6abdfdc 100644
--- a/src/dialogs/col-width.ui
+++ b/src/dialogs/col-width.ui
@@ -1,27 +1,105 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkAdjustment" id="adjustment1">
-    <property name="value">5</property>
     <property name="lower">5</property>
     <property name="upper">1000</property>
+    <property name="value">5</property>
     <property name="step_increment">1</property>
     <property name="page_increment">5</property>
   </object>
   <object class="GtkDialog" id="dialog">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Column Width</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">6</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-close</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkTable" id="main_table">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="border_width">8</property>
             <property name="n_rows">4</property>
             <property name="n_columns">3</property>
@@ -30,6 +108,7 @@
             <child>
               <object class="GtkLabel" id="pts-label">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="xpad">3</property>
                 <property name="label" translatable="yes">x</property>
@@ -46,6 +125,7 @@
             <child>
               <object class="GtkLabel" id="label1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">Column width in points:</property>
               </object>
@@ -62,6 +142,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
                 <property name="draw_indicator">True</property>
               </object>
@@ -93,6 +174,7 @@
             <child>
               <object class="GtkLabel" id="label">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">_Column width in pixels:</property>
                 <property name="use_underline">True</property>
@@ -107,6 +189,7 @@
             <child>
               <object class="GtkLabel" id="description">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="wrap">True</property>
               </object>
               <packing>
@@ -129,78 +212,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="apply_button">
-                <property name="label">gtk-apply</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-close</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/colrow.ui b/src/dialogs/colrow.ui
index 1ccd221..38d830a 100644
--- a/src/dialogs/colrow.ui
+++ b/src/dialogs/colrow.ui
@@ -1,27 +1,29 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="dialog">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Group/Ungroup</property>
     <property name="type_hint">dialog</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
-        <child>
-          <object class="GtkVBox" id="vbox1">
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
-            <property name="orientation">vertical</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
             <child>
-              <object class="GtkRadioButton" id="cols">
-                <property name="label" translatable="yes">_Columns</property>
+              <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">False</property>
-                <property name="use_underline">True</property>
-                <property name="draw_indicator">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -30,15 +32,14 @@
               </packing>
             </child>
             <child>
-              <object class="GtkRadioButton" id="rows">
-                <property name="label" translatable="yes">_Rows</property>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="can_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-                <property name="active">True</property>
-                <property name="draw_indicator">True</property>
-                <property name="group">cols</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -46,65 +47,75 @@
                 <property name="position">1</property>
               </packing>
             </child>
-          </object>
-          <packing>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
             <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
-                <property name="position">0</property>
+                <property name="position">2</property>
               </packing>
             </child>
+          </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>
+        <child>
+          <object class="GtkBox" id="vbox1">
+            <property name="visible">True</property>
+            <property name="orientation">vertical</property>
+            <property name="can_focus">False</property>
             <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
+              <object class="GtkRadioButton" id="cols">
+                <property name="label" translatable="yes">_Columns</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="can_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_underline">True</property>
+                <property name="draw_indicator">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
-                <property name="position">1</property>
+                <property name="position">0</property>
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
+              <object class="GtkRadioButton" id="rows">
+                <property name="label" translatable="yes">_Rows</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_underline">True</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">cols</property>
               </object>
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
-                <property name="position">2</property>
+                <property name="position">1</property>
               </packing>
             </child>
           </object>
           <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/consolidate.ui b/src/dialogs/consolidate.ui
index aed63db..5851cad 100644
--- a/src/dialogs/consolidate.ui
+++ b/src/dialogs/consolidate.ui
@@ -1,74 +1,101 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkListStore" id="model1">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes">SUM</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">MIN</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">MAX</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">AVERAGE</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">COUNT</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">PRODUCT</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">STDEV</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">STDEVP</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">VAR</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">VARP</col>
-      </row>
-    </data>
-  </object>
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Consolidate">
+    <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Data Consolidation</property>
     <property name="window_position">mouse</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="border_width">5</property>
             <child>
-              <object class="GtkVBox" id="vbox1">
+              <object class="GtkBox" id="vbox1">
                 <property name="visible">True</property>
-                <property name="border_width">12</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">12</property>
                 <property name="spacing">6</property>
                 <child>
-                  <object class="GtkHBox" id="hbox1">
+                  <object class="GtkBox" id="hbox1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="spacing">12</property>
                     <child>
                       <object class="GtkLabel" id="label1">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">_Function:</property>
                         <property name="use_underline">True</property>
@@ -84,6 +111,7 @@
                     <child>
                       <object class="GtkComboBox" id="function">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="tooltip_text" translatable="yes">The function to use when consolidating</property>
                         <property name="model">model1</property>
                         <child>
@@ -102,12 +130,14 @@
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">_Source areas:</property>
                     <property name="use_underline">True</property>
@@ -124,8 +154,6 @@
                   <object class="GtkScrolledWindow" id="scrolledwindow1">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="hscrollbar_policy">automatic</property>
-                    <property name="vscrollbar_policy">automatic</property>
                     <property name="shadow_type">in</property>
                     <child>
                       <object class="GtkTreeView" id="source_treeview">
@@ -135,21 +163,28 @@
                         <property name="reorderable">True</property>
                         <property name="rules_hint">True</property>
                         <property name="enable_search">False</property>
+                        <child internal-child="selection">
+                          <object class="GtkTreeSelection" id="treeview-selection1"/>
+                        </child>
                       </object>
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">2</property>
                   </packing>
                 </child>
                 <child>
                   <object class="GtkAlignment" id="alignment1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">1</property>
                     <property name="xscale">0</property>
                     <child>
-                      <object class="GtkHBox" id="hbox2">
+                      <object class="GtkBox" id="hbox2">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
                           <object class="GtkButton" id="clear">
@@ -158,6 +193,7 @@
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
                             <property name="tooltip_text" translatable="yes">Clear the list of source areas</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_stock">True</property>
                           </object>
                           <packing>
@@ -173,6 +209,7 @@
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
                             <property name="tooltip_text" translatable="yes">Delete the currently selected source area</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_stock">True</property>
                           </object>
                           <packing>
@@ -186,6 +223,7 @@
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">3</property>
                   </packing>
                 </child>
@@ -196,6 +234,7 @@
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="tooltip_text" translatable="yes">The top row contains labels, these will not be consolidated, but used as key for comparison</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -212,6 +251,7 @@
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="tooltip_text" translatable="yes">The left column contains labels, these will not be consolidated, but used as key for comparison</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -227,6 +267,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -241,6 +282,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label3">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Input</property>
                 <property name="use_underline">True</property>
               </object>
@@ -249,8 +291,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -262,6 +305,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label4">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Output</property>
                 <property name="use_underline">True</property>
               </object>
@@ -272,64 +316,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
@@ -340,4 +329,42 @@
       <action-widget response="0">okbutton</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkListStore" id="model1">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">SUM</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">MIN</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">MAX</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">AVERAGE</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">COUNT</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">PRODUCT</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">STDEV</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">STDEVP</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">VAR</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">VARP</col>
+      </row>
+    </data>
+  </object>
 </interface>
diff --git a/src/dialogs/correlation.ui b/src/dialogs/correlation.ui
index 1a515d9..ff71ba4 100644
--- a/src/dialogs/correlation.ui
+++ b/src/dialogs/correlation.ui
@@ -1,16 +1,78 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Correlation">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Correlation</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook">
             <property name="visible">True</property>
@@ -18,6 +80,7 @@
             <child>
               <object class="GtkTable" id="input-table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">3</property>
                 <property name="n_columns">2</property>
@@ -26,6 +89,7 @@
                 <child>
                   <object class="GtkLabel" id="var1-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">_Input range:</property>
@@ -40,6 +104,7 @@
                 <child>
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Grouped by:</property>
@@ -58,6 +123,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -69,8 +135,9 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="vbox2">
+                  <object class="GtkBox" id="vbox2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="homogeneous">True</property>
                     <child>
                       <object class="GtkRadioButton" id="grouped_by_col">
@@ -78,6 +145,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -94,6 +162,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">grouped_by_col</property>
@@ -110,6 +179,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">grouped_by_col</property>
@@ -140,6 +210,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label4">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Input</property>
               </object>
               <packing>
@@ -147,8 +218,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -160,6 +232,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label6">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Output</property>
               </object>
               <packing>
@@ -169,12 +242,15 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkLabel" id="warnings">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="wrap">True</property>
           </object>
           <packing>
@@ -183,63 +259,6 @@
             <property name="position">2</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/src/dialogs/covariance.ui b/src/dialogs/covariance.ui
index 3ceb9c3..2862261 100644
--- a/src/dialogs/covariance.ui
+++ b/src/dialogs/covariance.ui
@@ -1,16 +1,78 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Covariance">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Covariance</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
@@ -18,6 +80,7 @@
             <child>
               <object class="GtkTable" id="input-table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">3</property>
                 <property name="n_columns">2</property>
@@ -26,6 +89,7 @@
                 <child>
                   <object class="GtkLabel" id="var1-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">_Input range:</property>
@@ -40,6 +104,7 @@
                 <child>
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Grouped by:</property>
@@ -58,6 +123,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -69,8 +135,9 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="vbox2">
+                  <object class="GtkBox" id="vbox2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="homogeneous">True</property>
                     <child>
                       <object class="GtkRadioButton" id="grouped_by_col">
@@ -78,6 +145,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -94,6 +162,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">grouped_by_col</property>
@@ -110,6 +179,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">grouped_by_col</property>
@@ -140,6 +210,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label4">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Input</property>
               </object>
               <packing>
@@ -147,8 +218,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -160,6 +232,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Output</property>
               </object>
               <packing>
@@ -169,12 +242,15 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkLabel" id="warnings">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="wrap">True</property>
           </object>
           <packing>
@@ -183,63 +259,6 @@
             <property name="position">2</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/src/dialogs/dao.ui b/src/dialogs/dao.ui
index 0030994..ff5bbf5 100644
--- a/src/dialogs/dao.ui
+++ b/src/dialogs/dao.ui
@@ -1,29 +1,17 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkListStore" id="model1">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes">Values</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">FormulÃ</col>
-      </row>
-    </data>
-  </object>
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkWindow" id="gnm_dao">
+    <property name="can_focus">False</property>
     <child>
-      <object class="GtkVBox" id="dao_box">
+      <object class="GtkBox" id="dao_box">
         <property name="visible">True</property>
         <property name="orientation">vertical</property>
+        <property name="can_focus">False</property>
         <child>
           <object class="GtkTable" id="output-table">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="border_width">7</property>
             <property name="n_rows">11</property>
             <property name="n_columns">3</property>
@@ -35,6 +23,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
                 <property name="active">True</property>
                 <property name="draw_indicator">True</property>
@@ -54,6 +43,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
                 <property name="draw_indicator">True</property>
                 <property name="group">newsheet-button</property>
@@ -73,6 +63,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
                 <property name="draw_indicator">True</property>
                 <property name="group">newsheet-button</property>
@@ -92,6 +83,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
                 <property name="active">True</property>
                 <property name="draw_indicator">True</property>
@@ -111,6 +103,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
                 <property name="active">True</property>
                 <property name="draw_indicator">True</property>
@@ -130,6 +123,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
                 <property name="draw_indicator">True</property>
               </object>
@@ -148,6 +142,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
                 <property name="draw_indicator">True</property>
               </object>
@@ -163,6 +158,7 @@
             <child>
               <object class="GtkComboBox" id="put_menu">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="model">model1</property>
                 <child>
                   <object class="GtkCellRendererText" id="renderer1"/>
@@ -183,6 +179,7 @@
             <child>
               <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">_Enter into cells:</property>
                 <property name="use_underline">True</property>
@@ -204,6 +201,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
                 <property name="draw_indicator">True</property>
                 <property name="group">newsheet-button</property>
@@ -220,6 +218,7 @@
             <child>
               <object class="GtkLabel" id="label7">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">&lt;b&gt;Output Placement&lt;/b&gt;</property>
                 <property name="use_markup">True</property>
@@ -233,6 +232,7 @@
             <child>
               <object class="GtkLabel" id="label6">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">&lt;b&gt;Output Formatting&lt;/b&gt;</property>
                 <property name="use_markup">True</property>
@@ -286,10 +286,26 @@
             </child>
           </object>
           <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
             <property name="position">0</property>
           </packing>
         </child>
       </object>
     </child>
   </object>
+  <object class="GtkListStore" id="model1">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Values</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">FormulÃ</col>
+      </row>
+    </data>
+  </object>
 </interface>
diff --git a/src/dialogs/data-slicer.ui b/src/dialogs/data-slicer.ui
index 320f37a..dfb045d 100644
--- a/src/dialogs/data-slicer.ui
+++ b/src/dialogs/data-slicer.ui
@@ -1,27 +1,90 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="dialog_data_slicer">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">DataSlicer Guru : Gnumeric</property>
     <property name="window_position">mouse</property>
     <property name="default_height">500</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">6</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <child>
-              <object class="GtkVBox" id="source_vbox">
+              <object class="GtkBox" id="source_vbox">
                 <property name="visible">True</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -30,6 +93,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Source</property>
               </object>
               <packing>
@@ -37,9 +101,10 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="format-box">
+              <object class="GtkBox" id="format-box">
                 <property name="visible">True</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -47,18 +112,21 @@
                   <object class="GtkScrolledWindow" id="scrolledwindow1">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="hscrollbar_policy">automatic</property>
-                    <property name="vscrollbar_policy">automatic</property>
                     <child>
                       <object class="GtkTreeView" id="field_tree">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="headers_visible">False</property>
                         <property name="reorderable">True</property>
+                        <child internal-child="selection">
+                          <object class="GtkTreeSelection" id="treeview-selection1"/>
+                        </child>
                       </object>
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="padding">5</property>
                     <property name="pack_type">end</property>
                     <property name="position">1</property>
@@ -72,6 +140,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Format</property>
               </object>
               <packing>
@@ -81,64 +150,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/data-table.ui b/src/dialogs/data-table.ui
index 1820ce4..788f920 100644
--- a/src/dialogs/data-table.ui
+++ b/src/dialogs/data-table.ui
@@ -1,64 +1,20 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="DataTable">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Data Table</property>
     <property name="window_position">mouse</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
-        <child>
-          <object class="GtkTable" id="table">
-            <property name="visible">True</property>
-            <property name="border_width">12</property>
-            <property name="n_rows">2</property>
-            <property name="n_columns">2</property>
-            <property name="column_spacing">12</property>
-            <property name="row_spacing">12</property>
-            <child>
-              <object class="GtkLabel" id="row-label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">_Row Input :</property>
-                <property name="use_underline">True</property>
-              </object>
-              <packing>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="col-label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Co_lumn Input :</property>
-                <property name="use_underline">True</property>
-              </object>
-              <packing>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-          </object>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
         <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
+          <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="help">
@@ -67,6 +23,7 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
@@ -82,6 +39,7 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
@@ -97,6 +55,7 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
@@ -108,10 +67,61 @@
           </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>
+        <child>
+          <object class="GtkTable" id="table">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="border_width">12</property>
+            <property name="n_rows">2</property>
+            <property name="n_columns">2</property>
+            <property name="column_spacing">12</property>
+            <property name="row_spacing">12</property>
+            <child>
+              <object class="GtkLabel" id="row-label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">_Row Input :</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="col-label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Co_lumn Input :</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/src/dialogs/define-name.ui b/src/dialogs/define-name.ui
index ee8032f..456e1f4 100644
--- a/src/dialogs/define-name.ui
+++ b/src/dialogs/define-name.ui
@@ -1,25 +1,84 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="NameGuru">
+    <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Define Names</property>
     <property name="default_width">475</property>
     <property name="default_height">300</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</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="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="paste_button">
+                <property name="label">gtk-paste</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">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">automatic</property>
-            <property name="vscrollbar_policy">automatic</property>
             <property name="shadow_type">in</property>
             <child>
               <object class="GtkTreeView" id="name_list">
@@ -27,20 +86,27 @@
                 <property name="can_focus">True</property>
                 <property name="headers_visible">False</property>
                 <property name="reorderable">True</property>
+                <child internal-child="selection">
+                  <object class="GtkTreeSelection" id="treeview-selection1"/>
+                </child>
               </object>
             </child>
           </object>
           <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
             <property name="padding">5</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
-          <object class="GtkHBox" id="hbox1">
+          <object class="GtkBox" id="hbox1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <child>
               <object class="GtkImage" id="image1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xpad">2</property>
                 <property name="ypad">2</property>
                 <property name="stock">gtk-find</property>
@@ -48,6 +114,7 @@
               </object>
               <packing>
                 <property name="expand">False</property>
+                <property name="fill">True</property>
                 <property name="position">0</property>
               </packing>
             </child>
@@ -55,84 +122,32 @@
               <object class="GtkEntry" id="search_entry">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="invisible_char">&#x25CF;</property>
+                <property name="invisible_char">â</property>
               </object>
               <packing>
+                <property name="expand">True</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">2</property>
           </packing>
         </child>
         <child>
-          <object class="GtkHSeparator" id="hseparator1">
+          <object class="GtkSeparator" id="hseparator1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
           </object>
           <packing>
             <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">3</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</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="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</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="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="paste_button">
-                <property name="label">gtk-paste</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/src/dialogs/delete-cells.ui b/src/dialogs/delete-cells.ui
index 32076b7..bed199c 100644
--- a/src/dialogs/delete-cells.ui
+++ b/src/dialogs/delete-cells.ui
@@ -1,25 +1,89 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Delete_cells">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Delete cells</property>
     <property name="modal">True</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkAlignment" id="alignment1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="xscale">0</property>
             <child>
               <object class="GtkTable" id="table1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">6</property>
                 <property name="n_rows">5</property>
                 <property name="n_columns">2</property>
@@ -32,6 +96,7 @@
                     <property name="can_focus">True</property>
                     <property name="has_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -50,6 +115,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">radio_0</property>
@@ -69,6 +135,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">radio_0</property>
@@ -88,6 +155,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">radio_0</property>
@@ -104,6 +172,7 @@
                 <child>
                   <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">&lt;span weight="bold"&gt;Delete Method&lt;/span&gt;</property>
                     <property name="use_markup">True</property>
@@ -117,6 +186,7 @@
                 <child>
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                   </object>
                   <packing>
@@ -130,64 +200,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/descriptive-stats.ui b/src/dialogs/descriptive-stats.ui
index 167223f..fe1e94d 100644
--- a/src/dialogs/descriptive-stats.ui
+++ b/src/dialogs/descriptive-stats.ui
@@ -1,23 +1,79 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="value">0.050000000000000003</property>
-    <property name="upper">1</property>
-    <property name="step_increment">0.01</property>
-    <property name="page_increment">10</property>
-  </object>
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="DescStats">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Descriptive Statistics</property>
     <property name="destroy_with_parent">True</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
@@ -25,6 +81,7 @@
             <child>
               <object class="GtkTable" id="input-table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">3</property>
                 <property name="n_columns">2</property>
@@ -33,6 +90,7 @@
                 <child>
                   <object class="GtkLabel" id="var1-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">_Input range:</property>
@@ -47,6 +105,7 @@
                 <child>
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Grouped by:</property>
@@ -65,6 +124,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -76,8 +136,9 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="vbox2">
+                  <object class="GtkBox" id="vbox2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="homogeneous">True</property>
                     <child>
                       <object class="GtkRadioButton" id="grouped_by_col">
@@ -85,6 +146,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -101,6 +163,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">grouped_by_col</property>
@@ -117,6 +180,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">grouped_by_col</property>
@@ -147,6 +211,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label7">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Input</property>
               </object>
               <packing>
@@ -156,6 +221,7 @@
             <child>
               <object class="GtkTable" id="table2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">8</property>
                 <property name="n_columns">3</property>
@@ -192,6 +258,7 @@
                 <child>
                   <object class="GtkLabel" id="label3">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">1</property>
                     <property name="label" translatable="yes">(1 - _alpha):</property>
                     <property name="use_underline">True</property>
@@ -210,6 +277,7 @@
                 <child>
                   <object class="GtkLabel" id="label4">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">1</property>
                     <property name="label" translatable="yes">_K:</property>
                     <property name="use_underline">True</property>
@@ -228,6 +296,7 @@
                 <child>
                   <object class="GtkLabel" id="label5">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">1</property>
                     <property name="label" translatable="yes">_K:</property>
                     <property name="use_underline">True</property>
@@ -249,6 +318,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
@@ -265,6 +335,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -282,6 +353,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -299,6 +371,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -334,6 +407,7 @@
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="tooltip_text" translatable="yes">Use the ssmedian function with interval width 1 rather than the traditional median function.  </property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -369,6 +443,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label8">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Statistics</property>
               </object>
               <packing>
@@ -377,8 +452,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -390,6 +466,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label9">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Output</property>
               </object>
               <packing>
@@ -399,76 +476,23 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkLabel" id="warnings">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="wrap">True</property>
           </object>
           <packing>
             <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">2</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
@@ -477,4 +501,10 @@
       <action-widget response="0">okbutton</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">1</property>
+    <property name="value">0.050000000000000003</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
 </interface>
diff --git a/src/dialogs/dialog-about.c b/src/dialogs/dialog-about.c
index 998df9b..6eaa271 100644
--- a/src/dialogs/dialog-about.c
+++ b/src/dialogs/dialog-about.c
@@ -194,10 +194,10 @@ struct AboutState_ {
 
 /* ---------------------------------------- */
 
-static GdkColor
-blend_colors (const GdkColor *start, const GdkColor *end, double f)
+static GdkRGBA
+blend_colors (const GdkRGBA *start, const GdkRGBA *end, double f)
 {
-	GdkColor res;
+	GdkRGBA res;
 	res.red   = start->red   * (1 - f) + end->red   * f;
 	res.green = start->green * (1 - f) + end->green * f;
 	res.blue  = start->blue  * (1 - f) + end->blue  * f;
@@ -208,12 +208,16 @@ blend_colors (const GdkColor *start, const GdkColor *end, double f)
 static void
 set_fade (AboutRenderer *r, AboutState *state, double f)
 {
-	GtkStyle *style = gtk_widget_get_style (state->anim_area);
+	GtkStyleContext *ctxt = gtk_widget_get_style_context (state->anim_area);
 	PangoAttrList *attrlist = pango_layout_get_attributes (r->layout);
-	GdkColor col = blend_colors (style->bg + GTK_STATE_NORMAL,
-				     style->fg + GTK_STATE_NORMAL, f);
-	PangoAttribute *attr = pango_attr_foreground_new
-		(col.red, col.green, col.blue);
+	GdkRGBA col, bg, fg;
+	PangoAttribute *attr;
+
+	gtk_style_context_get_color (ctxt, GTK_STATE_NORMAL, &fg);
+	gtk_style_context_get_background_color (ctxt, GTK_STATE_NORMAL, &fg);
+	blend_colors (&bg, &fg, f);
+	attr = pango_attr_foreground_new
+		(col.red * 65535., col.green * 65535., col.blue * 65535.);
 	pango_attr_list_change (attrlist, attr);
 	pango_layout_set_attributes (r->layout, attrlist);
 }
@@ -234,11 +238,12 @@ text_item_renderer (AboutRenderer *r, AboutState *state)
 	double rage = CLAMP (age / (double)r->duration, 0.0, 1.0);
 	GtkWidget *widget = state->anim_area;
 	GdkWindow *window = gtk_widget_get_window (widget);
-	GtkStyle *style;
+	GtkStyleContext *ctxt;
 	const int fade = 500;
 	int x, y, width, height;
 	cairo_t *cr;
 	GtkAllocation wa;
+	GdkRGBA color;
 
 	if (age >= r->duration)
 		return FALSE;
@@ -248,7 +253,7 @@ text_item_renderer (AboutRenderer *r, AboutState *state)
 	else if (r->fade_out && r->duration - age < fade)
 		set_fade (r, state, (r->duration - age) / (double)fade);
 
-	style = gtk_widget_get_style (widget);
+	ctxt = gtk_widget_get_style_context (widget);
 
 	gtk_widget_get_allocation (widget, &wa);
 	x = (int)(PANGO_SCALE * wa.width *
@@ -288,7 +293,8 @@ text_item_renderer (AboutRenderer *r, AboutState *state)
 	y -= height / 2;
 
 	cr = gdk_cairo_create (window);
-	gdk_cairo_set_source_color (cr, &style->text[GTK_STATE_NORMAL]);
+	gtk_style_context_get_color (ctxt, GTK_STATE_NORMAL, &color);
+	gdk_cairo_set_source_rgba (cr, &color);
 	cairo_move_to (cr, x / (double)PANGO_SCALE, y / (double)PANGO_SCALE);
 	pango_cairo_show_layout (cr, layout);
 	cairo_destroy (cr);
diff --git a/src/dialogs/dialog-autoformat.c b/src/dialogs/dialog-autoformat.c
index 740da4d..313c265 100644
--- a/src/dialogs/dialog-autoformat.c
+++ b/src/dialogs/dialog-autoformat.c
@@ -341,7 +341,7 @@ previews_load (AutoFormatState *state, int topindex)
 			goc_canvas_scroll_to (state->canvas[i],
 				-BORDER, -BORDER);
 
-			go_widget_set_tooltip_text
+			gtk_widget_set_tooltip_text
 				(GTK_WIDGET (state->canvas[i]),
 				 _(ft->name));
 
@@ -467,7 +467,7 @@ cb_category_changed (AutoFormatState *state)
 		if (NULL == tip)
 			tip = state->current_category_group->name;
 	}
-	go_widget_set_tooltip_text (GTK_WIDGET (state->category),
+	gtk_widget_set_tooltip_text (GTK_WIDGET (state->category),
 		(NULL != tip) ? _(tip) : "");
 	previews_load (state, 0);
 	cb_check_item_toggled (NULL, state);
diff --git a/src/dialogs/dialog-cell-format.c b/src/dialogs/dialog-cell-format.c
index 5f93f35..17a1867 100644
--- a/src/dialogs/dialog-cell-format.c
+++ b/src/dialogs/dialog-cell-format.c
@@ -2198,6 +2198,8 @@ fmt_dialog_impl (FormatState *state, FormatDialogPosition_t pageno)
 	gboolean has_back;
 	GOColor default_border_color;
 	int default_border_style = GNM_STYLE_BORDER_THIN;
+	GtkStyleContext *ctxt;
+	GdkRGBA bc;
 
 	GtkWidget *tmp, *dialog = go_gtk_builder_get_widget (state->gui, "CellFormat");
 	g_return_if_fail (dialog != NULL);
@@ -2226,7 +2228,9 @@ fmt_dialog_impl (FormatState *state, FormatDialogPosition_t pageno)
 	fmt_dialog_init_validation_page (state);
 	fmt_dialog_init_input_msg_page (state);
 
-	default_border_color = GO_COLOR_FROM_GDK (gtk_widget_get_style (GTK_WIDGET (state->dialog))->black);
+	ctxt = gtk_widget_get_style_context (GTK_WIDGET (state->dialog));
+	gtk_style_context_get_border_color (ctxt, GTK_STATE_NORMAL, &bc);
+	default_border_color = GO_COLOR_FROM_GDK_RGBA (bc);
 
 	if (pageno == FD_CURRENT)
 		pageno = fmt_dialog_page;
diff --git a/src/dialogs/dialog-cell-sort.c b/src/dialogs/dialog-cell-sort.c
index c95dcde..fa94faa 100644
--- a/src/dialogs/dialog-cell-sort.c
+++ b/src/dialogs/dialog-cell-sort.c
@@ -971,7 +971,7 @@ dialog_init (SortFlowState *state)
 			  0, 0);
 	gnumeric_editable_enters (GTK_WINDOW (state->dialog),
 				  GTK_WIDGET (state->range_entry));
-	gnm_expr_entry_set_update_policy (state->range_entry, GTK_UPDATE_DISCONTINUOUS);
+	gnm_expr_entry_set_update_policy (state->range_entry, GNM_UPDATE_DISCONTINUOUS);
 	gtk_widget_show (GTK_WIDGET (state->range_entry));
 	g_signal_connect_swapped (G_OBJECT (state->range_entry),
 				  "changed",
diff --git a/src/dialogs/dialog-formula-guru.c b/src/dialogs/dialog-formula-guru.c
index e1f7f9c..d5d9e92 100644
--- a/src/dialogs/dialog-formula-guru.c
+++ b/src/dialogs/dialog-formula-guru.c
@@ -823,7 +823,6 @@ cb_dialog_formula_guru_query_tooltip (GtkWidget  *widget,
 	if (gtk_tree_view_get_tooltip_context
 	    (state->treeview, &x_, &y_, keyboard_mode, NULL, &path, &iter)) {
 		char *markup;
-		GtkRcStyle *rc_style = gnumeric_create_tooltip_rc_style ();
 		GtkWidget *parent, *window;
 
 		gtk_tree_model_get (GTK_TREE_MODEL (state->model), &iter,
@@ -834,18 +833,17 @@ cb_dialog_formula_guru_query_tooltip (GtkWidget  *widget,
 			state->tooltip_label = gnumeric_create_tooltip_widget ();
 			state->tooltip_widget
 				= gtk_widget_get_toplevel (state->tooltip_label);
-			gtk_widget_modify_style /* Applying to label */
-				(state->tooltip_label, rc_style);
-			gtk_widget_modify_style /* Applying to widget */
-				(state->tooltip_widget, rc_style);
+#warning GTK3: are these two lines useful? gnumeric_create_tooltip_widget_should do it
+			gnumeric_tooltip_set_style (state->tooltip_label);
+			gnumeric_tooltip_set_style (state->tooltip_widget);
 			gtk_widget_show_all (state->tooltip_widget);
 			g_object_ref (G_OBJECT (state->tooltip_widget));
 			g_object_ref (G_OBJECT (state->tooltip_label));
 		}
 		gtk_tooltip_set_custom (tooltip, state->tooltip_widget);
 		window = gtk_widget_get_toplevel (state->tooltip_widget);
-		gtk_widget_modify_style /* Applying to window */
-			(window, rc_style);
+		/* Applying to window */
+		gnumeric_tooltip_set_style (window);
 		gtk_widget_set_name (window, "gnumeric-tooltip");
 		gtk_widget_set_app_paintable (window, FALSE);
 
diff --git a/src/dialogs/dialog-password.c b/src/dialogs/dialog-password.c
index 66f5619..fbe9c50 100644
--- a/src/dialogs/dialog-password.c
+++ b/src/dialogs/dialog-password.c
@@ -37,8 +37,7 @@ dialog_get_password (GtkWindow *parent, const char *filename)
 	gtk_label_set_selectable (GTK_LABEL (label), TRUE);
 
 	d = gtk_dialog_new_with_buttons ("", parent,
-					 GTK_DIALOG_DESTROY_WITH_PARENT |
-					 GTK_DIALOG_NO_SEPARATOR,
+					 GTK_DIALOG_DESTROY_WITH_PARENT,
 					 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
 					 GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
 					 NULL);
diff --git a/src/dialogs/dialog-preferences.c b/src/dialogs/dialog-preferences.c
index 2f2ead9..339767a 100644
--- a/src/dialogs/dialog-preferences.c
+++ b/src/dialogs/dialog-preferences.c
@@ -109,7 +109,7 @@ set_tip (GOConfNode *node, GtkWidget *w)
 {
 	char *desc = go_conf_get_long_desc (node, NULL);
 	if (desc != NULL) {
-		go_widget_set_tooltip_text (w, desc);
+		gtk_widget_set_tooltip_text (w, desc);
 		g_free (desc);
 	}
 }
diff --git a/src/dialogs/dialog-printer-setup.c b/src/dialogs/dialog-printer-setup.c
index c16ced5..4ca33df 100644
--- a/src/dialogs/dialog-printer-setup.c
+++ b/src/dialogs/dialog-printer-setup.c
@@ -450,7 +450,7 @@ margin_preview_page_available_size(PrinterSetupState *state,
 					NULL);
 
 		/* Determine the requisition size for the widget */
-		gtk_widget_size_request(GTK_WIDGET(child_widget), &requisition);
+		gtk_widget_get_preferred_size (GTK_WIDGET(child_widget), &requisition, NULL);
 
 		/* Find largest widget in each table column */
 		/* Exclude widgets that expand across more than one table cells */
@@ -2043,7 +2043,7 @@ create_hf_preview_canvas (PrinterSetupState *state, gboolean header)
 		goc_text_get_type (),
 		"x",		padding,
 		"y",		header ? margin : bottom_margin,
-		"anchor",	header ? GTK_ANCHOR_NORTH_WEST : GTK_ANCHOR_SOUTH_WEST,
+		"anchor",	header ? GO_ANCHOR_NORTH_WEST : GO_ANCHOR_SOUTH_WEST,
 		"text",		"Left",
 		NULL);
 	gostyle = go_styled_object_get_style (GO_STYLED_OBJECT (pi->left));
@@ -2054,7 +2054,7 @@ create_hf_preview_canvas (PrinterSetupState *state, gboolean header)
 		goc_text_get_type (),
 		"x",		width / 2,
 		"y",		header ? margin : bottom_margin,
-		"anchor",	header ? GTK_ANCHOR_NORTH : GTK_ANCHOR_SOUTH,
+		"anchor",	header ? GO_ANCHOR_NORTH : GO_ANCHOR_SOUTH,
 		"text",		"Center",
 		NULL);
 	gostyle = go_styled_object_get_style (GO_STYLED_OBJECT (pi->left));
@@ -2065,7 +2065,7 @@ create_hf_preview_canvas (PrinterSetupState *state, gboolean header)
 		goc_text_get_type (),
 		"x",		width - padding,
 		"y",		header ? margin : bottom_margin,
-		"anchor",	header ? GTK_ANCHOR_NORTH_EAST : GTK_ANCHOR_SOUTH_EAST,
+		"anchor",	header ? GO_ANCHOR_NORTH_EAST : GO_ANCHOR_SOUTH_EAST,
 		"text",		"Right",
 		NULL);
 	gostyle = go_styled_object_get_style (GO_STYLED_OBJECT (pi->left));
@@ -2758,13 +2758,13 @@ do_setup_sheet_selector (PrinterSetupState *state)
 	g_return_if_fail (state->sheet != NULL);
 
 	table = go_gtk_builder_get_widget (state->gui, "table-sheet");
-	state->sheet_selector = gtk_combo_box_new_text ();
+	state->sheet_selector = gtk_combo_box_text_new ();
 	n = workbook_sheet_count (state->sheet->workbook);
 	for (i = 0 ; i < n ; i++) {
 		Sheet * a_sheet = workbook_sheet_by_index (state->sheet->workbook, i);
 		if (a_sheet == state->sheet)
 			n_this = i;
-		gtk_combo_box_append_text (GTK_COMBO_BOX (state->sheet_selector),
+		gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (state->sheet_selector),
 					a_sheet->name_unquoted);
 	}
 	gtk_combo_box_set_active (GTK_COMBO_BOX (state->sheet_selector), n_this);
diff --git a/src/dialogs/dialog-quit.c b/src/dialogs/dialog-quit.c
index bd2d0cd..e94f441 100644
--- a/src/dialogs/dialog-quit.c
+++ b/src/dialogs/dialog-quit.c
@@ -224,7 +224,7 @@ show_quit_dialog (GList *dirty, WBCGtk *wbcg)
 					   _("_Discard All"),
 					   GTK_STOCK_DELETE,
 					   GTK_RESPONSE_NO);
-	go_widget_set_tooltip_text (GTK_WIDGET (button), _("Discard changes in all files"));
+	gtk_widget_set_tooltip_text (GTK_WIDGET (button), _("Discard changes in all files"));
 
 	if (multiple)
 		g_signal_connect (G_OBJECT (list),
@@ -236,14 +236,15 @@ show_quit_dialog (GList *dirty, WBCGtk *wbcg)
 					   _("Don't Quit"),
 					   GTK_STOCK_CANCEL,
 					   GTK_RESPONSE_CANCEL);
-	go_widget_set_tooltip_text (button, _("Resume editing"));
+
+	gtk_widget_set_tooltip_text (button, _("Resume editing"));
 
 	if (multiple) {
 		button = go_gtk_dialog_add_button (GTK_DIALOG (dialog),
 						   _("_Save Selected"),
 						   GTK_STOCK_SAVE,
 						   GTK_RESPONSE_OK);
-		go_widget_set_tooltip_text (GTK_WIDGET (button),
+		gtk_widget_set_tooltip_text (GTK_WIDGET (button),
 					    _("Save selected documents and then quit"));
 
 		g_signal_connect (G_OBJECT (list),
@@ -255,7 +256,7 @@ show_quit_dialog (GList *dirty, WBCGtk *wbcg)
 						   _("Save"),
 						   GTK_STOCK_SAVE,
 						   GTK_RESPONSE_OK);
-		go_widget_set_tooltip_text (button, _("Save document"));
+		gtk_widget_set_tooltip_text (button, _("Save document"));
 	}
 
 	scrollw = gtk_scrolled_window_new (NULL, NULL);
@@ -273,7 +274,7 @@ show_quit_dialog (GList *dirty, WBCGtk *wbcg)
 
 		button = go_gtk_button_new_with_stock (_("Select _All"),
 						       GTK_STOCK_SELECT_ALL);
-		go_widget_set_tooltip_text (GTK_WIDGET (button),
+		gtk_widget_set_tooltip_text (GTK_WIDGET (button),
 					    _("Select all documents for saving"));
 
 		g_signal_connect (G_OBJECT (button), "clicked",
@@ -285,7 +286,7 @@ show_quit_dialog (GList *dirty, WBCGtk *wbcg)
 
 		button = go_gtk_button_new_with_stock (_("_Clear Selection"),
 						       GTK_STOCK_CLEAR);
-		go_widget_set_tooltip_text (GTK_WIDGET(button),
+		gtk_widget_set_tooltip_text (GTK_WIDGET(button),
 					    _("Unselect all documents for saving"));
 
 		g_signal_connect (G_OBJECT (button), "clicked",
diff --git a/src/dialogs/dialog-sheet-order.c b/src/dialogs/dialog-sheet-order.c
index b0e99cb..85e7d27 100644
--- a/src/dialogs/dialog-sheet-order.c
+++ b/src/dialogs/dialog-sheet-order.c
@@ -285,12 +285,12 @@ cb_desc (G_GNUC_UNUSED GtkWidget *w, SheetManager *state)
 }
 
 static gboolean
-color_equal (const GdkColor *color_a, const GnmColor *color_gb)
+color_equal (const GdkRGBA *color_a, const GnmColor *color_gb)
 {
 	if (color_gb == NULL)
 		return color_a == NULL;
 	/* FIXME: What about ->is_auto?  */
-	return color_a && GO_COLOR_FROM_GDK (*color_a) == color_gb->go_color;
+	return color_a && GO_COLOR_FROM_GDK_RGBA (*color_a) == color_gb->go_color;
 }
 
 static void
@@ -305,15 +305,15 @@ cb_color_changed_fore (G_GNUC_UNUSED GOComboColor *go_combo_color,
 	WorkbookSheetState *old_state;
 	WorkbookControl *wbc = WORKBOOK_CONTROL (state->wbcg);
 	Workbook *wb = wb_control_get_workbook (wbc);
-	GdkColor gdk_color;
-	GdkColor *p_gdk_color;
+	GdkRGBA gdk_color;
+	GdkRGBA *p_gdk_color;
 	GnmColor *gnm_color;
 
 	g_return_if_fail (selection != NULL);
 
 	selected_rows = gtk_tree_selection_get_selected_rows (selection, NULL);
 
-	p_gdk_color = (color == 0) ? NULL : go_color_to_gdk (color, &gdk_color);
+	p_gdk_color = (color == 0) ? NULL : go_color_to_gdk_rgba (color, &gdk_color);
 	gnm_color = (color == 0) ? NULL : style_color_new_gdk (&gdk_color);
 
 	old_state = workbook_sheet_state_new (wb);
@@ -357,15 +357,15 @@ cb_color_changed_back (G_GNUC_UNUSED GOComboColor *go_combo_color,
 	WorkbookSheetState *old_state;
 	WorkbookControl *wbc = WORKBOOK_CONTROL (state->wbcg);
 	Workbook *wb = wb_control_get_workbook (wbc);
-	GdkColor gdk_color;
-	GdkColor *p_gdk_color;
+	GdkRGBA gdk_color;
+	GdkRGBA *p_gdk_color;
 	GnmColor *gnm_color;
 
 	g_return_if_fail (selection != NULL);
 
 	selected_rows = gtk_tree_selection_get_selected_rows (selection, NULL);
 
-	p_gdk_color = (color == 0) ? NULL : go_color_to_gdk (color, &gdk_color);
+	p_gdk_color = (color == 0) ? NULL : go_color_to_gdk_rgba (color, &gdk_color);
 	gnm_color = (color == 0) ? NULL : style_color_new_gdk (&gdk_color);
 
 	old_state = workbook_sheet_state_new (wb);
@@ -436,7 +436,7 @@ cb_selection_changed (G_GNUC_UNUSED GtkTreeSelection *ignored,
 	GtkTreeIter  iter;
 	Sheet *sheet;
 	gboolean has_iter;
-	GdkColor *fore, *back;
+	GdkRGBA *fore, *back;
 	GtkTreeSelection *selection = gtk_tree_view_get_selection (state->sheet_list);
 	GList *selected_rows = gtk_tree_selection_get_selected_rows (selection, NULL);
 	gboolean multiple = gtk_tree_model_iter_n_children(GTK_TREE_MODEL (state->model), NULL) > 1;
@@ -471,9 +471,9 @@ cb_selection_changed (G_GNUC_UNUSED GtkTreeSelection *ignored,
 		state->initial_colors_set = TRUE;
 	}
 	if (back != NULL)
-		gdk_color_free (back);
+		gdk_rgba_free (back);
 	if (fore != NULL)
-		gdk_color_free (fore);
+		gdk_rgba_free (fore);
 
 	gtk_widget_set_sensitive (state->ccombo_back, TRUE);
 	gtk_widget_set_sensitive (state->ccombo_fore, TRUE);
@@ -692,8 +692,8 @@ create_sheet_list (SheetManager *state)
 					   G_TYPE_STRING,
 					   G_TYPE_STRING,
 					   G_TYPE_POINTER,
-					   GDK_TYPE_COLOR,
-					   GDK_TYPE_COLOR,
+					   GDK_TYPE_RGBA,
+					   GDK_TYPE_RGBA,
 					   G_TYPE_BOOLEAN,
 					   GDK_TYPE_PIXBUF);
 	state->sheet_list = GTK_TREE_VIEW (gtk_tree_view_new_with_model
@@ -800,13 +800,13 @@ create_sheet_list (SheetManager *state)
 static void
 set_sheet_info_at_iter (SheetManager *state, GtkTreeIter *iter, Sheet *sheet)
 {
-	GdkColor cback, *color = NULL;
-	GdkColor cfore, *text_color = NULL;
+	GdkRGBA cback, *color = NULL;
+	GdkRGBA cfore, *text_color = NULL;
 
 	if (sheet->tab_color)
-		color = go_color_to_gdk (sheet->tab_color->go_color, &cback);
+		color = go_color_to_gdk_rgba (sheet->tab_color->go_color, &cback);
 	if (sheet->tab_text_color)
-		text_color = go_color_to_gdk (sheet->tab_text_color->go_color, &cfore);
+		text_color = go_color_to_gdk_rgba (sheet->tab_text_color->go_color, &cfore);
 
 	gtk_list_store_set (state->model, iter,
 			    SHEET_LOCKED, sheet->is_protected,
diff --git a/src/dialogs/dialog-sheet-resize.c b/src/dialogs/dialog-sheet-resize.c
index 9cc3d2f..5f68fcc 100644
--- a/src/dialogs/dialog-sheet-resize.c
+++ b/src/dialogs/dialog-sheet-resize.c
@@ -147,6 +147,7 @@ dialog_sheet_resize (WBCGtk *wbcg)
 	GtkBuilder *gui;
 	ResizeState *state;
 	int slider_width;
+	GtkStyleContext *ctxt;
 
 	if (gnumeric_dialog_raise_if_exists (wbcg, RESIZE_DIALOG_KEY))
 		return;
@@ -160,12 +161,12 @@ dialog_sheet_resize (WBCGtk *wbcg)
 	state->sheet = wbcg_cur_sheet (wbcg);
 	g_return_if_fail (state->dialog != NULL);
 
-	gtk_widget_ensure_style (state->dialog);
+	ctxt = gtk_widget_get_style_context (GTK_WIDGET (wbcg_toplevel (wbcg)));
 	slider_width = mylog2 (MAX (GNM_MAX_ROWS / GNM_MIN_ROWS,
 				    GNM_MAX_COLS / GNM_MIN_COLS)) *
 		go_pango_measure_string
 		(gtk_widget_get_pango_context (GTK_WIDGET (wbcg_toplevel (wbcg))),
-		 gtk_widget_get_style (state->dialog)->font_desc, "00");
+		 gtk_style_context_get_font (ctxt, GTK_STATE_NORMAL), "00");
 
 	state->columns_scale = go_gtk_builder_get_widget (gui, "columns_scale");
 	gtk_widget_set_size_request (state->columns_scale, slider_width, -1);
diff --git a/src/dialogs/dialog-solver.c b/src/dialogs/dialog-solver.c
index 7ac7d59..30cd12b 100644
--- a/src/dialogs/dialog-solver.c
+++ b/src/dialogs/dialog-solver.c
@@ -630,6 +630,7 @@ run_solver (SolverState *state, GnmSolverParameters *param)
 	GtkWindow *top = GTK_WINDOW (gtk_widget_get_toplevel (state->dialog));
 	GnmSolverResult *res = NULL;
 	int y;
+	GtkStyleContext *ctxt;
 
 	sol = gnm_solver_factory_functional (param->options.algorithm,
 					     state->wbcg)
@@ -657,7 +658,7 @@ run_solver (SolverState *state, GnmSolverParameters *param)
 					  _("Stop"),
 					  GTK_STOCK_STOP,
 					  GTK_RESPONSE_NO);
-	go_widget_set_tooltip_text
+	gtk_widget_set_tooltip_text
 		(state->run.stop_button,
 		 _("Stop the running solver"));
 	g_signal_connect_swapped (G_OBJECT (state->run.stop_button),
@@ -688,12 +689,12 @@ run_solver (SolverState *state, GnmSolverParameters *param)
 		gtk_table_attach_defaults (GTK_TABLE (table),
 					   a, 0, 1, y, y + 1);
 		w = gtk_label_new ("");
-		gtk_widget_ensure_style (w);
+		ctxt = gtk_widget_get_style_context (w);
 		gtk_widget_set_size_request
 			(w,
 			 go_pango_measure_string
 			 (context,
-			  gtk_widget_get_style (w)->font_desc,
+			  gtk_style_context_get_font (ctxt, GTK_STATE_NORMAL),
 			  "0") * (5 + GNM_DIG),
 			 -1);
 		gtk_table_attach_defaults (GTK_TABLE (table),
diff --git a/src/dialogs/dialog-stf-export.c b/src/dialogs/dialog-stf-export.c
index 80df618..40338dd 100644
--- a/src/dialogs/dialog-stf-export.c
+++ b/src/dialogs/dialog-stf-export.c
@@ -70,7 +70,7 @@ typedef struct {
 		GtkComboBox	 *separator;
 		GtkWidget	 *custom;
 		GtkComboBox	 *quote;
-		GtkComboBoxEntry *quotechar;
+		GtkComboBoxText  *quotechar;
 		GtkWidget	 *charset;
 		GtkWidget	 *locale;
 		GtkComboBox	 *transliterate;
@@ -181,7 +181,7 @@ stf_export_dialog_format_page_init (TextExportState *state)
 		char *s;
 		gint pos;
 
-		state->format.quotechar = GTK_COMBO_BOX_ENTRY (go_gtk_builder_get_widget (state->gui, "format_quotechar"));
+		state->format.quotechar = GTK_COMBO_BOX_TEXT (go_gtk_builder_get_widget (state->gui, "format_quotechar"));
 		g_object_get (sobj, "quote", &s, NULL);
 
 #ifdef HAVE_GTK_ENTRY_GET_BUFFER
diff --git a/src/dialogs/dialog-stf-export.ui b/src/dialogs/dialog-stf-export.ui
index baf4440..ad7bf98 100644
--- a/src/dialogs/dialog-stf-export.ui
+++ b/src/dialogs/dialog-stf-export.ui
@@ -1,7 +1,6 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkListStore" id="model1">
     <columns>
       <!-- column-name gchararray -->
@@ -123,47 +122,127 @@
     </data>
   </object>
   <object class="GtkDialog" id="text-export">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Export as Text</property>
     <property name="window_position">center</property>
     <property name="destroy_with_parent">True</property>
     <property name="type_hint">dialog</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="button-cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="button-back">
+                <property name="label">gtk-go-back</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="button-next">
+                <property name="label">gtk-go-forward</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="button-finish">
+                <property name="label">gtk-save</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="text-export-notebook">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="border_width">4</property>
             <property name="show_tabs">False</property>
             <property name="show_border">False</property>
             <child>
-              <object class="GtkVBox" id="vbox5">
+              <object class="GtkBox" id="vbox5">
                 <property name="visible">True</property>
-                <property name="border_width">6</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">6</property>
                 <property name="spacing">4</property>
                 <child>
                   <object class="GtkLabel" id="sheets_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="ypad">5</property>
                     <property name="label" translatable="yes">Choose sheets to export and determine export ordering of the sheets:</property>
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="hbox5">
+                  <object class="GtkBox" id="hbox5">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <object class="GtkScrolledWindow" id="scrolledwindow3">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="hscrollbar_policy">automatic</property>
-                        <property name="vscrollbar_policy">automatic</property>
                         <property name="shadow_type">in</property>
                         <child>
                           <object class="GtkTreeView" id="sheet_list">
@@ -172,41 +251,52 @@
                             <property name="border_width">6</property>
                             <property name="reorderable">True</property>
                             <property name="enable_search">False</property>
+                            <child internal-child="selection">
+                              <object class="GtkTreeSelection" id="treeview-selection1"/>
+                            </child>
                           </object>
                         </child>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkVBox" id="vbox6">
+                      <object class="GtkBox" id="vbox6">
                         <property name="visible">True</property>
-                        <property name="border_width">6</property>
                         <property name="orientation">vertical</property>
+                        <property name="can_focus">False</property>
+                        <property name="border_width">6</property>
                         <child>
-                          <object class="GtkVBox" id="vbox7">
+                          <object class="GtkBox" id="vbox7">
                             <property name="visible">True</property>
                             <property name="orientation">vertical</property>
+                            <property name="can_focus">False</property>
                             <child>
                               <object class="GtkButton" id="sheet_select_all">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">Select all non-empty sheets for export.</property>
+                                <property name="use_action_appearance">False</property>
                                 <child>
                                   <object class="GtkAlignment" id="alignment2">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="xalign">0</property>
                                     <property name="xscale">0</property>
                                     <property name="yscale">0</property>
                                     <child>
-                                      <object class="GtkHBox" id="hbox6">
+                                      <object class="GtkBox" id="hbox6">
                                         <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
                                         <property name="spacing">2</property>
                                         <child>
                                           <object class="GtkImage" id="image1">
                                             <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
                                             <property name="stock">gtk-add</property>
                                           </object>
                                           <packing>
@@ -218,6 +308,7 @@
                                         <child>
                                           <object class="GtkLabel" id="label24">
                                             <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
                                             <property name="label" translatable="yes">Select _All</property>
                                             <property name="use_underline">True</property>
                                           </object>
@@ -244,19 +335,23 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">Deselect all sheets for export.</property>
+                                <property name="use_action_appearance">False</property>
                                 <child>
                                   <object class="GtkAlignment" id="alignment3">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="xalign">0</property>
                                     <property name="xscale">0</property>
                                     <property name="yscale">0</property>
                                     <child>
-                                      <object class="GtkHBox" id="hbox7">
+                                      <object class="GtkBox" id="hbox7">
                                         <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
                                         <property name="spacing">2</property>
                                         <child>
                                           <object class="GtkImage" id="image2">
                                             <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
                                             <property name="stock">gtk-remove</property>
                                           </object>
                                           <packing>
@@ -268,6 +363,7 @@
                                         <child>
                                           <object class="GtkLabel" id="label25">
                                             <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
                                             <property name="label" translatable="yes">Select N_one</property>
                                             <property name="use_underline">True</property>
                                           </object>
@@ -290,14 +386,16 @@
                             </child>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
                             <property name="fill">False</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkVBox" id="vbox8">
+                          <object class="GtkBox" id="vbox8">
                             <property name="visible">True</property>
                             <property name="orientation">vertical</property>
+                            <property name="can_focus">False</property>
                             <child>
                               <object class="GtkButton" id="sheet_top">
                                 <property name="label">gtk-goto-top</property>
@@ -305,6 +403,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">Move the selected sheet to the top of the list of to be exported sheets to be exported first.</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_stock">True</property>
                               </object>
                               <packing>
@@ -320,6 +419,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">Raise the selected sheet in the list of to be exported sheets to be exported earlier.</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_stock">True</property>
                               </object>
                               <packing>
@@ -335,6 +435,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">Lower the selected sheet in the list of to be exported sheets to be exported later.</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_stock">True</property>
                               </object>
                               <packing>
@@ -350,6 +451,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">Move the selected sheet to the end of the list of to be exported sheets to be exported last.</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_stock">True</property>
                               </object>
                               <packing>
@@ -360,17 +462,22 @@
                             </child>
                           </object>
                           <packing>
+                            <property name="expand">True</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="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
@@ -379,20 +486,23 @@
             <child type="tab">
               <object class="GtkLabel" id="label20">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
               </object>
               <packing>
                 <property name="tab_fill">False</property>
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox4">
+              <object class="GtkBox" id="vbox4">
                 <property name="visible">True</property>
-                <property name="border_width">6</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">6</property>
                 <property name="spacing">4</property>
                 <child>
                   <object class="GtkLabel" id="format_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="ypad">5</property>
                     <property name="label" translatable="yes">Choose export formatting:</property>
@@ -406,6 +516,7 @@
                 <child>
                   <object class="GtkTable" id="format_table">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">4</property>
                     <property name="n_rows">10</property>
                     <property name="n_columns">2</property>
@@ -414,6 +525,7 @@
                     <child>
                       <object class="GtkLabel" id="label11">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">Line _termination:</property>
                         <property name="use_underline">True</property>
@@ -427,6 +539,7 @@
                     <child>
                       <object class="GtkComboBox" id="format_termination">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="model">model1</property>
                         <child>
                           <object class="GtkCellRendererText" id="renderer1"/>
@@ -445,6 +558,7 @@
                     <child>
                       <object class="GtkLabel" id="label12">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">_Separator:</property>
                         <property name="use_underline">True</property>
@@ -459,47 +573,9 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkComboBoxEntry" id="format_quotechar">
-                        <property name="visible">True</property>
-                        <property name="model">model2</property>
-                        <child>
-                          <object class="GtkCellRendererText" id="renderer2"/>
-                          <attributes>
-                            <attribute name="text">0</attribute>
-                          </attributes>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">4</property>
-                        <property name="bottom_attach">5</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkComboBox" id="format_quote">
-                        <property name="visible">True</property>
-                        <property name="model">model3</property>
-                        <child>
-                          <object class="GtkCellRendererText" id="renderer3"/>
-                          <attributes>
-                            <attribute name="text">0</attribute>
-                          </attributes>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">3</property>
-                        <property name="bottom_attach">4</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
                       <object class="GtkLabel" id="label9">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">Qu_oting:</property>
                         <property name="use_underline">True</property>
@@ -515,6 +591,7 @@
                     <child>
                       <object class="GtkLabel" id="label10">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">Quote _character:</property>
                         <property name="use_underline">True</property>
@@ -542,6 +619,7 @@
                     <child>
                       <object class="GtkComboBox" id="format_separator">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="model">model4</property>
                         <child>
                           <object class="GtkCellRendererText" id="renderer4"/>
@@ -562,6 +640,7 @@
                     <child>
                       <object class="GtkLabel" id="label13">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">Character _encoding:</property>
                         <property name="use_underline">True</property>
@@ -576,6 +655,7 @@
                     <child>
                       <object class="GtkLabel" id="label14">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">_Unknown characters:</property>
                         <property name="use_underline">True</property>
@@ -591,6 +671,7 @@
                     <child>
                       <object class="GtkComboBox" id="format_transliterate">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="model">model5</property>
                         <child>
                           <object class="GtkCellRendererText" id="renderer5"/>
@@ -611,6 +692,7 @@
                     <child>
                       <object class="GtkLabel" id="label26">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">_Format:</property>
                         <property name="use_underline">True</property>
@@ -626,6 +708,7 @@
                     <child>
                       <object class="GtkComboBox" id="format">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="model">model6</property>
                         <child>
                           <object class="GtkCellRendererText" id="renderer6"/>
@@ -646,6 +729,7 @@
                     <child>
                       <object class="GtkLabel" id="label27">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">_Locale</property>
                         <property name="use_underline">True</property>
@@ -663,6 +747,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="draw_indicator">True</property>
                       </object>
                       <packing>
@@ -672,6 +757,51 @@
                       </packing>
                     </child>
                     <child>
+                      <object class="GtkComboBox" id="format_quote">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="model">model3</property>
+                        <child>
+                          <object class="GtkCellRendererText" id="renderer3"/>
+                          <attributes>
+                            <attribute name="text">0</attribute>
+                          </attributes>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkComboBoxText" id="comboboxtext1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="button_sensitivity">off</property>
+                        <property name="has_entry">True</property>
+                        <items>
+                          <item translatable="yes">"</item>
+                          <item translatable="yes">'</item>
+                          <item translatable="yes">`</item>
+                        </items>
+                        <child internal-child="entry">
+                          <object class="GtkEntry" id="comboboxtext-entry">
+                            <property name="can_focus">False</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">4</property>
+                        <property name="bottom_attach">5</property>
+                      </packing>
+                    </child>
+                    <child>
                       <placeholder/>
                     </child>
                     <child>
@@ -695,6 +825,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label22">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
               </object>
               <packing>
                 <property name="position">1</property>
@@ -703,76 +834,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="button-cancel">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="button-back">
-                <property name="label">gtk-go-back</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="button-next">
-                <property name="label">gtk-go-forward</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="button-finish">
-                <property name="label">gtk-save</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/dialog-stf-format-page.c b/src/dialogs/dialog-stf-format-page.c
index 67b04f0..7a61902 100644
--- a/src/dialogs/dialog-stf-format-page.c
+++ b/src/dialogs/dialog-stf-format-page.c
@@ -96,7 +96,7 @@ static void
 tree_view_clamp_column_visible (GtkTreeView       *tree_view,
 				GtkTreeViewColumn *column)
 {
-	GtkAdjustment *hadjustment = gtk_tree_view_get_hadjustment (tree_view);
+	GtkAdjustment *hadjustment = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (tree_view));
 	double hval = gtk_adjustment_get_value (hadjustment);
 	double hps = gtk_adjustment_get_page_size (hadjustment);
 	GtkWidget *button = gtk_tree_view_column_get_button (column);
@@ -599,7 +599,7 @@ format_page_update_preview (StfDialogData *pagedata)
 		GtkWidget *button = gtk_tree_view_column_get_button (column);
 
 		if (NULL == g_object_get_data (G_OBJECT (column), "checkbox")) {
-			GtkWidget *vbox = gtk_vbox_new (FALSE,5);
+			GtkWidget *vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
 			GtkWidget *check,
 				*check_autofit = gtk_check_button_new_with_label (_("Auto fit"));
 			char * label_text = g_strdup_printf
@@ -625,10 +625,10 @@ format_page_update_preview (StfDialogData *pagedata)
 				(_("If this checkbox is selected, "
 				   "column %i will be imported into "
 				   "Gnumeric."), i+1);
-			go_widget_set_tooltip_text
+			gtk_widget_set_tooltip_text
 				(check,
 				 label_text);
-			go_widget_set_tooltip_text
+			gtk_widget_set_tooltip_text
 				(check_autofit,
 				 _("If this checkbox is selected, "
 				   "the width of the column will be adjusted "
diff --git a/src/dialogs/dialog-stf.ui b/src/dialogs/dialog-stf.ui
index 74b2fc0..335f461 100644
--- a/src/dialogs/dialog-stf.ui
+++ b/src/dialogs/dialog-stf.ui
@@ -1,21 +1,37 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkAdjustment" id="adjustment1">
-    <property name="value">1</property>
     <property name="lower">1</property>
     <property name="upper">100</property>
+    <property name="value">1</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
   </object>
   <object class="GtkAdjustment" id="adjustment2">
-    <property name="value">1</property>
     <property name="lower">1</property>
     <property name="upper">100</property>
+    <property name="value">1</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
   </object>
+  <object class="GtkListStore" id="csv-textindicator-list">
+    <columns>
+      <!-- column-name text -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">"</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">'</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">`</col>
+      </row>
+    </data>
+  </object>
   <object class="GtkListStore" id="model1">
     <columns>
       <!-- column-name gchararray -->
@@ -37,35 +53,171 @@
     </data>
   </object>
   <object class="GtkDialog" id="stf_dialog">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Text Import Configuration</property>
     <property name="type_hint">dialog</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="back_button">
+                <property name="label">gtk-go-back</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="forward_button">
+                <property name="label">gtk-go-forward</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="finish_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xscale">0</property>
+                    <property name="yscale">0</property>
+                    <child>
+                      <object class="GtkBox" id="hbox21">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">2</property>
+                        <child>
+                          <object class="GtkImage" id="image1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="stock">gtk-apply</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label39">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">F_inish</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="stf_notebook">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="show_tabs">False</property>
             <child>
-              <object class="GtkVBox" id="vbox13">
+              <object class="GtkBox" id="vbox13">
                 <property name="visible">True</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkFrame" id="frame11">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label_xalign">0</property>
                     <child>
                       <object class="GtkTable" id="table2">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="border_width">6</property>
                         <property name="n_rows">5</property>
                         <property name="n_columns">2</property>
                         <property name="column_spacing">4</property>
                         <property name="row_spacing">4</property>
                         <child>
-                          <object class="GtkHSeparator" id="hseparator2">
+                          <object class="GtkSeparator" id="hseparator2">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                           </object>
                           <packing>
                             <property name="right_attach">2</property>
@@ -77,6 +229,7 @@
                         <child>
                           <object class="GtkLabel" id="label31">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Encoding:</property>
                           </object>
@@ -86,8 +239,9 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkHBox" id="encoding_hbox">
+                          <object class="GtkBox" id="encoding_hbox">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <child>
                               <placeholder/>
                             </child>
@@ -100,8 +254,9 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkHSeparator" id="hseparator3">
+                          <object class="GtkSeparator" id="hseparator3">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                           </object>
                           <packing>
                             <property name="right_attach">2</property>
@@ -113,6 +268,7 @@
                         <child>
                           <object class="GtkLabel" id="label32">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Line breaks:</property>
                           </object>
@@ -124,8 +280,9 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkHBox" id="hbox18">
+                          <object class="GtkBox" id="hbox18">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <child>
                               <object class="GtkCheckButton" id="line_break_unix">
                                 <property name="label" translatable="yes">_Unix (LF)</property>
@@ -133,11 +290,14 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">The line feed character (ASCII code 10) breaks lines</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
                               <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="position">0</property>
                               </packing>
                             </child>
@@ -148,11 +308,14 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">The sequence of carriage return and line feed (ASCII codes 13 and 10) breaks lines</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
                               <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
@@ -163,11 +326,14 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">The carriage return character (ASCII code 13) breaks lines</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
                               <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="position">2</property>
                               </packing>
                             </child>
@@ -183,6 +349,7 @@
                         <child>
                           <object class="GtkLabel" id="label34">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Original data type:</property>
                             <property name="justify">center</property>
@@ -195,8 +362,9 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkHBox" id="hbox19">
+                          <object class="GtkBox" id="hbox19">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <child>
                               <object class="GtkRadioButton" id="main_separated">
                                 <property name="label" translatable="yes">_Separated</property>
@@ -204,11 +372,14 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">Each column in the text is separated by a 'separation' character, e.g. a semicolon.</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
                               <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="position">0</property>
                               </packing>
                             </child>
@@ -219,11 +390,14 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">Define the width of each column manually.</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                                 <property name="group">main_separated</property>
                               </object>
                               <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
@@ -241,27 +415,32 @@
                     <child type="label">
                       <object class="GtkLabel" id="label2">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">Source Format</property>
                       </object>
                     </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
                   <object class="GtkFrame" id="frame10">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label_xalign">0</property>
                     <child>
-                      <object class="GtkHBox" id="hbox2">
+                      <object class="GtkBox" id="hbox2">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="border_width">4</property>
                         <property name="spacing">4</property>
                         <child>
                           <object class="GtkLabel" id="label1">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="label" translatable="yes">Fr_om line:</property>
                             <property name="use_underline">True</property>
                             <property name="mnemonic_widget">main_startrow</property>
@@ -283,12 +462,14 @@
                           </object>
                           <packing>
                             <property name="expand">False</property>
+                            <property name="fill">True</property>
                             <property name="position">1</property>
                           </packing>
                         </child>
                         <child>
                           <object class="GtkLabel" id="label18">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="label" translatable="yes">_To line: </property>
                             <property name="use_underline">True</property>
                             <property name="justify">center</property>
@@ -317,6 +498,7 @@
                         <child>
                           <object class="GtkLabel" id="main_lines">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0.98000001907348633</property>
                             <property name="label" translatable="yes">Number of lines to import</property>
                             <property name="justify">right</property>
@@ -333,25 +515,27 @@
                     <child type="label">
                       <object class="GtkLabel" id="label21">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">Lines to import</property>
                       </object>
                     </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
                 <child>
                   <object class="GtkFrame" id="main_frame">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label_xalign">0</property>
                     <child>
                       <object class="GtkScrolledWindow" id="main_data_container">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="border_width">4</property>
-                        <property name="hscrollbar_policy">automatic</property>
                         <child>
                           <placeholder/>
                         </child>
@@ -360,11 +544,14 @@
                     <child type="label">
                       <object class="GtkLabel" id="label22">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">Data</property>
                       </object>
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">2</property>
                   </packing>
                 </child>
@@ -373,6 +560,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label35">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Main</property>
               </object>
               <packing>
@@ -380,20 +568,24 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox14">
+              <object class="GtkBox" id="vbox14">
                 <property name="visible">True</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <child>
-                  <object class="GtkHBox" id="hbox3">
+                  <object class="GtkBox" id="hbox3">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="spacing">10</property>
                     <child>
                       <object class="GtkFrame" id="frame3">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label_xalign">0</property>
                         <child>
                           <object class="GtkTable" id="table1">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="border_width">4</property>
                             <property name="n_rows">6</property>
                             <property name="n_columns">3</property>
@@ -405,6 +597,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -420,6 +613,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -437,6 +631,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -450,6 +645,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -465,6 +661,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -495,6 +692,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">See two successive separators as one.</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -507,8 +705,9 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkHSeparator" id="hseparator4">
+                              <object class="GtkSeparator" id="hseparator4">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                               </object>
                               <packing>
                                 <property name="right_attach">3</property>
@@ -524,6 +723,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -540,6 +740,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -559,6 +760,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">Ignore any separators at the beginning of lines</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -575,36 +777,41 @@
                         <child type="label">
                           <object class="GtkLabel" id="label23">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="label" translatable="yes">Separators</property>
                           </object>
                         </child>
                       </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkFrame" id="frame4">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label_xalign">0</property>
                         <child>
-                          <object class="GtkVBox" id="vbox6">
+                          <object class="GtkBox" id="vbox6">
                             <property name="visible">True</property>
-                            <property name="border_width">4</property>
                             <property name="orientation">vertical</property>
+                            <property name="can_focus">False</property>
+                            <property name="border_width">4</property>
                             <property name="spacing">4</property>
                             <child>
-                              <object class="GtkHBox" id="hbox20">
+                              <object class="GtkBox" id="hbox20">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <child>
                                   <object class="GtkLabel" id="label5">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="xalign">0</property>
                                     <property name="label" translatable="yes">Te_xt indicator: </property>
                                     <property name="use_underline">True</property>
                                     <property name="justify">center</property>
-                                    <property name="mnemonic_widget">csv_textindicator</property>
                                   </object>
                                   <packing>
                                     <property name="expand">False</property>
@@ -612,17 +819,6 @@
                                     <property name="position">0</property>
                                   </packing>
                                 </child>
-                                <child>
-                                  <object class="GtkComboBoxEntry" id="csv_textindicator">
-                                    <property name="visible">True</property>
-                                    <property name="model">csv-textindicator-list</property>
-                                    <property name="active">0</property>
-                                    <property name="text_column">0</property>
-                                  </object>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
@@ -637,6 +833,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">See two successive text indicators as one that does not terminate the cell.</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
@@ -652,30 +849,33 @@
                         <child type="label">
                           <object class="GtkLabel" id="label24">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="label" translatable="yes">Text indicator</property>
                           </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="GtkFrame" id="frame5">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label_xalign">0</property>
                     <child>
                       <object class="GtkScrolledWindow" id="csv_data_container">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="hscrollbar_policy">automatic</property>
                         <child>
                           <placeholder/>
                         </child>
@@ -684,11 +884,14 @@
                     <child type="label">
                       <object class="GtkLabel" id="label25">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">Data</property>
                       </object>
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
@@ -700,6 +903,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label36">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">CSV</property>
               </object>
               <packing>
@@ -708,21 +912,25 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox15">
+              <object class="GtkBox" id="vbox15">
                 <property name="visible">True</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkFrame" id="frame9">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label_xalign">0</property>
                     <child>
-                      <object class="GtkHBox" id="hbox9">
+                      <object class="GtkBox" id="hbox9">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="border_width">4</property>
                         <property name="spacing">4</property>
                         <child>
-                          <object class="GtkHButtonBox" id="hbuttonbox3">
+                          <object class="GtkButtonBox" id="hbuttonbox3">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="layout_style">spread</property>
                             <child>
                               <object class="GtkButton" id="fixed_auto">
@@ -731,6 +939,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">Attempt to recognize columns in the text automatically.</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                               </object>
                               <packing>
@@ -746,6 +955,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">Clear list of columns</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                               </object>
                               <packing>
@@ -756,6 +966,8 @@
                             </child>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
@@ -767,24 +979,26 @@
                     <child type="label">
                       <object class="GtkLabel" id="label26">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">Columns</property>
                       </object>
                     </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
                   <object class="GtkFrame" id="frame8">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label_xalign">0</property>
                     <child>
                       <object class="GtkScrolledWindow" id="fixed_data_container">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="hscrollbar_policy">automatic</property>
                         <child>
                           <placeholder/>
                         </child>
@@ -793,11 +1007,14 @@
                     <child type="label">
                       <object class="GtkLabel" id="label27">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">Data</property>
                       </object>
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
@@ -809,6 +1026,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label37">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Fixed</property>
               </object>
               <packing>
@@ -817,19 +1035,23 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox16">
+              <object class="GtkBox" id="vbox16">
                 <property name="visible">True</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <child>
-                  <object class="GtkHBox" id="hbox16">
+                  <object class="GtkBox" id="hbox16">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <object class="GtkTable" id="locale_table">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="n_columns">4</property>
                         <child>
                           <object class="GtkLabel" id="label33">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Source Locale:</property>
                           </object>
@@ -845,6 +1067,7 @@
                         <child>
                           <object class="GtkComboBox" id="format_trim">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="model">model1</property>
                             <child>
                               <object class="GtkCellRendererText" id="renderer1"/>
@@ -864,6 +1087,7 @@
                         <child>
                           <object class="GtkLabel" id="label19">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Trim:</property>
                             <property name="justify">center</property>
@@ -880,12 +1104,15 @@
                         </child>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="padding">5</property>
                     <property name="position">0</property>
                   </packing>
@@ -893,13 +1120,13 @@
                 <child>
                   <object class="GtkFrame" id="frame1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">5</property>
                     <property name="label_xalign">0</property>
                     <child>
                       <object class="GtkScrolledWindow" id="format_data_container">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="hscrollbar_policy">automatic</property>
                         <child>
                           <placeholder/>
                         </child>
@@ -908,12 +1135,15 @@
                     <child type="label">
                       <object class="GtkLabel" id="label3">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">Data</property>
                         <property name="use_markup">True</property>
                       </object>
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="padding">5</property>
                     <property name="position">1</property>
                   </packing>
@@ -921,11 +1151,13 @@
                 <child>
                   <object class="GtkLabel" id="column_selection_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="padding">5</property>
                     <property name="position">2</property>
                   </packing>
@@ -938,6 +1170,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label38">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Format</property>
               </object>
               <packing>
@@ -947,125 +1180,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="back_button">
-                <property name="label">gtk-go-back</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="forward_button">
-                <property name="label">gtk-go-forward</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="finish_button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <child>
-                  <object class="GtkAlignment" id="alignment1">
-                    <property name="visible">True</property>
-                    <property name="xscale">0</property>
-                    <property name="yscale">0</property>
-                    <child>
-                      <object class="GtkHBox" id="hbox21">
-                        <property name="visible">True</property>
-                        <property name="spacing">2</property>
-                        <child>
-                          <object class="GtkImage" id="image1">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-apply</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="label39">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">F_inish</property>
-                            <property name="use_underline">True</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">4</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
           </packing>
         </child>
       </object>
@@ -1078,21 +1195,4 @@
       <action-widget response="-5">finish_button</action-widget>
     </action-widgets>
   </object>
-  <object class="GtkListStore" id="csv-textindicator-list">
-    <columns>
-      <!-- column-name text -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes">"</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">'</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">`</col>
-      </row>
-    </data>
-  </object>
 </interface>
diff --git a/src/dialogs/dialog-zoom.ui b/src/dialogs/dialog-zoom.ui
index 5afb2ca..94abe77 100644
--- a/src/dialogs/dialog-zoom.ui
+++ b/src/dialogs/dialog-zoom.ui
@@ -1,37 +1,93 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="value">100</property>
-    <property name="lower">10</property>
-    <property name="upper">500</property>
-    <property name="step_increment">5</property>
-    <property name="page_increment">25</property>
-  </object>
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Zoom">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Zoom</property>
     <property name="modal">True</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="has_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
-          <object class="GtkHBox" id="hbox1">
+          <object class="GtkBox" id="hbox1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="spacing">4</property>
             <child>
               <object class="GtkFrame" id="Frame">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label_xalign">0</property>
                 <child>
-                  <object class="GtkVBox" id="vbox1">
+                  <object class="GtkBox" id="vbox1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">4</property>
-                    <property name="orientation">vertical</property>
                     <property name="spacing">4</property>
                     <property name="homogeneous">True</property>
                     <child>
@@ -40,6 +96,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
@@ -55,12 +112,14 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">radio_200</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
@@ -70,6 +129,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">radio_200</property>
@@ -86,6 +146,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">radio_200</property>
@@ -102,6 +163,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">radio_200</property>
@@ -119,6 +181,7 @@
                         <property name="sensitive">False</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">radio_200</property>
@@ -130,8 +193,9 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHBox" id="hbox3">
+                      <object class="GtkBox" id="hbox3">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">4</property>
                         <child>
                           <object class="GtkRadioButton" id="radio_custom">
@@ -139,6 +203,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">radio_200</property>
@@ -150,13 +215,14 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkVBox" id="vbox2">
+                          <object class="GtkBox" id="vbox2">
                             <property name="visible">True</property>
-                            <property name="orientation">vertical</property>
+                            <property name="can_focus">False</property>
                             <child>
                               <object class="GtkDrawingArea" id="drawingarea1">
                                 <property name="visible">True</property>
                                 <property name="sensitive">False</property>
+                                <property name="can_focus">False</property>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
@@ -180,6 +246,8 @@
                             </child>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">1</property>
                           </packing>
                         </child>
@@ -195,29 +263,34 @@
                 <child type="label">
                   <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Magnification</property>
                   </object>
                 </child>
               </object>
               <packing>
                 <property name="expand">False</property>
+                <property name="fill">True</property>
                 <property name="position">0</property>
               </packing>
             </child>
             <child>
               <object class="GtkFrame" id="frame1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label_xalign">0</property>
                 <child>
                   <object class="GtkScrolledWindow" id="scrolledwindow1">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="hscrollbar_policy">never</property>
-                    <property name="vscrollbar_policy">automatic</property>
                     <child>
                       <object class="GtkTreeView" id="sheet_list">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
+                        <child internal-child="selection">
+                          <object class="GtkTreeSelection" id="treeview-selection1"/>
+                        </child>
                       </object>
                     </child>
                   </object>
@@ -225,74 +298,23 @@
                 <child type="label">
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Sheets</property>
                   </object>
                 </child>
               </object>
               <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
                 <property name="padding">4</property>
                 <property name="position">1</property>
               </packing>
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="has_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
@@ -303,4 +325,11 @@
       <action-widget response="0">ok_button</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="lower">10</property>
+    <property name="upper">500</property>
+    <property name="value">100</property>
+    <property name="step_increment">5</property>
+    <property name="page_increment">25</property>
+  </object>
 </interface>
diff --git a/src/dialogs/doc-meta-data.ui b/src/dialogs/doc-meta-data.ui
index acd6479..9b54f8b 100644
--- a/src/dialogs/doc-meta-data.ui
+++ b/src/dialogs/doc-meta-data.ui
@@ -1,20 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="GOMetadataDialog">
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Document Properties</property>
     <property name="type_hint">dialog</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">6</property>
         <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
+          <object class="GtkButtonBox" id="dialog-action_area1">
+           <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
@@ -59,7 +59,7 @@
           </packing>
         </child>
         <child>
-          <object class="GtkHBox" id="hbox1">
+          <object class="GtkBox" id="hbox1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="spacing">10</property>
@@ -71,10 +71,10 @@
                 <property name="tab_pos">left</property>
                 <property name="show_tabs">False</property>
                 <property name="show_border">False</property>
-                <property name="homogeneous">True</property>
                 <child>
-                  <object class="GtkVBox" id="vbox5">
+                  <object class="GtkBox" id="vbox5">
                     <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
                     <property name="can_focus">False</property>
                     <property name="border_width">5</property>
                     <property name="spacing">6</property>
@@ -336,7 +336,7 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHSeparator" id="hseparator3">
+                      <object class="GtkSeparator" id="hseparator3">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                       </object>
@@ -369,7 +369,7 @@
                         <property name="n_columns">3</property>
                         <property name="homogeneous">True</property>
                         <child>
-                          <object class="GtkHBox" id="hbox52">
+                          <object class="GtkBox" id="hbox52">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <child>
@@ -425,7 +425,7 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkHBox" id="hbox53">
+                          <object class="GtkBox" id="hbox53">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <child>
@@ -481,7 +481,7 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkHBox" id="hbox54">
+                          <object class="GtkBox" id="hbox54">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <child>
@@ -537,7 +537,7 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkHBox" id="hbox55">
+                          <object class="GtkBox" id="hbox55">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <child>
@@ -593,7 +593,7 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkHBox" id="hbox56">
+                          <object class="GtkBox" id="hbox56">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <child>
@@ -649,7 +649,7 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkHBox" id="hbox57">
+                          <object class="GtkBox" id="hbox57">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <child>
@@ -824,8 +824,6 @@
                       <object class="GtkScrolledWindow" id="scrolledwindow1">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="hscrollbar_policy">automatic</property>
-                        <property name="vscrollbar_policy">automatic</property>
                         <property name="shadow_type">etched-in</property>
                         <child>
                           <object class="GtkTextView" id="comments">
@@ -1079,8 +1077,9 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkVBox" id="vbox10">
+                  <object class="GtkBox" id="vbox10">
                     <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
                     <property name="can_focus">False</property>
                     <property name="border_width">5</property>
                     <property name="spacing">6</property>
@@ -1088,13 +1087,14 @@
                       <object class="GtkScrolledWindow" id="scrolledwindow2">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="hscrollbar_policy">automatic</property>
-                        <property name="vscrollbar_policy">automatic</property>
                         <property name="shadow_type">etched-in</property>
                         <child>
                           <object class="GtkTreeView" id="properties">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
+                            <child internal-child="selection">
+                              <object class="GtkTreeSelection" id="treeview-selection2"/>
+                            </child>
                           </object>
                         </child>
                       </object>
@@ -1105,6 +1105,7 @@
                       </packing>
                     </child>
                     <child>
+<<<<<<< HEAD
                       <object class="GtkHBox" id="hbox3">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
@@ -1158,6 +1159,9 @@
                     </child>
                     <child>
                       <object class="GtkHSeparator" id="hseparator4">
+=======
+                      <object class="GtkSeparator" id="hseparator4">
+>>>>>>> eradicate Gtk[H,V]*
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                       </object>
@@ -1270,8 +1274,48 @@
                           <object class="GtkLabel" id="label10">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
+<<<<<<< HEAD
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Value:</property>
+=======
+                            <child internal-child="entry">
+                              <object class="GtkEntry" id="comboboxentry-entry2">
+                                <property name="can_focus">False</property>
+                                <property name="primary_icon_activatable">False</property>
+                                <property name="secondary_icon_activatable">False</property>
+                                <property name="primary_icon_sensitive">True</property>
+                                <property name="secondary_icon_sensitive">True</property>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButtonBox" id="hbuttonbox2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">6</property>
+                        <property name="layout_style">end</property>
+                        <child>
+                          <object class="GtkButton" id="add_button">
+                            <property name="label">gtk-add</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_action_appearance">False</property>
+                            <property name="use_stock">True</property>
+>>>>>>> eradicate Gtk[H,V]*
                           </object>
                           <packing>
                             <property name="top_attach">1</property>
@@ -1337,8 +1381,9 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkVBox" id="vbox4">
+                  <object class="GtkBox" id="vbox4">
                     <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
                     <property name="can_focus">False</property>
                     <property name="border_width">4</property>
                     <property name="spacing">6</property>
@@ -1472,13 +1517,14 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkVBox" id="vbox1">
+                  <object class="GtkBox" id="vbox1">
                     <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
                     <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <property name="spacing">12</property>
                     <child>
-                      <object class="GtkHBox" id="hbox2">
+                      <object class="GtkBox" id="hbox2">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="spacing">12</property>
diff --git a/src/dialogs/exp-smoothing.ui b/src/dialogs/exp-smoothing.ui
index 799e3ca..e2c2aa9 100644
--- a/src/dialogs/exp-smoothing.ui
+++ b/src/dialogs/exp-smoothing.ui
@@ -1,58 +1,97 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="value">0.20000000000000001</property>
-    <property name="upper">1</property>
-    <property name="step_increment">0.01</property>
-    <property name="page_increment">0.10000000000000001</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment2">
-    <property name="value">0.20000000000000001</property>
-    <property name="upper">1</property>
-    <property name="step_increment">0.01</property>
-    <property name="page_increment">0.10000000000000001</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment3">
-    <property name="value">0.20000000000000001</property>
-    <property name="upper">1</property>
-    <property name="step_increment">0.01</property>
-    <property name="page_increment">0.10000000000000001</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment4">
-    <property name="value">12</property>
-    <property name="lower">2</property>
-    <property name="upper">4096</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="ExpSmoothing">
+    <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Exponential Smoothing</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
-          <object class="GtkVBox" id="vbox2">
+          <object class="GtkBox" id="vbox2">
             <property name="visible">True</property>
             <property name="orientation">vertical</property>
+            <property name="can_focus">False</property>
             <child>
               <object class="GtkNotebook" id="notebook1">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="border_width">5</property>
                 <child>
-                  <object class="GtkVBox" id="vbox3">
+                  <object class="GtkBox" id="vbox3">
                     <property name="visible">True</property>
-                    <property name="orientation">vertical</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <object class="GtkTable" id="input-table">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="border_width">12</property>
                         <property name="n_rows">3</property>
                         <property name="n_columns">2</property>
@@ -64,6 +103,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                           </object>
@@ -78,6 +118,7 @@
                         <child>
                           <object class="GtkLabel" id="label1">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Grouped by:</property>
                           </object>
@@ -91,6 +132,7 @@
                         <child>
                           <object class="GtkLabel" id="var1-label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">_Input range:</property>
                             <property name="use_underline">True</property>
@@ -101,19 +143,23 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkHBox" id="hbox1">
+                          <object class="GtkBox" id="hbox1">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <child>
                               <object class="GtkRadioButton" id="grouped_by_col">
                                 <property name="label" translatable="yes">C_olumns</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
                               <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="position">0</property>
                               </packing>
                             </child>
@@ -123,11 +169,14 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                                 <property name="group">grouped_by_col</property>
                               </object>
                               <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
@@ -146,21 +195,26 @@
                         </child>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHSeparator" id="hseparator1">
+                      <object class="GtkSeparator" id="hseparator1">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkTable" id="table4">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="border_width">12</property>
                         <property name="n_rows">5</property>
                         <child>
@@ -169,6 +223,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">ses-h-button</property>
@@ -184,6 +239,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">ses-h-button</property>
@@ -199,6 +255,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">ses-h-button</property>
                           </object>
@@ -213,6 +270,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">ses-h-button</property>
                           </object>
@@ -227,6 +285,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                           </object>
@@ -234,6 +293,7 @@
                       </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="position">2</property>
                       </packing>
                     </child>
@@ -242,6 +302,7 @@
                 <child type="tab">
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Input</property>
                     <property name="use_underline">True</property>
                   </object>
@@ -250,12 +311,13 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkVBox" id="vbox4">
+                  <object class="GtkBox" id="vbox4">
                     <property name="visible">True</property>
-                    <property name="orientation">vertical</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <object class="GtkTable" id="table3">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="border_width">12</property>
                         <property name="n_rows">4</property>
                         <property name="n_columns">2</property>
@@ -263,6 +325,7 @@
                         <child>
                           <object class="GtkLabel" id="label8">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Seasonal damping factor (Î):</property>
                             <property name="use_underline">True</property>
@@ -309,6 +372,7 @@
                         <child>
                           <object class="GtkLabel" id="label6">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Growth damping factor (Î):</property>
                             <property name="use_underline">True</property>
@@ -337,6 +401,7 @@
                         <child>
                           <object class="GtkLabel" id="label3">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">_Damping factor (Î):</property>
                             <property name="use_underline">True</property>
@@ -349,6 +414,7 @@
                         <child>
                           <object class="GtkLabel" id="label9">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Seasonal period:</property>
                             <property name="use_underline">True</property>
@@ -384,17 +450,20 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHSeparator" id="hseparator3">
+                      <object class="GtkSeparator" id="hseparator3">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkTable" id="table1">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="border_width">12</property>
                         <property name="n_rows">3</property>
                         <property name="n_columns">5</property>
@@ -402,10 +471,11 @@
                         <property name="row_spacing">6</property>
                         <child>
                           <object class="GtkRadioButton" id="nm2-button">
-                            <property name="label" translatable="yes">n&#x2212;2</property>
+                            <property name="label" translatable="yes">nâ2</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">n-button</property>
@@ -419,10 +489,11 @@
                         </child>
                         <child>
                           <object class="GtkRadioButton" id="nm1-button">
-                            <property name="label" translatable="yes">n&#x2212;1</property>
+                            <property name="label" translatable="yes">nâ1</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">n-button</property>
@@ -442,6 +513,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                           </object>
@@ -457,6 +529,7 @@
                         <child>
                           <object class="GtkLabel" id="label7">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Denominator:</property>
                           </object>
@@ -473,6 +546,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                           </object>
@@ -485,10 +559,11 @@
                         </child>
                         <child>
                           <object class="GtkRadioButton" id="nm3-button">
-                            <property name="label" translatable="yes">n&#x2212;3</property>
+                            <property name="label" translatable="yes">nâ3</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">n-button</property>
@@ -508,17 +583,20 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHSeparator" id="hseparator2">
+                      <object class="GtkSeparator" id="hseparator2">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="position">3</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkTable" id="table5">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="border_width">12</property>
                         <property name="column_spacing">12</property>
                         <child>
@@ -527,12 +605,14 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="draw_indicator">True</property>
                           </object>
                         </child>
                       </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="position">4</property>
                       </packing>
                     </child>
@@ -544,6 +624,7 @@
                 <child type="tab">
                   <object class="GtkLabel" id="label4">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Options</property>
                     <property name="use_underline">True</property>
                   </object>
@@ -553,8 +634,9 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="dao">
+                  <object class="GtkBox" id="dao">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <placeholder/>
                     </child>
@@ -566,6 +648,7 @@
                 <child type="tab">
                   <object class="GtkLabel" id="label5">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Output</property>
                     <property name="use_underline">True</property>
                   </object>
@@ -576,77 +659,27 @@
                 </child>
               </object>
               <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
                 <property name="position">0</property>
               </packing>
             </child>
             <child>
               <object class="GtkLabel" id="warnings">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
               </object>
               <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
                 <property name="position">1</property>
               </packing>
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
@@ -657,4 +690,29 @@
       <action-widget response="0">okbutton</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">1</property>
+    <property name="value">0.20000000000000001</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">0.10000000000000001</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="upper">1</property>
+    <property name="value">0.20000000000000001</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">0.10000000000000001</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment3">
+    <property name="upper">1</property>
+    <property name="value">0.20000000000000001</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">0.10000000000000001</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment4">
+    <property name="lower">2</property>
+    <property name="upper">4096</property>
+    <property name="value">12</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
 </interface>
diff --git a/src/dialogs/fill-series.ui b/src/dialogs/fill-series.ui
index 79b9ad6..77d05e4 100644
--- a/src/dialogs/fill-series.ui
+++ b/src/dialogs/fill-series.ui
@@ -1,17 +1,79 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Fill_series">
+    <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Fill Series</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
@@ -20,6 +82,7 @@
             <child>
               <object class="GtkTable" id="table1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">8</property>
                 <property name="n_columns">2</property>
@@ -28,6 +91,7 @@
                 <child>
                   <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Series in:</property>
                   </object>
@@ -42,6 +106,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -58,6 +123,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">series_in_rows</property>
@@ -74,6 +140,7 @@
                 <child>
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Type:</property>
                   </object>
@@ -90,6 +157,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
@@ -109,6 +177,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">type_linear</property>
@@ -128,6 +197,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">type_linear</property>
@@ -144,6 +214,7 @@
                 <child>
                   <object class="GtkLabel" id="label3">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">_Start value:</property>
                     <property name="use_underline">True</property>
@@ -172,6 +243,7 @@
                 <child>
                   <object class="GtkLabel" id="label4">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">S_tep value:</property>
                     <property name="use_underline">True</property>
@@ -200,6 +272,7 @@
                 <child>
                   <object class="GtkLabel" id="label5">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">St_op value:</property>
                     <property name="use_underline">True</property>
@@ -239,6 +312,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label6">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Series</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">notebook1</property>
@@ -250,6 +324,7 @@
             <child>
               <object class="GtkTable" id="table_date_unit">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">4</property>
                 <property name="n_columns">2</property>
@@ -258,6 +333,7 @@
                 <child>
                   <object class="GtkLabel" id="label7">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Date unit:</property>
                   </object>
@@ -272,6 +348,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -287,6 +364,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">unit_day</property>
@@ -305,6 +383,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">unit_day</property>
@@ -323,6 +402,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">unit_day</property>
@@ -352,6 +432,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label8">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Options</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">notebook1</property>
@@ -362,8 +443,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -375,6 +457,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label9">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Output</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">notebook1</property>
@@ -386,64 +469,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/font-sel.ui b/src/dialogs/font-sel.ui
index 278a062..ca98ba5 100644
--- a/src/dialogs/font-sel.ui
+++ b/src/dialogs/font-sel.ui
@@ -1,9 +1,9 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkTable" id="toplevel-table">
     <property name="visible">True</property>
+    <property name="can_focus">False</property>
     <property name="n_rows">4</property>
     <property name="n_columns">3</property>
     <property name="column_spacing">4</property>
@@ -13,7 +13,7 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="editable">False</property>
-        <property name="invisible_char">&#x25CF;</property>
+        <property name="invisible_char">â</property>
       </object>
       <packing>
         <property name="left_attach">1</property>
@@ -26,6 +26,7 @@
     <child>
       <object class="GtkLabel" id="label1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="xalign">0</property>
         <property name="label" translatable="yes">Font:</property>
         <property name="justify">center</property>
@@ -38,6 +39,7 @@
     <child>
       <object class="GtkLabel" id="label2">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="xalign">0</property>
         <property name="label" translatable="yes">Font style:</property>
         <property name="justify">center</property>
@@ -52,6 +54,7 @@
     <child>
       <object class="GtkLabel" id="label3">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="xalign">0</property>
         <property name="label" translatable="yes">Size:</property>
         <property name="justify">center</property>
@@ -68,7 +71,7 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="editable">False</property>
-        <property name="invisible_char">&#x25CF;</property>
+        <property name="invisible_char">â</property>
       </object>
       <packing>
         <property name="top_attach">1</property>
@@ -79,10 +82,12 @@
     <child>
       <object class="GtkFrame" id="font-preview-frame">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="label_xalign">0</property>
         <child type="label">
           <object class="GtkLabel" id="label4">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="label" translatable="yes">Preview</property>
           </object>
         </child>
@@ -97,7 +102,7 @@
       <object class="GtkEntry" id="font-size-entry">
         <property name="visible">True</property>
         <property name="can_focus">True</property>
-        <property name="invisible_char">&#x25CF;</property>
+        <property name="invisible_char">â</property>
       </object>
       <packing>
         <property name="left_attach">2</property>
@@ -112,13 +117,14 @@
       <object class="GtkScrolledWindow" id="scrolledwindow2">
         <property name="visible">True</property>
         <property name="can_focus">True</property>
-        <property name="hscrollbar_policy">automatic</property>
-        <property name="vscrollbar_policy">automatic</property>
         <property name="shadow_type">in</property>
         <child>
           <object class="GtkTreeView" id="font-style-list">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
+            <child internal-child="selection">
+              <object class="GtkTreeSelection" id="treeview-selection1"/>
+            </child>
           </object>
         </child>
       </object>
@@ -133,13 +139,14 @@
       <object class="GtkScrolledWindow" id="scrolledwindow1">
         <property name="visible">True</property>
         <property name="can_focus">True</property>
-        <property name="hscrollbar_policy">automatic</property>
-        <property name="vscrollbar_policy">automatic</property>
         <property name="shadow_type">in</property>
         <child>
           <object class="GtkTreeView" id="font-name-list">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
+            <child internal-child="selection">
+              <object class="GtkTreeSelection" id="treeview-selection2"/>
+            </child>
           </object>
         </child>
       </object>
@@ -153,12 +160,14 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="hscrollbar_policy">never</property>
-        <property name="vscrollbar_policy">automatic</property>
         <property name="shadow_type">in</property>
         <child>
           <object class="GtkTreeView" id="font-size-list">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
+            <child internal-child="selection">
+              <object class="GtkTreeSelection" id="treeview-selection3"/>
+            </child>
           </object>
         </child>
       </object>
diff --git a/src/dialogs/formula-guru.ui b/src/dialogs/formula-guru.ui
index 90fe243..fdc4f62 100644
--- a/src/dialogs/formula-guru.ui
+++ b/src/dialogs/formula-guru.ui
@@ -1,17 +1,81 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="formula_guru">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Formula Guru</property>
     <property name="default_width">500</property>
     <property name="default_height">300</property>
     <property name="type_hint">normal</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox2">
+      <object class="GtkBox" id="dialog-vbox2">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkTable" id="main_table">
+            <property name="can_focus">False</property>
             <property name="border_width">5</property>
             <property name="n_rows">5</property>
             <property name="n_columns">2</property>
@@ -33,9 +97,11 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <child>
                   <object class="GtkImage" id="image1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="stock">Gnumeric_FormulaGuru</property>
                     <property name="icon-size">3</property>
                   </object>
@@ -55,9 +121,11 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <child>
                   <object class="GtkImage" id="image2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="stock">gtk-clear</property>
                     <property name="icon-size">3</property>
                   </object>
@@ -77,9 +145,11 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <child>
                   <object class="GtkImage" id="image3">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="stock">gtk-zoom-fit</property>
                     <property name="icon-size">3</property>
                   </object>
@@ -93,18 +163,22 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="hbox1">
+              <object class="GtkBox" id="hbox1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkCheckButton" id="array_button">
                     <property name="label" translatable="yes">Enter as array function</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="padding">2</property>
                     <property name="position">0</property>
                   </packing>
@@ -115,10 +189,13 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="padding">2</property>
                     <property name="position">1</property>
                   </packing>
@@ -136,63 +213,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area2">
-            <property name="visible">True</property>
-            <property name="layout_style">end</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="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/fourier-analysis.ui b/src/dialogs/fourier-analysis.ui
index fa70b31..6186c96 100644
--- a/src/dialogs/fourier-analysis.ui
+++ b/src/dialogs/fourier-analysis.ui
@@ -1,16 +1,78 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="FourierAnalysis">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Fourier Analysis</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
@@ -19,6 +81,7 @@
             <child>
               <object class="GtkTable" id="input-table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">3</property>
                 <property name="n_columns">2</property>
@@ -27,6 +90,7 @@
                 <child>
                   <object class="GtkLabel" id="var1-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">_Input range:</property>
@@ -41,6 +105,7 @@
                 <child>
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Grouped by:</property>
@@ -59,6 +124,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -70,14 +136,16 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="vbox2">
+                  <object class="GtkBox" id="vbox2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <object class="GtkRadioButton" id="grouped_by_col">
                         <property name="label" translatable="yes">_Columns</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -94,6 +162,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">grouped_by_col</property>
@@ -124,6 +193,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label4">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Input</property>
               </object>
               <packing>
@@ -131,10 +201,11 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox3">
+              <object class="GtkBox" id="vbox3">
                 <property name="visible">True</property>
-                <property name="border_width">12</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">12</property>
                 <property name="spacing">6</property>
                 <child>
                   <object class="GtkCheckButton" id="inverse_button">
@@ -143,6 +214,7 @@
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="border_width">5</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -160,6 +232,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Options</property>
               </object>
               <packing>
@@ -168,8 +241,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -181,6 +255,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label6">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Output</property>
               </object>
               <packing>
@@ -190,12 +265,15 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkLabel" id="warnings">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="wrap">True</property>
           </object>
           <packing>
@@ -204,63 +282,6 @@
             <property name="position">2</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/src/dialogs/frequency.ui b/src/dialogs/frequency.ui
index 3507659..3f921bc 100644
--- a/src/dialogs/frequency.ui
+++ b/src/dialogs/frequency.ui
@@ -1,29 +1,93 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Frequency">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Frequency Tables</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">6</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="border_width">5</property>
             <child>
-              <object class="GtkVBox" id="vbox5">
+              <object class="GtkBox" id="vbox5">
                 <property name="visible">True</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkTable" id="input-table">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <property name="n_rows">3</property>
                     <property name="n_columns">2</property>
@@ -35,6 +99,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
@@ -47,8 +112,9 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHBox" id="hbox1">
+                      <object class="GtkBox" id="hbox1">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <property name="homogeneous">True</property>
                         <child>
@@ -57,10 +123,13 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
@@ -70,11 +139,14 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">grouped_by_col</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">1</property>
                           </packing>
                         </child>
@@ -84,12 +156,15 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">grouped_by_col</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">2</property>
                           </packing>
                         </child>
@@ -105,6 +180,7 @@
                     <child>
                       <object class="GtkLabel" id="label1">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="xpad">5</property>
                         <property name="label" translatable="yes">Grouped by:</property>
@@ -120,6 +196,7 @@
                     <child>
                       <object class="GtkLabel" id="var1-label">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="xpad">5</property>
                         <property name="label" translatable="yes">Input _range:</property>
@@ -136,15 +213,19 @@
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHSeparator" id="hseparator4">
+                  <object class="GtkSeparator" id="hseparator4">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
@@ -156,6 +237,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_Input</property>
                 <property name="use_underline">True</property>
                 <property name="justify">center</property>
@@ -165,13 +247,15 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox4">
+              <object class="GtkBox" id="vbox4">
                 <property name="visible">True</property>
-                <property name="border_width">12</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">12</property>
                 <child>
                   <object class="GtkTable" id="table2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="n_rows">2</property>
                     <property name="n_columns">2</property>
                     <child>
@@ -180,6 +264,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -208,6 +293,7 @@
                       <object class="GtkLabel" id="label9">
                         <property name="visible">True</property>
                         <property name="sensitive">False</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">_Maximum number of categories:</property>
                         <property name="use_underline">True</property>
@@ -223,27 +309,33 @@
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="padding">5</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHSeparator" id="hseparator2">
+                  <object class="GtkSeparator" id="hseparator2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
                 <child>
                   <object class="GtkTable" id="bin_table">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="n_rows">3</property>
                     <property name="n_columns">2</property>
                     <child>
                       <object class="GtkLabel" id="var2-label">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="xpad">5</property>
                         <property name="label" translatable="yes">Category _range:</property>
@@ -264,6 +356,7 @@
                         <property name="can_focus">True</property>
                         <property name="has_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
@@ -284,6 +377,8 @@
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="padding">5</property>
                     <property name="position">2</property>
                   </packing>
@@ -296,6 +391,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label3">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">C_ategories</property>
                 <property name="use_underline">True</property>
                 <property name="justify">center</property>
@@ -306,10 +402,11 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox3">
+              <object class="GtkBox" id="vbox3">
                 <property name="visible">True</property>
-                <property name="border_width">12</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">12</property>
                 <property name="spacing">6</property>
                 <child>
                   <object class="GtkRadioButton" id="nochart-button">
@@ -317,6 +414,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -332,6 +430,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">nochart-button</property>
                   </object>
@@ -347,6 +446,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">nochart-button</property>
                   </object>
@@ -357,11 +457,13 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHSeparator" id="hseparator5">
+                  <object class="GtkSeparator" id="hseparator5">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">3</property>
                   </packing>
                 </child>
@@ -371,6 +473,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -386,6 +489,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
@@ -404,6 +508,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_Graphs &amp; Options</property>
                 <property name="use_underline">True</property>
               </object>
@@ -413,8 +518,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -426,6 +532,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label4">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_Output</property>
                 <property name="use_underline">True</property>
                 <property name="justify">center</property>
@@ -437,12 +544,15 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkLabel" id="warnings">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="wrap">True</property>
           </object>
           <packing>
@@ -451,63 +561,6 @@
             <property name="position">2</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/src/dialogs/function-select.ui b/src/dialogs/function-select.ui
index df4b974..7b5d060 100644
--- a/src/dialogs/function-select.ui
+++ b/src/dialogs/function-select.ui
@@ -1,57 +1,156 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="selection_dialog">
     <property name="width_request">620</property>
     <property name="height_request">550</property>
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Function Selector</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</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_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="paste_button">
+                <property name="label">gtk-paste</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_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkLabel" id="title_label">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="xalign">0</property>
             <property name="label" translatable="yes">Select a function to insert:</property>
             <property name="wrap">True</property>
           </object>
           <packing>
             <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
-          <object class="GtkVPaned" id="vpaned1">
+          <object class="GtkPaned" id="vpaned1">
             <property name="visible">True</property>
+            <property name="orientation">vertical</property>
             <property name="can_focus">True</property>
             <property name="border_width">4</property>
             <child>
-              <object class="GtkVBox" id="vbox1">
+              <object class="GtkBox" id="vbox1">
                 <property name="visible">True</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <child>
-                  <object class="GtkHBox" id="hbox1">
+                  <object class="GtkBox" id="hbox1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <object class="GtkLabel" id="label1">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">Category:</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkComboBox" id="category-box">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="has_frame">False</property>
                       </object>
                       <packing>
@@ -62,39 +161,48 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkVSeparator" id="vseparator1"/>
+                      <object class="GtkSeparator" id="vseparator1">
+                        <property name="orientation">vertical</property>
+                        <property name="can_focus">False</property>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="padding">5</property>
                         <property name="position">2</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkImage" id="image1">
+                      <object class="GtkEntry" id="search-entry">
                         <property name="visible">True</property>
-                        <property name="stock">gtk-find</property>
-                        <property name="icon-size">2</property>
+                        <property name="can_focus">True</property>
+                        <property name="invisible_char">â</property>
                       </object>
                       <packing>
-                        <property name="expand">False</property>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="pack_type">end</property>
-                        <property name="position">4</property>
+                        <property name="position">3</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkEntry" id="search-entry">
+                      <object class="GtkImage" id="image1">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="invisible_char">&#x25CF;</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-find</property>
+                        <property name="icon-size">2</property>
                       </object>
                       <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="pack_type">end</property>
-                        <property name="position">3</property>
+                        <property name="position">4</property>
                       </packing>
                     </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
@@ -103,17 +211,20 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="border_width">5</property>
-                    <property name="hscrollbar_policy">automatic</property>
-                    <property name="vscrollbar_policy">automatic</property>
                     <property name="shadow_type">etched-in</property>
                     <child>
                       <object class="GtkTreeView" id="function-list">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
+                        <child internal-child="selection">
+                          <object class="GtkTreeSelection" id="treeview-selection1"/>
+                        </child>
                       </object>
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
@@ -128,7 +239,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="border_width">5</property>
-                <property name="hscrollbar_policy">automatic</property>
                 <property name="shadow_type">etched-in</property>
                 <child>
                   <object class="GtkTextView" id="description">
@@ -149,96 +259,14 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">2</property>
           </packing>
         </child>
         <child>
           <placeholder/>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</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>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="paste_button">
-                <property name="label">gtk-paste</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>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">4</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/src/dialogs/goalseek.ui b/src/dialogs/goalseek.ui
index 18ccb00..4630833 100644
--- a/src/dialogs/goalseek.ui
+++ b/src/dialogs/goalseek.ui
@@ -1,21 +1,99 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="GoalSeek">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">GoalSeek</property>
     <property name="window_position">mouse</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">12</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="applybutton">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="closebutton">
+                <property name="label">gtk-close</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkTable" id="goal-table">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="border_width">5</property>
             <property name="n_rows">6</property>
             <property name="n_columns">3</property>
@@ -24,6 +102,7 @@
             <child>
               <object class="GtkLabel" id="set_cell-label">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">_Set Cell:</property>
                 <property name="use_underline">True</property>
@@ -41,6 +120,7 @@
             <child>
               <object class="GtkLabel" id="to_value-label">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">_To Value:</property>
                 <property name="use_underline">True</property>
@@ -59,6 +139,7 @@
             <child>
               <object class="GtkLabel" id="by_changing-label">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">_By Changing Cell:</property>
                 <property name="use_underline">True</property>
@@ -76,6 +157,7 @@
             <child>
               <object class="GtkLabel" id="at_least-label">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">(_Minimum):</property>
                 <property name="use_underline">True</property>
@@ -94,6 +176,7 @@
             <child>
               <object class="GtkLabel" id="at_most-label">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">(Ma_ximum):</property>
                 <property name="use_underline">True</property>
@@ -151,6 +234,7 @@
             <child>
               <object class="GtkLabel" id="label8">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">&lt;span weight="bold"&gt;Goal&lt;/span&gt;</property>
                 <property name="use_markup">True</property>
@@ -164,6 +248,7 @@
             <child>
               <object class="GtkLabel" id="label10">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
               </object>
               <packing>
@@ -189,6 +274,7 @@
         <child>
           <object class="GtkTable" id="result-table">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="border_width">5</property>
             <property name="n_rows">5</property>
             <property name="n_columns">3</property>
@@ -197,6 +283,7 @@
             <child>
               <object class="GtkLabel" id="target-value">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="xpad">5</property>
                 <property name="ypad">1</property>
@@ -215,6 +302,7 @@
             <child>
               <object class="GtkLabel" id="current-value">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="xpad">5</property>
                 <property name="ypad">1</property>
@@ -233,6 +321,7 @@
             <child>
               <object class="GtkLabel" id="solution">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="xpad">5</property>
                 <property name="ypad">1</property>
@@ -251,6 +340,7 @@
             <child>
               <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="xpad">5</property>
                 <property name="ypad">1</property>
@@ -268,6 +358,7 @@
             <child>
               <object class="GtkLabel" id="label6">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="xpad">5</property>
                 <property name="ypad">1</property>
@@ -285,6 +376,7 @@
             <child>
               <object class="GtkLabel" id="label7">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="xpad">5</property>
                 <property name="ypad">1</property>
@@ -303,6 +395,7 @@
             <child>
               <object class="GtkLabel" id="result-label">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="xpad">5</property>
                 <property name="ypad">5</property>
@@ -321,6 +414,7 @@
             <child>
               <object class="GtkLabel" id="label11">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
               </object>
               <packing>
@@ -333,6 +427,7 @@
             <child>
               <object class="GtkLabel" id="label9">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">&lt;span weight="bold"&gt;Last Result&lt;/span&gt;</property>
                 <property name="use_markup">True</property>
@@ -350,77 +445,6 @@
             <property name="position">2</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="applybutton">
-                <property name="label">gtk-apply</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="closebutton">
-                <property name="label">gtk-close</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/src/dialogs/goto.ui b/src/dialogs/goto.ui
index 47e4cc6..c914d7d 100644
--- a/src/dialogs/goto.ui
+++ b/src/dialogs/goto.ui
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
+  <!-- interface-requires gtk+ 3.0 -->
   <!-- interface-naming-policy toplevel-contextual -->
   <object class="GtkAdjustment" id="adjustment1">
     <property name="lower">1</property>
@@ -22,12 +22,13 @@
     <property name="window_position">center</property>
     <property name="type_hint">normal</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">5</property>
         <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
+          <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
@@ -85,8 +86,6 @@
                 <property name="height_request">150</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="hscrollbar_policy">automatic</property>
-                <property name="vscrollbar_policy">automatic</property>
               </object>
               <packing>
                 <property name="right_attach">2</property>
diff --git a/src/dialogs/hf-config.ui b/src/dialogs/hf-config.ui
index 7f0dee1..b6387e2 100644
--- a/src/dialogs/hf-config.ui
+++ b/src/dialogs/hf-config.ui
@@ -1,23 +1,94 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="hf-config">
     <property name="width_request">600</property>
+    <property name="can_focus">False</property>
     <property name="window_position">center-on-parent</property>
     <property name="type_hint">dialog</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="help_button">
+                <property name="label">gtk-help</property>
+                <property name="can_focus">False</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="can_focus">False</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="can_focus">False</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="can_focus">False</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
         <child>
           <object class="GtkTable" id="table1">
+            <property name="can_focus">False</property>
             <property name="n_rows">4</property>
             <property name="n_columns">3</property>
             <property name="column_spacing">4</property>
             <property name="row_spacing">4</property>
             <child>
               <object class="GtkLabel" id="label4">
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="ypad">2</property>
                 <property name="label" translatable="yes">Enter the format string for each section:</property>
@@ -29,6 +100,7 @@
             </child>
             <child>
               <object class="GtkLabel" id="label3">
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">_Right section:</property>
                 <property name="use_underline">True</property>
@@ -45,6 +117,7 @@
             </child>
             <child>
               <object class="GtkLabel" id="label2">
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">_Middle section:</property>
                 <property name="use_underline">True</property>
@@ -61,6 +134,7 @@
             </child>
             <child>
               <object class="GtkLabel" id="label1">
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">_Left section:</property>
                 <property name="use_underline">True</property>
@@ -76,6 +150,7 @@
             <child>
               <object class="GtkFrame" id="frame1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                 <property name="label_xalign">0</property>
                 <property name="label_yalign">0</property>
@@ -83,14 +158,13 @@
                 <child>
                   <object class="GtkAlignment" id="alignment1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <child>
                       <object class="GtkScrolledWindow" id="scrolledwindow3">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="hscrollbar_policy">automatic</property>
-                        <property name="vscrollbar_policy">automatic</property>
                         <child>
                           <object class="GtkTextView" id="left-format">
                             <property name="visible">True</property>
@@ -118,6 +192,7 @@
             <child>
               <object class="GtkFrame" id="frame3">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                 <property name="label_xalign">0</property>
                 <property name="label_yalign">0</property>
@@ -125,14 +200,13 @@
                 <child>
                   <object class="GtkAlignment" id="alignment3">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <child>
                       <object class="GtkScrolledWindow" id="scrolledwindow1">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="hscrollbar_policy">automatic</property>
-                        <property name="vscrollbar_policy">automatic</property>
                         <child>
                           <object class="GtkTextView" id="middle-format">
                             <property name="visible">True</property>
@@ -163,6 +237,7 @@
             <child>
               <object class="GtkFrame" id="frame4">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                 <property name="label_xalign">0</property>
                 <property name="label_yalign">0</property>
@@ -170,14 +245,13 @@
                 <child>
                   <object class="GtkAlignment" id="alignment4">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <child>
                       <object class="GtkScrolledWindow" id="scrolledwindow2">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="hscrollbar_policy">automatic</property>
-                        <property name="vscrollbar_policy">automatic</property>
                         <child>
                           <object class="GtkTextView" id="right-format">
                             <property name="visible">True</property>
@@ -208,12 +282,15 @@
             <child>
               <object class="GtkToolbar" id="insertion-toolbar">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                 <child>
                   <object class="GtkToolButton" id="delete-button">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="tooltip_text" translatable="yes">Delete the selected fields and text</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="label" translatable="yes">Delete Field</property>
                     <property name="stock_id">gtk-delete</property>
                   </object>
@@ -225,6 +302,7 @@
                 <child>
                   <object class="GtkSeparatorToolItem" id="separatortoolitem1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                   </object>
                   <packing>
@@ -234,8 +312,10 @@
                 <child>
                   <object class="GtkMenuToolButton" id="insert-date-button">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="tooltip_text" translatable="yes">Insert the date of printing</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="label" translatable="yes">Date</property>
                   </object>
                   <packing>
@@ -245,8 +325,10 @@
                 <child>
                   <object class="GtkMenuToolButton" id="insert-time-button">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="tooltip_text" translatable="yes">Insert the time of printing</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="label" translatable="yes">Time</property>
                   </object>
                   <packing>
@@ -256,6 +338,7 @@
                 <child>
                   <object class="GtkSeparatorToolItem" id="toolbutton1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                   </object>
                   <packing>
@@ -265,8 +348,10 @@
                 <child>
                   <object class="GtkToolButton" id="insert-page-button">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="tooltip_text" translatable="yes">Insert the page number</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="label" translatable="yes">Page</property>
                   </object>
                   <packing>
@@ -277,8 +362,10 @@
                 <child>
                   <object class="GtkToolButton" id="insert-pages-button">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="tooltip_text" translatable="yes">Insert the total number of pages</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="label" translatable="yes">Pages</property>
                   </object>
                   <packing>
@@ -289,8 +376,10 @@
                 <child>
                   <object class="GtkToolButton" id="insert-sheet-button">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="tooltip_text" translatable="yes">Insert the name of the current sheet</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="label" translatable="yes">Sheet</property>
                   </object>
                   <packing>
@@ -301,6 +390,7 @@
                 <child>
                   <object class="GtkSeparatorToolItem" id="toolbutton2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                   </object>
                   <packing>
@@ -310,8 +400,10 @@
                 <child>
                   <object class="GtkToolButton" id="insert-file-button">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="tooltip_text" translatable="yes">Insert the name of the file</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="label" translatable="yes">File</property>
                     <property name="stock_id">gtk-file</property>
                   </object>
@@ -323,8 +415,10 @@
                 <child>
                   <object class="GtkToolButton" id="insert-path-button">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="tooltip_text" translatable="yes">Insert the path to the file</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="label" translatable="yes">Path</property>
                     <property name="stock_id">gtk-directory</property>
                   </object>
@@ -336,6 +430,7 @@
                 <child>
                   <object class="GtkSeparatorToolItem" id="toolbutton3">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                   </object>
                   <packing>
@@ -345,8 +440,10 @@
                 <child>
                   <object class="GtkMenuToolButton" id="insert-cell-button">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="tooltip_text" translatable="yes">Insert a spreadsheet cell</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="label" translatable="yes">Cell</property>
                   </object>
                   <packing>
@@ -363,70 +460,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="can_focus">False</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="apply_button">
-                <property name="label">gtk-apply</property>
-                <property name="can_focus">False</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="can_focus">False</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="can_focus">False</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-          </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="fill">True</property>
+            <property name="position">2</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/hf-dt-format.ui b/src/dialogs/hf-dt-format.ui
index 190b410..3de1a47 100644
--- a/src/dialogs/hf-dt-format.ui
+++ b/src/dialogs/hf-dt-format.ui
@@ -1,28 +1,89 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="hf-dt-format">
     <property name="width_request">600</property>
+    <property name="can_focus">False</property>
     <property name="window_position">center-on-parent</property>
     <property name="type_hint">dialog</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <object class="GtkButton" id="help_button">
+                <property name="label">gtk-help</property>
+                <property name="can_focus">False</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="can_focus">False</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="can_focus">False</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
         <child>
           <object class="GtkTable" id="layout-table">
+            <property name="can_focus">False</property>
             <property name="n_rows">4</property>
             <property name="n_columns">3</property>
             <property name="column_spacing">4</property>
             <property name="row_spacing">4</property>
             <child>
-              <object class="GtkHBox" id="hbox1">
+              <object class="GtkBox" id="hbox1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                 <child>
                   <object class="GtkImage" id="image1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="stock">gtk-dialog-question</property>
                     <property name="pixel_size">1</property>
@@ -30,6 +91,7 @@
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="padding">10</property>
                     <property name="position">0</property>
                   </packing>
@@ -37,12 +99,15 @@
                 <child>
                   <object class="GtkLabel" id="instruction-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">&lt;b&gt;Select a date format:&lt;/b&gt;</property>
                     <property name="use_markup">True</property>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
@@ -80,60 +145,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="layout_style">end</property>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="can_focus">False</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="can_focus">False</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="can_focus">False</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-          </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="fill">True</property>
+            <property name="position">2</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/histogram.ui b/src/dialogs/histogram.ui
index 9d826f2..ba60609 100644
--- a/src/dialogs/histogram.ui
+++ b/src/dialogs/histogram.ui
@@ -1,26 +1,93 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Histogram">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Histogram</property>
     <property name="type_hint">dialog</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">6</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="border_width">5</property>
             <child>
-              <object class="GtkVBox" id="vbox5">
+              <object class="GtkBox" id="vbox5">
                 <property name="visible">True</property>
+                <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkTable" id="input-table">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <property name="n_rows">3</property>
                     <property name="n_columns">2</property>
@@ -29,6 +96,7 @@
                     <child>
                       <object class="GtkLabel" id="var1-label">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="xpad">5</property>
                         <property name="label" translatable="yes">Input _range:</property>
@@ -43,6 +111,7 @@
                     <child>
                       <object class="GtkLabel" id="label1">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="xpad">5</property>
                         <property name="label" translatable="yes">Grouped by:</property>
@@ -56,8 +125,9 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHBox" id="hbox1">
+                      <object class="GtkBox" id="hbox1">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <property name="homogeneous">True</property>
                         <child>
@@ -66,10 +136,13 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
@@ -79,11 +152,14 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">grouped_by_col</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">1</property>
                           </packing>
                         </child>
@@ -93,12 +169,15 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">grouped_by_col</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">2</property>
                           </packing>
                         </child>
@@ -117,6 +196,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
@@ -133,15 +213,19 @@
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHSeparator" id="hseparator4">
+                  <object class="GtkSeparator" id="hseparator4">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
@@ -153,6 +237,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_Input</property>
                 <property name="use_underline">True</property>
                 <property name="justify">center</property>
@@ -162,12 +247,15 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox4">
+              <object class="GtkBox" id="vbox4">
                 <property name="visible">True</property>
+                <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <child>
                   <object class="GtkTable" id="table2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="n_rows">4</property>
                     <property name="n_columns">2</property>
                     <child>
@@ -187,6 +275,7 @@
                     <child>
                       <object class="GtkLabel" id="label8">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">M_inimum cutoff:</property>
                         <property name="use_underline">True</property>
@@ -203,6 +292,7 @@
                     <child>
                       <object class="GtkLabel" id="label9">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">_Number of cutoffs:</property>
                         <property name="use_underline">True</property>
@@ -219,6 +309,7 @@
                     <child>
                       <object class="GtkLabel" id="label7">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">Ma_ximum cutoff:</property>
                         <property name="use_underline">True</property>
@@ -266,6 +357,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -278,22 +370,27 @@
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="padding">5</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHSeparator" id="hseparator2">
+                  <object class="GtkSeparator" id="hseparator2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
                 <child>
                   <object class="GtkTable" id="bin_table">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="n_rows">3</property>
                     <property name="n_columns">2</property>
                     <child>
@@ -303,6 +400,7 @@
                         <property name="can_focus">True</property>
                         <property name="has_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
@@ -315,6 +413,7 @@
                     <child>
                       <object class="GtkLabel" id="var2-label">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="xpad">5</property>
                         <property name="label" translatable="yes">Cutoff _range:</property>
@@ -339,6 +438,8 @@
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="padding">5</property>
                     <property name="position">2</property>
                   </packing>
@@ -351,6 +452,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label3">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">C_utoffs</property>
                 <property name="use_underline">True</property>
                 <property name="justify">center</property>
@@ -361,18 +463,23 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox2">
+              <object class="GtkBox" id="vbox2">
                 <property name="visible">True</property>
+                <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkRadioButton" id="bintype_pm_inf_upper">
                     <property name="label" translatable="yes">(ââ,â), [â,â), â, [â,â), [â,â)</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
@@ -382,20 +489,25 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">bintype_pm_inf_upper</property>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHSeparator" id="hseparator1">
+                  <object class="GtkSeparator" id="hseparator1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">2</property>
                   </packing>
                 </child>
@@ -405,11 +517,14 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">bintype_pm_inf_upper</property>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">3</property>
                   </packing>
                 </child>
@@ -419,11 +534,14 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">bintype_pm_inf_upper</property>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">4</property>
                   </packing>
                 </child>
@@ -433,11 +551,14 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">bintype_pm_inf_upper</property>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">5</property>
                   </packing>
                 </child>
@@ -447,20 +568,25 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">bintype_pm_inf_upper</property>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">6</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHSeparator" id="hseparator3">
+                  <object class="GtkSeparator" id="hseparator3">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">7</property>
                   </packing>
                 </child>
@@ -470,11 +596,14 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">bintype_pm_inf_upper</property>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">8</property>
                   </packing>
                 </child>
@@ -484,11 +613,14 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">bintype_pm_inf_upper</property>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">9</property>
                   </packing>
                 </child>
@@ -500,6 +632,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label6">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_Bins</property>
                 <property name="use_underline">True</property>
               </object>
@@ -509,8 +642,10 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox3">
+              <object class="GtkBox" id="vbox3">
                 <property name="visible">True</property>
+                <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="spacing">6</property>
                 <child>
@@ -519,6 +654,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -534,6 +670,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">nochart-button</property>
                   </object>
@@ -549,6 +686,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">nochart-button</property>
                   </object>
@@ -564,6 +702,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">nochart-button</property>
                   </object>
@@ -574,11 +713,13 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHSeparator" id="hseparator5">
+                  <object class="GtkSeparator" id="hseparator5">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">4</property>
                   </packing>
                 </child>
@@ -588,6 +729,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -603,6 +745,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -618,6 +761,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -638,6 +782,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label4">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_Graphs &amp; Options</property>
                 <property name="use_underline">True</property>
                 <property name="justify">center</property>
@@ -648,8 +793,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -661,6 +807,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_Output</property>
                 <property name="use_underline">True</property>
                 <property name="justify">center</property>
@@ -672,12 +819,15 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkLabel" id="warnings">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="wrap">True</property>
           </object>
           <packing>
@@ -686,63 +836,6 @@
             <property name="position">2</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/src/dialogs/hyperlink.ui b/src/dialogs/hyperlink.ui
index f154f66..45a6ff9 100644
--- a/src/dialogs/hyperlink.ui
+++ b/src/dialogs/hyperlink.ui
@@ -1,24 +1,86 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="hyperlink-dialog">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">HyperLink</property>
     <property name="window_position">mouse</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkTable" id="table1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="n_rows">7</property>
             <property name="n_columns">3</property>
             <child>
               <object class="GtkImage" id="link-type-image">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xpad">10</property>
                 <property name="ypad">10</property>
               </object>
@@ -28,11 +90,13 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="internal-link-box">
+              <object class="GtkBox" id="internal-link-box">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkLabel" id="internal-link-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">6</property>
                     <property name="label" translatable="yes">Target _Range:</property>
@@ -59,11 +123,13 @@
             <child>
               <object class="GtkTable" id="email-box">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="n_rows">2</property>
                 <property name="n_columns">2</property>
                 <child>
                   <object class="GtkLabel" id="email-address-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">6</property>
                     <property name="label" translatable="yes">Email _Address:</property>
@@ -78,6 +144,7 @@
                 <child>
                   <object class="GtkLabel" id="email-subject-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">6</property>
                     <property name="label" translatable="yes">_Subject:</property>
@@ -127,11 +194,13 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="url-box">
+              <object class="GtkBox" id="url-box">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkLabel" id="url-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">6</property>
                     <property name="label" translatable="yes">_Web Address:</property>
@@ -151,6 +220,8 @@
                     <property name="activates_default">True</property>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
@@ -164,11 +235,13 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="external-link-box">
+              <object class="GtkBox" id="external-link-box">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkLabel" id="external-link-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">6</property>
                     <property name="label" translatable="yes">_File:</property>
@@ -188,6 +261,8 @@
                     <property name="activates_default">True</property>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
@@ -201,11 +276,13 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="hbox2">
+              <object class="GtkBox" id="hbox2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkImage" id="image2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xpad">5</property>
                     <property name="ypad">5</property>
                     <property name="stock">gtk-dialog-info</property>
@@ -221,6 +298,7 @@
                   <object class="GtkLabel" id="link-type-descriptor">
                     <property name="width_request">300</property>
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">3</property>
                     <property name="use_markup">True</property>
@@ -228,12 +306,14 @@
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
                 <child>
                   <object class="GtkLabel" id="ltype-decriptor">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                   </object>
                   <packing>
                     <property name="expand">False</property>
@@ -253,6 +333,7 @@
             <child>
               <object class="GtkComboBox" id="link-type-menu">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
               </object>
               <packing>
                 <property name="left_attach">2</property>
@@ -263,6 +344,7 @@
             <child>
               <object class="GtkLabel" id="label3">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="xpad">6</property>
                 <property name="label" translatable="yes">T_ype:</property>
@@ -279,6 +361,7 @@
             <child>
               <object class="GtkTable" id="table2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="n_rows">3</property>
                 <property name="n_columns">2</property>
                 <child>
@@ -287,6 +370,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">use-default-tip</property>
                   </object>
@@ -301,6 +385,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -318,8 +403,6 @@
                     <property name="height_request">50</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="hscrollbar_policy">automatic</property>
-                    <property name="vscrollbar_policy">automatic</property>
                     <property name="shadow_type">in</property>
                     <child>
                       <object class="GtkTextView" id="tip-entry">
@@ -365,62 +448,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/insert-cells.ui b/src/dialogs/insert-cells.ui
index 99c19db..7fdbaff 100644
--- a/src/dialogs/insert-cells.ui
+++ b/src/dialogs/insert-cells.ui
@@ -1,25 +1,89 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Insert_cells">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Insert cells</property>
     <property name="modal">True</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkAlignment" id="alignment1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="xscale">0</property>
             <child>
               <object class="GtkTable" id="table1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">6</property>
                 <property name="n_rows">5</property>
                 <property name="n_columns">2</property>
@@ -28,6 +92,7 @@
                 <child>
                   <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">&lt;span weight="bold"&gt;Insert Method&lt;/span&gt;</property>
                     <property name="use_markup">True</property>
@@ -45,6 +110,7 @@
                     <property name="can_focus">True</property>
                     <property name="has_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -63,6 +129,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">radio_0</property>
@@ -82,6 +149,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">radio_0</property>
@@ -98,6 +166,7 @@
                 <child>
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                   </object>
                   <packing>
@@ -113,6 +182,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">radio_0</property>
@@ -133,64 +203,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/kaplan-meier.ui b/src/dialogs/kaplan-meier.ui
index 58352ad..dc95e13 100644
--- a/src/dialogs/kaplan-meier.ui
+++ b/src/dialogs/kaplan-meier.ui
@@ -1,39 +1,93 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="upper">1000</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment2">
-    <property name="upper">1000</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="KaplanMeier">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Kaplan Meier Estimates</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">6</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="border_width">5</property>
             <child>
-              <object class="GtkVBox" id="vbox5">
+              <object class="GtkBox" id="vbox5">
                 <property name="visible">True</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkTable" id="input-table">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <property name="n_rows">5</property>
                     <property name="n_columns">3</property>
@@ -45,6 +99,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
@@ -59,6 +114,7 @@
                     <child>
                       <object class="GtkLabel" id="var2-label">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">Censor co_lumn:</property>
                         <property name="use_underline">True</property>
@@ -76,6 +132,7 @@
                     <child>
                       <object class="GtkLabel" id="var1-label">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="xpad">5</property>
                         <property name="label" translatable="yes">_Time column:</property>
@@ -91,6 +148,7 @@
                     <child>
                       <object class="GtkLabel" id="label1">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">1</property>
                         <property name="label" translatable="yes">Censored record labels from:</property>
                         <property name="justify">right</property>
@@ -105,6 +163,7 @@
                     <child>
                       <object class="GtkLabel" id="label5">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">1</property>
                         <property name="label" translatable="yes">to:</property>
                         <property name="justify">right</property>
@@ -162,6 +221,7 @@
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
@@ -170,6 +230,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_Input</property>
                 <property name="use_underline">True</property>
                 <property name="justify">center</property>
@@ -179,10 +240,11 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox2">
+              <object class="GtkBox" id="vbox2">
                 <property name="visible">True</property>
-                <property name="border_width">12</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">12</property>
                 <property name="spacing">5</property>
                 <child>
                   <object class="GtkCheckButton" id="groups-check">
@@ -190,6 +252,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -202,6 +265,7 @@
                 <child>
                   <object class="GtkTable" id="groups-table">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="n_rows">7</property>
                     <property name="n_columns">3</property>
                     <property name="column_spacing">5</property>
@@ -210,6 +274,7 @@
                     <child>
                       <object class="GtkLabel" id="groups-label">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">Groups column:</property>
                       </object>
@@ -223,6 +288,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_stock">True</property>
                       </object>
                       <packing>
@@ -240,6 +306,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_stock">True</property>
                       </object>
                       <packing>
@@ -255,8 +322,6 @@
                       <object class="GtkScrolledWindow" id="groups-scrolled">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="hscrollbar_policy">automatic</property>
-                        <property name="vscrollbar_policy">automatic</property>
                         <property name="shadow_type">in</property>
                         <child>
                           <placeholder/>
@@ -288,6 +353,8 @@
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
@@ -299,6 +366,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label6">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_Groups</property>
                 <property name="use_underline">True</property>
               </object>
@@ -308,13 +376,15 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox4">
+              <object class="GtkBox" id="vbox4">
                 <property name="visible">True</property>
-                <property name="border_width">12</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">12</property>
                 <child>
                   <object class="GtkTable" id="table1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="n_rows">2</property>
                     <property name="n_columns">2</property>
                     <property name="column_spacing">25</property>
@@ -324,6 +394,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
@@ -342,6 +413,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
@@ -357,6 +429,7 @@
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
@@ -366,6 +439,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -381,6 +455,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -396,6 +471,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -413,6 +489,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label3">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">O_ptions</property>
                 <property name="use_markup">True</property>
                 <property name="use_underline">True</property>
@@ -424,8 +501,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -437,6 +515,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label4">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_Output</property>
                 <property name="use_underline">True</property>
                 <property name="justify">center</property>
@@ -448,12 +527,15 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkLabel" id="warnings">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="wrap">True</property>
           </object>
           <packing>
@@ -462,63 +544,6 @@
             <property name="position">2</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
@@ -527,4 +552,14 @@
       <action-widget response="0">okbutton</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">1000</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="upper">1000</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
 </interface>
diff --git a/src/dialogs/mean-tests.ui b/src/dialogs/mean-tests.ui
index fb7dc9b..45b820e 100644
--- a/src/dialogs/mean-tests.ui
+++ b/src/dialogs/mean-tests.ui
@@ -1,16 +1,78 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="MeanTests">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Testing the Difference of 2 Means</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
@@ -18,6 +80,7 @@
             <child>
               <object class="GtkTable" id="input-table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">3</property>
                 <property name="n_columns">2</property>
@@ -26,6 +89,7 @@
                 <child>
                   <object class="GtkLabel" id="var1-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Variable _1 range:</property>
@@ -40,6 +104,7 @@
                 <child>
                   <object class="GtkLabel" id="var2-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Variable _2 range:</property>
@@ -59,6 +124,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -83,6 +149,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label9">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_Input</property>
                 <property name="use_underline">True</property>
               </object>
@@ -93,6 +160,7 @@
             <child>
               <object class="GtkTable" id="options-table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">4</property>
                 <property name="n_columns">3</property>
@@ -101,6 +169,7 @@
                 <child>
                   <object class="GtkLabel" id="variablespaired-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Variables are:</property>
@@ -117,6 +186,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -133,6 +203,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
@@ -148,6 +219,7 @@
                 <child>
                   <object class="GtkLabel" id="varianceknown-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Population variances are:</property>
@@ -166,6 +238,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -184,6 +257,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
@@ -204,6 +278,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -222,6 +297,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
@@ -253,6 +329,7 @@
                 <child>
                   <object class="GtkLabel" id="var2_variance-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Variable _2 population variance:</property>
@@ -284,6 +361,7 @@
                 <child>
                   <object class="GtkLabel" id="varianceequal-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">_Population variances are:</property>
@@ -301,6 +379,7 @@
                 <child>
                   <object class="GtkLabel" id="var1_variance-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Variable _1 population variance:</property>
@@ -323,6 +402,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label10">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_Populations</property>
                 <property name="use_underline">True</property>
               </object>
@@ -334,6 +414,7 @@
             <child>
               <object class="GtkTable" id="table3">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">2</property>
                 <property name="n_columns">2</property>
@@ -342,6 +423,7 @@
                 <child>
                   <object class="GtkLabel" id="label6">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Hypothesized mean _difference:</property>
@@ -357,6 +439,7 @@
                 <child>
                   <object class="GtkLabel" id="label7">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">_Alpha:</property>
@@ -407,6 +490,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label11">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_Test</property>
                 <property name="use_underline">True</property>
               </object>
@@ -416,8 +500,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -429,6 +514,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label12">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_Output</property>
                 <property name="use_underline">True</property>
               </object>
@@ -439,64 +525,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/merge.ui b/src/dialogs/merge.ui
index c32dbaa..f6f85c0 100644
--- a/src/dialogs/merge.ui
+++ b/src/dialogs/merge.ui
@@ -1,20 +1,83 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Merge">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Merge...</property>
     <property name="window_position">mouse</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox2">
+      <object class="GtkBox" id="dialog-vbox2">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="merge_button">
+                <property name="label" translatable="yes">_Merge</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkTable" id="main_table">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="border_width">5</property>
             <property name="n_rows">8</property>
             <property name="n_columns">3</property>
@@ -26,6 +89,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
@@ -43,6 +107,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
@@ -60,6 +125,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
@@ -76,8 +142,6 @@
                 <property name="width_request">200</property>
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="hscrollbar_policy">automatic</property>
-                <property name="vscrollbar_policy">automatic</property>
               </object>
               <packing>
                 <property name="right_attach">2</property>
@@ -88,6 +152,7 @@
             <child>
               <object class="GtkLabel" id="var1-label">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">1</property>
                 <property name="xpad">5</property>
                 <property name="ypad">5</property>
@@ -119,64 +184,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area2">
-            <property name="visible">True</property>
-            <property name="layout_style">end</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="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="merge_button">
-                <property name="label" translatable="yes">_Merge</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/moving-averages.ui b/src/dialogs/moving-averages.ui
index 7b30bbd..36cbe87 100644
--- a/src/dialogs/moving-averages.ui
+++ b/src/dialogs/moving-averages.ui
@@ -1,57 +1,120 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="upper">100</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="MovAverages">
+    <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Moving Average</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
-          <object class="GtkVBox" id="vbox2">
+          <object class="GtkBox" id="vbox2">
             <property name="visible">True</property>
             <property name="orientation">vertical</property>
+            <property name="can_focus">False</property>
             <child>
               <object class="GtkNotebook" id="notebook1">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="border_width">5</property>
                 <child>
-                  <object class="GtkVBox" id="vbox3">
+                  <object class="GtkBox" id="vbox3">
                     <property name="visible">True</property>
-                    <property name="orientation">vertical</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <object class="GtkTable" id="input-table">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="border_width">12</property>
                         <property name="n_rows">3</property>
                         <property name="n_columns">2</property>
                         <property name="column_spacing">12</property>
                         <property name="row_spacing">6</property>
                         <child>
-                          <object class="GtkHBox" id="hbox1">
+                          <object class="GtkBox" id="hbox1">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <child>
                               <object class="GtkRadioButton" id="grouped_by_col">
                                 <property name="label" translatable="yes">C_olumns</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
                               <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="position">0</property>
                               </packing>
                             </child>
@@ -61,11 +124,14 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                                 <property name="group">grouped_by_col</property>
                               </object>
                               <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
@@ -82,6 +148,7 @@
                         <child>
                           <object class="GtkLabel" id="var1-label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">_Input range:</property>
                             <property name="use_underline">True</property>
@@ -94,6 +161,7 @@
                         <child>
                           <object class="GtkLabel" id="label1">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Grouped by:</property>
                           </object>
@@ -110,6 +178,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                           </object>
@@ -126,21 +195,26 @@
                         </child>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHSeparator" id="hseparator1">
+                      <object class="GtkSeparator" id="hseparator1">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkTable" id="table4">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="border_width">12</property>
                         <property name="n_rows">4</property>
                         <child>
@@ -149,6 +223,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                           </object>
@@ -159,6 +234,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">sma-button</property>
                           </object>
@@ -173,6 +249,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">sma-button</property>
                           </object>
@@ -187,6 +264,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">sma-button</property>
                           </object>
@@ -198,6 +276,7 @@
                       </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="position">2</property>
                       </packing>
                     </child>
@@ -206,6 +285,7 @@
                 <child type="tab">
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Input</property>
                     <property name="use_underline">True</property>
                   </object>
@@ -214,18 +294,20 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkVBox" id="vbox4">
+                  <object class="GtkBox" id="vbox4">
                     <property name="visible">True</property>
-                    <property name="orientation">vertical</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <object class="GtkTable" id="table3">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="border_width">12</property>
                         <property name="n_columns">2</property>
                         <property name="column_spacing">12</property>
                         <child>
                           <object class="GtkLabel" id="label3">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">_Interval:</property>
                             <property name="use_underline">True</property>
@@ -251,21 +333,26 @@
                         </child>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHSeparator" id="hseparator3">
+                      <object class="GtkSeparator" id="hseparator3">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkTable" id="table1">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="border_width">12</property>
                         <property name="n_rows">3</property>
                         <property name="n_columns">4</property>
@@ -277,6 +364,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                           </object>
@@ -290,6 +378,7 @@
                         <child>
                           <object class="GtkLabel" id="label7">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Denominator:</property>
                           </object>
@@ -306,6 +395,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                           </object>
@@ -320,10 +410,11 @@
                         </child>
                         <child>
                           <object class="GtkRadioButton" id="nm1-button">
-                            <property name="label" translatable="yes">n&#x2212;1</property>
+                            <property name="label" translatable="yes">nâ1</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">n-button</property>
@@ -339,10 +430,11 @@
                         </child>
                         <child>
                           <object class="GtkRadioButton" id="nm2-button">
-                            <property name="label" translatable="yes">n&#x2212;2</property>
+                            <property name="label" translatable="yes">nâ2</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">n-button</property>
@@ -356,21 +448,26 @@
                         </child>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">2</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHSeparator" id="hseparator2">
+                      <object class="GtkSeparator" id="hseparator2">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="position">3</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkTable" id="table2">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="border_width">12</property>
                         <property name="n_rows">4</property>
                         <property name="n_columns">2</property>
@@ -381,6 +478,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                           </object>
@@ -396,6 +494,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">prior-button</property>
@@ -414,6 +513,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">prior-button</property>
@@ -448,22 +548,27 @@
                         </child>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="padding">3</property>
                         <property name="position">4</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHSeparator" id="hseparator4">
+                      <object class="GtkSeparator" id="hseparator4">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="position">5</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkTable" id="table5">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="border_width">12</property>
                         <property name="column_spacing">12</property>
                         <child>
@@ -472,12 +577,14 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="draw_indicator">True</property>
                           </object>
                         </child>
                       </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="position">6</property>
                       </packing>
                     </child>
@@ -489,6 +596,7 @@
                 <child type="tab">
                   <object class="GtkLabel" id="label4">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Options</property>
                     <property name="use_underline">True</property>
                   </object>
@@ -498,8 +606,9 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="dao">
+                  <object class="GtkBox" id="dao">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <placeholder/>
                     </child>
@@ -511,6 +620,7 @@
                 <child type="tab">
                   <object class="GtkLabel" id="label5">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Output</property>
                     <property name="use_underline">True</property>
                   </object>
@@ -521,77 +631,27 @@
                 </child>
               </object>
               <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
                 <property name="position">0</property>
               </packing>
             </child>
             <child>
               <object class="GtkLabel" id="warnings">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
               </object>
               <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
                 <property name="position">1</property>
               </packing>
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
@@ -602,4 +662,9 @@
       <action-widget response="0">okbutton</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
 </interface>
diff --git a/src/dialogs/normality-tests.ui b/src/dialogs/normality-tests.ui
index 9148e41..f5ab41f 100644
--- a/src/dialogs/normality-tests.ui
+++ b/src/dialogs/normality-tests.ui
@@ -1,23 +1,79 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="value">0.050000000000000003</property>
-    <property name="upper">1</property>
-    <property name="step_increment">0.01</property>
-    <property name="page_increment">10</property>
-  </object>
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Normality-Tests">
+    <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Normality Tests</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
@@ -26,6 +82,7 @@
             <child>
               <object class="GtkTable" id="input-table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">6</property>
                 <property name="n_columns">2</property>
@@ -34,6 +91,7 @@
                 <child>
                   <object class="GtkLabel" id="var1-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">_Input range:</property>
                     <property name="use_underline">True</property>
@@ -47,6 +105,7 @@
                 <child>
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Grouped by:</property>
                     <property name="justify">center</property>
@@ -67,6 +126,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -78,14 +138,16 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="vbox2">
+                  <object class="GtkBox" id="vbox2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <object class="GtkRadioButton" id="grouped_by_col">
                         <property name="label" translatable="yes">_Columns</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -114,6 +176,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">grouped_by_col</property>
@@ -133,6 +196,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">grouped_by_col</property>
@@ -169,6 +233,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Input</property>
               </object>
               <packing>
@@ -176,12 +241,14 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox3">
+              <object class="GtkBox" id="vbox3">
                 <property name="visible">True</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkTable" id="table2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <property name="n_rows">7</property>
                     <property name="n_columns">2</property>
@@ -190,6 +257,7 @@
                     <child>
                       <object class="GtkLabel" id="label3">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">_Alpha:</property>
                         <property name="use_underline">True</property>
@@ -227,6 +295,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
@@ -237,10 +306,11 @@
                     </child>
                     <child>
                       <object class="GtkRadioButton" id="cramervonmises">
-                        <property name="label" translatable="yes">Cram&#xE9;r-von Mises Test</property>
+                        <property name="label" translatable="yes">CramÃr-von Mises Test</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">andersondarling</property>
@@ -258,6 +328,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">andersondarling</property>
@@ -275,6 +346,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">andersondarling</property>
@@ -292,6 +364,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
@@ -310,6 +383,8 @@
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
@@ -321,6 +396,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label6">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Test</property>
               </object>
               <packing>
@@ -329,8 +405,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -342,6 +419,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label7">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Output</property>
               </object>
               <packing>
@@ -351,12 +429,15 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkLabel" id="warnings">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="use_markup">True</property>
             <property name="wrap">True</property>
           </object>
@@ -366,63 +447,6 @@
             <property name="position">2</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
@@ -431,4 +455,10 @@
       <action-widget response="0">okbutton</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">1</property>
+    <property name="value">0.050000000000000003</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
 </interface>
diff --git a/src/dialogs/paste-special.ui b/src/dialogs/paste-special.ui
index 5f18336..507e3f0 100644
--- a/src/dialogs/paste-special.ui
+++ b/src/dialogs/paste-special.ui
@@ -1,18 +1,94 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="paste-special">
+    <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Paste Special</property>
     <property name="type_hint">dialog</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="paste-link_button">
+                <property name="label" translatable="yes">Paste _Link</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkTable" id="table1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="n_rows">2</property>
             <property name="n_columns">3</property>
             <property name="column_spacing">5</property>
@@ -20,26 +96,33 @@
             <child>
               <object class="GtkFrame" id="frame1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label_xalign">0</property>
                 <property name="shadow_type">out</property>
                 <child>
                   <object class="GtkAlignment" id="alignment1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="left_padding">12</property>
                     <child>
-                      <object class="GtkVBox" id="vbox1">
+                      <object class="GtkBox" id="vbox1">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <object class="GtkRadioButton" id="paste-type-all">
                             <property name="label" translatable="yes">_All</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
@@ -49,12 +132,15 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">paste-type-all</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">1</property>
                           </packing>
                         </child>
@@ -64,11 +150,14 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">paste-type-all</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">2</property>
                           </packing>
                         </child>
@@ -78,11 +167,14 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">paste-type-all</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">3</property>
                           </packing>
                         </child>
@@ -92,11 +184,14 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">paste-type-all</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">4</property>
                           </packing>
                         </child>
@@ -107,6 +202,7 @@
                 <child type="label">
                   <object class="GtkLabel" id="Paste-Type">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">&lt;b&gt;Paste type&lt;/b&gt;</property>
                     <property name="use_markup">True</property>
                   </object>
@@ -116,26 +212,33 @@
             <child>
               <object class="GtkFrame" id="frame2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label_xalign">0</property>
                 <property name="shadow_type">out</property>
                 <child>
                   <object class="GtkAlignment" id="alignment2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="left_padding">12</property>
                     <child>
-                      <object class="GtkVBox" id="vbox2">
+                      <object class="GtkBox" id="vbox2">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <object class="GtkRadioButton" id="region-operation-none">
                             <property name="label" translatable="yes">None</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
@@ -145,11 +248,14 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">region-operation-none</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">1</property>
                           </packing>
                         </child>
@@ -159,11 +265,14 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">region-operation-none</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">2</property>
                           </packing>
                         </child>
@@ -173,11 +282,14 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">region-operation-none</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">3</property>
                           </packing>
                         </child>
@@ -191,6 +303,7 @@
                 <child type="label">
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">&lt;b&gt;Region operation&lt;/b&gt;</property>
                     <property name="use_markup">True</property>
                   </object>
@@ -204,26 +317,33 @@
             <child>
               <object class="GtkFrame" id="frame3">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label_xalign">0</property>
                 <property name="shadow_type">out</property>
                 <child>
                   <object class="GtkAlignment" id="alignment3">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="left_padding">12</property>
                     <child>
-                      <object class="GtkVBox" id="vbox3">
+                      <object class="GtkBox" id="vbox3">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <object class="GtkRadioButton" id="cell-operation-none">
                             <property name="label" translatable="yes">_None</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
@@ -233,11 +353,14 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">cell-operation-none</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">1</property>
                           </packing>
                         </child>
@@ -247,11 +370,14 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">cell-operation-none</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">2</property>
                           </packing>
                         </child>
@@ -261,11 +387,14 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">cell-operation-none</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">3</property>
                           </packing>
                         </child>
@@ -275,11 +404,14 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">cell-operation-none</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">4</property>
                           </packing>
                         </child>
@@ -290,6 +422,7 @@
                 <child type="label">
                   <object class="GtkLabel" id="label3">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">&lt;b&gt;Cell operation&lt;/b&gt;</property>
                     <property name="use_markup">True</property>
                   </object>
@@ -301,19 +434,22 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="hbox1">
+              <object class="GtkBox" id="hbox1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkCheckButton" id="skip-blanks">
                     <property name="label" translatable="yes">Skip _Blanks</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</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>
@@ -323,10 +459,13 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
@@ -341,74 +480,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="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>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="paste-link_button">
-                <property name="label" translatable="yes">Paste _Link</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/plugin-manager.ui b/src/dialogs/plugin-manager.ui
index 3822e26..31cfb7d 100644
--- a/src/dialogs/plugin-manager.ui
+++ b/src/dialogs/plugin-manager.ui
@@ -1,39 +1,85 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="dialog_plugin_manager">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Plugin Manager</property>
     <property name="window_position">mouse</property>
     <property name="default_height">480</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">12</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="button_close_manager">
+                <property name="label">gtk-close</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="border_width">5</property>
             <child>
-              <object class="GtkVBox" id="page_plugin_list">
+              <object class="GtkBox" id="page_plugin_list">
                 <property name="visible">True</property>
-                <property name="border_width">12</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">12</property>
                 <property name="spacing">6</property>
                 <child>
                   <object class="GtkScrolledWindow" id="scrolled_plugin_list">
                     <property name="width_request">400</property>
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="hscrollbar_policy">automatic</property>
-                    <property name="vscrollbar_policy">automatic</property>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
@@ -41,8 +87,6 @@
                   <object class="GtkScrolledWindow" id="scrolledwindow1">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="hscrollbar_policy">automatic</property>
-                    <property name="vscrollbar_policy">automatic</property>
                     <property name="shadow_type">in</property>
                     <child>
                       <object class="GtkTextView" id="textview_plugin_description">
@@ -55,12 +99,14 @@
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="hbox2">
+                  <object class="GtkBox" id="hbox2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="spacing">6</property>
                     <child>
                       <object class="GtkCheckButton" id="checkbutton_install_new">
@@ -68,6 +114,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
@@ -80,8 +127,11 @@
                     <child>
                       <object class="GtkLabel" id="label13">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
@@ -91,15 +141,19 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">2</property>
                       </packing>
                     </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">2</property>
                   </packing>
                 </child>
@@ -108,6 +162,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Plugin List</property>
                 <property name="justify">center</property>
               </object>
@@ -116,14 +171,16 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="page_plugin_details">
+              <object class="GtkBox" id="page_plugin_details">
                 <property name="visible">True</property>
-                <property name="border_width">12</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">12</property>
                 <property name="spacing">6</property>
                 <child>
                   <object class="GtkTable" id="table1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="n_columns">2</property>
                     <property name="column_spacing">4</property>
                     <property name="row_spacing">4</property>
@@ -142,6 +199,7 @@
                     <child>
                       <object class="GtkLabel" id="label_directory">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="xpad">4</property>
                         <property name="label" translatable="yes">Plugin directory:</property>
@@ -155,6 +213,7 @@
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
@@ -163,25 +222,28 @@
                     <property name="width_request">400</property>
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="hscrollbar_policy">automatic</property>
-                    <property name="vscrollbar_policy">automatic</property>
                     <property name="shadow_type">in</property>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
                 <child>
                   <object class="GtkFrame" id="frame_mark_for_deactivation">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label_xalign">0</property>
                     <child>
-                      <object class="GtkVBox" id="vbox6">
+                      <object class="GtkBox" id="vbox6">
                         <property name="visible">True</property>
                         <property name="orientation">vertical</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <object class="GtkLabel" id="label12">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="label" translatable="yes">The plugin cannot be deactivated now because it is in use. However, if you use the check button below, the plugin won't be activated after restarting Gnumeric (unless needed by another plugin).</property>
                             <property name="wrap">True</property>
                           </object>
@@ -198,6 +260,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                           </object>
@@ -212,11 +275,13 @@
                     <child type="label">
                       <object class="GtkLabel" id="label11">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                       </object>
                     </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">2</property>
                   </packing>
                 </child>
@@ -228,6 +293,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Plugin Details</property>
                 <property name="justify">center</property>
               </object>
@@ -237,31 +303,34 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="page_directories">
+              <object class="GtkBox" id="page_directories">
                 <property name="visible">True</property>
-                <property name="border_width">12</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">12</property>
                 <property name="spacing">4</property>
                 <child>
-                  <object class="GtkHBox" id="hbox3">
+                  <object class="GtkBox" id="hbox3">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="spacing">6</property>
                     <child>
                       <object class="GtkScrolledWindow" id="scrolled_directories">
                         <property name="width_request">400</property>
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="hscrollbar_policy">automatic</property>
-                        <property name="vscrollbar_policy">automatic</property>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkVBox" id="vbox7">
+                      <object class="GtkBox" id="vbox7">
                         <property name="visible">True</property>
                         <property name="orientation">vertical</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">6</property>
                         <child>
                           <object class="GtkButton" id="button_directory_add">
@@ -269,6 +338,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_stock">True</property>
                           </object>
                           <packing>
@@ -283,6 +353,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_stock">True</property>
                           </object>
                           <packing>
@@ -297,6 +368,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_stock">True</property>
                           </object>
                           <packing>
@@ -314,6 +386,8 @@
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
@@ -325,6 +399,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label6">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Directories</property>
                 <property name="justify">center</property>
               </object>
@@ -335,48 +410,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area">
-            <property name="visible">True</property>
-            <property name="layout_style">end</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="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="button_close_manager">
-                <property name="label">gtk-close</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/preferences.ui b/src/dialogs/preferences.ui
index b1de302..56b30b4 100644
--- a/src/dialogs/preferences.ui
+++ b/src/dialogs/preferences.ui
@@ -1,98 +1,111 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="preferences">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Gnumeric Preferences</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <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="hbox1">
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
-            <property name="border_width">5</property>
-            <property name="spacing">12</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
             <child>
-              <object class="GtkScrolledWindow" id="scrolledwindow1">
+              <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="hscrollbar_policy">never</property>
-                <property name="vscrollbar_policy">automatic</property>
-                <property name="shadow_type">in</property>
-                <child>
-                  <object class="GtkTreeView" id="itemlist">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="border_width">2</property>
-                    <property name="headers_visible">False</property>
-                    <property name="enable_search">False</property>
-                  </object>
-                </child>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
+                <property name="fill">False</property>
                 <property name="position">0</property>
               </packing>
             </child>
             <child>
-              <object class="GtkNotebook" id="notebook">
+              <object class="GtkButton" id="close_button">
+                <property name="label">gtk-close</property>
                 <property name="visible">True</property>
-                <property name="tab_pos">left</property>
-                <property name="show_tabs">False</property>
-                <property name="show_border">False</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
               </object>
               <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
                 <property name="position">1</property>
               </packing>
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
+        <child>
+          <object class="GtkBox" id="hbox1">
             <property name="visible">True</property>
-            <property name="layout_style">end</property>
+            <property name="can_focus">False</property>
+            <property name="border_width">5</property>
+            <property name="spacing">12</property>
             <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
+              <object class="GtkScrolledWindow" id="scrolledwindow1">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkTreeView" id="itemlist">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="border_width">2</property>
+                    <property name="headers_visible">False</property>
+                    <property name="enable_search">False</property>
+                    <child internal-child="selection">
+                      <object class="GtkTreeSelection" id="treeview-selection1"/>
+                    </child>
+                  </object>
+                </child>
               </object>
               <packing>
                 <property name="expand">False</property>
-                <property name="fill">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>
+              <object class="GtkNotebook" id="notebook">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
+                <property name="can_focus">False</property>
+                <property name="tab_pos">left</property>
+                <property name="show_tabs">False</property>
+                <property name="show_border">False</property>
               </object>
               <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
                 <property name="position">1</property>
               </packing>
             </child>
           </object>
           <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/principal-components.ui b/src/dialogs/principal-components.ui
index 78dba15..7da0740 100644
--- a/src/dialogs/principal-components.ui
+++ b/src/dialogs/principal-components.ui
@@ -1,16 +1,78 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="PrincipalComponents">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Principal Components Analysis</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
@@ -18,6 +80,7 @@
             <child>
               <object class="GtkTable" id="input-table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">3</property>
                 <property name="n_columns">2</property>
@@ -26,6 +89,7 @@
                 <child>
                   <object class="GtkLabel" id="var1-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">_Input range:</property>
@@ -40,6 +104,7 @@
                 <child>
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Grouped by:</property>
@@ -58,6 +123,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -69,8 +135,9 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="vbox2">
+                  <object class="GtkBox" id="vbox2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="homogeneous">True</property>
                     <child>
                       <object class="GtkRadioButton" id="grouped_by_col">
@@ -78,6 +145,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -94,6 +162,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">grouped_by_col</property>
@@ -110,6 +179,7 @@
                         <property name="sensitive">False</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">grouped_by_col</property>
@@ -140,6 +210,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label4">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Input</property>
               </object>
               <packing>
@@ -147,8 +218,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -160,6 +232,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Output</property>
               </object>
               <packing>
@@ -169,12 +242,15 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkLabel" id="warnings">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="wrap">True</property>
           </object>
           <packing>
@@ -183,63 +259,6 @@
             <property name="position">2</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/src/dialogs/print.ui b/src/dialogs/print.ui
index 11d1b80..381c305 100644
--- a/src/dialogs/print.ui
+++ b/src/dialogs/print.ui
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkAdjustment" id="adjustment1">
     <property name="upper">100</property>
     <property name="value">1</property>
@@ -75,12 +74,13 @@
     <property name="title" translatable="yes">Page Setup</property>
     <property name="type_hint">dialog</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">8</property>
         <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
+          <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
@@ -181,8 +181,9 @@
             <property name="left_padding">5</property>
             <property name="right_padding">5</property>
             <child>
-              <object class="GtkVBox" id="vbox14">
+              <object class="GtkBox" id="vbox14">
                 <property name="visible">True</property>
+                <property name="orientation">vertical</property>
                 <property name="can_focus">False</property>
                 <property name="spacing">6</property>
                 <child>
@@ -190,14 +191,15 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <child>
-                      <object class="GtkHBox" id="hbox2">
+                      <object class="GtkBox" id="hbox2">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="border_width">12</property>
                         <property name="spacing">4</property>
                         <child>
-                          <object class="GtkVBox" id="vbox2">
+                          <object class="GtkBox" id="vbox2">
                             <property name="visible">True</property>
+                            <property name="orientation">vertical</property>
                             <property name="can_focus">False</property>
                             <property name="spacing">12</property>
                             <child>
@@ -492,7 +494,7 @@
                                         <property name="xscale">0</property>
                                         <property name="yscale">0</property>
                                         <child>
-                                          <object class="GtkHBox" id="hbox29">
+                                          <object class="GtkBox" id="hbox29">
                                             <property name="visible">True</property>
                                             <property name="can_focus">False</property>
                                             <property name="spacing">2</property>
@@ -555,7 +557,7 @@
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <child>
-                                      <object class="GtkHBox" id="container-paper-sample">
+                                      <object class="GtkBox" id="container-paper-sample">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                         <child>
@@ -658,7 +660,7 @@
                                     <property name="active">True</property>
                                     <property name="draw_indicator">True</property>
                                     <child>
-                                      <object class="GtkHBox" id="hbox1">
+                                      <object class="GtkBox" id="hbox1">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -710,7 +712,7 @@
                                     <property name="draw_indicator">True</property>
                                     <property name="group">portrait-button</property>
                                     <child>
-                                      <object class="GtkHBox" id="hbox3">
+                                      <object class="GtkBox" id="hbox3">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -762,7 +764,7 @@
                                     <property name="draw_indicator">True</property>
                                     <property name="group">portrait-button</property>
                                     <child>
-                                      <object class="GtkHBox" id="hbox4">
+                                      <object class="GtkBox" id="hbox4">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -814,7 +816,7 @@
                                     <property name="draw_indicator">True</property>
                                     <property name="group">r-portrait-button</property>
                                     <child>
-                                      <object class="GtkHBox" id="hbox5">
+                                      <object class="GtkBox" id="hbox5">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -886,12 +888,14 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkVBox" id="vbox23">
+                      <object class="GtkBox" id="vbox23">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <property name="can_focus">False</property>
                         <child>
-                          <object class="GtkVBox" id="vbox15">
+                          <object class="GtkBox" id="vbox15">
                             <property name="visible">True</property>
+                            <property name="orientation">vertical</property>
                             <property name="can_focus">False</property>
                             <property name="border_width">5</property>
                             <property name="spacing">6</property>
@@ -1193,14 +1197,15 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHBox" id="hbox9">
+                      <object class="GtkBox" id="hbox9">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="border_width">12</property>
                         <property name="spacing">24</property>
                         <child>
-                          <object class="GtkVBox" id="vbox22">
+                          <object class="GtkBox" id="vbox22">
                             <property name="visible">True</property>
+                            <property name="orientation">vertical</property>
                             <property name="can_focus">False</property>
                             <property name="spacing">6</property>
                             <child>
@@ -1222,12 +1227,13 @@
                                 <property name="can_focus">False</property>
                                 <property name="left_padding">18</property>
                                 <child>
-                                  <object class="GtkVBox" id="vbox13">
+                                  <object class="GtkBox" id="vbox13">
                                     <property name="visible">True</property>
+                                    <property name="orientation">vertical</property>
                                     <property name="can_focus">False</property>
                                     <property name="spacing">6</property>
                                     <child>
-                                      <object class="GtkHBox" id="hbox24">
+                                      <object class="GtkBox" id="hbox24">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                         <property name="spacing">12</property>
@@ -1280,7 +1286,7 @@
                                       </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkHBox" id="container-header-sample">
+                                      <object class="GtkBox" id="container-header-sample">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                       </object>
@@ -1291,7 +1297,7 @@
                                       </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkHBox" id="container-footer-sample">
+                                      <object class="GtkBox" id="container-footer-sample">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                       </object>
@@ -1302,7 +1308,7 @@
                                       </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkHBox" id="hbox26">
+                                      <object class="GtkBox" id="hbox26">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                         <property name="spacing">12</property>
@@ -1355,7 +1361,7 @@
                                       </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkHBox" id="hbox6">
+                                      <object class="GtkBox" id="hbox6">
                                         <property name="visible">True</property>
                                         <property name="sensitive">False</property>
                                         <property name="can_focus">False</property>
@@ -1376,7 +1382,7 @@
                                           </packing>
                                         </child>
                                         <child>
-                                          <object class="GtkComboBoxEntry" id="first-page-combo">
+                                          <object class="GtkComboBoxText" id="first-page-combo">
                                             <property name="visible">True</property>
                                             <property name="can_focus">False</property>
                                             <child internal-child="entry">
@@ -1436,13 +1442,14 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkVBox" id="vbox4">
+                      <object class="GtkBox" id="vbox4">
+                        <property name="orientation">vertical</property>
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="border_width">14</property>
                         <property name="spacing">12</property>
                         <child>
-                          <object class="GtkHBox" id="print-area-hbox">
+                          <object class="GtkBox" id="print-area-hbox">
                             <property name="visible">True</property>
                             <property name="sensitive">False</property>
                             <property name="can_focus">False</property>
@@ -1470,8 +1477,9 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkVBox" id="vbox18">
-                            <property name="visible">True</property>
+                          <object class="GtkBox" id="vbox18">
+                           <property name="orientation">vertical</property>
+                           <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="spacing">6</property>
                             <child>
@@ -1505,6 +1513,9 @@
                                       <object class="GtkAlignment" id="alignment12">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
+                                        <property name="n_rows">2</property>
+                                        <property name="column_spacing">12</property>
+                                        <property name="row_spacing">6</property>
                                         <child>
                                           <object class="GtkLabel" id="label27">
                                             <property name="visible">True</property>
@@ -1575,25 +1586,27 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHBox" id="hbox10">
+                      <object class="GtkBox" id="hbox10">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="border_width">12</property>
                         <property name="spacing">4</property>
                         <child>
-                          <object class="GtkVBox" id="vbox5">
+                          <object class="GtkBox" id="vbox5">
+                            <property name="orientation">vertical</property>
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="border_width">2</property>
                             <property name="spacing">12</property>
                             <child>
-                              <object class="GtkHBox" id="hbox28">
+                              <object class="GtkBox" id="hbox28">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="spacing">24</property>
                                 <child>
-                                  <object class="GtkVBox" id="vbox19">
+                                  <object class="GtkBox" id="vbox19">
                                     <property name="visible">True</property>
+                                    <property name="orientation">vertical</property>
                                     <property name="can_focus">False</property>
                                     <property name="spacing">6</property>
                                     <child>
@@ -1785,7 +1798,8 @@
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkVBox" id="vbox1">
+                                  <object class="GtkBox" id="vbox1">
+                                    <property name="orientation">vertical</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="spacing">6</property>
@@ -1832,7 +1846,8 @@
                                               </packing>
                                             </child>
                                             <child>
-                                              <object class="GtkVBox" id="vbox3">
+                                              <object class="GtkBox" id="vbox3">
+                                                <property name="orientation">vertical</property>
                                                 <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
                                                 <property name="spacing">6</property>
diff --git a/src/dialogs/random-generation-cor.ui b/src/dialogs/random-generation-cor.ui
index df94374..c718e8a 100644
--- a/src/dialogs/random-generation-cor.ui
+++ b/src/dialogs/random-generation-cor.ui
@@ -1,33 +1,97 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="CorRandom">
+    <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Correlated Random Number Generator</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
-          <object class="GtkVBox" id="vbox2">
+          <object class="GtkBox" id="vbox2">
             <property name="visible">True</property>
             <property name="orientation">vertical</property>
+            <property name="can_focus">False</property>
             <child>
               <object class="GtkNotebook" id="notebook1">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="border_width">5</property>
                 <child>
-                  <object class="GtkVBox" id="vbox3">
+                  <object class="GtkBox" id="vbox3">
                     <property name="visible">True</property>
-                    <property name="orientation">vertical</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <object class="GtkTable" id="table4">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="border_width">12</property>
                         <property name="n_rows">2</property>
                         <child>
@@ -36,6 +100,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">cov-button</property>
@@ -51,6 +116,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
@@ -66,6 +132,7 @@
                     <child>
                       <object class="GtkTable" id="input-table">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="border_width">12</property>
                         <property name="n_columns">2</property>
                         <property name="column_spacing">12</property>
@@ -73,6 +140,7 @@
                         <child>
                           <object class="GtkLabel" id="var1-label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">_Matrix:</property>
                             <property name="use_underline">True</property>
@@ -100,6 +168,7 @@
                 <child type="tab">
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Input</property>
                     <property name="use_underline">True</property>
                   </object>
@@ -110,6 +179,7 @@
                 <child>
                   <object class="GtkTable" id="table3">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <property name="n_columns">2</property>
                     <property name="column_spacing">12</property>
@@ -126,6 +196,7 @@
                     <child>
                       <object class="GtkLabel" id="label3">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">Number of _random numbers:</property>
                         <property name="use_underline">True</property>
@@ -144,6 +215,7 @@
                 <child type="tab">
                   <object class="GtkLabel" id="label4">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Options</property>
                     <property name="use_underline">True</property>
                   </object>
@@ -153,8 +225,9 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="dao">
+                  <object class="GtkBox" id="dao">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <placeholder/>
                     </child>
@@ -166,6 +239,7 @@
                 <child type="tab">
                   <object class="GtkLabel" id="label5">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Output</property>
                     <property name="use_underline">True</property>
                   </object>
@@ -176,77 +250,27 @@
                 </child>
               </object>
               <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
                 <property name="position">0</property>
               </packing>
             </child>
             <child>
               <object class="GtkLabel" id="warnings">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
               </object>
               <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
                 <property name="position">1</property>
               </packing>
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/random-generation.ui b/src/dialogs/random-generation.ui
index 204e8af..9c6687a 100644
--- a/src/dialogs/random-generation.ui
+++ b/src/dialogs/random-generation.ui
@@ -1,17 +1,95 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Random">
+    <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Random Number Generation</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="applybutton">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
@@ -20,6 +98,7 @@
             <child>
               <object class="GtkTable" id="distribution_table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">3</property>
                 <property name="n_columns">2</property>
@@ -54,6 +133,7 @@
                 <child>
                   <object class="GtkLabel" id="par1_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="justify">center</property>
                     <property name="mnemonic_widget">par1_entry</property>
@@ -68,6 +148,7 @@
                 <child>
                   <object class="GtkLabel" id="par2_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="justify">center</property>
                     <property name="mnemonic_widget">par2_entry</property>
@@ -82,6 +163,7 @@
                 <child>
                   <object class="GtkLabel" id="distribution_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">_Distribution:</property>
                     <property name="use_underline">True</property>
@@ -95,6 +177,7 @@
                 <child>
                   <object class="GtkComboBox" id="distribution_combo">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
@@ -107,6 +190,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label3">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Random Numbers</property>
                 <property name="use_underline">True</property>
               </object>
@@ -117,6 +201,7 @@
             <child>
               <object class="GtkTable" id="table2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">2</property>
                 <property name="n_columns">2</property>
@@ -125,6 +210,7 @@
                 <child>
                   <object class="GtkLabel" id="vars_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">_Number of variables:</property>
                     <property name="use_underline">True</property>
@@ -139,6 +225,7 @@
                 <child>
                   <object class="GtkLabel" id="count_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">_Size of sample:</property>
                     <property name="use_underline">True</property>
@@ -185,6 +272,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Options</property>
                 <property name="use_underline">True</property>
               </object>
@@ -194,8 +282,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -207,6 +296,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label4">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Output</property>
                 <property name="use_underline">True</property>
               </object>
@@ -217,79 +307,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="applybutton">
-                <property name="label">gtk-apply</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/rank.ui b/src/dialogs/rank.ui
index 0d9ae56..21b1338 100644
--- a/src/dialogs/rank.ui
+++ b/src/dialogs/rank.ui
@@ -1,16 +1,78 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="RankPercentile">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Rank and Percentile</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
@@ -18,6 +80,7 @@
             <child>
               <object class="GtkTable" id="input-table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">3</property>
                 <property name="n_columns">2</property>
@@ -26,6 +89,7 @@
                 <child>
                   <object class="GtkLabel" id="var1-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">_Input range:</property>
@@ -40,6 +104,7 @@
                 <child>
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Grouped by:</property>
@@ -58,6 +123,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -69,14 +135,16 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="vbox2">
+                  <object class="GtkBox" id="vbox2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <object class="GtkRadioButton" id="grouped_by_col">
                         <property name="label" translatable="yes">_Columns</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -93,6 +161,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">grouped_by_col</property>
@@ -109,6 +178,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">grouped_by_col</property>
@@ -139,6 +209,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Input</property>
                 <property name="use_underline">True</property>
               </object>
@@ -147,12 +218,14 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox3">
+              <object class="GtkBox" id="vbox3">
                 <property name="visible">True</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkTable" id="table1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">5</property>
                     <property name="n_columns">3</property>
                     <child>
@@ -161,6 +234,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -177,6 +251,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">rank_button</property>
@@ -190,6 +265,7 @@
                     <child>
                       <object class="GtkLabel" id="label3">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">Ties:</property>
                         <property name="justify">center</property>
@@ -200,6 +276,8 @@
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
@@ -211,6 +289,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label6">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Options</property>
               </object>
               <packing>
@@ -219,8 +298,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -232,6 +312,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label7">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Output</property>
               </object>
               <packing>
@@ -241,12 +322,15 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkLabel" id="warnings">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
           </object>
           <packing>
             <property name="expand">False</property>
@@ -254,63 +338,6 @@
             <property name="position">2</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/src/dialogs/regression.ui b/src/dialogs/regression.ui
index 73b8ac5..9af30a8 100644
--- a/src/dialogs/regression.ui
+++ b/src/dialogs/regression.ui
@@ -1,15 +1,78 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Regression">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Regression</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
@@ -17,6 +80,7 @@
             <child>
               <object class="GtkTable" id="input-table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">8</property>
                 <property name="n_columns">2</property>
@@ -25,6 +89,7 @@
                 <child>
                   <object class="GtkLabel" id="var1-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">_X variables:</property>
@@ -41,6 +106,7 @@
                 <child>
                   <object class="GtkLabel" id="var2-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">_Y variable:</property>
@@ -60,6 +126,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -77,6 +144,7 @@
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="border_width">3</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
@@ -93,6 +161,7 @@
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="border_width">3</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
@@ -111,6 +180,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="draw_indicator">True</property>
                   </object>
                   <packing>
@@ -122,8 +192,9 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHSeparator" id="hseparator1">
+                  <object class="GtkSeparator" id="hseparator1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                   </object>
                   <packing>
                     <property name="right_attach">2</property>
@@ -151,6 +222,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label10">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_Input</property>
                 <property name="use_underline">True</property>
               </object>
@@ -159,15 +231,19 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox2">
+              <object class="GtkBox" id="vbox2">
                 <property name="visible">True</property>
+                <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <child>
-                  <object class="GtkHBox" id="hbox1">
+                  <object class="GtkBox" id="hbox1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <object class="GtkLabel" id="label7">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xpad">5</property>
                         <property name="label" translatable="yes">Confidence level:</property>
                         <property name="justify">center</property>
@@ -185,6 +261,8 @@
                         <property name="text" translatable="yes">0.95</property>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
@@ -202,6 +280,7 @@
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="border_width">3</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -218,10 +297,12 @@
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="border_width">3</property>
+                    <property name="use_action_appearance">False</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>
@@ -239,6 +320,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label11">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">O_ptions</property>
                 <property name="use_underline">True</property>
               </object>
@@ -248,8 +330,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -261,6 +344,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label12">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_Output</property>
                 <property name="use_underline">True</property>
               </object>
@@ -271,73 +355,21 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkLabel" id="warnings">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="justify">center</property>
           </object>
           <packing>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/row-height.ui b/src/dialogs/row-height.ui
index 3bc49a9..9eff689 100644
--- a/src/dialogs/row-height.ui
+++ b/src/dialogs/row-height.ui
@@ -1,27 +1,105 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkAdjustment" id="adjustment1">
-    <property name="value">5</property>
     <property name="lower">5</property>
     <property name="upper">1000</property>
+    <property name="value">5</property>
     <property name="step_increment">1</property>
     <property name="page_increment">5</property>
   </object>
   <object class="GtkDialog" id="dialog">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Row Height</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">6</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-close</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkTable" id="main_table">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="border_width">8</property>
             <property name="n_rows">4</property>
             <property name="n_columns">3</property>
@@ -30,6 +108,7 @@
             <child>
               <object class="GtkLabel" id="description">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="wrap">True</property>
               </object>
               <packing>
@@ -41,6 +120,7 @@
             <child>
               <object class="GtkLabel" id="label">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">_Row height in pixels:</property>
                 <property name="use_underline">True</property>
@@ -74,6 +154,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
                 <property name="draw_indicator">True</property>
               </object>
@@ -89,6 +170,7 @@
             <child>
               <object class="GtkLabel" id="label1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">Row height in points:</property>
               </object>
@@ -102,6 +184,7 @@
             <child>
               <object class="GtkLabel" id="pts-label">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="xpad">3</property>
                 <property name="label" translatable="yes">x</property>
@@ -129,78 +212,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="apply_button">
-                <property name="label">gtk-apply</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-close</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/sampling.ui b/src/dialogs/sampling.ui
index dacec6a..9100972 100644
--- a/src/dialogs/sampling.ui
+++ b/src/dialogs/sampling.ui
@@ -1,16 +1,78 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Sampling">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Sampling</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
@@ -18,6 +80,7 @@
             <child>
               <object class="GtkTable" id="input-table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">3</property>
                 <property name="n_columns">2</property>
@@ -26,6 +89,7 @@
                 <child>
                   <object class="GtkLabel" id="var1-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">_Input range: </property>
@@ -40,6 +104,7 @@
                 <child>
                   <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Grouped by:</property>
@@ -53,8 +118,9 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="hbox1">
+                  <object class="GtkBox" id="hbox1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="homogeneous">True</property>
                     <child>
                       <object class="GtkRadioButton" id="grouped_by_col">
@@ -62,6 +128,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
@@ -77,6 +144,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">grouped_by_col</property>
@@ -93,6 +161,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -119,6 +188,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -140,6 +210,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label4">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_Input</property>
                 <property name="use_underline">True</property>
               </object>
@@ -150,6 +221,7 @@
             <child>
               <object class="GtkTable" id="options-table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">5</property>
                 <property name="n_columns">3</property>
@@ -158,6 +230,7 @@
                 <child>
                   <object class="GtkLabel" id="method-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Sampling method:</property>
@@ -176,6 +249,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -194,6 +268,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
@@ -211,6 +286,7 @@
                 <child>
                   <object class="GtkLabel" id="period-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Per_iod:</property>
@@ -241,6 +317,7 @@
                 <child>
                   <object class="GtkLabel" id="random-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Size of sample:</property>
@@ -270,6 +347,7 @@
                 <child>
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">N_umber of samples:</property>
@@ -298,6 +376,7 @@
                 <child>
                   <object class="GtkLabel" id="offset-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Offset:</property>
@@ -329,6 +408,7 @@
                 <child>
                   <object class="GtkLabel" id="pdir-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Primary direction:</property>
@@ -347,6 +427,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -365,6 +446,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">row-major-button</property>
@@ -386,6 +468,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">O_ptions</property>
                 <property name="use_underline">True</property>
               </object>
@@ -395,8 +478,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -408,6 +492,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label6">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_Output</property>
                 <property name="use_underline">True</property>
               </object>
@@ -418,72 +503,20 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkLabel" id="warnings">
             <property name="visible">True</property>
-          </object>
-          <packing>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
+            <property name="can_focus">False</property>
           </object>
           <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/scenario-add.ui b/src/dialogs/scenario-add.ui
index 1e671ee..d88eac4 100644
--- a/src/dialogs/scenario-add.ui
+++ b/src/dialogs/scenario-add.ui
@@ -1,36 +1,102 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="ScenarioAdd">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Add Scenario</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="has_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
-          <object class="GtkHBox" id="hbox1">
+          <object class="GtkBox" id="hbox1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="spacing">4</property>
             <property name="homogeneous">True</property>
             <child>
-              <object class="GtkVBox" id="vbox2">
+              <object class="GtkBox" id="vbox2">
                 <property name="visible">True</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <child>
-                  <object class="GtkHBox" id="hbox2">
+                  <object class="GtkBox" id="hbox2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <child>
-                      <object class="GtkVBox" id="vbox6">
+                      <object class="GtkBox" id="vbox6">
                         <property name="visible">True</property>
                         <property name="orientation">vertical</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <object class="GtkLabel" id="label6">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="label" translatable="yes">Scenario name:</property>
                           </object>
                           <packing>
@@ -52,37 +118,46 @@
                         </child>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">0</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="GtkTable" id="input-table">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">5</property>
                     <child>
                       <object class="GtkLabel" id="var1-label">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">_Changing cells:</property>
                         <property name="use_underline">True</property>
                       </object>
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkVBox" id="vbox5">
+                  <object class="GtkBox" id="vbox5">
                     <property name="visible">True</property>
-                    <property name="orientation">vertical</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <object class="GtkLabel" id="label5">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">Comment:</property>
                       </object>
                       <packing>
@@ -95,7 +170,6 @@
                       <object class="GtkScrolledWindow" id="scrolledwindow3">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="hscrollbar_policy">automatic</property>
                         <child>
                           <object class="GtkTextView" id="comment_view">
                             <property name="visible">True</property>
@@ -104,78 +178,30 @@
                         </child>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">2</property>
                   </packing>
                 </child>
               </object>
               <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
                 <property name="position">0</property>
               </packing>
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="has_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/scenario-manager.ui b/src/dialogs/scenario-manager.ui
index 1ddaf4f..4209e91 100644
--- a/src/dialogs/scenario-manager.ui
+++ b/src/dialogs/scenario-manager.ui
@@ -1,26 +1,89 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Scenarios">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Scenario Manager</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="has_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
-          <object class="GtkHBox" id="hbox1">
+          <object class="GtkBox" id="hbox1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="spacing">4</property>
             <property name="homogeneous">True</property>
             <child>
-              <object class="GtkVBox" id="vbox2">
+              <object class="GtkBox" id="vbox2">
                 <property name="visible">True</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkNotebook" id="notebook1">
                     <property name="visible">True</property>
@@ -30,18 +93,20 @@
                     <child>
                       <object class="GtkTable" id="table2">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="n_rows">7</property>
                         <property name="n_columns">4</property>
                         <child>
-                          <object class="GtkVBox" id="vbox5">
+                          <object class="GtkBox" id="vbox5">
                             <property name="visible">True</property>
-                            <property name="orientation">vertical</property>
+                            <property name="can_focus">False</property>
                             <child>
                               <object class="GtkButton" id="show_button">
                                 <property name="label" translatable="yes">Show</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                               </object>
                               <packing>
@@ -56,6 +121,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                               </object>
                               <packing>
@@ -73,6 +139,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                               </object>
                               <packing>
@@ -99,6 +166,9 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="headers_visible">False</property>
+                                <child internal-child="selection">
+                                  <object class="GtkTreeSelection" id="treeview-selection1"/>
+                                </child>
                               </object>
                             </child>
                           </object>
@@ -147,6 +217,7 @@
                         <child>
                           <object class="GtkLabel" id="label8">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">&lt;span weight="bold"&gt;Scenarios&lt;/span&gt;</property>
                             <property name="use_markup">True</property>
@@ -161,6 +232,7 @@
                         <child>
                           <object class="GtkLabel" id="label9">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">&lt;span weight="bold"&gt;Changing Cells&lt;/span&gt;</property>
                             <property name="use_markup">True</property>
@@ -177,6 +249,7 @@
                         <child>
                           <object class="GtkLabel" id="label10">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">&lt;span weight="bold"&gt;Comment&lt;/span&gt;</property>
                             <property name="use_markup">True</property>
@@ -193,6 +266,7 @@
                         <child>
                           <object class="GtkLabel" id="label15">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes"> </property>
                           </object>
@@ -207,6 +281,7 @@
                         <child>
                           <object class="GtkLabel" id="label17">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes"> </property>
                           </object>
@@ -273,6 +348,7 @@
                     <child type="tab">
                       <object class="GtkLabel" id="View">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">View</property>
                       </object>
                       <packing>
@@ -282,10 +358,12 @@
                     <child>
                       <object class="GtkTable" id="options-table">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="n_rows">2</property>
                         <child>
                           <object class="GtkLabel" id="label11">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">&lt;span weight="bold"&gt;Reporting&lt;/span&gt;</property>
                             <property name="use_markup">True</property>
@@ -300,11 +378,13 @@
                         <child>
                           <object class="GtkTable" id="input-table">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="n_rows">3</property>
                             <property name="n_columns">3</property>
                             <child>
                               <object class="GtkLabel" id="var1-label">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">Result Cells:</property>
                               </object>
@@ -317,6 +397,7 @@
                             <child>
                               <object class="GtkLabel" id="label16">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes"> </property>
                               </object>
@@ -366,6 +447,7 @@
                     <child type="tab">
                       <object class="GtkLabel" id="label7">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">Options</property>
                       </object>
                       <packing>
@@ -375,73 +457,23 @@
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
               </object>
               <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
                 <property name="position">0</property>
               </packing>
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="has_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/search-replace.ui b/src/dialogs/search-replace.ui
index 894024e..70122bb 100644
--- a/src/dialogs/search-replace.ui
+++ b/src/dialogs/search-replace.ui
@@ -1,35 +1,333 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="query_dialog">
+    <property name="can_focus">False</property>
+    <property name="title" translatable="yes">Search and Replace Query</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox3">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="qd_cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="tooltip_text" translatable="yes">Perform no more replacements</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="qd_no">
+                <property name="label">gtk-no</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="tooltip_text" translatable="yes">Do not perform this replacement</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="qd_yes">
+                <property name="label">gtk-yes</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="has_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="tooltip_text" translatable="yes">Perform this replacement</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
+        <child>
+          <object class="GtkLabel" id="label8">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Search and Replace</property>
+            <property name="justify">center</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkTable" id="table3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="n_rows">3</property>
+            <property name="n_columns">2</property>
+            <property name="column_spacing">4</property>
+            <property name="row_spacing">4</property>
+            <child>
+              <object class="GtkLabel" id="label15">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Location</property>
+                <property name="use_underline">True</property>
+                <property name="justify">center</property>
+                <property name="mnemonic_widget">qd_location</property>
+              </object>
+              <packing>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label16">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Replacing</property>
+                <property name="use_underline">True</property>
+                <property name="justify">center</property>
+                <property name="mnemonic_widget">qd_old_text</property>
+              </object>
+              <packing>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label7">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">By</property>
+                <property name="use_underline">True</property>
+                <property name="justify">center</property>
+                <property name="mnemonic_widget">qd_new_text</property>
+              </object>
+              <packing>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="qd_old_text">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="editable">False</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="qd_new_text">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="editable">False</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="qd_location">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="editable">False</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkCheckButton" id="qd_query">
+            <property name="label" translatable="yes">_Query</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
+            <property name="tooltip_text" translatable="yes">Ask before each change</property>
+            <property name="use_action_appearance">False</property>
+            <property name="use_underline">True</property>
+            <property name="draw_indicator">True</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">4</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="-6">qd_cancel</action-widget>
+      <action-widget response="-9">qd_no</action-widget>
+      <action-widget response="-8">qd_yes</action-widget>
+    </action-widgets>
+  </object>
   <object class="GtkDialog" id="search_replace_dialog">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Search &amp; Replace</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">6</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="border_width">5</property>
             <child>
-              <object class="GtkVBox" id="vbox6">
+              <object class="GtkBox" id="vbox6">
                 <property name="visible">True</property>
-                <property name="border_width">12</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">12</property>
                 <property name="spacing">6</property>
                 <child>
                   <object class="GtkFrame" id="frame6">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label_xalign">0</property>
                     <child>
                       <object class="GtkTable" id="search_table">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="border_width">5</property>
                         <property name="n_rows">5</property>
                         <property name="n_columns">4</property>
@@ -38,6 +336,7 @@
                         <child>
                           <object class="GtkLabel" id="label2">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="xpad">4</property>
                             <property name="label" translatable="yes">_Replace by</property>
@@ -53,6 +352,7 @@
                         <child>
                           <object class="GtkLabel" id="label1">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="xpad">4</property>
                             <property name="label" translatable="yes">_Search for</property>
@@ -64,8 +364,9 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkHSeparator" id="hseparator1">
+                          <object class="GtkSeparator" id="hseparator1">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                           </object>
                           <packing>
                             <property name="right_attach">4</property>
@@ -81,6 +382,7 @@
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
                             <property name="tooltip_text" translatable="yes">When set, do not distinguish between upper and lower case letters</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
@@ -99,6 +401,7 @@
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
                             <property name="tooltip_text" translatable="yes">Ask before each change</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                           </object>
@@ -116,6 +419,7 @@
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
                             <property name="tooltip_text" translatable="yes">Do not consider matches in the middle of words</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                           </object>
@@ -134,6 +438,7 @@
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
                             <property name="tooltip_text" translatable="yes">Attempt to preserve case of text when replacing</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                           </object>
@@ -168,21 +473,26 @@
                     <child type="label">
                       <object class="GtkLabel" id="label3">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">Search</property>
                       </object>
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
                   <object class="GtkFrame" id="frame1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label_xalign">0</property>
                     <child>
                       <object class="GtkTable" id="scope_table">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="border_width">5</property>
                         <property name="n_rows">3</property>
                         <property name="column_spacing">4</property>
@@ -194,6 +504,7 @@
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
                             <property name="tooltip_text" translatable="yes">Search and replace in all cells in the workbook</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
@@ -209,6 +520,7 @@
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
                             <property name="tooltip_text" translatable="yes">Search and replace in current sheet only</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">scope_workbook</property>
@@ -226,6 +538,7 @@
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
                             <property name="tooltip_text" translatable="yes">Search and replace in specified range only</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">scope_workbook</property>
@@ -241,12 +554,14 @@
                     <child type="label">
                       <object class="GtkLabel" id="label4">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">Scope</property>
                       </object>
                     </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
@@ -255,6 +570,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Normal</property>
                 <property name="justify">center</property>
               </object>
@@ -263,14 +579,16 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox7">
+              <object class="GtkBox" id="vbox7">
                 <property name="visible">True</property>
-                <property name="border_width">12</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">12</property>
                 <property name="spacing">12</property>
                 <child>
                   <object class="GtkTable" id="table2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="n_rows">3</property>
                     <property name="n_columns">3</property>
                     <property name="column_spacing">6</property>
@@ -282,6 +600,7 @@
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">Perform changes within non-string values</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -302,6 +621,7 @@
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">Perform changes within cell comments</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
@@ -321,6 +641,7 @@
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">Perform changes within expressions</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -341,6 +662,7 @@
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">Perform changes within string values</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -357,6 +679,7 @@
                     <child>
                       <object class="GtkLabel" id="label9">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">&lt;span weight="bold"&gt;Change Cells Containing&lt;/span&gt;</property>
                         <property name="use_markup">True</property>
@@ -370,6 +693,7 @@
                     <child>
                       <object class="GtkLabel" id="label10">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                       </object>
                       <packing>
@@ -389,6 +713,7 @@
                 <child>
                   <object class="GtkTable" id="table4">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="n_rows">2</property>
                     <property name="n_columns">3</property>
                     <property name="column_spacing">6</property>
@@ -400,6 +725,7 @@
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">The search text is taken literally.</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -420,6 +746,7 @@
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">The search text is a regular expression</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">search_type_text</property>
@@ -436,559 +763,308 @@
                     <child>
                       <object class="GtkLabel" id="label11">
                         <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">&lt;span weight="bold"&gt;Search Text Type&lt;/span&gt;</property>
-                        <property name="use_markup">True</property>
-                      </object>
-                      <packing>
-                        <property name="right_attach">3</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="label12">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                      </object>
-                      <packing>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="x_options"></property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkTable" id="table5">
-                    <property name="visible">True</property>
-                    <property name="n_rows">4</property>
-                    <property name="n_columns">2</property>
-                    <property name="column_spacing">6</property>
-                    <property name="row_spacing">6</property>
-                    <child>
-                      <object class="GtkLabel" id="label13">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">&lt;span weight="bold"&gt;Miscellaneous&lt;/span&gt;</property>
-                        <property name="use_markup">True</property>
-                      </object>
-                      <packing>
-                        <property name="right_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkRadioButton" id="row_major">
-                        <property name="label" translatable="yes">_Row major</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">Search line by line</property>
-                        <property name="use_underline">True</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                      </object>
-                      <packing>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkRadioButton" id="column_major">
-                        <property name="label" translatable="yes">_Column major</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">Search column by column</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
-                        <property name="group">row_major</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkCheckButton" id="keep_strings">
-                        <property name="label" translatable="yes">_Keep strings as strings</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="has_tooltip">True</property>
-                        <property name="tooltip_text" translatable="yes">When set, string values will remain as such after replacement, even if they look like numbers or expressions</property>
-                        <property name="use_underline">True</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                      </object>
-                      <packing>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkCheckButton" id="save-in-prefs">
-                        <property name="label" translatable="yes">Save the current settings as default settings</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">When set, the current settings will be saved as the default settings for future invocations of this and the Search dialog.</property>
-                        <property name="draw_indicator">True</property>
-                      </object>
-                      <packing>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">3</property>
-                        <property name="bottom_attach">4</property>
-                      </packing>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child type="tab">
-              <object class="GtkLabel" id="label6">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">Advanced</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="note-vbox3">
-                <property name="visible">True</property>
-                <property name="border_width">4</property>
-                <property name="orientation">vertical</property>
-                <property name="spacing">4</property>
-                <child>
-                  <object class="GtkTable" id="error_table">
-                    <property name="visible">True</property>
-                    <property name="border_width">12</property>
-                    <property name="n_rows">3</property>
-                    <property name="n_columns">2</property>
-                    <property name="column_spacing">6</property>
-                    <property name="row_spacing">6</property>
-                    <property name="homogeneous">True</property>
-                    <child>
-                      <object class="GtkRadioButton" id="error_fail">
-                        <property name="label" translatable="yes">_Fail</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">Fail without any changes actually being done to any cell</property>
-                        <property name="use_underline">True</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">&lt;span weight="bold"&gt;Search Text Type&lt;/span&gt;</property>
+                        <property name="use_markup">True</property>
                       </object>
                       <packing>
+                        <property name="right_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
                         <property name="y_options"></property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkRadioButton" id="error_skip">
-                        <property name="label" translatable="yes">_Don't change</property>
+                      <object class="GtkLabel" id="label12">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">Skip cells that would result in errors</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
-                        <property name="group">error_fail</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
                       </object>
                       <packing>
                         <property name="top_attach">1</property>
                         <property name="bottom_attach">2</property>
+                        <property name="x_options"></property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkTable" id="table5">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="n_rows">4</property>
+                    <property name="n_columns">2</property>
+                    <property name="column_spacing">6</property>
+                    <property name="row_spacing">6</property>
+                    <child>
+                      <object class="GtkLabel" id="label13">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">&lt;span weight="bold"&gt;Miscellaneous&lt;/span&gt;</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                      <packing>
+                        <property name="right_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
                         <property name="y_options"></property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkRadioButton" id="error_query">
-                        <property name="label" translatable="yes">_Query</property>
+                      <object class="GtkRadioButton" id="row_major">
+                        <property name="label" translatable="yes">_Row major</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
+                        <property name="can_focus">False</property>
                         <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">Query for replacement</property>
+                        <property name="tooltip_text" translatable="yes">Search line by line</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
+                        <property name="active">True</property>
                         <property name="draw_indicator">True</property>
-                        <property name="group">error_fail</property>
                       </object>
                       <packing>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
                         <property name="y_options"></property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkRadioButton" id="error_error">
-                        <property name="label" translatable="yes">Make _error expression</property>
+                      <object class="GtkRadioButton" id="column_major">
+                        <property name="label" translatable="yes">_Column major</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
+                        <property name="can_focus">False</property>
                         <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">Create =ERROR("...")</property>
+                        <property name="tooltip_text" translatable="yes">Search column by column</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
-                        <property name="group">error_fail</property>
+                        <property name="group">row_major</property>
                       </object>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
                         <property name="y_options"></property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkRadioButton" id="error_string">
-                        <property name="label" translatable="yes">Make _string value</property>
+                      <object class="GtkCheckButton" id="keep_strings">
+                        <property name="label" translatable="yes">_Keep strings as strings</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">Turn unparsable entries into string values</property>
+                        <property name="has_tooltip">True</property>
+                        <property name="tooltip_text" translatable="yes">When set, string values will remain as such after replacement, even if they look like numbers or expressions</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
+                        <property name="active">True</property>
                         <property name="draw_indicator">True</property>
-                        <property name="group">error_fail</property>
                       </object>
                       <packing>
-                        <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
                         <property name="y_options"></property>
                       </packing>
                     </child>
                     <child>
-                      <placeholder/>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child type="tab">
-              <object class="GtkLabel" id="note-label3">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">Error Behaviour</property>
-                <property name="justify">center</property>
-              </object>
-              <packing>
-                <property name="position">2</property>
-                <property name="tab_fill">False</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="apply_button">
-                <property name="label">gtk-apply</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-    <action-widgets>
-      <action-widget response="0">help_button</action-widget>
-      <action-widget response="0">cancel_button</action-widget>
-      <action-widget response="0">apply_button</action-widget>
-      <action-widget response="0">ok_button</action-widget>
-    </action-widgets>
-  </object>
-  <object class="GtkDialog" id="query_dialog">
-    <property name="title" translatable="yes">Search and Replace Query</property>
-    <property name="type_hint">dialog</property>
-    <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox3">
-        <property name="visible">True</property>
-        <property name="orientation">vertical</property>
-        <property name="spacing">8</property>
-        <child>
-          <object class="GtkLabel" id="label8">
-            <property name="visible">True</property>
-            <property name="label" translatable="yes">Search and Replace</property>
-            <property name="justify">center</property>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkTable" id="table3">
-            <property name="visible">True</property>
-            <property name="n_rows">3</property>
-            <property name="n_columns">2</property>
-            <property name="column_spacing">4</property>
-            <property name="row_spacing">4</property>
-            <child>
-              <object class="GtkLabel" id="label15">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Location</property>
-                <property name="use_underline">True</property>
-                <property name="justify">center</property>
-                <property name="mnemonic_widget">qd_location</property>
-              </object>
-              <packing>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label16">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Replacing</property>
-                <property name="use_underline">True</property>
-                <property name="justify">center</property>
-                <property name="mnemonic_widget">qd_old_text</property>
+                      <object class="GtkCheckButton" id="save-in-prefs">
+                        <property name="label" translatable="yes">Save the current settings as default settings</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">When set, the current settings will be saved as the default settings for future invocations of this and the Search dialog.</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
               </object>
               <packing>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
+                <property name="position">1</property>
               </packing>
             </child>
-            <child>
-              <object class="GtkLabel" id="label7">
+            <child type="tab">
+              <object class="GtkLabel" id="label6">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">By</property>
-                <property name="use_underline">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Advanced</property>
                 <property name="justify">center</property>
-                <property name="mnemonic_widget">qd_new_text</property>
-              </object>
-              <packing>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="qd_old_text">
-                <property name="visible">True</property>
-                <property name="editable">False</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="qd_new_text">
-                <property name="visible">True</property>
-                <property name="editable">False</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="qd_location">
-                <property name="visible">True</property>
-                <property name="editable">False</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="position">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkCheckButton" id="qd_query">
-            <property name="label" translatable="yes">_Query</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">False</property>
-            <property name="tooltip_text" translatable="yes">Ask before each change</property>
-            <property name="use_underline">True</property>
-            <property name="draw_indicator">True</property>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">4</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area3">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="qd_cancel">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Perform no more replacements</property>
-                <property name="use_stock">True</property>
               </object>
               <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
+                <property name="position">1</property>
+                <property name="tab_fill">False</property>
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="qd_no">
-                <property name="label">gtk-no</property>
+              <object class="GtkBox" id="note-vbox3">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Do not perform this replacement</property>
-                <property name="use_stock">True</property>
+                <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">4</property>
+                <property name="spacing">4</property>
+                <child>
+                  <object class="GtkTable" id="error_table">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="border_width">12</property>
+                    <property name="n_rows">3</property>
+                    <property name="n_columns">2</property>
+                    <property name="column_spacing">6</property>
+                    <property name="row_spacing">6</property>
+                    <property name="homogeneous">True</property>
+                    <child>
+                      <object class="GtkRadioButton" id="error_fail">
+                        <property name="label" translatable="yes">_Fail</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">Fail without any changes actually being done to any cell</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="use_underline">True</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="error_skip">
+                        <property name="label" translatable="yes">_Don't change</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">Skip cells that would result in errors</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="use_underline">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">error_fail</property>
+                      </object>
+                      <packing>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="error_query">
+                        <property name="label" translatable="yes">_Query</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">Query for replacement</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="use_underline">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">error_fail</property>
+                      </object>
+                      <packing>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="error_error">
+                        <property name="label" translatable="yes">Make _error expression</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">Create =ERROR("...")</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="use_underline">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">error_fail</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="error_string">
+                        <property name="label" translatable="yes">Make _string value</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">Turn unparsable entries into string values</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="use_underline">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">error_fail</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
               </object>
               <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
+                <property name="position">2</property>
               </packing>
             </child>
-            <child>
-              <object class="GtkButton" id="qd_yes">
-                <property name="label">gtk-yes</property>
+            <child type="tab">
+              <object class="GtkLabel" id="note-label3">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="has_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Perform this replacement</property>
-                <property name="use_stock">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Error Behaviour</property>
+                <property name="justify">center</property>
               </object>
               <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
                 <property name="position">2</property>
+                <property name="tab_fill">False</property>
               </packing>
             </child>
           </object>
           <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
     </child>
     <action-widgets>
-      <action-widget response="-6">qd_cancel</action-widget>
-      <action-widget response="-9">qd_no</action-widget>
-      <action-widget response="-8">qd_yes</action-widget>
+      <action-widget response="0">help_button</action-widget>
+      <action-widget response="0">cancel_button</action-widget>
+      <action-widget response="0">apply_button</action-widget>
+      <action-widget response="0">ok_button</action-widget>
     </action-widgets>
   </object>
 </interface>
diff --git a/src/dialogs/search.ui b/src/dialogs/search.ui
index ea6847f..61307b7 100644
--- a/src/dialogs/search.ui
+++ b/src/dialogs/search.ui
@@ -1,31 +1,131 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="search_dialog">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Search</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">6</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</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="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="tooltip_text" translatable="yes">Dismiss search center</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="prev_button">
+                <property name="label">gtk-go-back</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="tooltip_text" translatable="yes">Show previous match</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="next_button">
+                <property name="label">gtk-go-forward</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="tooltip_text" translatable="yes">Show next match</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="search_button">
+                <property name="label">gtk-find</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="tooltip_text" translatable="yes">Start search</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="border_width">5</property>
             <child>
-              <object class="GtkVBox" id="vbox2">
+              <object class="GtkBox" id="vbox2">
                 <property name="visible">True</property>
-                <property name="border_width">12</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">12</property>
                 <property name="spacing">4</property>
                 <child>
                   <object class="GtkTable" id="page1-table">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="n_rows">7</property>
                     <property name="n_columns">2</property>
                     <property name="column_spacing">6</property>
@@ -33,6 +133,7 @@
                     <child>
                       <object class="GtkLabel" id="label3">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">_Search for:</property>
                         <property name="use_underline">True</property>
@@ -44,8 +145,9 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHSeparator" id="hseparator1">
+                      <object class="GtkSeparator" id="hseparator1">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                       </object>
                       <packing>
                         <property name="right_attach">2</property>
@@ -61,6 +163,7 @@
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">When set, do not distinguish between upper and lower case letters</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -79,6 +182,7 @@
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">Do not consider matches in the middle of words</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
@@ -92,8 +196,9 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHSeparator" id="hseparator2">
+                      <object class="GtkSeparator" id="hseparator2">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                       </object>
                       <packing>
                         <property name="right_attach">2</property>
@@ -109,6 +214,7 @@
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">Search in all cells in the workbook</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -127,6 +233,7 @@
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">Search in current sheet only</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">scope_workbook</property>
@@ -145,6 +252,7 @@
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">Search in specified range only</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">scope_workbook</property>
@@ -170,6 +278,8 @@
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
@@ -178,6 +288,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Normal</property>
                 <property name="justify">center</property>
               </object>
@@ -186,14 +297,16 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox4">
+              <object class="GtkBox" id="vbox4">
                 <property name="visible">True</property>
-                <property name="border_width">4</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">4</property>
                 <property name="spacing">4</property>
                 <child>
                   <object class="GtkTable" id="page2-table">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="n_rows">2</property>
                     <property name="n_columns">2</property>
                     <property name="column_spacing">4</property>
@@ -201,10 +314,12 @@
                     <child>
                       <object class="GtkFrame" id="frame3">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label_xalign">0</property>
                         <child>
                           <object class="GtkTable" id="table2">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="border_width">12</property>
                             <property name="n_rows">3</property>
                             <property name="n_columns">2</property>
@@ -218,6 +333,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">Find text within non-string values</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
@@ -236,6 +352,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">Find text within expressions</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
@@ -254,6 +371,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">Find text within string values</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
@@ -270,6 +388,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">Find text within cell comments</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -287,6 +406,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">Find text within the calculated values of expressions</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
@@ -308,6 +428,7 @@
                         <child type="label">
                           <object class="GtkLabel" id="label4">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="label" translatable="yes">Search cells containing</property>
                           </object>
                         </child>
@@ -316,10 +437,12 @@
                     <child>
                       <object class="GtkFrame" id="frame5">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label_xalign">0</property>
                         <child>
                           <object class="GtkTable" id="table5">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="border_width">12</property>
                             <property name="n_rows">3</property>
                             <property name="column_spacing">6</property>
@@ -332,6 +455,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">The search text is taken literally.</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
@@ -348,6 +472,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">The search text is a regular expression</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                                 <property name="group">search_type_text</property>
@@ -365,6 +490,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                                 <property name="group">search_type_text</property>
@@ -381,6 +507,7 @@
                         <child type="label">
                           <object class="GtkLabel" id="label5">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="label" translatable="yes">Search text is</property>
                           </object>
                         </child>
@@ -393,10 +520,12 @@
                     <child>
                       <object class="GtkFrame" id="frame4">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label_xalign">0</property>
                         <child>
                           <object class="GtkTable" id="table4">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="border_width">6</property>
                             <property name="n_rows">2</property>
                             <property name="n_columns">2</property>
@@ -410,6 +539,7 @@
                                 <property name="can_focus">False</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">Search line by line</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
@@ -426,6 +556,7 @@
                                 <property name="can_focus">False</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">Search column by column</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                                 <property name="group">row_major</property>
@@ -444,6 +575,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">These settings are shared with the Search &amp; Replace dialog.</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -458,6 +590,7 @@
                         <child type="label">
                           <object class="GtkLabel" id="label6">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="label" translatable="yes">Miscellaneous</property>
                           </object>
                         </child>
@@ -472,6 +605,8 @@
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
@@ -483,6 +618,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Advanced</property>
                 <property name="justify">center</property>
               </object>
@@ -492,9 +628,10 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="matches_vbox">
+              <object class="GtkBox" id="matches_vbox">
                 <property name="visible">True</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
               </object>
               <packing>
                 <property name="position">2</property>
@@ -503,6 +640,7 @@
             <child type="tab">
               <object class="GtkLabel" id="matches_tab">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Matches</property>
                 <property name="justify">center</property>
               </object>
@@ -513,98 +651,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</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="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Dismiss search center</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="prev_button">
-                <property name="label">gtk-go-back</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Show previous match</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="next_button">
-                <property name="label">gtk-go-forward</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Show next match</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="search_button">
-                <property name="label">gtk-find</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Start search</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">4</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/sheet-order.ui b/src/dialogs/sheet-order.ui
index d0059b6..1ea5301 100644
--- a/src/dialogs/sheet-order.ui
+++ b/src/dialogs/sheet-order.ui
@@ -1,23 +1,69 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="sheet-order-dialog">
+    <property name="can_focus">False</property>
     <property name="border_width">12</property>
     <property name="title" translatable="yes">Manage Sheets</property>
     <property name="window_position">mouse</property>
     <property name="default_width">500</property>
     <property name="default_height">200</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">6</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-close</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_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
         <child>
-          <object class="GtkHBox" id="hbox1">
+          <object class="GtkBox" id="hbox1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="spacing">6</property>
             <child>
               <object class="GtkScrolledWindow" id="scrolled">
@@ -25,17 +71,18 @@
                 <property name="height_request">120</property>
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="hscrollbar_policy">automatic</property>
-                <property name="vscrollbar_policy">automatic</property>
                 <property name="shadow_type">in</property>
               </object>
               <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
                 <property name="position">0</property>
               </packing>
             </child>
             <child>
               <object class="GtkTable" id="sheet_order_buttons_table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="n_rows">7</property>
                 <property name="n_columns">2</property>
                 <property name="column_spacing">3</property>
@@ -46,6 +93,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_stock">True</property>
                     <property name="xalign">0</property>
                   </object>
@@ -60,6 +108,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_stock">True</property>
                     <property name="xalign">0</property>
                   </object>
@@ -76,6 +125,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_stock">True</property>
                     <property name="xalign">0</property>
                   </object>
@@ -92,6 +142,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_stock">True</property>
                     <property name="xalign">0</property>
                   </object>
@@ -103,8 +154,9 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHSeparator" id="hseparator1">
+                  <object class="GtkSeparator" id="hseparator1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                   </object>
                   <packing>
                     <property name="right_attach">2</property>
@@ -120,6 +172,7 @@
                     <property name="can_default">True</property>
                     <property name="has_default">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="xalign">0</property>
                   </object>
@@ -136,6 +189,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_stock">True</property>
                     <property name="xalign">0</property>
                   </object>
@@ -154,6 +208,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="xalign">0</property>
                   </object>
@@ -171,6 +226,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_stock">True</property>
                     <property name="xalign">0</property>
                   </object>
@@ -190,6 +246,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="xalign">0</property>
                   </object>
@@ -208,6 +265,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="xalign">0</property>
                   </object>
@@ -235,6 +293,8 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
@@ -244,64 +304,27 @@
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">False</property>
+            <property name="use_action_appearance">False</property>
             <property name="use_underline">True</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="GtkLabel" id="warning">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
           </object>
           <packing>
             <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">3</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-close</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>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/src/dialogs/sheet-resize.ui b/src/dialogs/sheet-resize.ui
index 5c7c577..e30bc8c 100644
--- a/src/dialogs/sheet-resize.ui
+++ b/src/dialogs/sheet-resize.ui
@@ -1,45 +1,75 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="value">7</property>
-    <property name="lower">7</property>
-    <property name="upper">13.019999999552965</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">1</property>
-    <property name="page_size">1</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment2">
-    <property name="value">7</property>
-    <property name="lower">7</property>
-    <property name="upper">24</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">1</property>
-    <property name="page_size">1</property>
-  </object>
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Resize">
+    <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Resize Sheet</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
         <child>
-          <object class="GtkVBox" id="vbox1">
+          <object class="GtkBox" id="vbox1">
             <property name="visible">True</property>
             <property name="orientation">vertical</property>
+            <property name="can_focus">False</property>
             <child>
               <object class="GtkTable" id="table1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="n_rows">2</property>
                 <property name="n_columns">3</property>
                 <child>
                   <object class="GtkLabel" id="columns_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label">xxxxx</property>
                     <property name="justify">right</property>
@@ -53,6 +83,7 @@
                 <child>
                   <object class="GtkLabel" id="rows_label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label">yyyyy</property>
                     <property name="justify">right</property>
@@ -68,6 +99,7 @@
                 <child>
                   <object class="GtkLabel" id="label4">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Columns</property>
                   </object>
@@ -81,6 +113,7 @@
                 <child>
                   <object class="GtkLabel" id="label5">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Rows</property>
                   </object>
@@ -94,7 +127,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHScale" id="columns_scale">
+                  <object class="GtkScale" id="columns_scale">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="adjustment">adjustment1</property>
@@ -108,7 +141,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHScale" id="rows_scale">
+                  <object class="GtkScale" id="rows_scale">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="adjustment">adjustment2</property>
@@ -125,6 +158,8 @@
                 </child>
               </object>
               <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
                 <property name="position">0</property>
               </packing>
             </child>
@@ -135,6 +170,7 @@
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
                 <property name="tooltip_text" translatable="yes">Check this to apply the new size to all sheets in the workbook</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
                 <property name="active">True</property>
                 <property name="draw_indicator">True</property>
@@ -147,46 +183,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
@@ -196,4 +195,20 @@
       <action-widget response="0">cancel_button</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="lower">7</property>
+    <property name="upper">13.019999999552965</property>
+    <property name="value">7</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">1</property>
+    <property name="page_size">1</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="lower">7</property>
+    <property name="upper">24</property>
+    <property name="value">7</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">1</property>
+    <property name="page_size">1</property>
+  </object>
 </interface>
diff --git a/src/dialogs/sheetobject-size.ui b/src/dialogs/sheetobject-size.ui
index 65972b6..881cd71 100644
--- a/src/dialogs/sheetobject-size.ui
+++ b/src/dialogs/sheetobject-size.ui
@@ -1,18 +1,17 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkAdjustment" id="adjustment1">
-    <property name="value">5</property>
     <property name="lower">4</property>
     <property name="upper">10000</property>
+    <property name="value">5</property>
     <property name="step_increment">1</property>
     <property name="page_increment">5</property>
   </object>
   <object class="GtkAdjustment" id="adjustment2">
-    <property name="value">5</property>
     <property name="lower">4</property>
     <property name="upper">10000</property>
+    <property name="value">5</property>
     <property name="step_increment">1</property>
     <property name="page_increment">5</property>
   </object>
@@ -29,18 +28,97 @@
     <property name="page_increment">5</property>
   </object>
   <object class="GtkDialog" id="object-size">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Size &amp; Position</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">6</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkTable" id="main_table">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="border_width">8</property>
             <property name="n_rows">10</property>
             <property name="n_columns">4</property>
@@ -64,6 +142,7 @@
             <child>
               <object class="GtkLabel" id="label">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">_Width in pixels:</property>
                 <property name="use_underline">True</property>
@@ -78,6 +157,7 @@
               <object class="GtkLabel" id="w-pts-label">
                 <property name="width_request">60</property>
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">1</property>
                 <property name="xpad">3</property>
                 <property name="label" translatable="yes">x</property>
@@ -92,6 +172,7 @@
             <child>
               <object class="GtkLabel" id="label1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">Width in points:</property>
               </object>
@@ -105,6 +186,7 @@
             <child>
               <object class="GtkLabel" id="label2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">_Height in pixels:</property>
                 <property name="use_underline">True</property>
@@ -121,7 +203,7 @@
               <object class="GtkSpinButton" id="h-spin">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="invisible_char">&#x2022;</property>
+                <property name="invisible_char">â</property>
                 <property name="xalign">1</property>
                 <property name="adjustment">adjustment2</property>
                 <property name="climb_rate">1</property>
@@ -138,6 +220,7 @@
             <child>
               <object class="GtkLabel" id="label3">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">Height in points:</property>
               </object>
@@ -154,6 +237,7 @@
               <object class="GtkLabel" id="h-pts-label">
                 <property name="width_request">60</property>
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">1</property>
                 <property name="xpad">3</property>
                 <property name="label" translatable="yes">x</property>
@@ -168,8 +252,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHSeparator" id="hseparator1">
+              <object class="GtkSeparator" id="hseparator1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
               </object>
               <packing>
                 <property name="right_attach">4</property>
@@ -182,6 +267,7 @@
             <child>
               <object class="GtkLabel" id="name">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">_Name:</property>
                 <property name="use_underline">True</property>
@@ -199,7 +285,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="tooltip_text" translatable="yes">This name is used by some plugins that provide programmability to address this object. Most users will not need to set this name. </property>
-                <property name="invisible_char">&#x2022;</property>
+                <property name="invisible_char">â</property>
               </object>
               <packing>
                 <property name="left_attach">1</property>
@@ -213,6 +299,7 @@
             <child>
               <object class="GtkLabel" id="label4">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">Object position relative to its current position:</property>
               </object>
@@ -225,6 +312,7 @@
             <child>
               <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">_x-Offset in pixels:</property>
                 <property name="use_underline">True</property>
@@ -240,6 +328,7 @@
             <child>
               <object class="GtkLabel" id="label6">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">_y-Offset in pixels:</property>
                 <property name="use_underline">True</property>
@@ -256,7 +345,7 @@
               <object class="GtkSpinButton" id="x-spin">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="invisible_char">&#x2022;</property>
+                <property name="invisible_char">â</property>
                 <property name="xalign">1</property>
                 <property name="adjustment">adjustment3</property>
                 <property name="climb_rate">1</property>
@@ -274,7 +363,7 @@
               <object class="GtkSpinButton" id="y-spin">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="invisible_char">&#x2022;</property>
+                <property name="invisible_char">â</property>
                 <property name="xalign">1</property>
                 <property name="adjustment">adjustment4</property>
                 <property name="climb_rate">1</property>
@@ -292,6 +381,7 @@
               <object class="GtkLabel" id="x-pts-label">
                 <property name="width_request">60</property>
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">1</property>
                 <property name="xpad">3</property>
                 <property name="label" translatable="yes">x</property>
@@ -309,6 +399,7 @@
               <object class="GtkLabel" id="y-pts-label">
                 <property name="width_request">60</property>
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">1</property>
                 <property name="xpad">3</property>
                 <property name="label" translatable="yes">x</property>
@@ -325,6 +416,7 @@
             <child>
               <object class="GtkLabel" id="label7">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">x-Offset in points:</property>
                 <property name="use_underline">True</property>
@@ -341,6 +433,7 @@
             <child>
               <object class="GtkLabel" id="label8">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">y-Offset in points:</property>
                 <property name="use_underline">True</property>
@@ -355,8 +448,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHSeparator" id="hseparator2">
+              <object class="GtkSeparator" id="hseparator2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
               </object>
               <packing>
                 <property name="right_attach">4</property>
@@ -367,8 +461,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHSeparator" id="hseparator3">
+              <object class="GtkSeparator" id="hseparator3">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
               </object>
               <packing>
                 <property name="right_attach">4</property>
@@ -385,6 +480,7 @@
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
                 <property name="tooltip_text" translatable="yes">Sheet objects with this property do not print with the remainder of the sheet.</property>
+                <property name="use_action_appearance">False</property>
                 <property name="draw_indicator">True</property>
               </object>
               <packing>
@@ -397,80 +493,10 @@
           </object>
           <packing>
             <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="apply_button">
-                <property name="label">gtk-apply</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/src/dialogs/shuffle.ui b/src/dialogs/shuffle.ui
index 329c040..c691cd1 100644
--- a/src/dialogs/shuffle.ui
+++ b/src/dialogs/shuffle.ui
@@ -1,31 +1,96 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Shuffling">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Data Shuffling</property>
     <property name="window_position">mouse</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkTable" id="input-table">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="n_rows">3</property>
             <property name="n_columns">3</property>
             <child>
-              <object class="GtkHBox" id="hbox1">
+              <object class="GtkBox" id="hbox1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkRadioButton" id="shuffle_cols">
                     <property name="label" translatable="yes">_Columns</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -41,6 +106,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">shuffle_cols</property>
@@ -57,6 +123,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">shuffle_cols</property>
@@ -79,6 +146,7 @@
             <child>
               <object class="GtkLabel" id="label6">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">Shuffle Method: </property>
               </object>
@@ -94,6 +162,7 @@
             <child>
               <object class="GtkLabel" id="var1-label">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">Input Range: </property>
               </object>
@@ -126,12 +195,15 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkLabel" id="warnings">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="xpad">5</property>
             <property name="ypad">5</property>
             <property name="wrap">True</property>
@@ -142,63 +214,6 @@
             <property name="position">2</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/src/dialogs/sign-test-two.ui b/src/dialogs/sign-test-two.ui
index 877c98f..e50b872 100644
--- a/src/dialogs/sign-test-two.ui
+++ b/src/dialogs/sign-test-two.ui
@@ -1,22 +1,78 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="value">0.050000000000000003</property>
-    <property name="upper">1</property>
-    <property name="step_increment">0.01</property>
-    <property name="page_increment">10</property>
-  </object>
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Sign-Test">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Comparing 2 Medians (Paired Sample)</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
@@ -24,6 +80,7 @@
             <child>
               <object class="GtkTable" id="input-table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">3</property>
                 <property name="n_columns">2</property>
@@ -32,6 +89,7 @@
                 <child>
                   <object class="GtkLabel" id="var1-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Variable _1 range:</property>
@@ -46,6 +104,7 @@
                 <child>
                   <object class="GtkLabel" id="var2-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Variable _2 range:</property>
@@ -65,6 +124,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -89,6 +149,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label9">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_Input</property>
                 <property name="use_underline">True</property>
               </object>
@@ -99,6 +160,7 @@
             <child>
               <object class="GtkTable" id="table3">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">4</property>
                 <property name="n_columns">2</property>
@@ -107,6 +169,7 @@
                 <child>
                   <object class="GtkLabel" id="label6">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Hypothesized _difference of medians:</property>
@@ -124,6 +187,7 @@
                 <child>
                   <object class="GtkLabel" id="label7">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">_Alpha:</property>
@@ -156,7 +220,7 @@
                   <object class="GtkSpinButton" id="alpha-entry">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x2022;</property>
+                    <property name="invisible_char">â</property>
                     <property name="adjustment">adjustment1</property>
                     <property name="climb_rate">0.01</property>
                     <property name="digits">2</property>
@@ -177,6 +241,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -191,6 +256,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">signtest</property>
@@ -210,6 +276,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label11">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_Test</property>
                 <property name="use_underline">True</property>
               </object>
@@ -219,8 +286,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -232,6 +300,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label12">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_Output</property>
                 <property name="use_underline">True</property>
               </object>
@@ -242,12 +311,15 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkLabel" id="warnings">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="use_markup">True</property>
             <property name="wrap">True</property>
           </object>
@@ -257,63 +329,6 @@
             <property name="position">2</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
@@ -322,4 +337,10 @@
       <action-widget response="0">okbutton</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">1</property>
+    <property name="value">0.050000000000000003</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
 </interface>
diff --git a/src/dialogs/sign-test.ui b/src/dialogs/sign-test.ui
index dda6e86..a8b2dc7 100644
--- a/src/dialogs/sign-test.ui
+++ b/src/dialogs/sign-test.ui
@@ -1,23 +1,79 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="value">0.050000000000000003</property>
-    <property name="upper">1</property>
-    <property name="step_increment">0.01</property>
-    <property name="page_increment">10</property>
-  </object>
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Sign-Test">
+    <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Testing 1 Median</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
@@ -26,6 +82,7 @@
             <child>
               <object class="GtkTable" id="input-table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">6</property>
                 <property name="n_columns">2</property>
@@ -34,6 +91,7 @@
                 <child>
                   <object class="GtkLabel" id="var1-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">_Input range:</property>
                     <property name="use_underline">True</property>
@@ -50,6 +108,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -61,8 +120,9 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="vbox2">
+                  <object class="GtkBox" id="vbox2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="homogeneous">True</property>
                     <child>
                       <object class="GtkRadioButton" id="grouped_by_col">
@@ -70,6 +130,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -86,6 +147,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">grouped_by_col</property>
@@ -102,6 +164,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">grouped_by_col</property>
@@ -124,6 +187,7 @@
                 <child>
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Grouped by:</property>
@@ -165,6 +229,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Input</property>
               </object>
               <packing>
@@ -172,12 +237,14 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox3">
+              <object class="GtkBox" id="vbox3">
                 <property name="visible">True</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkTable" id="table2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <property name="n_rows">4</property>
                     <property name="n_columns">2</property>
@@ -189,6 +256,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
@@ -203,6 +271,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">signtest</property>
@@ -217,6 +286,7 @@
                     <child>
                       <object class="GtkLabel" id="label3">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">_Alpha:</property>
                         <property name="use_underline">True</property>
@@ -251,6 +321,7 @@
                     <child>
                       <object class="GtkLabel" id="median-entry-label">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">_Predicted Median:</property>
                         <property name="use_underline">True</property>
@@ -266,7 +337,7 @@
                       <object class="GtkEntry" id="median-entry">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="invisible_char">&#x2022;</property>
+                        <property name="invisible_char">â</property>
                         <property name="text">0</property>
                         <property name="caps_lock_warning">False</property>
                       </object>
@@ -281,6 +352,8 @@
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
@@ -292,6 +365,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label6">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Test</property>
               </object>
               <packing>
@@ -300,8 +374,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -313,6 +388,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label7">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Output</property>
               </object>
               <packing>
@@ -322,12 +398,15 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkLabel" id="warnings">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="use_markup">True</property>
             <property name="wrap">True</property>
           </object>
@@ -337,63 +416,6 @@
             <property name="position">2</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
@@ -402,4 +424,10 @@
       <action-widget response="0">okbutton</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">1</property>
+    <property name="value">0.050000000000000003</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
 </interface>
diff --git a/src/dialogs/simulation.ui b/src/dialogs/simulation.ui
index 9ca644c..ba4a2f6 100644
--- a/src/dialogs/simulation.ui
+++ b/src/dialogs/simulation.ui
@@ -1,57 +1,93 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="value">10</property>
-    <property name="lower">1</property>
-    <property name="upper">36000</property>
-    <property name="step_increment">10</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment2">
-    <property name="value">1000</property>
-    <property name="lower">1</property>
-    <property name="upper">10000000000</property>
-    <property name="step_increment">1000</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment3">
-    <property name="value">1</property>
-    <property name="lower">1</property>
-    <property name="upper">100000000</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment4">
-    <property name="value">1</property>
-    <property name="lower">1</property>
-    <property name="upper">100000000</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Simulation">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Risk Simulation</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-close</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <child>
-              <object class="GtkVBox" id="vbox6">
+              <object class="GtkBox" id="vbox6">
                 <property name="visible">True</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <property name="spacing">6</property>
                 <child>
                   <object class="GtkTable" id="input-table">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">12</property>
                     <property name="n_rows">2</property>
                     <property name="n_columns">2</property>
@@ -60,6 +96,7 @@
                     <child>
                       <object class="GtkLabel" id="var1-label">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">Input variables:</property>
                         <property name="justify">right</property>
@@ -72,6 +109,7 @@
                     <child>
                       <object class="GtkLabel" id="var2-label">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">Output variables:</property>
                         <property name="justify">right</property>
@@ -91,6 +129,8 @@
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
@@ -99,6 +139,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Variables</property>
                 <property name="justify">center</property>
               </object>
@@ -107,13 +148,15 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox2">
+              <object class="GtkBox" id="vbox2">
                 <property name="visible">True</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <property name="spacing">6</property>
                 <child>
                   <object class="GtkTable" id="table3">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="n_rows">7</property>
                     <property name="n_columns">3</property>
                     <property name="column_spacing">12</property>
@@ -121,6 +164,7 @@
                     <child>
                       <object class="GtkLabel" id="label35">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">   
    &lt;span weight="bold"&gt;Rounds&lt;/span&gt;</property>
@@ -134,6 +178,7 @@
                     <child>
                       <object class="GtkLabel" id="label36">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">First round #:</property>
                       </object>
@@ -149,6 +194,7 @@
                     <child>
                       <object class="GtkLabel" id="label37">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">Last round #:</property>
                       </object>
@@ -164,6 +210,7 @@
                     <child>
                       <object class="GtkLabel" id="label38">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">   &lt;span weight="bold"&gt;Limits&lt;/span&gt;</property>
                         <property name="use_markup">True</property>
@@ -178,6 +225,7 @@
                     <child>
                       <object class="GtkLabel" id="label39">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">Iterations:</property>
                       </object>
@@ -193,6 +241,7 @@
                     <child>
                       <object class="GtkLabel" id="label40">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">Max time:</property>
                       </object>
@@ -300,6 +349,8 @@
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
@@ -311,6 +362,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Options</property>
                 <property name="justify">center</property>
               </object>
@@ -320,12 +372,14 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox9">
+              <object class="GtkBox" id="vbox9">
                 <property name="visible">True</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkFrame" id="frame8">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">8</property>
                     <property name="label_xalign">0</property>
                     <property name="shadow_type">none</property>
@@ -339,6 +393,9 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="headers_visible">False</property>
+                            <child internal-child="selection">
+                              <object class="GtkTreeSelection" id="treeview-selection1"/>
+                            </child>
                           </object>
                         </child>
                       </object>
@@ -346,25 +403,30 @@
                     <child type="label">
                       <object class="GtkLabel" id="label31">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">&lt;b&gt;Simulation summary:&lt;/b&gt;</property>
                         <property name="use_markup">True</property>
                       </object>
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
                   <object class="GtkFrame" id="frame9">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">6</property>
                     <property name="label_xalign">0</property>
                     <property name="shadow_type">none</property>
                     <child>
-                      <object class="GtkVBox" id="vbox10">
+                      <object class="GtkBox" id="vbox10">
                         <property name="visible">True</property>
                         <property name="orientation">vertical</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <placeholder/>
                         </child>
@@ -381,12 +443,15 @@
                             </child>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">1</property>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkHBox" id="hbox4">
+                          <object class="GtkBox" id="hbox4">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <child>
                               <object class="GtkButton" id="prev-button">
                                 <property name="label" translatable="yes">Prev. Sim.</property>
@@ -394,6 +459,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="border_width">12</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                               </object>
                               <packing>
@@ -409,6 +475,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="border_width">12</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                               </object>
                               <packing>
@@ -424,6 +491,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="border_width">12</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                               </object>
                               <packing>
@@ -439,6 +507,7 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="border_width">12</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_underline">True</property>
                               </object>
                               <packing>
@@ -449,6 +518,8 @@
                             </child>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">2</property>
                           </packing>
                         </child>
@@ -457,12 +528,15 @@
                     <child type="label">
                       <object class="GtkLabel" id="label32">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">&lt;b&gt;Summary of results:&lt;/b&gt;</property>
                         <property name="use_markup">True</property>
                       </object>
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
@@ -477,6 +551,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label29">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Summary</property>
               </object>
               <packing>
@@ -485,8 +560,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -498,6 +574,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label30">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Output</property>
               </object>
               <packing>
@@ -507,12 +584,15 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkLabel" id="warnings">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="xpad">5</property>
             <property name="ypad">5</property>
             <property name="wrap">True</property>
@@ -523,63 +603,6 @@
             <property name="position">2</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-close</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
@@ -588,4 +611,32 @@
       <action-widget response="0">okbutton</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="lower">1</property>
+    <property name="upper">36000</property>
+    <property name="value">10</property>
+    <property name="step_increment">10</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="lower">1</property>
+    <property name="upper">10000000000</property>
+    <property name="value">1000</property>
+    <property name="step_increment">1000</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment3">
+    <property name="lower">1</property>
+    <property name="upper">100000000</property>
+    <property name="value">1</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">100000000</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
 </interface>
diff --git a/src/dialogs/so-button.ui b/src/dialogs/so-button.ui
index 0ed2a28..f02d354 100644
--- a/src/dialogs/so-button.ui
+++ b/src/dialogs/so-button.ui
@@ -1,22 +1,85 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="SO-Button">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Button Properties</property>
     <property name="resizable">False</property>
     <property name="window_position">mouse</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">6</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkTable" id="table">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="border_width">5</property>
             <property name="n_rows">2</property>
             <property name="n_columns">2</property>
@@ -25,6 +88,7 @@
             <child>
               <object class="GtkLabel" id="label_linkto">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">Link to:</property>
                 <property name="wrap">True</property>
@@ -37,6 +101,7 @@
             <child>
               <object class="GtkLabel" id="label2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">Label:</property>
                 <property name="wrap">True</property>
@@ -77,63 +142,6 @@
             <property name="position">1</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/src/dialogs/so-checkbox.ui b/src/dialogs/so-checkbox.ui
index c070e50..c119961 100644
--- a/src/dialogs/so-checkbox.ui
+++ b/src/dialogs/so-checkbox.ui
@@ -1,22 +1,85 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="SO-Checkbox">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Checkbox Properties</property>
     <property name="resizable">False</property>
     <property name="window_position">mouse</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">6</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkTable" id="table">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="border_width">5</property>
             <property name="n_rows">2</property>
             <property name="n_columns">2</property>
@@ -25,6 +88,7 @@
             <child>
               <object class="GtkLabel" id="label_linkto">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">Link to:</property>
                 <property name="wrap">True</property>
@@ -37,6 +101,7 @@
             <child>
               <object class="GtkLabel" id="label2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">Label:</property>
                 <property name="wrap">True</property>
@@ -77,63 +142,6 @@
             <property name="position">1</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/src/dialogs/so-frame.ui b/src/dialogs/so-frame.ui
index fc74191..fa58f69 100644
--- a/src/dialogs/so-frame.ui
+++ b/src/dialogs/so-frame.ui
@@ -1,59 +1,22 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="so_frame">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Frame Properties</property>
     <property name="resizable">False</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <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="hbox1">
-            <property name="visible">True</property>
-            <property name="border_width">5</property>
-            <property name="spacing">12</property>
-            <child>
-              <object class="GtkLabel" id="label">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">Label:</property>
-                <accessibility>
-                  <relation type="label-for" target="entry"/>
-                </accessibility>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <accessibility>
-                  <relation type="labelled-by" target="label"/>
-                </accessibility>
-              </object>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
         <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
+          <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="help_button">
@@ -62,6 +25,7 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
@@ -77,6 +41,7 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
@@ -93,6 +58,7 @@
                 <property name="can_default">True</property>
                 <property name="has_default">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
@@ -104,10 +70,53 @@
           </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>
+        <child>
+          <object class="GtkBox" id="hbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="border_width">5</property>
+            <property name="spacing">12</property>
+            <child>
+              <object class="GtkLabel" id="label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Label:</property>
+                <accessibility>
+                  <relation type="label-for" target="entry"/>
+                </accessibility>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <accessibility>
+                  <relation type="labelled-by" target="label"/>
+                </accessibility>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/src/dialogs/so-list.ui b/src/dialogs/so-list.ui
index 9d4ce2b..3808192 100644
--- a/src/dialogs/so-list.ui
+++ b/src/dialogs/so-list.ui
@@ -1,19 +1,81 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="SOList">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">List Properties</property>
     <property name="window_position">mouse</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkTable" id="table">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="border_width">12</property>
             <property name="n_rows">5</property>
             <property name="n_columns">2</property>
@@ -21,6 +83,7 @@
             <child>
               <object class="GtkLabel" id="link-label">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">_Link :</property>
                 <property name="use_underline">True</property>
@@ -33,6 +96,7 @@
             <child>
               <object class="GtkLabel" id="content-label">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">_Content :</property>
                 <property name="use_underline">True</property>
@@ -50,6 +114,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="active">True</property>
                 <property name="draw_indicator">True</property>
               </object>
@@ -66,6 +131,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="active">True</property>
                 <property name="draw_indicator">True</property>
                 <property name="group">as-value-radio</property>
@@ -91,63 +157,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/so-radiobutton.ui b/src/dialogs/so-radiobutton.ui
index 69e96e0..01ef7c0 100644
--- a/src/dialogs/so-radiobutton.ui
+++ b/src/dialogs/so-radiobutton.ui
@@ -1,22 +1,85 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="SO-Radiobutton">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Radiobutton Properties</property>
     <property name="resizable">False</property>
     <property name="window_position">mouse</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">6</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkTable" id="table">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="border_width">5</property>
             <property name="n_rows">3</property>
             <property name="n_columns">2</property>
@@ -26,7 +89,7 @@
               <object class="GtkEntry" id="value_entry">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="invisible_char">&#x25CF;</property>
+                <property name="invisible_char">â</property>
               </object>
               <packing>
                 <property name="left_attach">1</property>
@@ -38,6 +101,7 @@
             <child>
               <object class="GtkLabel" id="label1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Value:</property>
               </object>
               <packing>
@@ -66,6 +130,7 @@
             <child>
               <object class="GtkLabel" id="label2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">Label:</property>
                 <property name="wrap">True</property>
@@ -83,6 +148,7 @@
             <child>
               <object class="GtkLabel" id="label_linkto">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">Link to:</property>
                 <property name="wrap">True</property>
@@ -102,63 +168,6 @@
             <property name="position">1</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/src/dialogs/so-scrollbar.ui b/src/dialogs/so-scrollbar.ui
index 11379c9..2b05e37 100644
--- a/src/dialogs/so-scrollbar.ui
+++ b/src/dialogs/so-scrollbar.ui
@@ -1,42 +1,85 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="upper">3001</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment2">
-    <property name="upper">3001</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment3">
-    <property name="upper">3001</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment4">
-    <property name="upper">3001</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="SO-Scrollbar">
+    <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Scrollbar Properties</property>
     <property name="resizable">False</property>
     <property name="window_position">mouse</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">6</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkTable" id="table">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="border_width">5</property>
             <property name="n_rows">6</property>
             <property name="n_columns">2</property>
@@ -45,6 +88,7 @@
             <child>
               <object class="GtkLabel" id="label_linkto">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">Link to:</property>
                 <property name="wrap">True</property>
@@ -57,6 +101,7 @@
             <child>
               <object class="GtkLabel" id="label_max">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">Max:</property>
                 <property name="wrap">True</property>
@@ -74,6 +119,7 @@
             <child>
               <object class="GtkLabel" id="label_increment">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">Increment:</property>
                 <property name="wrap">True</property>
@@ -91,6 +137,7 @@
             <child>
               <object class="GtkLabel" id="label_page">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">Page:</property>
                 <property name="wrap">True</property>
@@ -184,6 +231,7 @@
             <child>
               <object class="GtkLabel" id="label_min">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">Min:</property>
                 <property name="wrap">True</property>
@@ -201,6 +249,7 @@
             <child>
               <object class="GtkLabel" id="direction_label">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">Direction:</property>
               </object>
@@ -212,14 +261,16 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="direction_box">
+              <object class="GtkBox" id="direction_box">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkRadioButton" id="direction_h">
                     <property name="label" translatable="yes">_Horizontal</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -235,6 +286,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">direction_h</property>
@@ -266,63 +318,6 @@
             <property name="position">1</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
@@ -331,4 +326,24 @@
       <action-widget response="0">ok_button</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">3001</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="upper">3001</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment3">
+    <property name="upper">3001</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment4">
+    <property name="upper">3001</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
 </interface>
diff --git a/src/dialogs/solver.ui b/src/dialogs/solver.ui
index 212e993..eda1c66 100644
--- a/src/dialogs/solver.ui
+++ b/src/dialogs/solver.ui
@@ -1,53 +1,78 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="value">30</property>
-    <property name="lower">1</property>
-    <property name="upper">36000</property>
-    <property name="step_increment">10</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment2">
-    <property name="value">100</property>
-    <property name="lower">1</property>
-    <property name="upper">10000000000</property>
-    <property name="step_increment">10</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkListStore" id="model1">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes">&#x2264;</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">&#x2265;</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">=</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Int</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Bool</col>
-      </row>
-    </data>
-  </object>
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="Solver">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Solver</property>
     <property name="window_position">mouse</property>
     <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox4">
+      <object class="GtkBox" id="dialog-vbox4">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area4">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="closebutton">
+                <property name="label">gtk-close</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="solvebutton">
+                <property name="label" translatable="yes">Solve</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
@@ -56,6 +81,7 @@
             <child>
               <object class="GtkTable" id="parameter_table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="n_rows">4</property>
                 <property name="n_columns">2</property>
                 <property name="column_spacing">5</property>
@@ -63,6 +89,7 @@
                 <child>
                   <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">_Equal To:</property>
                     <property name="use_underline">True</property>
@@ -78,6 +105,7 @@
                 <child>
                   <object class="GtkLabel" id="label15">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">B_y Changing Cells: </property>
                     <property name="use_underline">True</property>
@@ -91,8 +119,9 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="hbox10">
+                  <object class="GtkBox" id="hbox10">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="homogeneous">True</property>
                     <child>
                       <object class="GtkRadioButton" id="max_button">
@@ -100,10 +129,13 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="padding">5</property>
                         <property name="position">0</property>
                       </packing>
@@ -114,11 +146,14 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">max_button</property>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="padding">5</property>
                         <property name="position">1</property>
                       </packing>
@@ -136,6 +171,7 @@
                 <child>
                   <object class="GtkLabel" id="label14">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="ypad">5</property>
@@ -163,6 +199,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label9">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Parameters</property>
                 <property name="justify">center</property>
               </object>
@@ -173,6 +210,7 @@
             <child>
               <object class="GtkTable" id="options_table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">8</property>
                 <property name="n_rows">6</property>
                 <property name="n_columns">2</property>
@@ -181,6 +219,7 @@
                 <child>
                   <object class="GtkLabel" id="label21">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0.88999998569488525</property>
                     <property name="label" translatable="yes">_Algorithm:</property>
                     <property name="use_underline">True</property>
@@ -195,6 +234,7 @@
                 <child>
                   <object class="GtkComboBox" id="algorithm_combo">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
@@ -210,6 +250,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -226,6 +267,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
@@ -242,6 +284,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">qp_model_button</property>
@@ -259,6 +302,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
@@ -276,6 +320,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -289,8 +334,9 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHSeparator" id="hseparator1">
+                  <object class="GtkSeparator" id="hseparator1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                   </object>
                   <packing>
                     <property name="right_attach">2</property>
@@ -317,6 +363,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label25">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Model</property>
               </object>
               <packing>
@@ -325,12 +372,14 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox7">
+              <object class="GtkBox" id="vbox7">
                 <property name="visible">True</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
                 <child>
-                  <object class="GtkHBox" id="hbox7">
+                  <object class="GtkBox" id="hbox7">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <object class="GtkScrolledWindow" id="scrolledwindow1">
                         <property name="visible">True</property>
@@ -341,16 +390,23 @@
                           <object class="GtkTreeView" id="constraint_list">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
+                            <child internal-child="selection">
+                              <object class="GtkTreeSelection" id="treeview-selection1"/>
+                            </child>
                           </object>
                         </child>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkVButtonBox" id="vbuttonbox1">
+                      <object class="GtkButtonBox" id="vbuttonbox1">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
+                        <property name="can_focus">False</property>
                         <property name="border_width">10</property>
                         <property name="spacing">4</property>
                         <property name="layout_style">start</property>
@@ -366,6 +422,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_stock">True</property>
                           </object>
                           <packing>
@@ -377,23 +434,28 @@
                       </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="position">1</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="GtkTable" id="edit-table">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="border_width">10</property>
                     <property name="n_rows">2</property>
                     <property name="n_columns">4</property>
                     <child>
                       <object class="GtkComboBox" id="type_menu">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="model">model1</property>
                         <child>
                           <object class="GtkCellRendererText" id="renderer1"/>
@@ -414,6 +476,7 @@
                     <child>
                       <object class="GtkLabel" id="rhs_label">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">_Right Hand Side:</property>
                         <property name="use_underline">True</property>
                         <property name="justify">center</property>
@@ -428,6 +491,7 @@
                     <child>
                       <object class="GtkLabel" id="label12">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">_Type:</property>
                         <property name="use_underline">True</property>
                         <property name="justify">center</property>
@@ -442,6 +506,7 @@
                     <child>
                       <object class="GtkLabel" id="lhs_label">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">_Left Hand Side:</property>
                         <property name="use_underline">True</property>
                         <property name="justify">center</property>
@@ -456,6 +521,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="relief">half</property>
                         <property name="use_stock">True</property>
                       </object>
@@ -470,6 +536,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                       </object>
                       <packing>
@@ -488,6 +555,7 @@
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
@@ -499,6 +567,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label10">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Constraints</property>
                 <property name="justify">center</property>
               </object>
@@ -510,6 +579,7 @@
             <child>
               <object class="GtkTable" id="options_table1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">8</property>
                 <property name="n_rows">4</property>
                 <property name="n_columns">2</property>
@@ -519,6 +589,7 @@
                   <object class="GtkLabel" id="label19">
                     <property name="width_request">154</property>
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Max _Iterations:</property>
                     <property name="use_underline">True</property>
@@ -531,6 +602,7 @@
                 <child>
                   <object class="GtkLabel" id="label20">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Max _Time (sec.):</property>
                     <property name="use_underline">True</property>
@@ -549,6 +621,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -604,6 +677,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label26">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Options</property>
               </object>
               <packing>
@@ -612,15 +686,17 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox8">
+              <object class="GtkBox" id="vbox8">
                 <property name="visible">True</property>
-                <property name="border_width">10</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">10</property>
                 <child>
-                  <object class="GtkVBox" id="vbox9">
+                  <object class="GtkBox" id="vbox9">
                     <property name="visible">True</property>
-                    <property name="border_width">8</property>
                     <property name="orientation">vertical</property>
+                    <property name="can_focus">False</property>
+                    <property name="border_width">8</property>
                     <property name="spacing">5</property>
                     <child>
                       <object class="GtkCheckButton" id="program">
@@ -628,6 +704,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
@@ -639,6 +716,8 @@
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
@@ -650,6 +729,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label16">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Reports</property>
                 <property name="justify">center</property>
               </object>
@@ -659,10 +739,11 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox10">
+              <object class="GtkBox" id="vbox10">
                 <property name="visible">True</property>
-                <property name="border_width">8</property>
                 <property name="orientation">vertical</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">8</property>
                 <property name="spacing">5</property>
                 <child>
                   <object class="GtkRadioButton" id="no_scenario">
@@ -670,6 +751,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -685,6 +767,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">no_scenario</property>
@@ -696,11 +779,13 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="hbox9">
+                  <object class="GtkBox" id="hbox9">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <object class="GtkLabel" id="label24">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">_Name: </property>
                         <property name="use_underline">True</property>
                         <property name="mnemonic_widget">scenario_name_entry</property>
@@ -717,12 +802,15 @@
                         <property name="can_focus">True</property>
                       </object>
                       <packing>
+                        <property name="expand">True</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">2</property>
                   </packing>
                 </child>
@@ -737,6 +825,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label27">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Scenarios</property>
               </object>
               <packing>
@@ -746,64 +835,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area4">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="closebutton">
-                <property name="label">gtk-close</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="solvebutton">
-                <property name="label" translatable="yes">Solve</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
@@ -814,4 +848,41 @@
       <action-widget response="0">solvebutton</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="lower">1</property>
+    <property name="upper">36000</property>
+    <property name="value">30</property>
+    <property name="step_increment">10</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="lower">1</property>
+    <property name="upper">10000000000</property>
+    <property name="value">100</property>
+    <property name="step_increment">10</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkListStore" id="model1">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">â</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">â</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">=</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Int</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Bool</col>
+      </row>
+    </data>
+  </object>
 </interface>
diff --git a/src/dialogs/tabulate.ui b/src/dialogs/tabulate.ui
index b41bf7f..ce7b060 100644
--- a/src/dialogs/tabulate.ui
+++ b/src/dialogs/tabulate.ui
@@ -1,27 +1,92 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="tabulate_dialog">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Tabulate Dependency</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
         <child>
-          <object class="GtkVBox" id="vbox1">
+          <object class="GtkBox" id="vbox1">
             <property name="visible">True</property>
             <property name="orientation">vertical</property>
+            <property name="can_focus">False</property>
             <child>
               <object class="GtkFrame" id="frame1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label_xalign">0</property>
                 <child>
                   <object class="GtkTable" id="source_table">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="n_rows">4</property>
                     <property name="n_columns">4</property>
                     <property name="homogeneous">True</property>
@@ -54,6 +119,7 @@
                     <child>
                       <object class="GtkLabel" id="label5">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">Minimum</property>
                         <property name="justify">center</property>
                       </object>
@@ -67,6 +133,7 @@
                     <child>
                       <object class="GtkLabel" id="label6">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">Maximum</property>
                         <property name="justify">center</property>
                       </object>
@@ -80,6 +147,7 @@
                     <child>
                       <object class="GtkLabel" id="label7">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">Step</property>
                         <property name="justify">center</property>
                       </object>
@@ -93,6 +161,7 @@
                     <child>
                       <object class="GtkLabel" id="label4">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">Cell</property>
                         <property name="justify">center</property>
                       </object>
@@ -206,42 +275,51 @@
                 <child type="label">
                   <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Dependency cells</property>
                   </object>
                 </child>
               </object>
               <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
                 <property name="position">0</property>
               </packing>
             </child>
             <child>
               <object class="GtkFrame" id="frame4">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label_xalign">0</property>
                 <child>
-                  <object class="GtkHBox" id="result_hbox">
+                  <object class="GtkBox" id="result_hbox">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                   </object>
                 </child>
                 <child type="label">
                   <object class="GtkLabel" id="label8">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Result cell</property>
                   </object>
                 </child>
               </object>
               <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
                 <property name="position">1</property>
               </packing>
             </child>
             <child>
               <object class="GtkFrame" id="frame3">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label_xalign">0</property>
                 <child>
-                  <object class="GtkVBox" id="vbox4">
+                  <object class="GtkBox" id="vbox4">
                     <property name="visible">True</property>
-                    <property name="orientation">vertical</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <object class="GtkRadioButton" id="mode_visual">
                         <property name="label" translatable="yes">_Visual</property>
@@ -249,6 +327,7 @@
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">Use down for first source, right for second, and multiple sheets for third</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
@@ -265,6 +344,7 @@
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">Make one long list of coordinates and values</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">mode_visual</property>
@@ -280,75 +360,22 @@
                 <child type="label">
                   <object class="GtkLabel" id="label9">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">Tabulation Mode</property>
                   </object>
                 </child>
               </object>
               <packing>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
                 <property name="position">2</property>
               </packing>
             </child>
           </object>
           <packing>
             <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/variance-tests.ui b/src/dialogs/variance-tests.ui
index 4b5c761..c047e80 100644
--- a/src/dialogs/variance-tests.ui
+++ b/src/dialogs/variance-tests.ui
@@ -1,17 +1,79 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="VarianceTests">
+    <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Testing Equality of 2 Variances (F-Test)</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
@@ -20,6 +82,7 @@
             <child>
               <object class="GtkTable" id="input-table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">3</property>
                 <property name="n_columns">2</property>
@@ -28,6 +91,7 @@
                 <child>
                   <object class="GtkLabel" id="var1-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Variable _1 range:</property>
                     <property name="use_underline">True</property>
@@ -41,6 +105,7 @@
                 <child>
                   <object class="GtkLabel" id="var2-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Variable _2 range:</property>
                     <property name="use_underline">True</property>
@@ -59,6 +124,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -81,6 +147,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Input</property>
                 <property name="use_underline">True</property>
               </object>
@@ -91,12 +158,14 @@
             <child>
               <object class="GtkTable" id="table1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_columns">2</property>
                 <property name="column_spacing">12</property>
                 <child>
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">_Alpha:</property>
                     <property name="use_underline">True</property>
@@ -134,6 +203,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label3">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Test</property>
                 <property name="use_underline">True</property>
               </object>
@@ -143,8 +213,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -156,6 +227,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label4">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Output</property>
                 <property name="use_underline">True</property>
               </object>
@@ -166,64 +238,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/view.ui b/src/dialogs/view.ui
index 79b08e6..e78bb89 100644
--- a/src/dialogs/view.ui
+++ b/src/dialogs/view.ui
@@ -1,28 +1,91 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="View">
+    <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Create New View</property>
     <property name="resizable">False</property>
     <property name="modal">True</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</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">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="has_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
-          <object class="GtkVBox" id="vbox2">
+          <object class="GtkBox" id="vbox2">
             <property name="visible">True</property>
-            <property name="border_width">5</property>
             <property name="orientation">vertical</property>
+            <property name="can_focus">False</property>
+            <property name="border_width">5</property>
             <property name="spacing">6</property>
             <child>
               <object class="GtkLabel" id="label3">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">&lt;b&gt;Location&lt;/b&gt;</property>
                 <property name="use_markup">True</property>
@@ -37,11 +100,13 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="hbox1">
+              <object class="GtkBox" id="hbox1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <object class="GtkLabel" id="label4">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">    </property>
                   </object>
                   <packing>
@@ -51,16 +116,17 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkVBox" id="location_screens_vbox">
+                  <object class="GtkBox" id="location_screens_vbox">
                     <property name="visible">True</property>
-                    <property name="orientation">vertical</property>
+                    <property name="can_focus">False</property>
                     <property name="spacing">6</property>
                     <child>
                       <placeholder/>
                     </child>
                     <child>
-                      <object class="GtkHBox" id="hbox2">
+                      <object class="GtkBox" id="hbox2">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
                           <object class="GtkRadioButton" id="location_elsewhere">
@@ -69,6 +135,7 @@
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
                             <property name="tooltip_text" translatable="yes">New view will be opened on specified screen</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                             <accessibility>
@@ -90,24 +157,30 @@
                             </accessibility>
                           </object>
                           <packing>
+                            <property name="expand">True</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="pack_type">end</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
                   </object>
                   <packing>
+                    <property name="expand">True</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>
@@ -117,6 +190,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
                 <property name="draw_indicator">True</property>
               </object>
@@ -128,63 +202,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="has_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/dialogs/wilcoxon-mann-whitney.ui b/src/dialogs/wilcoxon-mann-whitney.ui
index e14c42b..1708722 100644
--- a/src/dialogs/wilcoxon-mann-whitney.ui
+++ b/src/dialogs/wilcoxon-mann-whitney.ui
@@ -1,16 +1,78 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="WilcoxonMannWhitney">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Wilcoxon-Mann-Whitney Test</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">8</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
@@ -18,6 +80,7 @@
             <child>
               <object class="GtkTable" id="input-table">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="n_rows">3</property>
                 <property name="n_columns">2</property>
@@ -26,6 +89,7 @@
                 <child>
                   <object class="GtkLabel" id="var1-label">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">_Input range:</property>
@@ -40,6 +104,7 @@
                 <child>
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="label" translatable="yes">Grouped by:</property>
@@ -58,6 +123,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -69,8 +135,9 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="vbox2">
+                  <object class="GtkBox" id="vbox2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="homogeneous">True</property>
                     <child>
                       <object class="GtkRadioButton" id="grouped_by_col">
@@ -78,6 +145,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -94,6 +162,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">grouped_by_col</property>
@@ -110,6 +179,7 @@
                         <property name="sensitive">False</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">grouped_by_col</property>
@@ -140,6 +210,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label4">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Input</property>
               </object>
               <packing>
@@ -147,8 +218,9 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="dao">
+              <object class="GtkBox" id="dao">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <child>
                   <placeholder/>
                 </child>
@@ -160,6 +232,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Output</property>
               </object>
               <packing>
@@ -169,12 +242,15 @@
             </child>
           </object>
           <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkLabel" id="warnings">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="wrap">True</property>
           </object>
           <packing>
@@ -183,63 +259,6 @@
             <property name="position">2</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="helpbutton">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancelbutton">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="okbutton">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/src/dialogs/workbook-attr.ui b/src/dialogs/workbook-attr.ui
index 5eab563..f69ead9 100644
--- a/src/dialogs/workbook-attr.ui
+++ b/src/dialogs/workbook-attr.ui
@@ -1,60 +1,91 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkDialog" id="WorkbookAttr">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">View Properties</property>
     <property name="type_hint">normal</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <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="hbox1">
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
-            <property name="border_width">5</property>
-            <property name="spacing">12</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
             <child>
-              <object class="GtkScrolledWindow" id="scrolledwindow1">
+              <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="hscrollbar_policy">never</property>
-                <property name="vscrollbar_policy">never</property>
-                <property name="shadow_type">in</property>
-                <child>
-                  <object class="GtkTreeView" id="itemlist">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="headers_visible">False</property>
-                    <property name="headers_clickable">False</property>
-                  </object>
-                </child>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
-                <property name="position">1</property>
+                <property name="fill">False</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="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </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>
+        <child>
+          <object class="GtkBox" id="hbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="border_width">5</property>
+            <property name="spacing">12</property>
+            <child>
               <object class="GtkNotebook" id="notebook">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="show_tabs">False</property>
                 <property name="show_border">False</property>
                 <child>
-                  <object class="GtkVBox" id="vbox2">
+                  <object class="GtkBox" id="vbox2">
                     <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <object class="GtkCheckButton" id="WorkbookView::show_notebook_tabs">
                         <property name="label" translatable="yes">Notebook _Tabs for Sheets</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</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>
@@ -64,11 +95,13 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</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>
@@ -78,11 +111,13 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</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>
@@ -91,6 +126,7 @@
                 <child type="tab">
                   <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">View</property>
                     <property name="justify">center</property>
                   </object>
@@ -101,6 +137,7 @@
                 <child>
                   <object class="GtkTable" id="table2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="n_rows">2</property>
                     <property name="n_columns">2</property>
                     <property name="column_spacing">12</property>
@@ -111,6 +148,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
@@ -141,6 +179,7 @@
                       <object class="GtkLabel" id="label7">
                         <property name="visible">True</property>
                         <property name="sensitive">False</property>
+                        <property name="can_focus">False</property>
                         <property name="yalign">0</property>
                         <property name="label" translatable="yes">Pa_ssword:</property>
                         <property name="use_underline">True</property>
@@ -161,6 +200,7 @@
                 <child type="tab">
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label">Protection</property>
                     <property name="justify">center</property>
                   </object>
@@ -170,19 +210,23 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkVBox" id="vbox1">
+                  <object class="GtkBox" id="vbox1">
                     <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <object class="GtkCheckButton" id="WorkbookView::do_auto_completion">
                         <property name="label" translatable="yes">A_uto Complete Text in Cells</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</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>
@@ -194,6 +238,7 @@
                 <child type="tab">
                   <object class="GtkLabel" id="label3">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label">page 3</property>
                   </object>
                   <packing>
@@ -202,19 +247,23 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkVBox" id="vbox-f-marker">
+                  <object class="GtkBox" id="vbox-f-marker">
                     <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
+                    <property name="can_focus">False</property>
                     <child>
                       <object class="GtkCheckButton" id="WorkbookView::show_function_cell_markers">
                         <property name="label" translatable="yes">Show _Formula Cell Markers</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</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>
@@ -226,6 +275,7 @@
                 <child type="tab">
                   <object class="GtkLabel" id="label4">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label">page 4</property>
                   </object>
                   <packing>
@@ -235,55 +285,43 @@
                 </child>
               </object>
               <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
                 <property name="pack_type">end</property>
                 <property name="position">0</property>
               </packing>
             </child>
-          </object>
-          <packing>
-            <property name="padding">1</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
             <child>
-              <object class="GtkButton" id="close_button">
-                <property name="label">gtk-close</property>
+              <object class="GtkScrolledWindow" id="scrolledwindow1">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
+                <property name="hscrollbar_policy">never</property>
+                <property name="vscrollbar_policy">never</property>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkTreeView" id="itemlist">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="headers_visible">False</property>
+                    <property name="headers_clickable">False</property>
+                    <child internal-child="selection">
+                      <object class="GtkTreeSelection" id="treeview-selection1"/>
+                    </child>
+                  </object>
+                </child>
               </object>
               <packing>
                 <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
               </packing>
             </child>
           </object>
           <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="padding">1</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>
diff --git a/src/gnm-graph-window.c b/src/gnm-graph-window.c
index f154da9..53f6904 100644
--- a/src/gnm-graph-window.c
+++ b/src/gnm-graph-window.c
@@ -191,7 +191,7 @@ gnm_graph_window_init (GnmGraphWindow *window)
 		N_("500%")
 	};
 
-	window->vbox = gtk_vbox_new (FALSE, 0);
+	window->vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 	gtk_widget_show (GTK_WIDGET (window->vbox));
 	gtk_container_add (GTK_CONTAINER (window), window->vbox);
 
@@ -209,9 +209,9 @@ gnm_graph_window_init (GnmGraphWindow *window)
 	gtk_widget_show (GTK_WIDGET (item));
 	gtk_toolbar_insert (GTK_TOOLBAR (window->toolbar), item, -1);
 
-	window->size_combo = gtk_combo_box_new_text ();
+	window->size_combo = gtk_combo_box_text_new ();
 	for (i = 0; i < G_N_ELEMENTS (chart_sizes); i++)
-		gtk_combo_box_append_text (GTK_COMBO_BOX (window->size_combo), _(chart_sizes[i]));
+		gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (window->size_combo), _(chart_sizes[i]));
 	gtk_widget_set_sensitive (window->size_combo, FALSE);
 	gtk_widget_show (window->size_combo);
 	gtk_combo_box_set_active (GTK_COMBO_BOX (window->size_combo), CHART_SIZE_FIT);
@@ -268,7 +268,7 @@ gnm_graph_window_set_graph (GnmGraphWindow *window,
 		gtk_widget_show (window->graph);
 		gtk_container_add (GTK_CONTAINER (window->scrolled_window), window->graph);
 
-		gtk_widget_size_request (window->toolbar, &toolbar_requisition);
+		gtk_widget_get_preferred_size (window->toolbar, &toolbar_requisition, NULL);
 		gtk_window_set_default_size (GTK_WINDOW (window),
 					     (int) graph_width,
 					     (int) graph_height + toolbar_requisition.height);
diff --git a/src/gnm-pane.c b/src/gnm-pane.c
index 01e402a..af5151a 100644
--- a/src/gnm-pane.c
+++ b/src/gnm-pane.c
@@ -397,7 +397,7 @@ gnm_pane_key_mode_sheet (GnmPane *pane, GdkEventKey *event,
 	 * NOTE : Keep these in sync with the condition
 	 *        for tabs.
 	 */
-	case GDK_KP_Enter:
+	case GDK_KEY_KP_Enter:
 	case GDK_KEY_Return:
 		if (wbcg_is_editing (wbcg) &&
 		    (state == GDK_CONTROL_MASK ||
@@ -676,8 +676,8 @@ gnm_pane_focus_out (GtkWidget *widget, GdkEventFocus *event)
 static void
 gnm_pane_realize (GtkWidget *w)
 {
-	GtkStyle  *style;
-
+	GtkStyleContext *ctxt;
+	GdkRGBA rgba;
 	GNM_PANE (w)->im_block_edit_start = FALSE;
 
 	if (GTK_WIDGET_CLASS (parent_klass)->realize)
@@ -685,10 +685,10 @@ gnm_pane_realize (GtkWidget *w)
 
 	/* Set the default background color of the canvas itself to white.
 	 * This makes the redraws when the canvas scrolls flicker less. */
-	style = gtk_style_copy (gtk_widget_get_style (w));
-	style->bg[GTK_STATE_NORMAL] = style->white;
-	gtk_widget_set_style (w, style);
-	g_object_unref (style);
+	ctxt = gtk_widget_get_style_context (w);
+	gtk_style_context_get_background_color (ctxt, GTK_STATE_SELECTED, &rgba);
+	gtk_widget_override_background_color (w, GTK_STATE_NORMAL, &gs_white);
+	gtk_widget_override_background_color (w, GTK_STATE_SELECTED, &rgba);
 
 	gtk_im_context_set_client_window
 		(GNM_PANE (w)->im_context,
@@ -887,7 +887,7 @@ gnm_pane_dispose (GObject *obj)
 	pane->cursor.expr_range = NULL;
 
 	if (pane->mouse_cursor) {
-		gdk_cursor_unref (pane->mouse_cursor);
+		g_object_unref (pane->mouse_cursor);
 		pane->mouse_cursor = NULL;
 	}
 	gnm_pane_clear_obj_size_tip (pane);
@@ -988,13 +988,6 @@ GSF_CLASS (GnmPane, gnm_pane,
 	   GNM_SIMPLE_CANVAS_TYPE)
 
 static void
-cb_gnm_pane_header_realized (GtkLayout *layout)
-{
-	GdkWindow *window = gtk_layout_get_bin_window (layout);
-	gdk_window_set_back_pixmap (window, NULL, FALSE);
-}
-
-static void
 gnm_pane_header_init (GnmPane *pane, SheetControlGUI *scg,
 		      gboolean is_col_header)
 {
@@ -1031,9 +1024,6 @@ gnm_pane_header_init (GnmPane *pane, SheetControlGUI *scg,
 	    NULL != sheet &&
 	    fabs (1. - sheet->last_zoom_factor_used) > 1e-6)
 		goc_canvas_set_pixels_per_unit (canvas, sheet->last_zoom_factor_used);
-
-	g_signal_connect (G_OBJECT (canvas), "realize",
-		G_CALLBACK (cb_gnm_pane_header_realized), NULL);
 }
 
 static void
@@ -1085,7 +1075,7 @@ cb_pane_drag_motion (GtkWidget *widget, GdkDragContext *context,
 		GdkModifierType mask;
 		double wx, wy;
 
-		g_object_set_data (&context->parent_instance,
+		g_object_set_data (G_OBJECT (context),
 			"wbcg", scg_wbcg (scg));
 		goc_canvas_w2c (canvas, x, y, &wx, &wy);
 		wx *= goc_canvas_get_pixels_per_unit (canvas);
@@ -1138,7 +1128,7 @@ cb_pane_drag_leave (GtkWidget *widget, GdkDragContext *context,
 	source_pane = GNM_PANE (source_widget);
 
 	wbcg = scg_wbcg (source_pane->simple.scg);
-	if (wbcg == g_object_get_data (&context->parent_instance, "wbcg"))
+	if (wbcg == g_object_get_data (G_OBJECT (context), "wbcg"))
 		return;
 
 	gnm_pane_objects_drag (source_pane, NULL,
@@ -1923,7 +1913,7 @@ gnm_pane_object_autoscroll (GnmPane *pane, GdkDragContext *context,
 	} else
 		dx = 0;
 
-	g_object_set_data (&context->parent_instance,
+	g_object_set_data (G_OBJECT (context),
 			   "wbcg", scg_wbcg (scg));
 	pane->sliding_dx    = dx;
 	pane->sliding_dy    = dy;
@@ -2242,9 +2232,9 @@ gnm_pane_special_cursor_stop (GnmPane *pane)
 void
 gnm_pane_mouse_cursor_set (GnmPane *pane, GdkCursor *c)
 {
-	gdk_cursor_ref (c);
+	g_object_ref (c);
 	if (pane->mouse_cursor)
-		gdk_cursor_unref (pane->mouse_cursor);
+		g_object_unref (pane->mouse_cursor);
 	pane->mouse_cursor = c;
 }
 
@@ -2469,8 +2459,8 @@ cb_pane_popup_menu (GnmPane *pane)
 		 * realllllly wants a col/row header menu */
 		gboolean is_col = FALSE;
 		gboolean is_row = FALSE;
-		GdkWindow *gdk_win = gdk_display_get_window_at_pointer (
-			gtk_widget_get_display (GTK_WIDGET (pane)),
+		GdkWindow *gdk_win = gdk_device_get_window_at_position (
+			gtk_get_current_event_device (),
 			NULL, NULL);
 
 		if (gdk_win != NULL) {
@@ -2538,17 +2528,17 @@ control_point_set_cursor (SheetControlGUI const *scg, GocItem *ctrl_pt)
 static void
 target_list_add_list (GtkTargetList *targets, GtkTargetList *added_targets)
 {
-	GList *ptr;
+	unsigned n;
+	GtkTargetEntry *gte;
 
 	g_return_if_fail (targets != NULL);
 
 	if (added_targets == NULL)
 		return;
 
-	for (ptr = added_targets->list; ptr !=  NULL; ptr = ptr->next) {
-		GtkTargetPair *tp = ptr->data;
-		gtk_target_list_add (targets, tp->target, tp->flags, tp->info);
-	}
+	gte = gtk_target_table_new_from_list (added_targets, &n);
+	gtk_target_list_add_table (targets, gte, n);
+	gtk_target_table_free (gte, n);
 }
 
 /**
@@ -2598,14 +2588,12 @@ gnm_pane_drag_begin (GnmPane *pane, SheetObject *so, GdkEvent *event)
 
 
 	if (gnm_debug_flag ("dnd")) {
-		GList *l;
-		g_printerr ("%d offered formats:\n", g_list_length (targets->list));
-		for (l = targets->list; l; l = l->next) {
-			GtkTargetPair *pair = l->data;
-			char *target_name = gdk_atom_name (pair->target);
-			g_printerr ("%s\n", target_name);
-			g_free (target_name);
-		}
+		unsigned i, n;
+		GtkTargetEntry *gte = gtk_target_table_new_from_list (targets, &n);
+		g_printerr ("%u offered formats:\n", n);
+		for (i = 0; i < n; i++)
+			g_printerr ("%s\n", gte[n].target);
+		gtk_target_table_free (gte, n);
 	}
 
 	context = gtk_drag_begin (GTK_WIDGET (canvas), targets,
diff --git a/src/gnm-plugin.c b/src/gnm-plugin.c
index ec8ebb2..941fe58 100644
--- a/src/gnm-plugin.c
+++ b/src/gnm-plugin.c
@@ -920,6 +920,7 @@ gnm_plugins_init (GOCmdContext *context)
 	char const *env_var;
 	GSList *dir_list = go_slist_create (
 		g_build_filename (gnm_sys_lib_dir (), PLUGIN_SUBDIR, NULL),
+	        g_strdup (gnm_sys_extern_plugin_dir ()),
 		(gnm_usr_dir (TRUE) == NULL ? NULL :
 			g_build_filename (gnm_usr_dir (TRUE), PLUGIN_SUBDIR, NULL)),
 		NULL);
diff --git a/src/gnm-so-filled.c b/src/gnm-so-filled.c
index 361e315..cfd8ba5 100644
--- a/src/gnm-so-filled.c
+++ b/src/gnm-so-filled.c
@@ -200,7 +200,7 @@ cb_gnm_so_filled_changed (GnmSOFilled const *sof,
 				double w, h;
 				g_object_get (group->bg, "width", &w, "height", &h, NULL);
 				group->text = goc_item_new (GOC_GROUP (group), GOC_TYPE_TEXT,
-					"anchor",	GTK_ANCHOR_CENTER,
+					"anchor",	GO_ANCHOR_CENTER,
 					"clip",		TRUE,
 					"x",		w / 2.,
 					"y",		h / 2.,
@@ -208,7 +208,7 @@ cb_gnm_so_filled_changed (GnmSOFilled const *sof,
 					NULL);
 			} else
 				group->text = goc_item_new (GOC_GROUP (group), GOC_TYPE_TEXT,
-					"anchor",	GTK_ANCHOR_NW,
+					"anchor",	GO_ANCHOR_NW,
 					"clip",		TRUE,
 					"x",		sof->margin_pts.left,
 					"y",		sof->margin_pts.top,
diff --git a/src/gui-clipboard.c b/src/gui-clipboard.c
index 1704307..e8ec344 100644
--- a/src/gui-clipboard.c
+++ b/src/gui-clipboard.c
@@ -618,19 +618,15 @@ x_targets_received (GtkClipboard *clipboard, GdkAtom *targets,
 
 	if (table_atom == GDK_NONE) {
 		GtkTargetList *tl = gtk_target_list_new (NULL, 0);
-		GList *l;
 		gboolean found = FALSE;
 
 		gtk_target_list_add_image_targets (tl, 0, FALSE);
 
 		/* Find an image format */
 		for (i = 0 ; i < n_targets && !found; i++) {
-			for (l = tl->list; l && !found; l = l->next) {
-				GtkTargetPair *tp = l->data;
-				if (tp->target == targets[i]) {
-					ctxt->image_atom = targets[i];
-					found = TRUE;
-				}
+			if (gtk_target_list_find (tl, targets[i], NULL)) {
+				ctxt->image_atom = targets[i];
+				found = TRUE;
 			}
 		}
 		gtk_target_list_unref (tl);
@@ -1019,25 +1015,11 @@ static GtkTargetEntry*
 target_list_to_entries (GtkTargetList *target_list, int *n_entries)
 {
 	GtkTargetEntry *entries;
-	int n_targets, i;
-	GList *p;
-
-	if (!target_list || !target_list->list || n_entries == NULL)
-		return NULL;
 
-	n_targets = g_list_length (target_list->list);
-	if (n_targets == 0)
+	if (!target_list || n_entries == NULL)
 		return NULL;
 
-	entries = g_new0 (GtkTargetEntry, n_targets);
-	for (p = target_list->list, i = 0; p != NULL; p = p->next, i++) {
-		GtkTargetPair *tp = p->data;
-		entries[i].target = gdk_atom_name (tp->target);
-		entries[i].flags  = tp->flags;
-		entries[i].info   = tp->info;
-	}
-
-	*n_entries = n_targets;
+	return gtk_target_table_new_from_list (target_list, (unsigned *) &n_entries);
 	return entries;
 }
 
diff --git a/src/gui-file.c b/src/gui-file.c
index 95b0d97..6208ebf 100644
--- a/src/gui-file.c
+++ b/src/gui-file.c
@@ -68,6 +68,7 @@ static void
 make_format_chooser (GList *list, GtkComboBox *combo)
 {
 	GList *l;
+	GtkComboBoxText *bt = GTK_COMBO_BOX_TEXT (combo);
 
 	/* Make format chooser */
 	for (l = list; l != NULL; l = l->next) {
@@ -82,7 +83,7 @@ make_format_chooser (GList *list, GtkComboBox *combo)
 			descr = go_file_saver_get_description (
 						GO_FILE_SAVER (l->data));
 
-		gtk_combo_box_append_text (combo, descr);
+		gtk_combo_box_text_append_text (bt, descr);
 	}
 }
 
@@ -321,7 +322,7 @@ gui_file_open (WBCGtk *wbcg, file_open_t type, char const *default_format)
 	data.charmap_label = gtk_label_new_with_mnemonic (_("Character _encoding:"));
 
 	/* Make format chooser */
-	format_combo = GTK_COMBO_BOX (gtk_combo_box_new_text ());
+	format_combo = GTK_COMBO_BOX (gtk_combo_box_text_new ());
 	make_format_chooser (openers, format_combo);
 	g_signal_connect (G_OBJECT (format_combo), "changed",
 			  G_CALLBACK (file_format_changed_cb), &data);
@@ -587,9 +588,9 @@ gui_file_save_as (WBCGtk *wbcg, WorkbookView *wb_view, file_save_as_t type,
 	}
 
 	{
-		GtkWidget *box = gtk_hbox_new (FALSE, 2);
+		GtkWidget *box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
 		GtkWidget *label = gtk_label_new_with_mnemonic (_("File _type:"));
-		format_combo = GTK_COMBO_BOX (gtk_combo_box_new_text ());
+		format_combo = GTK_COMBO_BOX (gtk_combo_box_text_new ());
 		make_format_chooser (savers, format_combo);
 
 		gtk_box_pack_start (GTK_BOX (box), label, FALSE, TRUE, 6);
diff --git a/src/gui-util.c b/src/gui-util.c
index 795348a..1c387c7 100644
--- a/src/gui-util.c
+++ b/src/gui-util.c
@@ -467,28 +467,16 @@ gnumeric_popup_menu (GtkMenu *menu, GdkEventButton *event)
 			: gtk_get_current_event_time());
 }
 
-GtkRcStyle*
-gnumeric_create_tooltip_rc_style (void)
+void
+gnumeric_tooltip_set_style (GtkWidget *widget)
 {
-	static GtkRcStyle*rc_style = NULL;
-
-	if (rc_style == NULL) {
-		int i;
-		rc_style = gtk_rc_style_new ();
-
-		for (i = 0; i < 5 ; i++) {
-			rc_style->color_flags[i] = (GTK_RC_FG | GTK_RC_BG |
-						    GTK_RC_TEXT | GTK_RC_BASE);
-			rc_style->bg[i] = gs_yellow;
-			rc_style->fg[i] = gs_black;
-			rc_style->text[i] = gs_black;
-			rc_style->base[i] = gs_black;
-		}
+	int i;
+	for (i = 0; i < 5 ; i++) {
+		gtk_widget_override_color (widget, i, &gs_black);
+		gtk_widget_override_background_color (widget, i, &gs_yellow);
 	}
-	return rc_style;
 }
 
-
 GtkWidget *
 gnumeric_create_tooltip_widget (void)
 {
@@ -507,7 +495,6 @@ GtkWidget *
 gnumeric_create_tooltip (GtkWidget *ref_widget)
 {
 	GtkWidget *tip, *label, *frame;
-	GtkRcStyle*rc_style = gnumeric_create_tooltip_rc_style ();
 
 	tip = gtk_window_new (GTK_WINDOW_POPUP);
 	gtk_window_set_type_hint (GTK_WINDOW (tip),
@@ -522,10 +509,8 @@ gnumeric_create_tooltip (GtkWidget *ref_widget)
 
 	gtk_container_add (GTK_CONTAINER (tip), frame);
 
-	if (rc_style != NULL) {
-		gtk_widget_modify_style (tip, rc_style);
-		gtk_widget_modify_style (label, rc_style);
-	}
+	gnumeric_tooltip_set_style (tip);
+	gnumeric_tooltip_set_style (label);
 
 	return label;
 }
@@ -535,7 +520,7 @@ gnumeric_position_tooltip (GtkWidget *tip, int px, int py, gboolean horizontal)
 {
 	GtkRequisition req;
 
-	gtk_widget_size_request (tip, &req);
+	gtk_widget_get_preferred_size (tip, &req, NULL);
 
 	if (horizontal){
 		px -= req.width / 2;
@@ -545,6 +530,7 @@ gnumeric_position_tooltip (GtkWidget *tip, int px, int py, gboolean horizontal)
 		py -= req.height / 2;
 	}
 
+printf("px=%d py=%d\n",px,py);
 	if (px < 0)
 		px = 0;
 	if (py < 0)
@@ -1223,7 +1209,7 @@ gnm_widget_set_cursor_type (GtkWidget *w, GdkCursorType ct)
 	GdkDisplay *display = gtk_widget_get_display (w);
 	GdkCursor *cursor = gdk_cursor_new_for_display (display, ct);
 	gnm_widget_set_cursor (w, cursor);
-	gdk_cursor_unref (cursor);
+	g_object_unref (cursor);
 }
 
 /* ------------------------------------------------------------------------- */
@@ -1310,7 +1296,7 @@ gnumeric_message_dialog_new (GtkWindow * parent,
 		label = gtk_label_new (message);
 		g_free (message);
 
-		hbox = gtk_hbox_new (FALSE, 0);
+		hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
 		gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, TRUE, 0);
 		gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
 		gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), hbox, TRUE, TRUE, 0);
@@ -1322,7 +1308,6 @@ gnumeric_message_dialog_new (GtkWindow * parent,
 		gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
 		gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 12);
 		gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
-		gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
 		gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
 		gtk_widget_show_all (GTK_WIDGET (gtk_dialog_get_content_area (GTK_DIALOG (dialog))));
 	}
diff --git a/src/gui-util.h b/src/gui-util.h
index 705befe..b37ae53 100644
--- a/src/gui-util.h
+++ b/src/gui-util.h
@@ -40,9 +40,9 @@ void gnumeric_popup_menu (GtkMenu *menu, GdkEventButton *event);
  */
 void        gnumeric_position_tooltip (GtkWidget *tip, int px, int py,
 				       gboolean horizontal);
-GtkRcStyle *gnumeric_create_tooltip_rc_style (void);
 GtkWidget  *gnumeric_create_tooltip_widget (void);
 GtkWidget  *gnumeric_create_tooltip (GtkWidget *ref_widget);
+void        gnumeric_tooltip_set_style (GtkWidget *widget);
 
 GtkBuilder *gnm_gtk_builder_new (char const *uifile, char const *domain,
 				 GOCmdContext *cc);
diff --git a/src/gutils.c b/src/gutils.c
index f6c868b..785e96f 100644
--- a/src/gutils.c
+++ b/src/gutils.c
@@ -38,6 +38,7 @@ static char *gnumeric_icon_dir;
 static char *gnumeric_locale_dir;
 static char *gnumeric_usr_dir;
 static char *gnumeric_usr_dir_unversioned;
+static char *gnumeric_extern_plugin_dir;
 
 static gboolean
 running_in_tree (void)
@@ -83,6 +84,9 @@ gutils_init (void)
 	gnumeric_icon_dir = g_build_filename (dir, "share", "pixmaps",
 					      "gnumeric", NULL);
 	gnumeric_locale_dir = g_build_filename (dir, "share", "locale", NULL);
+	gnumeric_extern_plugin_dir = g_build_filename (dir, "lib",
+					     "gnumeric", GNM_API_VERSION, "plugins"
+					     NULL);
 	g_free (dir);
 #else
 	if (running_in_tree ()) {
@@ -105,6 +109,7 @@ gutils_init (void)
 	gnumeric_data_dir = g_strdup (GNUMERIC_DATADIR);
 	gnumeric_icon_dir = g_strdup (GNUMERIC_ICONDIR);
 	gnumeric_locale_dir = g_strdup (GNUMERIC_LOCALEDIR);
+	gnumeric_extern_plugin_dir = g_strdup (GNUMERIC_EXTERNPLUGINDIR);
 #endif
 	home_dir = g_get_home_dir ();
 	gnumeric_usr_dir_unversioned = home_dir
@@ -130,6 +135,8 @@ gutils_shutdown (void)
 	gnumeric_usr_dir = NULL;
 	g_free (gnumeric_usr_dir_unversioned);
 	gnumeric_usr_dir_unversioned = NULL;
+	g_free (gnumeric_extern_plugin_dir);
+	gnumeric_extern_plugin_dir = NULL;
 }
 
 char const *
@@ -145,6 +152,12 @@ gnm_sys_data_dir (void)
 }
 
 char const *
+gnm_sys_extern_plugin_dir (void)
+{
+	return gnumeric_extern_plugin_dir;
+}
+
+char const *
 gnm_icon_dir (void)
 {
 	return gnumeric_icon_dir;
diff --git a/src/gutils.h b/src/gutils.h
index e7d9d02..5d3e84c 100644
--- a/src/gutils.h
+++ b/src/gutils.h
@@ -14,6 +14,7 @@ void gutils_shutdown (void);
 /* System and user paths */
 char const *gnm_sys_lib_dir    (void);
 char const *gnm_sys_data_dir   (void);
+char const *gnm_sys_extern_plugin_dir    (void);
 char const *gnm_icon_dir       (void);
 char const *gnm_locale_dir     (void);
 char const *gnm_usr_dir	       (gboolean versioned);
diff --git a/src/io-context-gtk.c b/src/io-context-gtk.c
index 206c3e3..03ee81c 100644
--- a/src/io-context-gtk.c
+++ b/src/io-context-gtk.c
@@ -136,7 +136,7 @@ icg_show_gui (IOContextGtk *icg)
 		init_splash = FALSE;
 	}
 
-	box = GTK_BOX (gtk_vbox_new (FALSE, 0));
+	box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 0));
 	if (icg->show_splash) {
 		GdkPixbuf *pixbuf =
 			gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
@@ -149,8 +149,7 @@ icg_show_gui (IOContextGtk *icg)
 	/* Don't show this unless we need it. */
 	if (icg->files_total > 1) {
 		icg->file_bar = GTK_PROGRESS_BAR (gtk_progress_bar_new ());
-		gtk_progress_bar_set_orientation (
-			icg->file_bar, GTK_PROGRESS_LEFT_TO_RIGHT);
+		gtk_progress_bar_set_inverted (icg->file_bar, FALSE);
 		gtk_progress_bar_set_text (icg->file_bar, "Files");
 		gtk_progress_bar_set_fraction
 			(icg->file_bar,
@@ -160,8 +159,7 @@ icg_show_gui (IOContextGtk *icg)
 	}
 
 	icg->work_bar = GTK_PROGRESS_BAR (gtk_progress_bar_new ());
-	gtk_progress_bar_set_orientation (
-		icg->work_bar, GTK_PROGRESS_LEFT_TO_RIGHT);
+	gtk_progress_bar_set_inverted (icg->work_bar, FALSE);
 	gtk_progress_bar_set_text (icg->work_bar, icg->progress_msg);
 	gtk_progress_bar_set_fraction (icg->work_bar, icg->progress);
 	gtk_box_pack_start (box, GTK_WIDGET (icg->work_bar),
diff --git a/src/item-bar.c b/src/item-bar.c
index c7af62b..5c2882d 100644
--- a/src/item-bar.c
+++ b/src/item-bar.c
@@ -231,8 +231,8 @@ item_bar_unrealize (GocItem *item)
 {
 	ItemBar *ib = ITEM_BAR (item);
 
-	gdk_cursor_unref (ib->change_cursor);
-	gdk_cursor_unref (ib->normal_cursor);
+	g_object_unref (ib->change_cursor);
+	g_object_unref (ib->normal_cursor);
 
 	parent_class->unrealize (item);
 }
@@ -244,35 +244,42 @@ ib_draw_cell (ItemBar const * const ib, cairo_t *cr,
 {
 	GtkLayout *canvas = GTK_LAYOUT (ib->base.canvas);
 	GtkWidget *widget = GTK_WIDGET (canvas);
-	GtkStyle *style = gtk_widget_get_style (widget);
+	GtkStyleContext *ctxt = gtk_widget_get_style_context (widget);
 	PangoFont *font;
 	PangoRectangle size;
 	GOColor color, font_color;
-	int shadow, ascent;
+	GdkRGBA rgba;
+	int ascent;
 
 	switch (type) {
 	default:
 	case COL_ROW_NO_SELECTION:
-		shadow = GTK_SHADOW_OUT;
 		font   = ib->normal_font;
-		color = GO_COLOR_FROM_GDK (style->bg[GTK_STATE_NORMAL]);
-		font_color = GO_COLOR_FROM_GDK (style->fg[GTK_STATE_NORMAL]);
+		gtk_style_context_set_state (ctxt, GTK_STATE_NORMAL);
+		gtk_style_context_get_background_color (ctxt, GTK_STATE_NORMAL, &rgba);
+		color = GO_COLOR_FROM_GDK_RGBA (rgba);
+		gtk_style_context_get_color (ctxt, GTK_STATE_NORMAL, &rgba);
+		font_color = GO_COLOR_FROM_GDK_RGBA (rgba);
 		ascent = ib->normal_font_ascent;
 		break;
 
 	case COL_ROW_PARTIAL_SELECTION:
-		shadow = GTK_SHADOW_OUT;
 		font   = ib->bold_font;
-		color = GO_COLOR_FROM_GDK (style->bg[GTK_STATE_SELECTED]);
-		font_color = GO_COLOR_FROM_GDK (style->fg[GTK_STATE_SELECTED]);
+		gtk_style_context_set_state (ctxt, GTK_STATE_NORMAL);
+		gtk_style_context_get_background_color (ctxt, GTK_STATE_SELECTED, &rgba);
+		color = GO_COLOR_FROM_GDK_RGBA (rgba);
+		gtk_style_context_get_color (ctxt, GTK_STATE_SELECTED, &rgba);
+		font_color = GO_COLOR_FROM_GDK_RGBA (rgba);
 		ascent = ib->bold_font_ascent;
 		break;
 
 	case COL_ROW_FULL_SELECTION:
-		shadow = GTK_SHADOW_IN;
 		font   = ib->bold_font;
-		color = GO_COLOR_FROM_GDK (style->dark[GTK_STATE_SELECTED]);
-		font_color = GO_COLOR_FROM_GDK (style->fg[GTK_STATE_SELECTED]);
+		gtk_style_context_set_state (ctxt, GTK_STATE_SELECTED);
+		gtk_style_context_get_background_color (ctxt, GTK_STATE_SELECTED, &rgba);
+		color = GO_COLOR_FROM_GDK_RGBA (rgba);
+		gtk_style_context_get_color (ctxt, GTK_STATE_SELECTED, &rgba);
+		font_color = GO_COLOR_FROM_GDK_RGBA (rgba);
 		ascent = ib->bold_font_ascent;
 		break;
 	}
@@ -286,18 +293,11 @@ ib_draw_cell (ItemBar const * const ib, cairo_t *cr,
 		return;
 	}
 
+	gtk_render_frame (ctxt, cr, rect->x, rect->y, rect->width + 1, rect->height + 1);
 	cairo_rectangle (cr, rect->x + 1, rect->y + 1, rect->width - 2, rect->height - 2);
 	cairo_fill_preserve (cr);
 	cairo_restore (cr);
 
-	/* The widget parameters could be NULL, but if so some themes would emit a warning.
-	 * (Murrine is known to do this: http://bugzilla.gnome.org/show_bug.cgi?id=564410). */
-	gtk_paint_shadow (style,
-			  gtk_layout_get_bin_window (canvas),
-			  GTK_STATE_NORMAL, shadow,
-			  NULL, widget, "GnmItemBarCell",
-			  rect->x, rect->y, rect->width + 1, rect->height + 1);
-
 	g_return_if_fail (font != NULL);
 	g_object_unref (ib->pango.item->analysis.font);
 	ib->pango.item->analysis.font = g_object_ref (font);
@@ -309,7 +309,7 @@ ib_draw_cell (ItemBar const * const ib, cairo_t *cr,
 	cairo_set_source_rgba (cr, GO_COLOR_TO_CAIRO (font_color));
 	cairo_translate (cr,
 					 rect->x + (rect->width - PANGO_PIXELS (size.width)) / 2,
-					 rect->y  + (rect->height - PANGO_PIXELS (size.height)) / 2 + ascent);
+					 rect->y + (rect->height - PANGO_PIXELS (size.height)) / 2 + ascent);
 	pango_cairo_show_glyph_string (cr, font, ib->pango.glyphs);
 	cairo_restore (cr);
 }
@@ -343,8 +343,14 @@ item_bar_draw_region (GocItem const *item, cairo_t *cr, double x_0, double y_0,
 	gboolean const rtl = sheet->text_is_rtl != FALSE;
 	int shadow;
 	int first_line_offset = 1;
-	GtkStyle *style = gtk_widget_get_style (canvas);
-	GOColor color = GO_COLOR_FROM_GDK (style->text[GTK_STATE_NORMAL]);
+	GdkRGBA rgba;
+	GtkStyleContext *ctxt = gtk_widget_get_style_context (canvas);
+	GOColor color;
+
+	gtk_style_context_save (ctxt);
+	gtk_style_context_add_class (ctxt, GTK_STYLE_CLASS_BUTTON);
+	gtk_style_context_get_color (ctxt, GTK_STATE_NORMAL, &rgba);
+	color = GO_COLOR_FROM_GDK_RGBA (rgba);
 	goc_canvas_c2w (item->canvas, x_0, y_0, &x0, &y0);
 	goc_canvas_c2w (item->canvas, x_1, y_1, &x1, &y1);
 
@@ -452,11 +458,9 @@ item_bar_draw_region (GocItem const *item, cairo_t *cr, double x_0, double y_0,
 							else if (size < 6)
 								safety = 6 - size;
 
-							gtk_paint_shadow (gtk_widget_get_style (canvas),
-									  gtk_layout_get_bin_window (GTK_LAYOUT (canvas)),
-								 GTK_STATE_NORMAL,
-								 prev_visible ? GTK_SHADOW_OUT : GTK_SHADOW_IN,
-								 NULL, NULL, "GnmItemBarCell",
+							gtk_style_context_set_state (ctxt, next->visible ?
+							                             GTK_STATE_NORMAL: GTK_STATE_SELECTED);
+							gtk_render_frame (ctxt, cr,
 								 left, top+safety, size, size);
 							if (size > 9) {
 								if (!prev_visible) {
@@ -485,11 +489,9 @@ item_bar_draw_region (GocItem const *item, cairo_t *cr, double x_0, double y_0,
 								safety = 6 - size;
 
 							right = (rtl ? (total + pixels) : total) - size;
-							gtk_paint_shadow (gtk_widget_get_style (canvas),
-									  gtk_layout_get_bin_window (GTK_LAYOUT (canvas)),
-								 GTK_STATE_NORMAL,
-								 prev_visible ? GTK_SHADOW_OUT : GTK_SHADOW_IN,
-								 NULL, NULL, "GnmItemBarCell",
+							gtk_style_context_set_state (ctxt, next->visible ?
+							                             GTK_STATE_NORMAL: GTK_STATE_SELECTED);
+							gtk_render_frame (ctxt, cr,
 								 right, top+safety, size, size);
 							if (size > 9) {
 								if (!prev_visible) {
@@ -510,7 +512,7 @@ item_bar_draw_region (GocItem const *item, cairo_t *cr, double x_0, double y_0,
 					cairo_restore (cr);
 				}
 			}
-			prev_visible = cri->visible;
+				prev_visible = cri->visible;
 			prev_level = cri->outline_level;
 			++col;
 		} while ((rtl && end <= total) || (!rtl && total <= end));
@@ -615,12 +617,10 @@ item_bar_draw_region (GocItem const *item, cairo_t *cr, double x_0, double y_0,
 							left = pos - dir * (.2 * inc - 2);
 							if (rtl)
 								left -= size;
-							gtk_paint_shadow (gtk_widget_get_style (canvas),
-									  gtk_layout_get_bin_window (GTK_LAYOUT (canvas)),
-								 GTK_STATE_NORMAL,
-								 prev_visible ? GTK_SHADOW_OUT : GTK_SHADOW_IN,
-								 NULL, NULL, "GnmItemBarCell",
-								 left+safety, top, size, size);
+							gtk_style_context_set_state (ctxt, next->visible ?
+							                             GTK_STATE_NORMAL: GTK_STATE_SELECTED);
+							gtk_render_frame (ctxt, cr,
+								left+safety, top, size, size);
 							if (size > 9) {
 								if (!prev_visible) {
 									left += dir;
@@ -650,11 +650,9 @@ item_bar_draw_region (GocItem const *item, cairo_t *cr, double x_0, double y_0,
 							if (rtl)
 								left -= size;
 							bottom = total - size;
-							gtk_paint_shadow (gtk_widget_get_style (canvas),
-									  gtk_layout_get_bin_window (GTK_LAYOUT (canvas)),
-								 GTK_STATE_NORMAL,
-								 next->visible ? GTK_SHADOW_OUT : GTK_SHADOW_IN,
-								 NULL, NULL, "GnmItemBarCell",
+							gtk_style_context_set_state (ctxt, next->visible ?
+							                             GTK_STATE_NORMAL: GTK_STATE_SELECTED);
+							gtk_render_frame (ctxt,cr,
 								 left+safety*dir, bottom, size, size);
 							if (size > 9) {
 								if (!next->visible) {
@@ -679,6 +677,7 @@ item_bar_draw_region (GocItem const *item, cairo_t *cr, double x_0, double y_0,
 			++row;
 		} while (total <= end);
 	}
+	gtk_style_context_restore (ctxt);
 	return TRUE;
 }
 
diff --git a/src/item-cursor.c b/src/item-cursor.c
index 6624dc6..9faa986 100644
--- a/src/item-cursor.c
+++ b/src/item-cursor.c
@@ -59,7 +59,6 @@ struct _ItemCursor {
 	GnmCellPos last_tip_pos;
 
 	ItemCursorStyle style;
-	GdkGC    *gc;
 	int      state;
 	int      animation_timer;
 
@@ -87,8 +86,7 @@ struct _ItemCursor {
 	gboolean auto_fill_handle_at_top;
 	gboolean auto_fill_handle_at_left;
 
-	GdkPixmap *stipple;
-	GdkColor  color;
+	GdkRGBA  color;
 };
 typedef GocItemClass ItemCursorClass;
 
@@ -129,9 +127,6 @@ static void
 item_cursor_realize (GocItem *item)
 {
 	ItemCursor *ic = ITEM_CURSOR (item);
-	GdkWindow  *window = gtk_widget_get_window (GTK_WIDGET (item->canvas));
-
-	ic->gc = gdk_gc_new (window);
 
 	if (parent_class->realize)
 		(*parent_class->realize) (item);
@@ -142,11 +137,6 @@ item_cursor_realize (GocItem *item)
 			150, (GSourceFunc) cb_item_cursor_animation,
 			ic);
 	}
-
-	if (ic->style == ITEM_CURSOR_DRAG || ic->style == ITEM_CURSOR_AUTOFILL) {
-		static unsigned char const stipple_data [] = { 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa };
-		ic->stipple = gdk_bitmap_create_from_data (window, (const gchar *)stipple_data, 8, 8);
-	}
 }
 
 static void
@@ -154,14 +144,6 @@ item_cursor_unrealize (GocItem *item)
 {
 	ItemCursor *ic = ITEM_CURSOR (item);
 
-	g_object_unref (G_OBJECT (ic->gc));
-	ic->gc = NULL;
-
-	if (ic->stipple) {
-		g_object_unref (ic->stipple);
-		ic->stipple = NULL;
-	}
-
 	if (ic->animation_timer != -1) {
 		g_source_remove (ic->animation_timer);
 		ic->animation_timer = -1;
@@ -209,20 +191,18 @@ item_cursor_update_bounds (GocItem *item)
 static void
 item_cursor_draw (GocItem const *item, cairo_t *cr)
 {
-	GdkGCValues values;
 	ItemCursor *ic = ITEM_CURSOR (item);
 	int x0, y0, x1, y1; /* in widget coordinates */
-	GdkPoint points [5];
-	int draw_thick, draw_handle;
+	GocPoint points[5];
+	int i, draw_thick, draw_handle;
 	int premove = 0;
 	gboolean draw_stippled, draw_center, draw_external, draw_internal, draw_xor;
 	double scale = item->canvas->pixels_per_unit;
 	GdkEventExpose *expose = (GdkEventExpose *) goc_canvas_get_cur_event (item->canvas);
-	GdkWindow *window = expose->window;
-	GdkColor *fore = NULL, *back = NULL;
+	GdkRGBA *fore = NULL, *back = NULL;
 
 #if 0
-	g_print ("draw[%d] %d,%d %d,%d\n",
+		g_print ("draw[%d] %lx,%lx %lx,%lx\n",
 		 GNM_PANE (item->canvas)->index,
 		 ic->outline.x1,
 		 ic->outline.y1,
@@ -247,6 +227,8 @@ item_cursor_draw (GocItem const *item, cairo_t *cr)
 	if (x0 > x1 || y0 > y1)
 		return;
 
+	cairo_save (cr);
+
 	draw_external = FALSE;
 	draw_internal = FALSE;
 	draw_handle   = 0;
@@ -261,7 +243,7 @@ item_cursor_draw (GocItem const *item, cairo_t *cr)
 		draw_center   = TRUE;
 		draw_thick    = 3;
 		draw_stippled = TRUE;
-		fore          = &gs_white;
+		fore          = &gs_black;
 		back          = &gs_white;
 		break;
 
@@ -315,29 +297,30 @@ item_cursor_draw (GocItem const *item, cairo_t *cr)
 
 	ic->auto_fill_handle_at_top = (draw_handle >= 2);
 
-	gdk_gc_set_clip_rectangle (ic->gc, &expose->area);
-
-	/* Avoid guint16 overflow during line drawing.  We can change
-	 * the shape we draw, so long as no lines or parts of
-	 * rectangles are moved from outside to inside the clipping
-	 * region */
-	x0 = MAX (x0, expose->area.x - CLIP_SAFETY_MARGIN);
-	y0 = MAX (y0, expose->area.y - CLIP_SAFETY_MARGIN);
-	x1 = MIN (x1, expose->area.x + expose->area.width + CLIP_SAFETY_MARGIN);
-	y1 = MIN (y1, expose->area.y + expose->area.height + CLIP_SAFETY_MARGIN);
+	if (expose)  {
+		cairo_rectangle (cr, expose->area.x, expose->area.y, expose->area.width, expose->area.height);
+		cairo_clip (cr);
+		/* Avoid guint16 overflow during line drawing.  We can change
+		 * the shape we draw, so long as no lines or parts of
+		 * rectangles are moved from outside to inside the clipping
+		 * region */
+		x0 = MAX (x0, expose->area.x - CLIP_SAFETY_MARGIN);
+		y0 = MAX (y0, expose->area.y - CLIP_SAFETY_MARGIN);
+		x1 = MIN (x1, expose->area.x + expose->area.width + CLIP_SAFETY_MARGIN);
+		y1 = MIN (y1, expose->area.y + expose->area.height + CLIP_SAFETY_MARGIN);
+	}
 
 	if (x0 >= x1 || y0 >= y1)
 		draw_handle = 0;
 
-	gdk_gc_set_line_attributes (ic->gc, 1,
-		GDK_LINE_SOLID, GDK_CAP_BUTT, GDK_JOIN_MITER);
-	gdk_gc_set_rgb_fg_color (ic->gc, &gs_white);
-	gdk_gc_set_rgb_bg_color (ic->gc, &gs_white);
-	if (draw_xor) {
-		values.function = GDK_XOR;
-		gdk_gc_set_values (ic->gc, &values, GDK_GC_FUNCTION);
-	}
+	cairo_set_dash (cr, NULL, 0, 0.);
+	cairo_set_line_width (cr, 1.);
+	cairo_set_line_cap (cr, CAIRO_LINE_CAP_BUTT);
+	cairo_set_line_join (cr, CAIRO_LINE_JOIN_MITER);
+	cairo_set_source_rgba (cr, gs_black.red, gs_black.green, gs_black.blue, gs_black.alpha);
 
+	if (draw_xor)
+		cairo_set_operator (cr, CAIRO_OPERATOR_HARD_LIGHT);
 	if (draw_external) {
 		switch (draw_handle) {
 		/* Auto handle at bottom */
@@ -347,14 +330,14 @@ item_cursor_draw (GocItem const *item, cairo_t *cr)
 
 		/* No auto handle */
 		case 0 :
-			points [0].x = x1 + 1;
+			points [0].x = x1 + 1.5;
 			points [0].y = y1 + 1 - premove;
 			points [1].x = points [0].x;
-			points [1].y = y0 - 1;
-			points [2].x = x0 - 1;
-			points [2].y = y0 - 1;
-			points [3].x = x0 - 1;
-			points [3].y = y1 + 1;
+			points [1].y = y0 - .5;
+			points [2].x = x0 - .5;
+			points [2].y = y0 - .5;
+			points [3].x = x0 - .5;
+			points [3].y = y1 + 1.5;
 			points [4].x = x1 + 1 - premove;
 			points [4].y = points [3].y;
 			break;
@@ -365,14 +348,14 @@ item_cursor_draw (GocItem const *item, cairo_t *cr)
 
 		/* Auto handle at top of sheet */
 		case 3 :
-			points [0].x = x1 + 1;
-			points [0].y = y0 - 1 + AUTO_HANDLE_SPACE;
+			points [0].x = x1 + 1.5;
+			points [0].y = y0 - .5 + AUTO_HANDLE_SPACE;
 			points [1].x = points [0].x;
-			points [1].y = y1 + 1;
-			points [2].x = x0 - 1;
+			points [1].y = y1 + 1.5;
+			points [2].x = x0 - .5;
 			points [2].y = points [1].y;
 			points [3].x = points [2].x;
-			points [3].y = y0 - 1;
+			points [3].y = y0 - .5;
 			points [4].x = x1 + 1 - premove;
 			points [4].y = points [3].y;
 			break;
@@ -380,7 +363,10 @@ item_cursor_draw (GocItem const *item, cairo_t *cr)
 		default :
 			g_assert_not_reached ();
 		}
-		gdk_draw_lines (window, ic->gc, points, 5);
+		cairo_move_to (cr, points[0].x, points[0].y);
+		for (i = 1; i < 5; i++)
+			cairo_line_to (cr, points[i].x, points[i].y);
+		cairo_stroke (cr);
 	}
 
 	if (draw_external && draw_internal && draw_handle) {
@@ -403,60 +389,67 @@ item_cursor_draw (GocItem const *item, cairo_t *cr)
 			points [3].y += 2;
 			points [4].y += 2;
 		}
-		gdk_draw_lines (window, ic->gc, points, 5);
+		cairo_move_to (cr, points[0].x, points[0].y);
+		for (i = 1; i < 5; i++)
+			cairo_line_to (cr, points[i].x, points[i].y);
+		cairo_stroke (cr);
 	}
 
 	if (draw_handle == 1 || draw_handle == 2) {
 		int const y_off = (draw_handle == 1) ? y1 - y0 : 0;
-		gdk_draw_rectangle (window, ic->gc, TRUE,
-				    x1 - 2,
-				    y0 + y_off - 2,
-				    2, 2);
-		gdk_draw_rectangle (window, ic->gc, TRUE,
-				    x1 + 1,
-				    y0 + y_off - 2,
-				    2, 2);
-		gdk_draw_rectangle (window, ic->gc, TRUE,
-				    x1 - 2,
-				    y0 + y_off + 1,
-				    2, 2);
-		gdk_draw_rectangle (window, ic->gc, TRUE,
-				    x1 + 1,
-				    y0 + y_off + 1,
-				    2, 2);
+		cairo_rectangle (cr, x1 - 2, y0 + y_off - 2, 2, 2);
+		cairo_rectangle (cr, x1 + 1, y0 + y_off - 2, 2, 2);
+		cairo_rectangle (cr, x1 - 2, y0 + y_off + 1, 2, 2);
+		cairo_rectangle (cr, x1 + 1, y0 + y_off + 1, 2, 2);
+		cairo_fill (cr);
 	} else if (draw_handle == 3) {
-		gdk_draw_rectangle (window, ic->gc, TRUE,
-				    x1 - 2,
-				    y0 + 1,
-				    2, 4);
-		gdk_draw_rectangle (window, ic->gc, TRUE,
-				    x1 + 1,
-				    y0 + 1,
-				    2, 4);
+		cairo_rectangle (cr, x1 - 2, y0 + 1, 2, 4);
+		cairo_rectangle (cr, x1 + 1, y0 + 1, 2, 4);
+		cairo_fill (cr);
 	}
 
 	if (draw_center) {
-		gdk_gc_set_rgb_fg_color (ic->gc, fore);
-		gdk_gc_set_rgb_bg_color (ic->gc, back);
-
-		if (draw_stippled) {
-			gdk_gc_set_fill (ic->gc, GDK_STIPPLED);
-			gdk_gc_set_stipple (ic->gc, ic->stipple);
-			gdk_gc_set_line_attributes (ic->gc, draw_thick,
-				GDK_LINE_SOLID, GDK_CAP_BUTT, GDK_JOIN_MITER);
-		} else
-			gdk_gc_set_line_attributes (ic->gc, draw_thick,
-				GDK_LINE_DOUBLE_DASH, GDK_CAP_BUTT, GDK_JOIN_MITER);
-
 		/* Stay in the boundary */
 		if ((draw_thick % 2) == 0) {
 			x0++;
 			y0++;
 		}
-		gdk_draw_rectangle (window, ic->gc, FALSE,
-				    x0, y0,
-				    abs (x1 - x0), abs (y1 - y0));
+		if ((draw_thick % 1) == 1) {
+			x0 += .5;
+			y0 += .5;
+		}
+
+		if (draw_stippled) {
+			GOPattern pat;
+			double scalex = 1., scaley = 1.;
+			cairo_pattern_t *cp;
+			cairo_matrix_t mat;
+			pat.fore = GO_COLOR_FROM_GDK_RGBA (*fore);
+			pat.back = GO_COLOR_FROM_GDK_RGBA (*back);
+			pat.pattern = GO_PATTERN_GREY50;
+			cp = go_pattern_create_cairo_pattern (&pat, cr);
+			cairo_user_to_device_distance (cr, &scalex, &scaley);
+			cairo_matrix_init_scale (&mat, scalex, scaley);
+			cairo_pattern_set_matrix (cp, &mat);
+			cairo_set_source (cr, cp);
+			cairo_pattern_destroy (cp);
+			cairo_set_line_width (cr, draw_thick);
+			cairo_rectangle (cr, x0, y0, abs (x1 - x0), abs (y1 - y0));
+			cairo_stroke (cr);
+		} else {
+			double dashes[] = {4., 4.};
+			cairo_set_dash (cr, dashes, 2, 0.);
+			cairo_set_line_width (cr, draw_thick);
+			cairo_set_source_rgba (cr, back->red, back->green, back->blue, back->alpha);
+			cairo_rectangle (cr, x0, y0, abs (x1 - x0), abs (y1 - y0));
+			cairo_stroke_preserve (cr);
+			cairo_set_dash (cr, dashes, 2, 4.);
+			cairo_set_source_rgba (cr, fore->red, fore->green, fore->blue, fore->alpha);
+			cairo_stroke (cr);
+		}
+
 	}
+		cairo_restore (cr);
 }
 
 gboolean
@@ -1414,7 +1407,7 @@ item_cursor_set_property (GObject *obj, guint param_id,
 		GOColor color;
 		color_name = g_value_get_string (value);
 		if (go_color_from_str (color_name, &color)) {
-			go_color_to_gdk (color, &ic->color);
+			go_color_to_gdk_rgba (color, &ic->color);
 			ic->use_color = 1;
 		}
 	}
diff --git a/src/item-edit.c b/src/item-edit.c
index af58fe8..750e772 100644
--- a/src/item-edit.c
+++ b/src/item-edit.c
@@ -122,7 +122,11 @@ item_edit_draw (GocItem const *item, cairo_t *cr)
 	cairo_fill (cr);
 
 	/* set the default color */
+#warning GTK3: no black in style context, using just black for now
+#if 0
 	color = GO_COLOR_FROM_GDK (gtk_widget_get_style (GTK_WIDGET (item->canvas))->black);
+#endif
+	color = GO_COLOR_BLACK;
 	cairo_set_source_rgba (cr, GO_COLOR_TO_CAIRO (color));
 	if (dir == PANGO_DIRECTION_RTL) {
 		pango_layout_get_pixel_extents (ie->layout, NULL, &pos);
diff --git a/src/item-grid.c b/src/item-grid.c
index eeb926a..81c04bd 100644
--- a/src/item-grid.c
+++ b/src/item-grid.c
@@ -175,12 +175,12 @@ item_grid_unrealize (GocItem *item)
 	ItemGrid *ig = ITEM_GRID (item);
 
 	if (ig->cursor_link) {
-		gdk_cursor_unref (ig->cursor_link);
+		g_object_unref (ig->cursor_link);
 		ig->cursor_link = NULL;
 	}
 
 	if (ig->cursor_cross) {
-		gdk_cursor_unref (ig->cursor_cross);
+		g_object_unref (ig->cursor_cross);
 		ig->cursor_cross = NULL;
 	}
 
@@ -231,7 +231,7 @@ static void
 item_grid_draw_merged_range (cairo_t *cr, ItemGrid *ig,
 			     int start_x, int start_y,
 			     GnmRange const *view, GnmRange const *range,
-			     gboolean draw_selection, GtkStyle *theme)
+			     gboolean draw_selection, GtkStyleContext *ctxt)
 {
 	int l, r, t, b, last;
 	SheetView const *sv = scg_view (ig->scg);
@@ -278,7 +278,7 @@ item_grid_draw_merged_range (cairo_t *cr, ItemGrid *ig,
 
 	/* Check for background THEN selection */
 	if (gnumeric_background_set (style, cr,
-				     is_selected, theme) || is_selected) {
+				     is_selected, ctxt) || is_selected) {
 		/* Remember X excludes the far pixels */
 		if (dir > 0)
 			cairo_rectangle (cr, l, t, r-l+1, b-t+1);
@@ -332,7 +332,7 @@ static void
 item_grid_draw_background (cairo_t *cr, ItemGrid *ig,
 			   GnmStyle const *style,
 			   int col, int row, int x, int y, int w, int h,
-			   gboolean draw_selection, GtkStyle *theme)
+			   gboolean draw_selection, GtkStyleContext *ctxt)
 {
 	SheetView const *sv = scg_view (ig->scg);
 	gboolean const is_selected = draw_selection &&
@@ -340,7 +340,7 @@ item_grid_draw_background (cairo_t *cr, ItemGrid *ig,
 		sv_is_pos_selected (sv, col, row);
 	gboolean const has_back =
 		gnumeric_background_set (style, cr,
-					 is_selected, theme);
+					 is_selected, ctxt);
 
 #if DEBUG_SELECTION_PAINT
 	if (is_selected) {
@@ -393,7 +393,7 @@ item_grid_draw_region (GocItem const *item, cairo_t *cr, double x_0, double y_0,
 	SheetView const *sv = scg_view (ig->scg);
 	WorkbookView *wbv = sv_wbv (sv);
 	gboolean show_function_cell_markers = wbv->show_function_cell_markers;
-	GtkStyle *theme = gtk_widget_get_style (GTK_WIDGET (canvas));
+	GtkStyleContext *ctxt = gtk_widget_get_style_context (GTK_WIDGET (canvas));
 
 	/* To ensure that far and near borders get drawn we pretend to draw +-2
 	 * pixels around the target area which would include the surrounding
@@ -568,7 +568,7 @@ item_grid_draw_region (GocItem const *item, cairo_t *cr, double x_0, double y_0,
 						item_grid_draw_merged_range (cr, ig,
 									     start_x, y, &view, r,
 									     draw_selection,
-									     theme);
+									     ctxt);
 				}
 			} else {
 				lag = &(ptr->next);
@@ -664,7 +664,7 @@ plain_draw : /* a quick hack to deal with 142267 */
 			item_grid_draw_background (cr, ig,
 				style, col, row, x, y,
 				ci->size_pixels, ri->size_pixels,
-						   draw_selection, theme);
+						   draw_selection, ctxt);
 
 
 			/* Is this part of a span?
diff --git a/src/pattern.c b/src/pattern.c
index a9fdea0..bf4bcac 100644
--- a/src/pattern.c
+++ b/src/pattern.c
@@ -49,14 +49,14 @@ static GOPatternType patterns[] = {
  */
 
 static double
-gnm_get_light (guint16 c)
+gnm_get_light (double c)
 {
-	return ((1 + c/65535.)/2);
+	return ((1 + c)/2);
 }
 
 gboolean
 gnumeric_background_set (GnmStyle const *mstyle, cairo_t *cr,
-			 gboolean const is_selected, GtkStyle *theme)
+			 gboolean const is_selected, GtkStyleContext *ctxt)
 {
 	int pattern;
 
@@ -73,7 +73,13 @@ gnumeric_background_set (GnmStyle const *mstyle, cairo_t *cr,
 		gopat.back = gnm_style_get_back_color (mstyle)->go_color;
 		if (is_selected) {
 			GOColor light;
-			light = theme? GO_COLOR_FROM_GDK (theme->light[GTK_STATE_SELECTED]): GO_COLOR_FROM_RGB (230, 230, 250);
+			GdkRGBA rgba;
+			if (ctxt) {
+				gtk_style_context_get_background_color (ctxt,
+				                GTK_STATE_FLAG_SELECTED, &rgba);
+				light = GO_COLOR_FROM_GDK_RGBA (rgba);
+			} else
+				light = GO_COLOR_FROM_RGB (230, 230, 250);
 			gopat.fore = GO_COLOR_INTERPOLATE (light, gopat.fore, .5);
 			gopat.back = GO_COLOR_INTERPOLATE (light, gopat.back, .5);
 		}
@@ -82,15 +88,17 @@ gnumeric_background_set (GnmStyle const *mstyle, cairo_t *cr,
 		cairo_pattern_destroy (crpat);
 		return TRUE;
 	} else if (is_selected) {
-		if (theme == NULL)
+		if (ctxt == NULL)
 			cairo_set_source_rgb
-				(cr, .901960784, .901960784, .980392157);
+				(cr, gs_lavender.red, gs_lavender.green, gs_lavender.blue);
 		else {
-			GdkColor color = theme->light[GTK_STATE_SELECTED];
-			cairo_set_source_rgb
-				(cr, gnm_get_light (color.red),
-				 gnm_get_light (color.green),
-				 gnm_get_light (color.blue));
+			GdkRGBA rgba;
+			gtk_style_context_get_background_color (ctxt, GTK_STATE_SELECTED, &rgba);
+			cairo_set_source_rgba
+				(cr, gnm_get_light (rgba.red),
+				 gnm_get_light (rgba.green),
+				 gnm_get_light (rgba.blue),
+				 gnm_get_light (rgba.alpha));
 		}
 	}
 	return FALSE;
diff --git a/src/pattern.h b/src/pattern.h
index f8b1af5..0b9408f 100644
--- a/src/pattern.h
+++ b/src/pattern.h
@@ -8,11 +8,11 @@ G_BEGIN_DECLS
 
 #define GNUMERIC_SHEET_PATTERNS 25
 
-gboolean    gnumeric_background_set	(GnmStyle const *style,
+gboolean    gnumeric_background_set	(GnmStyle const *mstyle,
 					 cairo_t *cr,
 					 gboolean const is_selected,
-					 GtkStyle *theme);
-gboolean    gnumeric_background_set_gtk	(GnmStyle const *style,
+					 GtkStyleContext *ctxt);
+gboolean    gnumeric_background_set_gtk	(GnmStyle const *mstyle,
 					 cairo_t *context);
 
 G_END_DECLS
diff --git a/src/print.c b/src/print.c
index 2867989..95d24fd 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1399,7 +1399,7 @@ gnm_create_widget_cb (GtkPrintOperation *operation, gpointer user_data)
 			  GTK_EXPAND | GTK_FILL,GTK_SHRINK | GTK_FILL,0,0);
 	gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin_to), n_sheets);
 
-	button_ignore_page_breaks = gtk_hseparator_new ();
+	button_ignore_page_breaks = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
 	gtk_table_attach (GTK_TABLE (table), button_ignore_page_breaks, 1, 7, 7, 8,
 		  GTK_EXPAND | GTK_FILL,GTK_SHRINK | GTK_FILL,5,5);
 
diff --git a/src/sheet-control-gui.c b/src/sheet-control-gui.c
index e9ad28d..072d832 100644
--- a/src/sheet-control-gui.c
+++ b/src/sheet-control-gui.c
@@ -244,7 +244,7 @@ scg_setup_group_buttons (SheetControlGUI *scg, unsigned max_outline,
 			 ItemBar const *ib, gboolean is_cols, int w, int h,
 			 GPtrArray *btns, GtkWidget *box)
 {
-	GtkStyle *style;
+	PangoFontDescription *font_desc;
 	unsigned i;
 	Sheet const *sheet = scg_sheet (scg);
 
@@ -283,20 +283,17 @@ scg_setup_group_buttons (SheetControlGUI *scg, unsigned max_outline,
 					   "is_cols", GINT_TO_POINTER (1));
 	}
 
-	style = gtk_style_new ();
-	if (style->font_desc)
-		pango_font_description_free (style->font_desc);
-	style->font_desc = pango_font_describe (item_bar_normal_font (ib));
+	font_desc = pango_font_describe (item_bar_normal_font (ib));
 
 	/* size all of the button so things work after a zoom */
 	for (i = 0 ; i < btns->len ; i++) {
 		GtkWidget *btn = g_ptr_array_index (btns, i);
 		GtkWidget *label = gtk_bin_get_child (GTK_BIN (gtk_bin_get_child (GTK_BIN (btn))));
 		gtk_widget_set_size_request (GTK_WIDGET (btn), w, h);
-		gtk_widget_set_style (label, style);
+		gtk_widget_override_font (label, font_desc);
 	}
 
-	g_object_unref (style);
+	pango_font_description_free (font_desc);
 	gtk_widget_show_all (box);
 }
 
@@ -553,24 +550,23 @@ scg_colrow_select (SheetControlGUI *scg, gboolean is_cols,
 /***************************************************************************/
 
 static void
-cb_select_all_btn_expose (GtkWidget *widget, GdkEventExpose *event, SheetControlGUI *scg)
+cb_select_all_btn_draw (GtkWidget *widget, cairo_t *cr, SheetControlGUI *scg)
 {
 	int offset = scg_sheet (scg)->text_is_rtl ? -1 : 0;
 	GtkAllocation a;
+	GdkRGBA rgba;
+	GtkStyleContext *ctxt = gtk_widget_get_style_context (widget);
 
 	gtk_widget_get_allocation (widget, &a);
 
 	/* This should be keep in sync with item_bar_cell code (item-bar.c) */
-	gdk_draw_rectangle (gtk_widget_get_window (widget),
-			    gtk_widget_get_style (widget)->bg_gc[GTK_STATE_ACTIVE],
-			    TRUE,
-			    offset + 1, 1, a.width - 1, a.height - 1);
-	/* The widget parameters could be NULL, but if so some themes would emit a warning.
-	 * (Murrine is known to do this: http://bugzilla.gnome.org/show_bug.cgi?id=564410). */
-	gtk_paint_shadow (gtk_widget_get_style (widget),
-			  gtk_widget_get_window (widget),
-			  GTK_STATE_NORMAL, GTK_SHADOW_OUT,
-			  NULL, widget, "GnmItemBarCell",
+
+	gtk_style_context_get_background_color (ctxt, GTK_STATE_ACTIVE, &rgba);
+	gdk_cairo_set_source_rgba (cr, &rgba);
+	cairo_rectangle (cr, offset + 1, 1, a.width - 1, a.height - 1);
+	cairo_fill (cr);
+#warning GTK3: how do we select the shadow type there, see also item-bar.c
+	gtk_render_frame (gtk_widget_get_style_context (widget), cr,
 			  offset, 0, a.width + 1, a.height + 1);
 }
 
@@ -1322,8 +1318,11 @@ resize_pane_finish (SheetControlGUI *scg, GtkPaned *p)
 	int colrow;
 	gint64 guide_pos;
 
+#warning GTK3: replace this?
+#if 0
 	if (p->in_drag)
 		return TRUE;
+#endif
 	pane = resize_pane_pos (scg, p, &colrow, &guide_pos);
 
 	if (sv_is_frozen (sv)) {
@@ -1374,7 +1373,8 @@ cb_resize_pane_motion (GtkPaned *p,
 	gint64 guide_pos;
 
 	resize_pane_pos (scg, p, &colrow, &guide_pos);
-	if (scg->pane_drag_handler == 0 && p->in_drag) {
+#warning GTK3: what replaces p->in_drag?
+	if (scg->pane_drag_handler == 0/* && p->in_drag*/) {
 		g_signal_handlers_block_by_func
 			(G_OBJECT (p),
 			 G_CALLBACK (cb_check_resize), scg);
@@ -1424,10 +1424,10 @@ SheetControlGUI *
 sheet_control_gui_new (SheetView *sv, WBCGtk *wbcg)
 {
 	SheetControlGUI *scg;
-	GtkUpdateType scroll_update_policy;
+	GnmUpdateType scroll_update_policy;
 	Sheet *sheet;
 	GocDirection direction;
-	GdkColor cfore, cback;
+	GdkRGBA cfore, cback;
 
 	g_return_val_if_fail (IS_SHEET_VIEW (sv), NULL);
 
@@ -1452,12 +1452,14 @@ sheet_control_gui_new (SheetView *sv, WBCGtk *wbcg)
 
 		scg->col_group.buttons = g_ptr_array_new ();
 		scg->row_group.buttons = g_ptr_array_new ();
-		scg->col_group.button_box = gtk_vbox_new (TRUE, 0);
-		scg->row_group.button_box = gtk_hbox_new (TRUE, 0);
+		scg->col_group.button_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+		gtk_box_set_homogeneous (GTK_BOX (scg->col_group.button_box), TRUE);
+		scg->row_group.button_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+		gtk_box_set_homogeneous (GTK_BOX (scg->row_group.button_box), TRUE);
 		scg->select_all_btn = gtk_drawing_area_new ();
 		gtk_widget_add_events (scg->select_all_btn, GDK_BUTTON_PRESS_MASK);
-		g_signal_connect (G_OBJECT (scg->select_all_btn), "expose-event",
-				  G_CALLBACK (cb_select_all_btn_expose), scg);
+		g_signal_connect (G_OBJECT (scg->select_all_btn), "draw",
+				  G_CALLBACK (cb_select_all_btn_draw), scg);
 		g_signal_connect (G_OBJECT (scg->select_all_btn), "event",
 				  G_CALLBACK (cb_select_all_btn_event), scg);
 
@@ -1506,12 +1508,16 @@ sheet_control_gui_new (SheetView *sv, WBCGtk *wbcg)
 
 		/* Scroll bars and their adjustments */
 		scroll_update_policy = gnm_conf_get_core_gui_editing_livescrolling ()
-			? GTK_UPDATE_CONTINUOUS : GTK_UPDATE_DELAYED;
+			? GNM_UPDATE_CONTINUOUS : GNM_UPDATE_DELAYED;
 		scg->va = (GtkAdjustment *)gtk_adjustment_new (0., 0., 1, 1., 1., 1.);
-		scg->vs = g_object_new (GTK_TYPE_VSCROLLBAR,
+		scg->vs = g_object_new (GTK_TYPE_SCROLLBAR,
+		                "orientation", GTK_ORIENTATION_VERTICAL,
 				"adjustment",	 scg->va,
-				"update-policy", scroll_update_policy,
-				NULL);
+#warning GTK3: update-policy is gone from gtk, what should we do?
+#if 0
+		                "update-policy", scroll_update_policy,
+#endif
+		                NULL);
 		g_signal_connect (G_OBJECT (scg->vs),
 			"value_changed",
 			G_CALLBACK (cb_vscrollbar_value_changed), scg);
@@ -1520,9 +1526,12 @@ sheet_control_gui_new (SheetView *sv, WBCGtk *wbcg)
 			G_CALLBACK (cb_vscrollbar_adjust_bounds), sheet);
 
 		scg->ha = (GtkAdjustment *)gtk_adjustment_new (0., 0., 1, 1., 1., 1.);
-		scg->hs = g_object_new (GTK_TYPE_HSCROLLBAR,
+		scg->hs = g_object_new (GTK_TYPE_SCROLLBAR,
 				"adjustment", scg->ha,
-				"update-policy", scroll_update_policy,
+#warning GTK3: update-policy is gone from gtk, what should we do?
+#if 0
+		                "update-policy", scroll_update_policy,
+#endif
 				NULL);
 		g_signal_connect (G_OBJECT (scg->hs),
 			"value_changed",
@@ -1538,7 +1547,7 @@ sheet_control_gui_new (SheetView *sv, WBCGtk *wbcg)
 			GTK_EXPAND | GTK_FILL | GTK_SHRINK,
 			GTK_EXPAND | GTK_FILL | GTK_SHRINK,
 			0, 0);
-		scg->vpane = g_object_new (GTK_TYPE_VPANED, NULL);
+		scg->vpane = g_object_new (GTK_TYPE_PANED, "orientation", GTK_ORIENTATION_VERTICAL, NULL);
 		gtk_paned_add1 (scg->vpane, gtk_label_new (NULL)); /* use a spacer */
 		gtk_paned_add2 (scg->vpane, scg->vs);
 		scg_gtk_paned_set_position (scg, scg->vpane, 0);
@@ -1547,7 +1556,7 @@ sheet_control_gui_new (SheetView *sv, WBCGtk *wbcg)
 			GTK_FILL,
 			GTK_EXPAND | GTK_FILL | GTK_SHRINK,
 			0, 0);
-		scg->hpane = g_object_new (GTK_TYPE_HPANED, NULL);
+		scg->hpane = g_object_new (GTK_TYPE_PANED, NULL);
 		gtk_paned_add1 (scg->hpane, gtk_label_new (NULL)); /* use a spacer */
 		gtk_paned_add2 (scg->hpane, scg->hs);
 		scg_gtk_paned_set_position (scg, scg->hpane, 0);
@@ -1592,7 +1601,6 @@ sheet_control_gui_new (SheetView *sv, WBCGtk *wbcg)
 			 "swapped_signal::notify::rows", cb_scg_sheet_resized, scg,
 			 NULL);
 	} else {
-		GtkStyle *style;
 		scg->active_panes = 0;
 		scg->table = GTK_TABLE (gtk_table_new (1, 1, FALSE));
 		g_object_ref (scg->table);
@@ -1605,10 +1613,8 @@ sheet_control_gui_new (SheetView *sv, WBCGtk *wbcg)
 				GTK_EXPAND | GTK_FILL | GTK_SHRINK,
 				0, 0);
 		}
-		style = gtk_style_copy (gtk_widget_get_style (scg->vs));
-		style->bg[GTK_STATE_NORMAL] = style->white;
-		gtk_widget_set_style (scg->vs, style);
-		g_object_unref (style);
+#warning GTK3: we used GtkStyle::white there */
+		gtk_widget_override_background_color (scg->vs, GTK_STATE_NORMAL, &gs_white);
 
 		sv_attach_control (sv, SHEET_CONTROL (scg));
 		g_object_set_data (G_OBJECT (scg->vs), "sheet-control", scg);
@@ -1622,10 +1628,10 @@ sheet_control_gui_new (SheetView *sv, WBCGtk *wbcg)
 	scg->label = editable_label_new
 		(sheet->name_unquoted,
 		 sheet->tab_color
-		 ? go_color_to_gdk (sheet->tab_color->go_color, &cback)
+		 ? go_color_to_gdk_rgba (sheet->tab_color->go_color, &cback)
 		 : NULL,
 		 sheet->tab_text_color
-		 ? go_color_to_gdk (sheet->tab_text_color->go_color, &cfore)
+		 ? go_color_to_gdk_rgba (sheet->tab_text_color->go_color, &cfore)
 		 : NULL);
 	g_object_ref (scg->label);
 
diff --git a/src/sheet-object-graph.c b/src/sheet-object-graph.c
index 7d02b64..55984b5 100644
--- a/src/sheet-object-graph.c
+++ b/src/sheet-object-graph.c
@@ -743,10 +743,10 @@ sheet_object_graph_guru (WBCGtk *wbcg, GogGraph *graph,
 		w = gtk_label_new (_("Series as:"));
 		g_object_set (w, "xalign", 0., NULL);
 		gtk_table_attach (GTK_TABLE (custom), w, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
-		w = gtk_combo_box_new_text ();
-		gtk_combo_box_append_text (GTK_COMBO_BOX (w), _("Auto"));
-		gtk_combo_box_append_text (GTK_COMBO_BOX (w), _("Columns"));
-		gtk_combo_box_append_text (GTK_COMBO_BOX (w), _("Rows"));
+		w = gtk_combo_box_text_new ();
+		gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w), _("Auto"));
+		gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w), _("Columns"));
+		gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w), _("Rows"));
 		gtk_combo_box_set_active (GTK_COMBO_BOX (w), 0);
 		g_signal_connect (G_OBJECT (w), "changed", G_CALLBACK (cb_selection_mode_changed), data);
 		gtk_table_attach (GTK_TABLE (custom), w, 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
diff --git a/src/sheet-object-widget.c b/src/sheet-object-widget.c
index 0bc28bc..8d9ab9c 100644
--- a/src/sheet-object-widget.c
+++ b/src/sheet-object-widget.c
@@ -72,42 +72,6 @@ attr_eq (const xmlChar *a, const char *s)
 /****************************************************************************/
 
 static void
-sheet_widget_draw_cairo (SheetObject const *so, cairo_t *cr,
-			 double width, double height)
-{
-	g_warning ("Failed to draw sheet object widget of type %s",
-		   g_type_name_from_instance ((gpointer)so));
-}
-
-static void
-draw_cairo_text (cairo_t *cr, char const *text, int *pwidth, int *pheight,
-		 gboolean centered)
-{
-	PangoLayout *layout = pango_cairo_create_layout (cr);
-	GtkStyle *style = gtk_style_new ();
-	double const scale_h = 72. / gnm_app_display_dpi_get (TRUE);
-	double const scale_v = 72. / gnm_app_display_dpi_get (FALSE);
-	int width, height;
-
-	pango_layout_set_font_description (layout, style->font_desc);
-	pango_layout_set_single_paragraph_mode (layout, TRUE);
-	pango_layout_set_text (layout, text, -1);
-	pango_layout_get_pixel_size (layout, &width, &height);
-
-	cairo_scale (cr, scale_h, scale_v);
-	if (centered)
-		cairo_rel_move_to (cr, 0., 0.5 - ((double)height)/2.);
-	pango_cairo_show_layout (cr, layout);
-	g_object_unref (layout);
-	g_object_unref (style);
-
-	if (pwidth)
-		*pwidth = width * scale_h;
-	if (pheight)
-		*pheight = height * scale_v;
-}
-
-static void
 cb_so_get_ref (GnmDependent *dep, SheetObject *so, gpointer user)
 {
 	GnmDependent **pdep = user;
@@ -214,7 +178,7 @@ static GSF_CLASS (SOWidgetView, so_widget_view,
 #define SOW_MAKE_TYPE(n1, n2, fn_config, fn_set_sheet, fn_clear_sheet, fn_foreach_dep, \
 		      fn_copy, fn_write_sax, fn_prep_sax_parser,	\
 		      fn_get_property, fn_set_property,                 \
-		      fn_draw_cairo, class_init_code)				\
+		      class_init_code)					\
 									\
 static void								\
 sheet_widget_ ## n1 ## _class_init (GObjectClass *object_class)		\
@@ -232,7 +196,6 @@ sheet_widget_ ## n1 ## _class_init (GObjectClass *object_class)		\
 	so_class->copy			= fn_copy;			\
 	so_class->write_xml_sax		= fn_write_sax;			\
 	so_class->prep_sax_parser	= fn_prep_sax_parser;		\
-	so_class->draw_cairo	        = fn_draw_cairo;     \
 	sow_class->create_widget	= &sheet_widget_ ## n1 ## _create_widget; \
         { class_init_code; }						\
 }									\
@@ -256,6 +219,20 @@ static GObjectClass *sheet_object_widget_class = NULL;
 static GType sheet_object_widget_get_type	(void);
 
 static void
+sheet_widget_draw_cairo (SheetObject const *so, cairo_t *cr,
+			 double width, double height)
+{
+	GtkWidget *win = gtk_offscreen_window_new ();
+	GtkWidget *w = SOW_CLASS(so)->create_widget (SHEET_OBJECT_WIDGET (so));
+
+	gtk_container_add (GTK_CONTAINER (win), w);
+	gtk_widget_set_size_request (w, width, height);
+	gtk_widget_show_all (win);
+	gtk_container_propagate_draw (GTK_CONTAINER (win), w, cr);
+	gtk_widget_destroy (win);
+}
+
+static void
 sax_write_dep (GsfXMLOut *output, GnmDependent const *dep, char const *id,
 	       GnmConventions const *convs)
 {
@@ -326,6 +303,7 @@ sheet_object_widget_class_init (GObjectClass *object_class)
 	/* SheetObject class method overrides */
 	so_class->new_view		= sheet_object_widget_new_view;
 	so_class->rubber_band_directly	= TRUE;
+	so_class->draw_cairo		= sheet_widget_draw_cairo;
 
 	sow_class->create_widget = NULL;
 }
@@ -588,46 +566,6 @@ sheet_widget_frame_user_config (SheetObject *so, SheetControl *sc)
 	gtk_widget_show (state->dialog);
 }
 
-static void
-sheet_widget_frame_draw_cairo (SheetObject const *so, cairo_t *cr,
-			 double width, double height)
-{
-	SheetWidgetFrame *swf = SHEET_WIDGET_FRAME (so);
-
-	int theight = 0, twidth = 0;
-	cairo_save (cr);
-	cairo_move_to (cr, 10, 0);
-
-	cairo_save (cr);
-	draw_cairo_text (cr, swf->label, &twidth, &theight, FALSE);
-	cairo_restore (cr);
-
-	cairo_set_line_width (cr, 1);
-	cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
-	cairo_set_source_rgb(cr, 0.5, 0.5, 0.5);
-	cairo_new_path (cr);
-	cairo_move_to (cr, 6, theight/2);
-	cairo_line_to (cr, 0, theight/2);
-	cairo_line_to (cr, 0, height);
-	cairo_line_to (cr, width, height);
-	cairo_line_to (cr, width, theight/2);
-	cairo_line_to (cr, 14 + twidth, theight/2);
-	cairo_stroke (cr);
-
-	cairo_set_source_rgb(cr, 0.8, 0.8, 0.8);
-	cairo_new_path (cr);
-	cairo_move_to (cr, 6, theight/2 + 1);
-	cairo_line_to (cr, 1, theight/2 + 1);
-	cairo_line_to (cr, 1, height - 1);
-	cairo_line_to (cr, width - 1, height - 1);
-	cairo_line_to (cr, width - 1, theight/2 + 1);
-	cairo_line_to (cr, 14 + twidth, theight/2 + 1);
-	cairo_stroke (cr);
-
-	cairo_new_path (cr);
-	cairo_restore (cr);
-}
-
 SOW_MAKE_TYPE (frame, Frame,
 	       sheet_widget_frame_user_config,
 	       NULL,
@@ -638,7 +576,6 @@ SOW_MAKE_TYPE (frame, Frame,
 	       sheet_widget_frame_prep_sax_parser,
 	       sheet_widget_frame_get_property,
 	       sheet_widget_frame_set_property,
-	       sheet_widget_frame_draw_cairo,
 	       {
 		       g_object_class_install_property
 			       (object_class, SOF_PROP_TEXT,
@@ -1104,59 +1041,6 @@ sheet_widget_button_set_markup (SheetObject *so, PangoAttrList *markup)
 	}
 }
 
-static void
-sheet_widget_button_draw_cairo (SheetObject const *so, cairo_t *cr,
-			 double width, double height)
-{
-	SheetWidgetButton *swb = SHEET_WIDGET_BUTTON (so);
-	PangoLayout *layout = pango_cairo_create_layout (cr);
-	GtkStyle *style = gtk_style_new ();
-	double const scale_h = 72. / gnm_app_display_dpi_get (TRUE);
-	double const scale_v = 72. / gnm_app_display_dpi_get (FALSE);
-	int twidth, theight;
-	int const half_line = 1.5;
-	int radius = 10;
-
-	if (height < 3 * radius)
-		radius = height / 3.;
-	if (width < 3 * radius)
-		radius = width / 3.;
-	if (radius < 1)
-		radius = 1;
-
-	cairo_save (cr);
-	cairo_set_line_width (cr, 2 * half_line);
-	cairo_set_source_rgb(cr, 0.5, 0.5, 0.5);
-
-	cairo_new_path (cr);
-	cairo_arc (cr, radius + half_line, radius + half_line, radius, M_PI, - M_PI/2);
-	cairo_arc (cr, width - (radius + half_line), radius + half_line,
-		   radius, - M_PI/2, 0);
-	cairo_arc (cr, width - (radius + half_line), height - (radius + half_line),
-		   radius, 0, M_PI/2);
-	cairo_arc (cr, (radius + half_line), height - (radius + half_line),
-		   radius, M_PI/2, M_PI);
-	cairo_close_path (cr);
-	cairo_stroke (cr);
-
-	cairo_set_source_rgb(cr, 0, 0, 0);
-	pango_layout_set_font_description (layout, style->font_desc);
-	pango_layout_set_single_paragraph_mode (layout, TRUE);
-	pango_layout_set_text (layout, swb->label, -1);
-	pango_layout_set_attributes (layout, swb->markup);
-	pango_layout_get_pixel_size (layout, &twidth, &theight);
-
-	cairo_move_to (cr, width/2., height/2.);
-	cairo_scale (cr, scale_h, scale_v);
-	cairo_rel_move_to (cr, - twidth/2., - theight/2.);
-	pango_cairo_show_layout (cr, layout);
-	g_object_unref (layout);
-	g_object_unref (style);
-
-	cairo_new_path (cr);
-	cairo_restore (cr);
-}
-
 SOW_MAKE_TYPE (button, Button,
 	       sheet_widget_button_user_config,
 	       sheet_widget_button_set_sheet,
@@ -1167,7 +1051,6 @@ SOW_MAKE_TYPE (button, Button,
 	       sheet_widget_button_prep_sax_parser,
 	       sheet_widget_button_get_property,
 	       sheet_widget_button_set_property,
-	       sheet_widget_button_draw_cairo,
 	       {
 		       g_object_class_install_property
 			       (object_class, SOB_PROP_TEXT,
@@ -1199,7 +1082,8 @@ typedef struct {
 
 typedef struct {
 	SheetObjectWidgetClass parent_class;
-	GType htype, vtype;
+	GType type;
+	gboolean has_orientation;
 } SheetWidgetAdjustmentClass;
 
 enum {
@@ -1308,6 +1192,8 @@ sheet_widget_adjustment_set_horizontal (SheetWidgetAdjustment *swa,
 {
 	GList *ptr;
 
+	if (!SWA_CLASS (swa)->has_orientation)
+		return;
 	horizontal = !!horizontal;
 	if (horizontal == swa->horizontal)
 		return;
@@ -1384,9 +1270,7 @@ sheet_widget_adjustment_init_full (SheetWidgetAdjustment *swa,
 static void
 sheet_widget_adjustment_init (SheetWidgetAdjustment *swa)
 {
-	SheetWidgetAdjustmentClass *klass = SWA_CLASS (swa);
-	gboolean horizontal = (klass->vtype == G_TYPE_NONE);
-	sheet_widget_adjustment_init_full (swa, NULL, horizontal);
+	sheet_widget_adjustment_init_full (swa, NULL, FALSE);
 }
 
 static void
@@ -1529,8 +1413,7 @@ sheet_widget_adjustment_user_config_impl (SheetObject *so, SheetControl *sc, cha
 	AdjustmentConfigState *state;
 	GtkWidget *table;
 	GtkBuilder *gui;
-	gboolean has_directions = (swa_class->htype != G_TYPE_NONE &&
-				   swa_class->vtype != G_TYPE_NONE);
+	gboolean has_directions = swa_class->has_orientation;
 
 	/* Only pop up one copy per workbook */
 	if (gnumeric_dialog_raise_if_exists (wbcg, SHEET_OBJECT_CONFIG_KEY))
@@ -1680,7 +1563,7 @@ sheet_widget_adjustment_write_xml_sax (SheetObject const *so, GsfXMLOut *output,
 			       gtk_adjustment_get_value (swa->adjustment),
 			       2);
 
-	if (swa_class->htype != G_TYPE_NONE && swa_class->vtype != G_TYPE_NONE)
+	if (swa_class->has_orientation)
 		gsf_xml_out_add_bool (output, "Horizontal", swa->horizontal);
 
 	sax_write_dep (output, &swa->dep, "Input", convs);
@@ -1693,7 +1576,7 @@ sheet_widget_adjustment_prep_sax_parser (SheetObject *so, GsfXMLIn *xin,
 {
 	SheetWidgetAdjustment *swa = SHEET_WIDGET_ADJUSTMENT (so);
 	SheetWidgetAdjustmentClass *swa_class = SWA_CLASS (so);
-	swa->horizontal = (swa_class->vtype == G_TYPE_NONE);
+	swa->horizontal = FALSE;
 
 	for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2) {
 		double tmp;
@@ -1711,8 +1594,7 @@ sheet_widget_adjustment_prep_sax_parser (SheetObject *so, GsfXMLIn *xin,
 			gtk_adjustment_set_value (swa->adjustment, tmp);
 		else if (sax_read_dep (attrs, "Input", &swa->dep, xin, convs))
 			;
-		else if (swa_class->htype != G_TYPE_NONE &&
-			 swa_class->vtype != G_TYPE_NONE &&
+		else if (swa_class->has_orientation &&
 			 gnm_xml_attr_bool (attrs, "Horizontal", &b))
 			swa->horizontal = b;
 	}
@@ -1756,8 +1638,8 @@ SOW_MAKE_TYPE (adjustment, Adjustment,
 	       sheet_widget_adjustment_prep_sax_parser,
 	       sheet_widget_adjustment_get_property,
 	       sheet_widget_adjustment_set_property,
-	       sheet_widget_draw_cairo,
 	       {
+		       ((SheetWidgetAdjustmentClass *) object_class)->has_orientation = TRUE;
 		       g_object_class_install_property
 			       (object_class, SWA_PROP_HORIZONTAL,
 				g_param_spec_boolean ("horizontal", NULL, NULL,
@@ -1781,9 +1663,7 @@ sheet_widget_scrollbar_create_widget (SheetObjectWidget *sow)
 	GtkWidget *bar;
 
 	swa->being_updated = TRUE;
-	bar = swa->horizontal
-		? gtk_hscrollbar_new (swa->adjustment)
-		: gtk_vscrollbar_new (swa->adjustment);
+	bar = gtk_scrollbar_new (swa->horizontal? GTK_ORIENTATION_HORIZONTAL: GTK_ORIENTATION_VERTICAL, swa->adjustment);
 	gtk_widget_set_can_focus (bar, FALSE);
 	g_signal_connect (G_OBJECT (bar),
 		"value_changed",
@@ -1800,70 +1680,14 @@ sheet_widget_scrollbar_user_config (SheetObject *so, SheetControl *sc)
 						  N_("Scrollbar Properties"));
 }
 
-static void sheet_widget_slider_horizontal_draw_cairo
-(SheetObject const *so, cairo_t *cr, double width, double height);
-
-static void
-sheet_widget_scrollbar_horizontal_draw_cairo (SheetObject const *so, cairo_t *cr,
-			 double width, double height)
-{
-	cairo_save (cr);
-	cairo_set_source_rgb(cr, 0.5, 0.5, 0.5);
-
-	cairo_new_path (cr);
-	cairo_move_to (cr, 0., height/2);
-	cairo_rel_line_to (cr, 15., 7.5);
-	cairo_rel_line_to (cr, 0, -15);
-	cairo_close_path (cr);
-	cairo_fill (cr);
-
-	cairo_new_path (cr);
-	cairo_move_to (cr, width, height/2);
-	cairo_rel_line_to (cr, -15., 7.5);
-	cairo_rel_line_to (cr, 0, -15);
-	cairo_close_path (cr);
-	cairo_fill (cr);
-
-	cairo_new_path (cr);
-	cairo_translate (cr, 15., 0.);
-	sheet_widget_slider_horizontal_draw_cairo (so, cr, width - 30, height);
-	cairo_restore (cr);
-}
-
-static void
-sheet_widget_scrollbar_vertical_draw_cairo (SheetObject const *so, cairo_t *cr,
-			 double width, double height)
-{
-	cairo_save (cr);
-	cairo_rotate (cr, M_PI/2);
-	cairo_translate (cr, 0., -width);
-	sheet_widget_scrollbar_horizontal_draw_cairo (so, cr, height, width);
-	cairo_restore (cr);
-}
-
-static void
-sheet_widget_scrollbar_draw_cairo (SheetObject const *so, cairo_t *cr,
-			 double width, double height)
-{
-	SheetWidgetAdjustment *swa = SHEET_WIDGET_ADJUSTMENT (so);
-	if (swa->horizontal)
-		sheet_widget_scrollbar_horizontal_draw_cairo
-			(so, cr, width, height);
-	else
-		sheet_widget_scrollbar_vertical_draw_cairo
-			(so, cr, width, height);
-}
 static void
 sheet_widget_scrollbar_class_init (SheetObjectWidgetClass *sow_class)
 {
 	SheetWidgetAdjustmentClass *swa_class = (SheetWidgetAdjustmentClass *)sow_class;
-	SheetObjectClass *so_class = SHEET_OBJECT_CLASS (sow_class);
 
-	so_class->draw_cairo = &sheet_widget_scrollbar_draw_cairo;
         sow_class->create_widget = &sheet_widget_scrollbar_create_widget;
 	SHEET_OBJECT_CLASS (sow_class)->user_config = &sheet_widget_scrollbar_user_config;
-	swa_class->htype = GTK_TYPE_HSCROLLBAR;
-	swa_class->vtype = GTK_TYPE_VSCROLLBAR;
+	swa_class->type = GTK_TYPE_SCROLLBAR;
 }
 
 GSF_CLASS (SheetWidgetScrollbar, sheet_widget_scrollbar,
@@ -1906,71 +1730,15 @@ sheet_widget_spinbutton_user_config (SheetObject *so, SheetControl *sc)
 }
 
 static void
-sheet_widget_spinbutton_draw_cairo (SheetObject const *so, cairo_t *cr,
-			 double width, double height)
-{
-	SheetWidgetAdjustment *swa = SHEET_WIDGET_ADJUSTMENT (so);
-	GtkAdjustment *adjustment = swa->adjustment;
-	double value = gtk_adjustment_get_value (adjustment);
-	int ivalue = (int) value;
-	double halfheight = height/2;
-	char *str;
-
-	cairo_save (cr);
-	cairo_set_line_width (cr, 0.5);
-	cairo_set_source_rgb(cr, 0, 0, 0);
-
-	cairo_new_path (cr);
-	cairo_move_to (cr, 0, 0);
-	cairo_line_to (cr, width, 0);
-	cairo_line_to (cr, width, height);
-	cairo_line_to (cr, 0, height);
-	cairo_close_path (cr);
-	cairo_stroke (cr);
-
-	cairo_new_path (cr);
-	cairo_move_to (cr, width - 10, 0);
-	cairo_rel_line_to (cr, 0, height);
-	cairo_stroke (cr);
-
-	cairo_set_source_rgb(cr, 0.5, 0.5, 0.5);
-
-	cairo_new_path (cr);
-	cairo_move_to (cr, width - 5, 3);
-	cairo_rel_line_to (cr, 3, 3);
-	cairo_rel_line_to (cr, -6, 0);
-	cairo_close_path (cr);
-	cairo_fill (cr);
-
-	cairo_new_path (cr);
-	cairo_move_to (cr, width - 5, height - 3);
-	cairo_rel_line_to (cr, 3, -3);
-	cairo_rel_line_to (cr, -6, 0);
-	cairo_close_path (cr);
-	cairo_fill (cr);
-
-	str = g_strdup_printf ("%i", ivalue);
-	cairo_set_source_rgb(cr, 0, 0, 0);
-	cairo_move_to (cr, 4., halfheight);
-	draw_cairo_text (cr, str, NULL, NULL, TRUE);
-	g_free (str);
-
-	cairo_new_path (cr);
-	cairo_restore (cr);
-}
-
-static void
 sheet_widget_spinbutton_class_init (SheetObjectWidgetClass *sow_class)
 {
 	SheetWidgetAdjustmentClass *swa_class = (SheetWidgetAdjustmentClass *)sow_class;
-	SheetObjectClass *so_class = SHEET_OBJECT_CLASS (sow_class);
 
-	so_class->draw_cairo = &sheet_widget_spinbutton_draw_cairo;
         sow_class->create_widget = &sheet_widget_spinbutton_create_widget;
 	SHEET_OBJECT_CLASS (sow_class)->user_config = &sheet_widget_spinbutton_user_config;
 
-	swa_class->htype = GTK_TYPE_SPIN_BUTTON;
-	swa_class->vtype = G_TYPE_NONE;
+	swa_class->type = GTK_TYPE_SPIN_BUTTON;
+	swa_class->has_orientation = FALSE;
 }
 
 GSF_CLASS (SheetWidgetSpinbutton, sheet_widget_spinbutton,
@@ -1993,9 +1761,7 @@ sheet_widget_slider_create_widget (SheetObjectWidget *sow)
 	GtkWidget *slider;
 
 	swa->being_updated = TRUE;
-	slider = swa->horizontal
-		? gtk_hscale_new (swa->adjustment)
-		: gtk_vscale_new (swa->adjustment);
+	slider = gtk_scale_new (swa->horizontal? GTK_ORIENTATION_HORIZONTAL: GTK_ORIENTATION_VERTICAL, swa->adjustment);
 	gtk_scale_set_draw_value (GTK_SCALE (slider), FALSE);
 	gtk_widget_set_can_focus (slider, FALSE);
 	g_signal_connect (G_OBJECT (slider),
@@ -2014,74 +1780,14 @@ sheet_widget_slider_user_config (SheetObject *so, SheetControl *sc)
 }
 
 static void
-sheet_widget_slider_horizontal_draw_cairo (SheetObject const *so, cairo_t *cr,
-			 double width, double height)
-{
-	SheetWidgetAdjustment *swa = SHEET_WIDGET_ADJUSTMENT (so);
-	GtkAdjustment *adjustment = swa->adjustment;
-	double value = gtk_adjustment_get_value (adjustment);
-	double upper = gtk_adjustment_get_upper (adjustment);
-	double lower = gtk_adjustment_get_lower (adjustment);
-	double fraction = (upper == lower) ? 0.0 : (value - lower)/(upper- lower);
-
-	cairo_save (cr);
-	cairo_set_line_width (cr, 5);
-	cairo_set_source_rgb(cr, 0.8, 0.8, 0.8);
-	cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
-
-	cairo_new_path (cr);
-	cairo_move_to (cr, 4, height/2);
-	cairo_rel_line_to (cr, width - 8., 0);
-	cairo_stroke (cr);
-
-	cairo_set_line_width (cr, 15);
-	cairo_set_source_rgb(cr, 0.5, 0.5, 0.5);
-	cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
-
-	cairo_new_path (cr);
-	cairo_move_to (cr, fraction * (width - 8. - 20. - 5. - 5. + 2.5 + 2.5)
-		       - 10. + 10. + 4. + 5. - 2.5, height/2);
-	cairo_rel_line_to (cr, 20, 0);
-	cairo_stroke (cr);
-
-	cairo_new_path (cr);
-	cairo_restore (cr);
-}
-
-static void
-sheet_widget_slider_vertical_draw_cairo (SheetObject const *so, cairo_t *cr,
-			 double width, double height)
-{
-	cairo_save (cr);
-	cairo_rotate (cr, M_PI/2);
-	cairo_translate (cr, 0., -width);
-	sheet_widget_slider_horizontal_draw_cairo (so, cr, height, width);
-	cairo_restore (cr);
-}
-
-static void
-sheet_widget_slider_draw_cairo (SheetObject const *so, cairo_t *cr,
-			 double width, double height)
-{
-	SheetWidgetAdjustment *swa = SHEET_WIDGET_ADJUSTMENT (so);
-	if (swa->horizontal)
-		sheet_widget_slider_horizontal_draw_cairo (so, cr, width, height);
-	else
-		sheet_widget_slider_vertical_draw_cairo (so, cr, width, height);
-}
-
-static void
 sheet_widget_slider_class_init (SheetObjectWidgetClass *sow_class)
 {
 	SheetWidgetAdjustmentClass *swa_class = (SheetWidgetAdjustmentClass *)sow_class;
-	SheetObjectClass *so_class = SHEET_OBJECT_CLASS (sow_class);
 
-	so_class->draw_cairo = &sheet_widget_slider_draw_cairo;
         sow_class->create_widget = &sheet_widget_slider_create_widget;
 	SHEET_OBJECT_CLASS (sow_class)->user_config = &sheet_widget_slider_user_config;
 
-	swa_class->htype = GTK_TYPE_HSCALE;
-	swa_class->vtype = GTK_TYPE_VSCALE;
+	swa_class->type = GTK_TYPE_SCALE;
 }
 
 GSF_CLASS (SheetWidgetSlider, sheet_widget_slider,
@@ -2545,50 +2251,6 @@ sheet_widget_checkbox_set_label	(SheetObject *so, char const *str)
 	}
 }
 
-static void
-sheet_widget_checkbox_draw_cairo (SheetObject const *so, cairo_t *cr,
-			 double width, double height)
-{
-	SheetWidgetCheckbox const *swc = SHEET_WIDGET_CHECKBOX (so);
-	double halfheight = height/2;
-
-	cairo_save (cr);
-	cairo_set_line_width (cr, 0.5);
-	cairo_set_source_rgb(cr, 1.0, 1.0, 1.0);
-
-	cairo_new_path (cr);
-	cairo_move_to (cr, 4, halfheight - 4);
-	cairo_rel_line_to (cr, 0, 8);
-	cairo_rel_line_to (cr, 8., 0);
-	cairo_rel_line_to (cr, 0., -8.);
-	cairo_rel_line_to (cr, -8., 0.);
-	cairo_close_path (cr);
-	cairo_fill_preserve (cr);
-	cairo_set_source_rgb(cr, 0.0, 0.0, 0.0);
-	cairo_stroke (cr);
-
-	if (swc->value) {
-		cairo_new_path (cr);
-		cairo_move_to (cr, 4, halfheight - 4);
-		cairo_rel_line_to (cr, 8., 8.);
-		cairo_rel_line_to (cr, -8., 0.);
-		cairo_rel_line_to (cr, 8., -8.);
-		cairo_rel_line_to (cr, -8., 0.);
-		cairo_close_path (cr);
-		cairo_set_line_join (cr, CAIRO_LINE_JOIN_BEVEL);
-		cairo_stroke (cr);
-	}
-
-	cairo_move_to (cr, 4. + 8. + 4, halfheight);
-
-	draw_cairo_text (cr, swc->label, NULL, NULL, TRUE);
-
-	cairo_new_path (cr);
-	cairo_restore (cr);
-}
-
-
-
 SOW_MAKE_TYPE (checkbox, Checkbox,
 	       sheet_widget_checkbox_user_config,
 	       sheet_widget_checkbox_set_sheet,
@@ -2599,7 +2261,6 @@ SOW_MAKE_TYPE (checkbox, Checkbox,
 	       sheet_widget_checkbox_prep_sax_parser,
 	       sheet_widget_checkbox_get_property,
 	       sheet_widget_checkbox_set_property,
-	       sheet_widget_checkbox_draw_cairo,
 	       {
 		       g_object_class_install_property
 			       (object_class, SOC_PROP_ACTIVE,
@@ -3191,41 +2852,6 @@ sheet_widget_radio_button_user_config (SheetObject *so, SheetControl *sc)
  	gtk_widget_show (state->dialog);
 }
 
-static void
-sheet_widget_radio_button_draw_cairo (SheetObject const *so, cairo_t *cr,
-			 double width, double height)
-{
-	SheetWidgetRadioButton const *swr = SHEET_WIDGET_RADIO_BUTTON (so);
-	double halfheight = height/2;
-
-	cairo_save (cr);
-	cairo_set_line_width (cr, 0.5);
-	cairo_set_source_rgb(cr, 1.0, 1.0, 1.0);
-
-	cairo_new_path (cr);
-	cairo_move_to (cr, 4. + 8., halfheight);
-	cairo_arc (cr, 4. + 4., halfheight, 4., 0., 2*M_PI);
-	cairo_close_path (cr);
-	cairo_fill_preserve (cr);
-	cairo_set_source_rgb(cr, 0.0, 0.0, 0.0);
-	cairo_stroke (cr);
-
-	if (swr->active) {
-		cairo_new_path (cr);
-		cairo_move_to (cr, 4. + 6.5, halfheight);
-		cairo_arc (cr, 4. + 4., halfheight, 2.5, 0., 2*M_PI);
-		cairo_close_path (cr);
-		cairo_fill (cr);
-	}
-
-	cairo_move_to (cr, 4. + 8. + 4, halfheight);
-
-	draw_cairo_text (cr, swr->label, NULL, NULL, TRUE);
-
-	cairo_new_path (cr);
-	cairo_restore (cr);
-}
-
 SOW_MAKE_TYPE (radio_button, RadioButton,
  	       sheet_widget_radio_button_user_config,
   	       sheet_widget_radio_button_set_sheet,
@@ -3236,7 +2862,6 @@ SOW_MAKE_TYPE (radio_button, RadioButton,
  	       sheet_widget_radio_button_prep_sax_parser,
   	       sheet_widget_radio_button_get_property,
   	       sheet_widget_radio_button_set_property,
-	       sheet_widget_radio_button_draw_cairo,
 	       {
 		       g_object_class_install_property
 			       (object_class, SOR_PROP_ACTIVE,
@@ -3539,7 +3164,6 @@ SOW_MAKE_TYPE (list_base, ListBase,
 	       sheet_widget_list_base_prep_sax_parser,
 	       NULL,
 	       NULL,
-	       sheet_widget_draw_cairo,
 	       {
 	       list_base_signals[LIST_BASE_MODEL_CHANGED] = g_signal_new ("model-changed",
 			SHEET_WIDGET_LIST_BASE_TYPE,
@@ -3693,8 +3317,8 @@ sheet_widget_list_create_widget (SheetObjectWidget *sow)
 	GtkWidget *frame = g_object_new (GTK_TYPE_FRAME, NULL);
 	GtkWidget *list = gtk_tree_view_new_with_model (swl->model);
 	GtkWidget *sw = gtk_scrolled_window_new (
-		gtk_tree_view_get_hadjustment (GTK_TREE_VIEW (list)),
-		gtk_tree_view_get_vadjustment (GTK_TREE_VIEW (list)));
+		gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (list)),
+		gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (list)));
 	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
 		GTK_POLICY_AUTOMATIC,
 		GTK_POLICY_ALWAYS);
@@ -3722,120 +3346,8 @@ sheet_widget_list_create_widget (SheetObjectWidget *sow)
 }
 
 static void
-sheet_widget_list_draw_cairo (SheetObject const *so, cairo_t *cr,
-			 double width, double height)
-{
-	SheetWidgetListBase *swl = SHEET_WIDGET_LIST_BASE (so);
-
-	cairo_save (cr);
-	cairo_set_line_width (cr, 0.5);
-	cairo_set_source_rgb(cr, 0, 0, 0);
-
-	cairo_new_path (cr);
-	cairo_move_to (cr, 0, 0);
-	cairo_line_to (cr, width, 0);
-	cairo_line_to (cr, width, height);
-	cairo_line_to (cr, 0, height);
-	cairo_close_path (cr);
-	cairo_stroke (cr);
-
-	cairo_new_path (cr);
-	cairo_move_to (cr, width - 10, 0);
-	cairo_rel_line_to (cr, 0, height);
-	cairo_stroke (cr);
-
-	cairo_set_source_rgb(cr, 0.5, 0.5, 0.5);
-
-	cairo_new_path (cr);
-	cairo_move_to (cr, width - 5 -3, height - 12);
-	cairo_rel_line_to (cr, 6, 0);
-	cairo_rel_line_to (cr, -3, 8);
-	cairo_close_path (cr);
-	cairo_fill (cr);
-
-	cairo_new_path (cr);
-	cairo_move_to (cr, width - 5 -3, 12);
-	cairo_rel_line_to (cr, 6, 0);
-	cairo_rel_line_to (cr, -3, -8);
-	cairo_close_path (cr);
-	cairo_fill (cr);
-
-
-	if (swl->model != NULL) {
-		GtkTreeIter iter;
-		GString*str = g_string_new (NULL);
-		PangoLayout *layout = pango_cairo_create_layout (cr);
-		GtkStyle *style = gtk_style_new ();
-		double const scale_h = 72. / gnm_app_display_dpi_get (TRUE);
-		double const scale_v = 72. / gnm_app_display_dpi_get (FALSE);
-		int twidth = 0, theight = 0;
-		PangoLayoutIter *pliter;
-		int y0, y1, i;
-		double dy0 = 0, dy1 = 0;
-		gboolean got_line = TRUE;
-
-		cairo_new_path (cr);
-		cairo_rectangle (cr, 2, 1, width - 2 - 12, height - 2);
-		cairo_clip (cr);
-
-		if (gtk_tree_model_get_iter_first (swl->model, &iter))
-			do {
-				char *astr = NULL, *newline;
-				gtk_tree_model_get (swl->model, &iter, 0, &astr, -1);
-				while (NULL != (newline = strchr (astr, '\n')))
-					*newline = ' ';
-				g_string_append (str, astr);
-				g_string_append_c (str, '\n');
-				g_free (astr);
-			} while (gtk_tree_model_iter_next (swl->model, &iter));
-
-		pango_layout_set_font_description (layout, style->font_desc);
-		pango_layout_set_single_paragraph_mode (layout, FALSE);
-		pango_layout_set_spacing (layout, 3 * PANGO_SCALE);
-		pango_layout_set_text (layout, str->str, -1);
-		pango_layout_get_pixel_size (layout, &twidth, &theight);
-
-		cairo_translate (cr, 4., 2.);
-		cairo_scale (cr, scale_h, scale_v);
-
-		pliter =   pango_layout_get_iter (layout);
-		for (i = 1; i < swl->selection; i++)
-			got_line = pango_layout_iter_next_line (pliter);
-
-		if (got_line) {
-			pango_layout_iter_get_line_yrange (pliter, &y0, &y1);
-			dy0 = y0 / (double)PANGO_SCALE;
-			dy1 = y1 / (double)PANGO_SCALE;
-
-			if (dy1 > (height - 4)/scale_v)
-				cairo_translate (cr, 0, (height - 4)/scale_v - dy1);
-
-			cairo_new_path (cr);
-			cairo_rectangle (cr, -4/scale_h, dy0,
-					 width/scale_h, dy1 - dy0);
-			cairo_set_source_rgb(cr, 0.8, 0.8, 0.8);
-			cairo_fill (cr);
-       		}
-		pango_layout_iter_free (pliter);
-		cairo_set_source_rgb(cr, 0, 0, 0);
-		pango_cairo_show_layout (cr, layout);
-		g_object_unref (layout);
-		g_object_unref (style);
-
-
-		g_string_free (str, TRUE);
-	}
-
-	cairo_new_path (cr);
-	cairo_restore (cr);
-}
-
-static void
 sheet_widget_list_class_init (SheetObjectWidgetClass *sow_class)
 {
-	SheetObjectClass *so_class = SHEET_OBJECT_CLASS (sow_class);
-
-	so_class->draw_cairo = &sheet_widget_list_draw_cairo;
         sow_class->create_widget = &sheet_widget_list_create_widget;
 }
 
@@ -3870,8 +3382,8 @@ cb_combo_model_changed (SheetWidgetListBase *swl, GtkComboBox *combo)
 
 	/* we can not set this until we have a model,
 	 * but after that we can not reset it */
-	if (gtk_combo_box_entry_get_text_column (GTK_COMBO_BOX_ENTRY (combo)) < 0)
-		gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (combo), 0);
+	if (gtk_combo_box_get_entry_text_column (GTK_COMBO_BOX (combo)) < 0)
+		gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX (combo), 0);
 
 	/* force entry to reload */
 	cb_combo_selection_changed (swl, combo);
@@ -3891,7 +3403,7 @@ sheet_widget_combo_create_widget (SheetObjectWidget *sow)
 	SheetWidgetListBase *swl = SHEET_WIDGET_LIST_BASE (sow);
 	GtkWidget *combo;
 
-	combo = g_object_new (gtk_combo_box_entry_get_type (), NULL);
+	combo = gtk_combo_box_new_with_entry ();
 	gtk_widget_set_can_focus (gtk_bin_get_child (GTK_BIN (combo)),
 				  FALSE);
 	if (swl->model != NULL)
@@ -3912,62 +3424,8 @@ sheet_widget_combo_create_widget (SheetObjectWidget *sow)
 }
 
 static void
-sheet_widget_combo_draw_cairo (SheetObject const *so, cairo_t *cr,
-			 double width, double height)
-{
-	SheetWidgetListBase *swl = SHEET_WIDGET_LIST_BASE (so);
-	double halfheight = height/2;
-
-	cairo_save (cr);
-	cairo_set_line_width (cr, 0.5);
-	cairo_set_source_rgb(cr, 0, 0, 0);
-
-	cairo_new_path (cr);
-	cairo_move_to (cr, 0, 0);
-	cairo_line_to (cr, width, 0);
-	cairo_line_to (cr, width, height);
-	cairo_line_to (cr, 0, height);
-	cairo_close_path (cr);
-	cairo_stroke (cr);
-
-	cairo_new_path (cr);
-	cairo_move_to (cr, width - 10, 0);
-	cairo_rel_line_to (cr, 0, height);
-	cairo_stroke (cr);
-
-	cairo_set_source_rgb(cr, 0.5, 0.5, 0.5);
-
-	cairo_new_path (cr);
-	cairo_move_to (cr, width - 5 -3, halfheight - 4);
-	cairo_rel_line_to (cr, 6, 0);
-	cairo_rel_line_to (cr, -3, 8);
-	cairo_close_path (cr);
-	cairo_fill (cr);
-
-	cairo_set_source_rgb(cr, 0, 0, 0);
-	cairo_move_to (cr, 4., halfheight);
-
-	if (swl->model != NULL) {
-		GtkTreeIter iter;
-		if (gtk_tree_model_iter_nth_child (swl->model, &iter, NULL,
-						   swl->selection - 1)) {
-			char *str = NULL;
-			gtk_tree_model_get (swl->model, &iter, 0, &str, -1);
-			draw_cairo_text (cr, str, NULL, NULL, TRUE);
-			g_free (str);
-		}
-	}
-
-	cairo_new_path (cr);
-	cairo_restore (cr);
-}
-
-static void
 sheet_widget_combo_class_init (SheetObjectWidgetClass *sow_class)
 {
-	SheetObjectClass *so_class = SHEET_OBJECT_CLASS (sow_class);
-
-	so_class->draw_cairo = &sheet_widget_combo_draw_cairo;
         sow_class->create_widget = &sheet_widget_combo_create_widget;
 }
 
diff --git a/src/style-border.c b/src/style-border.c
index a0ce3c5..84a25c3 100644
--- a/src/style-border.c
+++ b/src/style-border.c
@@ -511,16 +511,12 @@ void
 gnm_style_border_set_dash (GnmStyleBorderType const i,
 			   cairo_t *context)
 {
-	GdkLineStyle style = GDK_LINE_SOLID;
 	int w;
 
 	g_return_if_fail (context != NULL);
 	g_return_if_fail (i >= GNM_STYLE_BORDER_NONE);
 	g_return_if_fail (i < GNM_STYLE_BORDER_MAX);
 
-	if (style_border_data[i].pattern != NULL)
-		style = GDK_LINE_ON_OFF_DASH;
-
 	w = style_border_data[i].width;
 	if (w == 0)
 		w = 1;
diff --git a/src/style-color.c b/src/style-color.c
index e8e42ab..004ee93 100644
--- a/src/style-color.c
+++ b/src/style-color.c
@@ -13,12 +13,12 @@
 #include <gtk/gtk.h>
 
 /* Public _unallocated_ colours, i.e., no valid .pixel.  */
-GdkColor gs_black      = { 0, 0x0000, 0x0000, 0x0000 };    /* "Black" */
-GdkColor gs_white      = { 0, 0xffff, 0xffff, 0xffff };    /* "White" */
-GdkColor gs_yellow     = { 0, 0xffff, 0xffff, 0xe0e0 };    /* "LightYellow" */
-GdkColor gs_lavender   = { 0, 0xe6e6, 0xe6e6, 0xfafa };    /* "lavender" */
-GdkColor gs_dark_gray  = { 0, 0x3333, 0x3333, 0x3333 };    /* "gray20" */
-GdkColor gs_light_gray = { 0, 0xc7c7, 0xc7c7, 0xc7c7 };    /* "gray78" */
+GdkRGBA gs_black      = { 0, 0, 0, 1 };    /* "Black" */
+GdkRGBA gs_white      = { 1, 1, 1, 1 };    /* "White" */
+GdkRGBA gs_yellow     = { 1, 1, .88, 1 };    /* "LightYellow" */
+GdkRGBA gs_lavender   = { .9, .9, .98, 1 };    /* "lavender" */
+GdkRGBA gs_dark_gray  = { .2, .2, .2, 1 };    /* "gray20" */
+GdkRGBA gs_light_gray = { .78, .78, .78, 1 };    /* "gray78" */
 
 static GHashTable *style_color_hash;
 static GnmColor *sc_black;
@@ -28,8 +28,8 @@ static GnmColor *sc_grid;
 GnmColor *
 style_color_new_name (char const *name)
 {
-	GdkColor c;
-	gdk_color_parse (name, &c);
+	GdkRGBA c;
+	gdk_rgba_parse (&c, name);
 	return style_color_new_gdk (&c);
 }
 
@@ -58,9 +58,9 @@ style_color_new_pango (PangoColor const *c)
 }
 
 GnmColor *
-style_color_new_gdk (GdkColor const *c)
+style_color_new_gdk (GdkRGBA const *c)
 {
-	return style_color_new_i16 (c->red, c->green, c->blue);
+	return style_color_new_i8 (c->red * 255, c->green * 255, c->blue * 255);
 }
 
 GnmColor *
@@ -197,6 +197,8 @@ color_hash (gconstpointer v)
 void
 gnm_color_init (void)
 {
+#warning GTK3: do we still need that?
+#if 0
 	GdkColor error;
 
 	if (gdk_screen_get_default () != NULL) {
@@ -218,7 +220,7 @@ gnm_color_init (void)
 	gs_lavender.pixel = error.pixel;
 	gs_dark_gray.pixel = error.pixel;
 	gs_light_gray.pixel = error.pixel;
-
+#endif
 	style_color_hash = g_hash_table_new (color_hash,
 					     (GEqualFunc)style_color_equal);
 }
diff --git a/src/style-color.h b/src/style-color.h
index 54c6f5c..71e2788 100644
--- a/src/style-color.h
+++ b/src/style-color.h
@@ -19,19 +19,19 @@ struct _GnmColor {
 };
 
 /* Colors used by any GnumericSheet item */
-GNM_VAR_DECL GdkColor gs_white;
-GNM_VAR_DECL GdkColor gs_light_gray;
-GNM_VAR_DECL GdkColor gs_dark_gray;
-GNM_VAR_DECL GdkColor gs_black;
-GNM_VAR_DECL GdkColor gs_lavender;
-GNM_VAR_DECL GdkColor gs_yellow;
+GNM_VAR_DECL GdkRGBA gs_white;
+GNM_VAR_DECL GdkRGBA gs_light_gray;
+GNM_VAR_DECL GdkRGBA gs_dark_gray;
+GNM_VAR_DECL GdkRGBA gs_black;
+GNM_VAR_DECL GdkRGBA gs_lavender;
+GNM_VAR_DECL GdkRGBA gs_yellow;
 
 GnmColor *style_color_new_go    (GOColor c);
 GnmColor *style_color_new_name  (char const *name);
 GnmColor *style_color_new_i16   (gushort red, gushort green, gushort blue);
 GnmColor *style_color_new_i8    (guint8 red, guint8 green, guint8 blue);
 GnmColor *style_color_new_pango (PangoColor const *c);
-GnmColor *style_color_new_gdk   (GdkColor const *c);
+GnmColor *style_color_new_gdk   (GdkRGBA const *c);
 GnmColor *style_color_auto_font (void);
 GnmColor *style_color_auto_back (void);
 GnmColor *style_color_auto_pattern (void);
diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c
index bc315f1..b3c5fd4 100644
--- a/src/wbc-gtk.c
+++ b/src/wbc-gtk.c
@@ -66,7 +66,7 @@
 #include <gsf/gsf-impl-utils.h>
 #include <gsf/gsf-doc-meta-data.h>
 #include <gtk/gtk.h>
-#include "gdk/gdkkeysyms.h"
+#include "gdk/gdkkeysyms-compat.h"
 #include <glib/gi18n-lib.h>
 #include <errno.h>
 #include <string.h>
@@ -693,7 +693,10 @@ cb_sheet_label_drag_begin (GtkWidget *widget, GdkDragContext *context,
 {
 	GtkWidget *arrow, *image;
 	GdkPixbuf *pixbuf;
+#warning GTK3: how can we mask there?
+#if 0
 	GdkBitmap *bitmap;
+#endif
 
 	g_return_if_fail (IS_WBC_GTK (wbcg));
 
@@ -708,11 +711,15 @@ cb_sheet_label_drag_begin (GtkWidget *widget, GdkDragContext *context,
 	image = gtk_image_new_from_pixbuf (pixbuf);
 	gtk_widget_show (image);
 	gtk_container_add (GTK_CONTAINER (arrow), image);
+#if 0
 	gdk_pixbuf_render_pixmap_and_mask_for_colormap (pixbuf,
 		gtk_widget_get_colormap (widget), NULL, &bitmap, 0x7f);
+#endif
 	g_object_unref (pixbuf);
+#if 0
 	gtk_widget_shape_combine_mask (arrow, bitmap, 0, 0);
 	g_object_unref (bitmap);
+#endif
 	g_object_ref_sink (arrow);
 	g_object_set_data (G_OBJECT (widget), "arrow", arrow);
 }
@@ -868,7 +875,7 @@ cb_zoom_change (Sheet *sheet,
 
 static void
 cb_notebook_switch_page (G_GNUC_UNUSED GtkNotebook *notebook_,
-			 G_GNUC_UNUSED GtkNotebookPage *page_,
+			 G_GNUC_UNUSED GtkWidget *page_,
 			 guint page_num, WBCGtk *wbcg)
 {
 	Sheet *sheet;
@@ -950,7 +957,7 @@ cb_notebook_switch_page (G_GNUC_UNUSED GtkNotebook *notebook_,
 }
 
 /*
- * We want the pane managed differently that GtkHPaned does by default.
+ * We want the pane managed differently that GtkPaned does by default.
  * When in automatic mode, we want at most 1/3 of the space to be
  * allocated to the tabs.  We don't want empty space on the tabs side
  * at all.
@@ -962,10 +969,9 @@ cb_notebook_switch_page (G_GNUC_UNUSED GtkNotebook *notebook_,
  * paned has a set position.
  */
 static void
-cb_paned_size_allocate (GtkHPaned *hpaned,
+cb_paned_size_allocate (GtkPaned *paned,
 			GtkAllocation *allocation)
 {
-	GtkPaned *paned = (GtkPaned *)hpaned;
 	GtkWidget *widget = (GtkWidget *)paned;
 	GtkRequisition child1_requisition;
 	gint handle_size;
@@ -994,17 +1000,18 @@ cb_paned_size_allocate (GtkHPaned *hpaned,
 	if (!g_object_get_data (G_OBJECT (paned), PANED_SIGNAL_KEY))
 		goto chain;
 
-	widget->allocation = *allocation;
+	gtk_widget_set_allocation (widget, allocation);
 
 	gtk_container_child_set (GTK_CONTAINER (paned),
 				 child1, "shrink", TRUE,
 				 NULL);
 
 	g_object_set (G_OBJECT (child1), "scrollable", FALSE, NULL);
-	gtk_widget_size_request (child1, &child1_requisition);
+	gtk_widget_get_preferred_size (child1, &child1_requisition, NULL);
 
 	gtk_widget_style_get (widget, "handle-size", &handle_size, NULL);
-	w = widget->allocation.width - handle_size - 2 * border_width;
+	gtk_widget_get_allocation (widget, &pa);
+	w = pa.width - handle_size - 2 * border_width;
 	p1 = MAX (0, w / 2);
 
 	/*
@@ -1012,17 +1019,17 @@ cb_paned_size_allocate (GtkHPaned *hpaned,
 	 * used for auto-expr and other little things.  This helps with
 	 * wide windows.
 	 */
-	gtk_widget_get_allocation (gtk_widget_get_parent (GTK_WIDGET (hpaned)),
+	gtk_widget_get_allocation (gtk_widget_get_parent (GTK_WIDGET (paned)),
 				   &pa);
 	wp = pa.width;
 	p1 = MAX (p1, w - (wp - w) * 125 / 100);
 
 	/* However, never use more for tabs than we want.  */
-	p1 = MIN (p1, child1->requisition.width);
+	p1 = MIN (p1, child1_requisition.width);
 
 	p2 = MAX (0, w - p1);
 
-	if (p1 < child1->requisition.width) {
+	if (p1 < child1_requisition.width) {
 		/*
 		 * We don't have room so make the notebook scrollable.
 		 * We will then not set the size again.
@@ -1091,7 +1098,7 @@ cb_status_size_allocate (GtkWidget *widget,
 static void
 wbc_gtk_create_notebook_area (WBCGtk *wbcg)
 {
-	wbcg->notebook_area = gtk_vbox_new (FALSE, 0);
+	wbcg->notebook_area = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 
 	wbcg->snotebook = g_object_new (GTK_TYPE_NOTEBOOK,
 					"show-tabs", FALSE,
@@ -1105,8 +1112,6 @@ wbc_gtk_create_notebook_area (WBCGtk *wbcg)
 	wbcg->bnotebook = g_object_new (GNM_NOTEBOOK_TYPE,
 					"tab-pos", GTK_POS_BOTTOM,
 					"show-border", FALSE,
-					"tab-hborder", 0,
-					"tab-vborder", 0,
 					NULL);
 	g_object_ref (wbcg->bnotebook);
 
@@ -1180,7 +1185,7 @@ cb_sheet_tab_change (Sheet *sheet,
 		     G_GNUC_UNUSED GParamSpec *pspec,
 		     EditableLabel *el)
 {
-	GdkColor cfore, cback;
+	GdkRGBA cfore, cback;
 	SheetControlGUI *scg = get_scg (GTK_WIDGET (el));
 
 	g_return_if_fail (IS_SHEET_CONTROL_GUI (scg));
@@ -1189,10 +1194,10 @@ cb_sheet_tab_change (Sheet *sheet,
 	editable_label_set_text (el, sheet->name_unquoted);
 	editable_label_set_color (el,
 				  sheet->tab_color
-				  ? go_color_to_gdk (sheet->tab_color->go_color, &cback)
+				  ? go_color_to_gdk_rgba (sheet->tab_color->go_color, &cback)
 				  : NULL,
 				  sheet->tab_text_color
-				  ? go_color_to_gdk (sheet->tab_text_color->go_color, &cfore)
+				  ? go_color_to_gdk_rgba (sheet->tab_text_color->go_color, &cfore)
 				  : NULL);
 
 	signal_paned_repartition (scg->wbcg->tabs_paned);
@@ -2184,8 +2189,12 @@ cb_editline_focus_in (GtkWidget *w, GdkEventFocus *event,
 {
 	if (!wbcg_is_editing (wbcg))
 		if (!wbcg_edit_start (wbcg, FALSE, TRUE)) {
+#if 0
 			GtkEntry *entry = GTK_ENTRY (w);
+#endif
 			wbcg_focus_cur_scg (wbcg);
+#warning GTK3: what can we do there for gtk3?
+#if 0
 			entry->in_drag = FALSE;
 			/*
 			 * ->button is private, ugh.  Since the text area
@@ -2194,6 +2203,7 @@ cb_editline_focus_in (GtkWidget *w, GdkEventFocus *event,
 			 * correct state.
 			 */
 			entry->button = 0;
+#endif
 			return TRUE;
 		}
 
@@ -2281,7 +2291,7 @@ edit_area_button (WBCGtk *wbcg, GtkToolbar *tb,
 			      "sensitive", sensitive,
 			      "can-focus", FALSE,
 			      NULL);
-	go_tool_item_set_tooltip_text (GTK_TOOL_ITEM (button), tip);
+	gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (button), tip);
 	g_signal_connect_swapped (button, "clicked", func, wbcg);
 	gtk_toolbar_insert (tb, GTK_TOOL_ITEM (button), -1);
 
@@ -2300,7 +2310,7 @@ edit_area_button_menu (WBCGtk *wbcg, GtkToolbar *tb,
 			      "sensitive", sensitive,
 			      "can-focus", FALSE,
 			      NULL);
-	go_tool_item_set_tooltip_text (GTK_TOOL_ITEM (button), tip);
+	gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (button), tip);
 	g_signal_connect_swapped (button, "clicked", func, wbcg);
 	gtk_toolbar_insert (tb, GTK_TOOL_ITEM (button), -1);
 	gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (button),
@@ -2549,8 +2559,8 @@ show_gui (WBCGtk *wbcg)
 		pheight = pheight > 0 ? pheight : -1;
 		gtk_widget_set_size_request (GTK_WIDGET (wbcg->notebook_area),
 					     pwidth, pheight);
-		gtk_widget_size_request (GTK_WIDGET (wbcg->toplevel),
-					 &requisition);
+		gtk_widget_get_preferred_size (GTK_WIDGET (wbcg->toplevel),
+					 &requisition, NULL);
 		/* We want to test if toplevel is bigger than screen.
 		 * gtk_widget_size_request tells us the space
 		 * allocated to the  toplevel proper, but not how much is
@@ -2699,8 +2709,6 @@ cb_wbcg_drag_data_received (GtkWidget *widget, GdkDragContext *context,
 	g_free (target_type);
 }
 
-#ifdef HAVE_GTK_ENTRY_SET_ICON_FROM_STOCK
-
 static void cb_cs_go_up  (WBCGtk *wbcg)
 { wb_control_navigate_to_cell (WORKBOOK_CONTROL (wbcg), navigator_top); }
 static void cb_cs_go_down  (WBCGtk *wbcg)
@@ -2764,8 +2772,6 @@ wbc_gtk_cell_selector_popup (G_GNUC_UNUSED GtkEntry *entry,
 		gnumeric_popup_menu (GTK_MENU (menu), &event->button);
 	}
 }
-#endif
-
 
 static void
 wbc_gtk_create_edit_area (WBCGtk *wbcg)
@@ -2786,7 +2792,7 @@ wbc_gtk_create_edit_area (WBCGtk *wbcg)
 	/* Set a reasonable width for the selection box. */
 	len = go_pango_measure_string (
 		gtk_widget_get_pango_context (GTK_WIDGET (wbcg_toplevel (wbcg))),
-		gtk_widget_get_style (GTK_WIDGET (entry))->font_desc,
+		gtk_style_context_get_font (gtk_widget_get_style_context (GTK_WIDGET (entry)), GTK_STATE_NORMAL),
 		cell_coord_name (GNM_MAX_COLS - 1, GNM_MAX_ROWS - 1));
 	/*
 	 * Add a little extra since font might be proportional and since
@@ -2846,8 +2852,6 @@ wbc_gtk_create_edit_area (WBCGtk *wbcg)
 		"focus-out-event",
 		G_CALLBACK (cb_statusbox_focus), wbcg);
 
-#ifdef HAVE_GTK_ENTRY_SET_ICON_FROM_STOCK
-
 	gtk_entry_set_icon_from_stock
 		(GTK_ENTRY (wbcg->selection_descriptor),
 		 GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_JUMP_TO);
@@ -2863,8 +2867,6 @@ wbc_gtk_create_edit_area (WBCGtk *wbcg)
 			  G_CALLBACK
 			  (wbc_gtk_cell_selector_popup),
 			  wbcg);
-#endif
-
 
 	gtk_widget_show_all (GTK_WIDGET (tb));
 }
@@ -3713,6 +3715,8 @@ cb_handlebox_dock_status (GtkHandleBox *hb,
 			  GtkToolbar *toolbar, gpointer pattached)
 {
 	gboolean attached = GPOINTER_TO_INT (pattached);
+#warning GTK3: looks like there is no replacement in gtk3
+#if 0
 	GtkWidget *box = GTK_WIDGET (hb);
 
 	/* BARF!  */
@@ -3721,6 +3725,7 @@ cb_handlebox_dock_status (GtkHandleBox *hb,
 	style->ythickness = attached ? 2 : 0;
 	gtk_widget_set_style (box, style);
 	g_object_unref (style);
+#endif
 
 	gtk_toolbar_set_show_arrow (toolbar, attached);
 }
@@ -3996,12 +4001,8 @@ set_toolbar_style_for_position (GtkToolbar *tb, GtkPositionType pos)
 		GTK_ORIENTATION_HORIZONTAL, GTK_ORIENTATION_HORIZONTAL
 	};
 
-#ifdef HAVE_GTK_ORIENTABLE_SET_ORIENTATION
 	gtk_orientable_set_orientation (GTK_ORIENTABLE (tb),
 					orientations[pos]);
-#else
-	gtk_toolbar_set_orientation (tb, orientations[pos]);
-#endif
 
 	if (GTK_IS_HANDLE_BOX (box)) {
 		static const GtkPositionType hdlpos[] = {
@@ -4247,7 +4248,7 @@ cb_add_menus_toolbars (G_GNUC_UNUSED GtkUIManager *ui,
 				"signal::child_detached", G_CALLBACK (cb_handlebox_dock_status), GINT_TO_POINTER (FALSE),
 				NULL);
 		} else
-			box = gtk_hbox_new (FALSE, 2);
+			box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
 		g_signal_connect (G_OBJECT (w),
 				  "button_press_event",
 				  G_CALLBACK (cb_toolbar_button_press),
@@ -4257,7 +4258,7 @@ cb_add_menus_toolbars (G_GNUC_UNUSED GtkUIManager *ui,
 				  G_CALLBACK (cb_handlebox_button_press),
 				  gtk);
 
-		gtk_container_add (GTK_CONTAINER (box), w);
+		gtk_box_pack_start (GTK_BOX (box), w, TRUE, TRUE, 0);
 		gtk_widget_show_all (box);
 		if (!visible)
 			gtk_widget_hide (box);
@@ -4898,17 +4899,15 @@ wbc_gtk_create_status_area (WBCGtk *wbcg)
 
 	wbcg->progress_bar = gtk_progress_bar_new ();
 	gtk_progress_bar_set_text (GTK_PROGRESS_BAR (wbcg->progress_bar), " ");
-	gtk_progress_bar_set_orientation (
-		GTK_PROGRESS_BAR (wbcg->progress_bar), GTK_PROGRESS_LEFT_TO_RIGHT);
+	gtk_progress_bar_set_inverted (GTK_PROGRESS_BAR (wbcg->progress_bar), FALSE);
 
 	wbcg->auto_expr_label = tmp = gtk_label_new ("");
 	g_object_ref (wbcg->auto_expr_label);
 	gtk_label_set_ellipsize (GTK_LABEL (tmp), PANGO_ELLIPSIZE_START);
 	gtk_widget_set_can_focus (tmp, FALSE);
-	gtk_widget_ensure_style (tmp);
 	gtk_widget_set_size_request (tmp, go_pango_measure_string (
 		gtk_widget_get_pango_context (GTK_WIDGET (wbcg->toplevel)),
-		gtk_widget_get_style (tmp)->font_desc,
+		gtk_style_context_get_font (gtk_widget_get_style_context (tmp), GTK_STATE_NORMAL),
 		"Sumerage=-012345678901234"), -1);
 	tmp = gtk_event_box_new ();
 	gtk_container_add (GTK_CONTAINER (tmp), wbcg->auto_expr_label);
@@ -4920,12 +4919,12 @@ wbc_gtk_create_status_area (WBCGtk *wbcg)
 	gtk_container_add (GTK_CONTAINER (frame), tmp);
 
 	wbcg->status_text = tmp = gtk_statusbar_new ();
-	gtk_widget_ensure_style (tmp);
 	gtk_widget_set_size_request (tmp, go_pango_measure_string (
 		gtk_widget_get_pango_context (GTK_WIDGET (wbcg->toplevel)),
-		gtk_widget_get_style (tmp)->font_desc, "W") * 5, -1);
+		gtk_style_context_get_font (gtk_widget_get_style_context (tmp), GTK_STATE_NORMAL),
+	        "W") * 5, -1);
 
-	wbcg->tabs_paned = GTK_PANED (gtk_hpaned_new ());
+	wbcg->tabs_paned = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_HORIZONTAL));
 	gtk_paned_pack2 (wbcg->tabs_paned, wbcg->progress_bar, FALSE, TRUE);
 	g_signal_connect (G_OBJECT (wbcg->tabs_paned),
 			  "size-allocate", G_CALLBACK (cb_paned_size_allocate),
@@ -4934,7 +4933,7 @@ wbc_gtk_create_status_area (WBCGtk *wbcg)
 			  "button-press-event", G_CALLBACK (cb_paned_button_press),
 			  NULL);
 
-	wbcg->status_area = gtk_hbox_new (FALSE, 2);
+	wbcg->status_area = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
 	g_signal_connect (G_OBJECT (wbcg->status_area),
 			  "size-allocate", G_CALLBACK (cb_status_size_allocate),
 			  wbcg);
@@ -5193,8 +5192,7 @@ wbcg_set_toplevel (WBCGtk *wbcg, GtkWidget *w)
 	g_return_if_fail (GTK_IS_WINDOW (w));
 
 	g_object_set (G_OBJECT (w),
-		"allow-grow", TRUE,
-		"allow-shrink", TRUE,
+		"resizable", TRUE,
 		NULL);
 
 	g_signal_connect_data (w, "delete_event",
@@ -5574,7 +5572,7 @@ wbcg_data_allocator_editor (GogDataAllocator *dalloc,
 		(GWeakNotify) cb_dim_editor_weakref_notify, editor);
 
 	gnm_expr_entry_set_update_policy (editor->entry,
-		GTK_UPDATE_DISCONTINUOUS);
+		GNM_UPDATE_DISCONTINUOUS);
 
 	val = gog_dataset_get_dim (dataset, dim_i);
 	if (val != NULL) {
@@ -5807,13 +5805,14 @@ wbc_gtk_init (GObject *obj)
 
 	wbcg->new_object = NULL;
 
-	wbcg->menu_zone = gtk_vbox_new (TRUE, 0);
-	wbcg->everything = gtk_vbox_new (FALSE, 0);
+	wbcg->menu_zone = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+	gtk_box_set_homogeneous (GTK_BOX (wbcg->menu_zone), TRUE);
+	wbcg->everything = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 
-	wbcg->toolbar_zones[GTK_POS_TOP] = gtk_vbox_new (FALSE, 0);
+	wbcg->toolbar_zones[GTK_POS_TOP] = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 	wbcg->toolbar_zones[GTK_POS_BOTTOM] = NULL;
-	wbcg->toolbar_zones[GTK_POS_LEFT] = gtk_hbox_new (FALSE, 0);
-	wbcg->toolbar_zones[GTK_POS_RIGHT] = gtk_hbox_new (FALSE, 0);
+	wbcg->toolbar_zones[GTK_POS_LEFT] = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+	wbcg->toolbar_zones[GTK_POS_RIGHT] = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
 
 	wbcg->idle_update_style_feedback = 0;
 
@@ -5845,7 +5844,7 @@ wbc_gtk_init (GObject *obj)
 	gtk_window_set_title (wbcg_toplevel (wbcg), "Gnumeric");
 	gtk_window_set_wmclass (wbcg_toplevel (wbcg), "Gnumeric", "Gnumeric");
 
-	hbox = gtk_hbox_new (FALSE, 0);
+	hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
 	gtk_box_pack_start (GTK_BOX (hbox), wbcg->toolbar_zones[GTK_POS_LEFT], FALSE, TRUE, 0);
 	gtk_box_pack_start (GTK_BOX (hbox), wbcg->table, TRUE, TRUE, 0);
 	gtk_box_pack_start (GTK_BOX (hbox), wbcg->toolbar_zones[GTK_POS_RIGHT], FALSE, TRUE, 0);
diff --git a/src/widgets/gnm-cell-combo-view.c b/src/widgets/gnm-cell-combo-view.c
index c2b7725..2ce768c 100644
--- a/src/widgets/gnm-cell-combo-view.c
+++ b/src/widgets/gnm-cell-combo-view.c
@@ -164,7 +164,7 @@ cb_ccombo_key_press (GtkWidget *popup, GdkEventKey *event, GtkWidget *list)
 		if (!(event->state & GDK_MOD1_MASK))
 			return FALSE;
 
-	case GDK_KP_Enter :
+	case GDK_KEY_KP_Enter :
 	case GDK_KEY_Return :
 		ccombo_activate (GTK_TREE_VIEW (list), FALSE);
 		return TRUE;
@@ -295,7 +295,7 @@ gnm_cell_combo_view_popdown (SheetObjectView *sov, guint32 activate_time)
 	list = ccombo_create_list (GNM_CCOMBO_VIEW (sov), so, &clip, &select, &make_buttons);
 
 	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (list), FALSE);
-	gtk_widget_size_request (GTK_WIDGET (list), &req);
+	gtk_widget_get_preferred_size (GTK_WIDGET (list), &req, NULL);
 	g_object_set_data (G_OBJECT (list), SOV_ID, sov);
 
 	frame = gtk_frame_new (NULL);
@@ -308,8 +308,8 @@ gnm_cell_combo_view_popdown (SheetObjectView *sov, guint32 activate_time)
 	if (clip != NULL) {
 		GdkRectangle  rect;
 		GtkWidget *sw = gtk_scrolled_window_new (
-			gtk_tree_view_get_hadjustment (GTK_TREE_VIEW (list)),
-			gtk_tree_view_get_vadjustment (GTK_TREE_VIEW (list)));
+			gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (list)),
+			gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (list)));
 		gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
 						GTK_POLICY_AUTOMATIC,
 						GTK_POLICY_ALWAYS);
@@ -324,8 +324,8 @@ gnm_cell_combo_view_popdown (SheetObjectView *sov, guint32 activate_time)
 		container = list;
 
 	if (make_buttons) {
-		GtkWidget *vbox = gtk_vbox_new (FALSE, 0);
-		GtkWidget *hbox = gtk_hbox_new (FALSE, 0);
+		GtkWidget *vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+		GtkWidget *hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
 
 		GtkWidget *button;
 		button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
@@ -395,19 +395,12 @@ gnm_cell_combo_view_popdown (SheetObjectView *sov, guint32 activate_time)
 
 	popup_window = gtk_widget_get_window (popup);
 
-	if (0 == gdk_pointer_grab (popup_window, TRUE,
+	gdk_device_grab (gtk_get_current_event_device (), popup_window,
+	        GDK_OWNERSHIP_APPLICATION, TRUE,
 		GDK_BUTTON_PRESS_MASK |
 		GDK_BUTTON_RELEASE_MASK |
 		GDK_POINTER_MOTION_MASK,
-		NULL, NULL, activate_time)) {
-		if (0 ==  gdk_keyboard_grab (popup_window, TRUE, activate_time)) {
-			gtk_grab_add (popup);
-		} else {
-			gdk_display_pointer_ungrab
-				(gtk_widget_get_display (popup),
-				 activate_time);
-		}
-	}
+		NULL, activate_time);
 }
 
 /**
diff --git a/src/widgets/gnm-dao.c b/src/widgets/gnm-dao.c
index 413be08..065cbdc 100644
--- a/src/widgets/gnm-dao.c
+++ b/src/widgets/gnm-dao.c
@@ -32,7 +32,7 @@
 #include <dead-kittens.h>
 
 struct  _GnmDao {
-	GtkHBox		box;
+	GtkBox		box;
 	GtkBuilder      *gui;
 
 	GtkWidget *new_sheet;
@@ -49,13 +49,13 @@ struct  _GnmDao {
 };
 
 typedef struct {
-	GtkHBoxClass parent_class;
+	GtkBoxClass parent_class;
 
 	void (*gnm_dao_changed) (GnmDao *gdao);
 	void (*gnm_dao_activate) (GnmDao *gdao);
 } GnmDaoClass;
 
-static GtkHBoxClass *gnm_dao_parent_class;
+static GtkBoxClass *gnm_dao_parent_class;
 
 /* Signals we emit */
 enum {
@@ -123,7 +123,7 @@ gnm_dao_class_init (GObjectClass *klass)
 {
 	gnm_destroy_class_set (klass, gnm_dao_destroy);
 
-	gnm_dao_parent_class = g_type_class_peek (gtk_hbox_get_type ());
+	gnm_dao_parent_class = g_type_class_peek (gtk_box_get_type ());
 
 	gnm_dao_signals[GNM_DAO_CHANGED] =
 		g_signal_new ("readiness-changed",
@@ -144,7 +144,7 @@ gnm_dao_class_init (GObjectClass *klass)
 }
 
 GSF_CLASS (GnmDao, gnm_dao,
-	   gnm_dao_class_init, gnm_dao_init, GTK_TYPE_HBOX)
+	   gnm_dao_class_init, gnm_dao_init, GTK_TYPE_BOX)
 
 static void
 tool_set_focus_output_range (G_GNUC_UNUSED GtkWidget *widget,
diff --git a/src/widgets/gnm-filter-combo-view.c b/src/widgets/gnm-filter-combo-view.c
index 47da1cd..308f2a0 100644
--- a/src/widgets/gnm-filter-combo-view.c
+++ b/src/widgets/gnm-filter-combo-view.c
@@ -293,7 +293,7 @@ fcombo_arrow_format (GnmFilterCombo *fcombo, GtkWidget *arrow)
 		if (NULL != fcombo->cond) {
 		}
 		if (desc) {
-			go_widget_set_tooltip_text (gtk_widget_get_parent (arrow), desc);
+			gtk_widget_set_tooltip_text (gtk_widget_get_parent (arrow), desc);
 			g_free (desc);
 		}
 	}
@@ -301,7 +301,7 @@ fcombo_arrow_format (GnmFilterCombo *fcombo, GtkWidget *arrow)
 	gtk_arrow_set (GTK_ARROW (arrow),
 		fcombo->cond != NULL ? GTK_ARROW_RIGHT : GTK_ARROW_DOWN,
 		GTK_SHADOW_IN);
-	gtk_widget_modify_fg (arrow, GTK_STATE_NORMAL,
+	gtk_widget_override_color (arrow, GTK_STATE_NORMAL,
 		fcombo->cond != NULL ? &gs_yellow : &gs_black);
 }
 
diff --git a/src/widgets/gnm-notebook.c b/src/widgets/gnm-notebook.c
index 415ddad..24f6231 100644
--- a/src/widgets/gnm-notebook.c
+++ b/src/widgets/gnm-notebook.c
@@ -24,8236 +24,6 @@
 #include <gsf/gsf-impl-utils.h>
 #include <dead-kittens.h>
 
-#if !GTK_CHECK_VERSION(2,17,1)
-/* 582488 GtkNotebook behaves poorly when allocated less than reque... */
-#define USE_INTERNAL_COPY_OF_GTK_NOTEBOOK
-#endif
-
-#ifdef USE_INTERNAL_COPY_OF_GTK_NOTEBOOK
-
-#define I_(x) (x)
-/*
- * Yes, we really do include a copy of GtkNotebook here until #582488
- * can be fixed.
- */
-
-/* ========================================================================= */
-/* Marshallers for GggNotebook. */
-
-#ifdef G_ENABLE_DEBUG
-#define g_marshal_value_peek_boolean(v)  g_value_get_boolean (v)
-#define g_marshal_value_peek_char(v)     g_value_get_char (v)
-#define g_marshal_value_peek_uchar(v)    g_value_get_uchar (v)
-#define g_marshal_value_peek_int(v)      g_value_get_int (v)
-#define g_marshal_value_peek_uint(v)     g_value_get_uint (v)
-#define g_marshal_value_peek_long(v)     g_value_get_long (v)
-#define g_marshal_value_peek_ulong(v)    g_value_get_ulong (v)
-#define g_marshal_value_peek_int64(v)    g_value_get_int64 (v)
-#define g_marshal_value_peek_uint64(v)   g_value_get_uint64 (v)
-#define g_marshal_value_peek_enum(v)     g_value_get_enum (v)
-#define g_marshal_value_peek_flags(v)    g_value_get_flags (v)
-#define g_marshal_value_peek_float(v)    g_value_get_float (v)
-#define g_marshal_value_peek_double(v)   g_value_get_double (v)
-#define g_marshal_value_peek_string(v)   (char*) g_value_get_string (v)
-#define g_marshal_value_peek_param(v)    g_value_get_param (v)
-#define g_marshal_value_peek_boxed(v)    g_value_get_boxed (v)
-#define g_marshal_value_peek_pointer(v)  g_value_get_pointer (v)
-#define g_marshal_value_peek_object(v)   g_value_get_object (v)
-#else /* !G_ENABLE_DEBUG */
-/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
- *          Do not access GValues directly in your code. Instead, use the
- *          g_value_get_*() functions
- */
-#define g_marshal_value_peek_boolean(v)  (v)->data[0].v_int
-#define g_marshal_value_peek_char(v)     (v)->data[0].v_int
-#define g_marshal_value_peek_uchar(v)    (v)->data[0].v_uint
-#define g_marshal_value_peek_int(v)      (v)->data[0].v_int
-#define g_marshal_value_peek_uint(v)     (v)->data[0].v_uint
-#define g_marshal_value_peek_long(v)     (v)->data[0].v_long
-#define g_marshal_value_peek_ulong(v)    (v)->data[0].v_ulong
-#define g_marshal_value_peek_int64(v)    (v)->data[0].v_int64
-#define g_marshal_value_peek_uint64(v)   (v)->data[0].v_uint64
-#define g_marshal_value_peek_enum(v)     (v)->data[0].v_long
-#define g_marshal_value_peek_flags(v)    (v)->data[0].v_ulong
-#define g_marshal_value_peek_float(v)    (v)->data[0].v_float
-#define g_marshal_value_peek_double(v)   (v)->data[0].v_double
-#define g_marshal_value_peek_string(v)   (v)->data[0].v_pointer
-#define g_marshal_value_peek_param(v)    (v)->data[0].v_pointer
-#define g_marshal_value_peek_boxed(v)    (v)->data[0].v_pointer
-#define g_marshal_value_peek_pointer(v)  (v)->data[0].v_pointer
-#define g_marshal_value_peek_object(v)   (v)->data[0].v_pointer
-#endif /* !G_ENABLE_DEBUG */
-
-/* VOID:POINTER,UINT (gnm-marshalers.list:29) */
-static void
-ggg__VOID__POINTER_UINT (GClosure     *closure,
-                         GValue       *return_value G_GNUC_UNUSED,
-                         guint         n_param_values,
-                         const GValue *param_values,
-                         gpointer      invocation_hint G_GNUC_UNUSED,
-                         gpointer      marshal_data)
-{
-  typedef void (*GMarshalFunc_VOID__POINTER_UINT) (gpointer     data1,
-                                                   gpointer     arg_1,
-                                                   guint        arg_2,
-                                                   gpointer     data2);
-  register GMarshalFunc_VOID__POINTER_UINT callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-
-  g_return_if_fail (n_param_values == 3);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-  callback = (GMarshalFunc_VOID__POINTER_UINT) (marshal_data ? marshal_data : cc->callback);
-
-  callback (data1,
-            g_marshal_value_peek_pointer (param_values + 1),
-            g_marshal_value_peek_uint (param_values + 2),
-            data2);
-}
-
-/* BOOLEAN:ENUM (gnm-marshalers.list:30) */
-static void
-ggg__BOOLEAN__ENUM (GClosure     *closure,
-                    GValue       *return_value G_GNUC_UNUSED,
-                    guint         n_param_values,
-                    const GValue *param_values,
-                    gpointer      invocation_hint G_GNUC_UNUSED,
-                    gpointer      marshal_data)
-{
-  typedef gboolean (*GMarshalFunc_BOOLEAN__ENUM) (gpointer     data1,
-                                                  gint         arg_1,
-                                                  gpointer     data2);
-  register GMarshalFunc_BOOLEAN__ENUM callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-  gboolean v_return;
-
-  g_return_if_fail (return_value != NULL);
-  g_return_if_fail (n_param_values == 2);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-  callback = (GMarshalFunc_BOOLEAN__ENUM) (marshal_data ? marshal_data : cc->callback);
-
-  v_return = callback (data1,
-                       g_marshal_value_peek_enum (param_values + 1),
-                       data2);
-
-  g_value_set_boolean (return_value, v_return);
-}
-
-/* BOOLEAN:BOOLEAN (gnm-marshalers.list:31) */
-static void
-ggg__BOOLEAN__BOOLEAN (GClosure     *closure,
-                       GValue       *return_value G_GNUC_UNUSED,
-                       guint         n_param_values,
-                       const GValue *param_values,
-                       gpointer      invocation_hint G_GNUC_UNUSED,
-                       gpointer      marshal_data)
-{
-  typedef gboolean (*GMarshalFunc_BOOLEAN__BOOLEAN) (gpointer     data1,
-                                                     gboolean     arg_1,
-                                                     gpointer     data2);
-  register GMarshalFunc_BOOLEAN__BOOLEAN callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-  gboolean v_return;
-
-  g_return_if_fail (return_value != NULL);
-  g_return_if_fail (n_param_values == 2);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-  callback = (GMarshalFunc_BOOLEAN__BOOLEAN) (marshal_data ? marshal_data : cc->callback);
-
-  v_return = callback (data1,
-                       g_marshal_value_peek_boolean (param_values + 1),
-                       data2);
-
-  g_value_set_boolean (return_value, v_return);
-}
-
-/* BOOLEAN:INT (gnm-marshalers.list:32) */
-static void
-ggg__BOOLEAN__INT (GClosure     *closure,
-                   GValue       *return_value G_GNUC_UNUSED,
-                   guint         n_param_values,
-                   const GValue *param_values,
-                   gpointer      invocation_hint G_GNUC_UNUSED,
-                   gpointer      marshal_data)
-{
-  typedef gboolean (*GMarshalFunc_BOOLEAN__INT) (gpointer     data1,
-                                                 gint         arg_1,
-                                                 gpointer     data2);
-  register GMarshalFunc_BOOLEAN__INT callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-  gboolean v_return;
-
-  g_return_if_fail (return_value != NULL);
-  g_return_if_fail (n_param_values == 2);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-  callback = (GMarshalFunc_BOOLEAN__INT) (marshal_data ? marshal_data : cc->callback);
-
-  v_return = callback (data1,
-                       g_marshal_value_peek_int (param_values + 1),
-                       data2);
-
-  g_value_set_boolean (return_value, v_return);
-}
-
-/* VOID:ENUM (gnm-marshalers.list:33) */
-
-/* BOOLEAN:ENUM,BOOLEAN (gnm-marshalers.list:34) */
-static void
-ggg__BOOLEAN__ENUM_BOOLEAN (GClosure     *closure,
-                            GValue       *return_value G_GNUC_UNUSED,
-                            guint         n_param_values,
-                            const GValue *param_values,
-                            gpointer      invocation_hint G_GNUC_UNUSED,
-                            gpointer      marshal_data)
-{
-  typedef gboolean (*GMarshalFunc_BOOLEAN__ENUM_BOOLEAN) (gpointer     data1,
-                                                          gint         arg_1,
-                                                          gboolean     arg_2,
-                                                          gpointer     data2);
-  register GMarshalFunc_BOOLEAN__ENUM_BOOLEAN callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-  gboolean v_return;
-
-  g_return_if_fail (return_value != NULL);
-  g_return_if_fail (n_param_values == 3);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-  callback = (GMarshalFunc_BOOLEAN__ENUM_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
-
-  v_return = callback (data1,
-                       g_marshal_value_peek_enum (param_values + 1),
-                       g_marshal_value_peek_boolean (param_values + 2),
-                       data2);
-
-  g_value_set_boolean (return_value, v_return);
-}
-
-/* VOID:OBJECT,UINT (gnm-marshalers.list:35) */
-static void
-ggg__VOID__OBJECT_UINT (GClosure     *closure,
-                        GValue       *return_value G_GNUC_UNUSED,
-                        guint         n_param_values,
-                        const GValue *param_values,
-                        gpointer      invocation_hint G_GNUC_UNUSED,
-                        gpointer      marshal_data)
-{
-  typedef void (*GMarshalFunc_VOID__OBJECT_UINT) (gpointer     data1,
-                                                  gpointer     arg_1,
-                                                  guint        arg_2,
-                                                  gpointer     data2);
-  register GMarshalFunc_VOID__OBJECT_UINT callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-
-  g_return_if_fail (n_param_values == 3);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-  callback = (GMarshalFunc_VOID__OBJECT_UINT) (marshal_data ? marshal_data : cc->callback);
-
-  callback (data1,
-            g_marshal_value_peek_object (param_values + 1),
-            g_marshal_value_peek_uint (param_values + 2),
-            data2);
-}
-
-/* OBJECT:OBJECT,INT,INT (gnm-marshalers.list:36) */
-static void
-ggg__OBJECT__OBJECT_INT_INT (GClosure     *closure,
-                             GValue       *return_value G_GNUC_UNUSED,
-                             guint         n_param_values,
-                             const GValue *param_values,
-                             gpointer      invocation_hint G_GNUC_UNUSED,
-                             gpointer      marshal_data)
-{
-  typedef GObject* (*GMarshalFunc_OBJECT__OBJECT_INT_INT) (gpointer     data1,
-                                                           gpointer     arg_1,
-                                                           gint         arg_2,
-                                                           gint         arg_3,
-                                                           gpointer     data2);
-  register GMarshalFunc_OBJECT__OBJECT_INT_INT callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-  GObject* v_return;
-
-  g_return_if_fail (return_value != NULL);
-  g_return_if_fail (n_param_values == 4);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-  callback = (GMarshalFunc_OBJECT__OBJECT_INT_INT) (marshal_data ? marshal_data : cc->callback);
-
-  v_return = callback (data1,
-                       g_marshal_value_peek_object (param_values + 1),
-                       g_marshal_value_peek_int (param_values + 2),
-                       g_marshal_value_peek_int (param_values + 3),
-                       data2);
-
-  g_value_take_object (return_value, v_return);
-}
-
-/* VOID:ENUM (gnm-marshalers.list:29) */
-#define ggg__VOID__ENUM	g_cclosure_marshal_VOID__ENUM
-
-
-/* ========================================================================= */
-/* More or less a copy og gtknotebook.h */
-
-/* -*- Mode: C; c-file-style: "gnu"; tab-width: 8 -*- */
-/* GTK - The GIMP Toolkit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
- * file for a list of people on the GTK+ Team.  See the ChangeLog
- * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
- */
-
-#ifndef __GGG_NOTEBOOK_H__
-#define __GGG_NOTEBOOK_H__
-
-
-#include <gdk/gdk.h>
-
-G_BEGIN_DECLS
-
-#define GGG_TYPE_NOTEBOOK                  (ggg_notebook_get_type ())
-#define GGG_NOTEBOOK(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GGG_TYPE_NOTEBOOK, GggNotebook))
-#define GGG_NOTEBOOK_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), GGG_TYPE_NOTEBOOK, GggNotebookClass))
-#define GGG_IS_NOTEBOOK(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GGG_TYPE_NOTEBOOK))
-#define GGG_IS_NOTEBOOK_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), GGG_TYPE_NOTEBOOK))
-#define GGG_NOTEBOOK_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GGG_TYPE_NOTEBOOK, GggNotebookClass))
-
-
-typedef enum
-{
-  GGG_NOTEBOOK_TAB_FIRST,
-  GGG_NOTEBOOK_TAB_LAST
-} GggNotebookTab;
-
-typedef struct _GggNotebook       GggNotebook;
-typedef struct _GggNotebookClass  GggNotebookClass;
-typedef struct _GggNotebookPage   GggNotebookPage;
-
-struct _GggNotebook
-{
-  GtkContainer container;
-
-  GggNotebookPage *cur_page;
-  GList *children;
-  GList *first_tab;		/* The first tab visible (for scrolling notebooks) */
-  GList *focus_tab;
-
-  GtkWidget *menu;
-  GdkWindow *event_window;
-
-  guint32 timer;
-
-  guint16 tab_hborder;
-  guint16 tab_vborder;
-
-  guint show_tabs          : 1;
-  guint homogeneous        : 1;
-  guint show_border        : 1;
-  guint tab_pos            : 2;
-  guint scrollable         : 1;
-  guint in_child           : 3;
-  guint click_child        : 3;
-  guint button             : 2;
-  guint need_timer         : 1;
-  guint child_has_focus    : 1;
-  guint have_visible_child : 1;
-  guint focus_out          : 1;	/* Flag used by ::move-focus-out implementation */
-
-  guint has_before_previous : 1;
-  guint has_before_next     : 1;
-  guint has_after_previous  : 1;
-  guint has_after_next      : 1;
-};
-
-struct _GggNotebookClass
-{
-  GtkContainerClass parent_class;
-
-  void (* switch_page)       (GggNotebook     *notebook,
-                              GggNotebookPage *page,
-			      guint            page_num);
-
-  /* Action signals for keybindings */
-  gboolean (* select_page)     (GggNotebook       *notebook,
-                                gboolean           move_focus);
-  gboolean (* focus_tab)       (GggNotebook       *notebook,
-                                GggNotebookTab     type);
-  gboolean (* change_current_page) (GggNotebook   *notebook,
-                                gint               offset);
-  void (* move_focus_out)      (GggNotebook       *notebook,
-				GtkDirectionType   direction);
-  gboolean (* reorder_tab)     (GggNotebook       *notebook,
-				GtkDirectionType   direction,
-				gboolean           move_to_last);
-
-  /* More vfuncs */
-  gint (* insert_page)         (GggNotebook       *notebook,
-			        GtkWidget         *child,
-				GtkWidget         *tab_label,
-				GtkWidget         *menu_label,
-				gint               position);
-
-  GggNotebook * (* create_window) (GggNotebook       *notebook,
-                                   GtkWidget         *page,
-                                   gint               x,
-                                   gint               y);
-
-  void (*_gtk_reserved1) (void);
-};
-
-typedef GggNotebook* (*GggNotebookWindowCreationFunc) (GggNotebook *source,
-                                                       GtkWidget   *page,
-                                                       gint         x,
-                                                       gint         y,
-                                                       gpointer     data);
-
-/***********************************************************
- *           Creation, insertion, deletion                 *
- ***********************************************************/
-
-GType   ggg_notebook_get_type       (void) G_GNUC_CONST;
-GtkWidget * ggg_notebook_new        (void);
-gint ggg_notebook_append_page       (GggNotebook *notebook,
-				     GtkWidget   *child,
-				     GtkWidget   *tab_label);
-gint ggg_notebook_append_page_menu  (GggNotebook *notebook,
-				     GtkWidget   *child,
-				     GtkWidget   *tab_label,
-				     GtkWidget   *menu_label);
-gint ggg_notebook_prepend_page      (GggNotebook *notebook,
-				     GtkWidget   *child,
-				     GtkWidget   *tab_label);
-gint ggg_notebook_prepend_page_menu (GggNotebook *notebook,
-				     GtkWidget   *child,
-				     GtkWidget   *tab_label,
-				     GtkWidget   *menu_label);
-gint ggg_notebook_insert_page       (GggNotebook *notebook,
-				     GtkWidget   *child,
-				     GtkWidget   *tab_label,
-				     gint         position);
-gint ggg_notebook_insert_page_menu  (GggNotebook *notebook,
-				     GtkWidget   *child,
-				     GtkWidget   *tab_label,
-				     GtkWidget   *menu_label,
-				     gint         position);
-void ggg_notebook_remove_page       (GggNotebook *notebook,
-				     gint         page_num);
-
-/***********************************************************
- *           Tabs drag and drop                            *
- ***********************************************************/
-
-void ggg_notebook_set_window_creation_hook (GggNotebookWindowCreationFunc  func,
-					    gpointer                       data,
-                                            GDestroyNotify                 destroy);
-#if 1
-void ggg_notebook_set_group_id             (GggNotebook *notebook,
-					    gint         group_id);
-gint ggg_notebook_get_group_id             (GggNotebook *notebook);
-
-#endif /* GTK_DISABLE_DEPRECATED */
-
-void ggg_notebook_set_group                (GggNotebook *notebook,
-					    gpointer     group);
-gpointer ggg_notebook_get_group            (GggNotebook *notebook);
-
-
-
-/***********************************************************
- *            query, set current NotebookPage              *
- ***********************************************************/
-
-gint       ggg_notebook_get_current_page (GggNotebook *notebook);
-GtkWidget* ggg_notebook_get_nth_page     (GggNotebook *notebook,
-					  gint         page_num);
-gint       ggg_notebook_get_n_pages      (GggNotebook *notebook);
-gint       ggg_notebook_page_num         (GggNotebook *notebook,
-					  GtkWidget   *child);
-void       ggg_notebook_set_current_page (GggNotebook *notebook,
-					  gint         page_num);
-void       ggg_notebook_next_page        (GggNotebook *notebook);
-void       ggg_notebook_prev_page        (GggNotebook *notebook);
-
-/***********************************************************
- *            set Notebook, NotebookTab style              *
- ***********************************************************/
-
-void     ggg_notebook_set_show_border      (GggNotebook     *notebook,
-					    gboolean         show_border);
-gboolean ggg_notebook_get_show_border      (GggNotebook     *notebook);
-void     ggg_notebook_set_show_tabs        (GggNotebook     *notebook,
-					    gboolean         show_tabs);
-gboolean ggg_notebook_get_show_tabs        (GggNotebook     *notebook);
-void     ggg_notebook_set_tab_pos          (GggNotebook     *notebook,
-				            GtkPositionType  pos);
-GtkPositionType ggg_notebook_get_tab_pos   (GggNotebook     *notebook);
-
-#if 1
-void     ggg_notebook_set_homogeneous_tabs (GggNotebook     *notebook,
-					    gboolean         homogeneous);
-void     ggg_notebook_set_tab_border       (GggNotebook     *notebook,
-					    guint            border_width);
-void     ggg_notebook_set_tab_hborder      (GggNotebook     *notebook,
-					    guint            tab_hborder);
-void     ggg_notebook_set_tab_vborder      (GggNotebook     *notebook,
-					    guint            tab_vborder);
-#endif /* GTK_DISABLE_DEPRECATED */
-
-void     ggg_notebook_set_scrollable       (GggNotebook     *notebook,
-					    gboolean         scrollable);
-gboolean ggg_notebook_get_scrollable       (GggNotebook     *notebook);
-
-/***********************************************************
- *               enable/disable PopupMenu                  *
- ***********************************************************/
-
-void ggg_notebook_popup_enable  (GggNotebook *notebook);
-void ggg_notebook_popup_disable (GggNotebook *notebook);
-
-/***********************************************************
- *             query/set NotebookPage Properties           *
- ***********************************************************/
-
-GtkWidget * ggg_notebook_get_tab_label    (GggNotebook *notebook,
-					   GtkWidget   *child);
-void ggg_notebook_set_tab_label           (GggNotebook *notebook,
-					   GtkWidget   *child,
-					   GtkWidget   *tab_label);
-void ggg_notebook_set_tab_label_text      (GggNotebook *notebook,
-					   GtkWidget   *child,
-					   const gchar *tab_text);
-G_CONST_RETURN gchar *ggg_notebook_get_tab_label_text (GggNotebook *notebook,
-						       GtkWidget   *child);
-GtkWidget * ggg_notebook_get_menu_label   (GggNotebook *notebook,
-					   GtkWidget   *child);
-void ggg_notebook_set_menu_label          (GggNotebook *notebook,
-					   GtkWidget   *child,
-					   GtkWidget   *menu_label);
-void ggg_notebook_set_menu_label_text     (GggNotebook *notebook,
-					   GtkWidget   *child,
-					   const gchar *menu_text);
-G_CONST_RETURN gchar *ggg_notebook_get_menu_label_text (GggNotebook *notebook,
-							GtkWidget   *child);
-void ggg_notebook_query_tab_label_packing (GggNotebook *notebook,
-					   GtkWidget   *child,
-					   gboolean    *expand,
-					   gboolean    *fill,
-					   GtkPackType *pack_type);
-void ggg_notebook_set_tab_label_packing   (GggNotebook *notebook,
-					   GtkWidget   *child,
-					   gboolean     expand,
-					   gboolean     fill,
-					   GtkPackType  pack_type);
-void ggg_notebook_reorder_child           (GggNotebook *notebook,
-					   GtkWidget   *child,
-					   gint         position);
-gboolean ggg_notebook_get_tab_reorderable (GggNotebook *notebook,
-					   GtkWidget   *child);
-void ggg_notebook_set_tab_reorderable     (GggNotebook *notebook,
-					   GtkWidget   *child,
-					   gboolean     reorderable);
-gboolean ggg_notebook_get_tab_detachable  (GggNotebook *notebook,
-					   GtkWidget   *child);
-void ggg_notebook_set_tab_detachable      (GggNotebook *notebook,
-					   GtkWidget   *child,
-					   gboolean     detachable);
-
-#if 1
-#define	ggg_notebook_current_page               ggg_notebook_get_current_page
-#define ggg_notebook_set_page                   ggg_notebook_set_current_page
-#endif /* GTK_DISABLE_DEPRECATED */
-
-G_END_DECLS
-
-#endif /* __GGG_NOTEBOOK_H__ */
-
-/* ========================================================================= */
-/* More or less a copy og gtknotebook.c */
-
-/* -*- Mode: C; c-file-style: "gnu"; tab-width: 8 -*- */
-/* GTK - The GIMP Toolkit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
- * file for a list of people on the GTK+ Team.  See the ChangeLog
- * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
- */
-
-#include <gnumeric-config.h>
-#include <gnumeric.h>
-#include <gtk/gtk.h>
-#include <glib/gi18n-lib.h>
-#include <string.h>
-#include <gdk/gdkkeysyms.h>
-#include <stdio.h>
-
-#define SCROLL_DELAY_FACTOR   5
-#define SCROLL_THRESHOLD      12
-#define DND_THRESHOLD_MULTIPLIER 4
-#define FRAMES_PER_SECOND     45
-#define MSECS_BETWEEN_UPDATES (1000 / FRAMES_PER_SECOND)
-
-enum {
-  SWITCH_PAGE,
-  FOCUS_TAB,
-  SELECT_PAGE,
-  CHANGE_CURRENT_PAGE,
-  MOVE_FOCUS_OUT,
-  REORDER_TAB,
-  PAGE_REORDERED,
-  PAGE_REMOVED,
-  PAGE_ADDED,
-  CREATE_WINDOW,
-  LAST_SIGNAL
-};
-
-enum {
-  STEP_PREV,
-  STEP_NEXT
-};
-
-typedef enum
-{
-  ARROW_NONE,
-  ARROW_LEFT_BEFORE,
-  ARROW_RIGHT_BEFORE,
-  ARROW_LEFT_AFTER,
-  ARROW_RIGHT_AFTER
-} GggNotebookArrow;
-
-typedef enum
-{
-  POINTER_BEFORE,
-  POINTER_AFTER,
-  POINTER_BETWEEN
-} GggNotebookPointerPosition;
-
-typedef enum
-{
-  DRAG_OPERATION_NONE,
-  DRAG_OPERATION_REORDER,
-  DRAG_OPERATION_DETACH
-} GggNotebookDragOperation;
-
-#define ARROW_IS_LEFT(arrow)  ((arrow) == ARROW_LEFT_BEFORE || (arrow) == ARROW_LEFT_AFTER)
-#define ARROW_IS_BEFORE(arrow) ((arrow) == ARROW_LEFT_BEFORE || (arrow) == ARROW_RIGHT_BEFORE)
-
-enum {
-  PROP_0,
-  PROP_TAB_POS,
-  PROP_SHOW_TABS,
-  PROP_SHOW_BORDER,
-  PROP_SCROLLABLE,
-  PROP_TAB_BORDER,
-  PROP_TAB_HBORDER,
-  PROP_TAB_VBORDER,
-  PROP_PAGE,
-  PROP_ENABLE_POPUP,
-  PROP_GROUP_ID,
-  PROP_GROUP,
-  PROP_HOMOGENEOUS
-};
-
-enum {
-  CHILD_PROP_0,
-  CHILD_PROP_TAB_LABEL,
-  CHILD_PROP_MENU_LABEL,
-  CHILD_PROP_POSITION,
-  CHILD_PROP_TAB_EXPAND,
-  CHILD_PROP_TAB_FILL,
-  CHILD_PROP_TAB_PACK,
-  CHILD_PROP_REORDERABLE,
-  CHILD_PROP_DETACHABLE
-};
-
-#define GGG_NOTEBOOK_PAGE(_glist_)         ((GggNotebookPage *)((GList *)(_glist_))->data)
-
-/* some useful defines for calculating coords */
-#define PAGE_LEFT_X(_page_)   (((GggNotebookPage *) (_page_))->allocation.x)
-#define PAGE_RIGHT_X(_page_)  (((GggNotebookPage *) (_page_))->allocation.x + ((GggNotebookPage *) (_page_))->allocation.width)
-#define PAGE_MIDDLE_X(_page_) (((GggNotebookPage *) (_page_))->allocation.x + ((GggNotebookPage *) (_page_))->allocation.width / 2)
-#define PAGE_TOP_Y(_page_)    (((GggNotebookPage *) (_page_))->allocation.y)
-#define PAGE_BOTTOM_Y(_page_) (((GggNotebookPage *) (_page_))->allocation.y + ((GggNotebookPage *) (_page_))->allocation.height)
-#define PAGE_MIDDLE_Y(_page_) (((GggNotebookPage *) (_page_))->allocation.y + ((GggNotebookPage *) (_page_))->allocation.height / 2)
-#define NOTEBOOK_IS_TAB_LABEL_PARENT(_notebook_,_page_) (((GggNotebookPage *) (_page_))->tab_label->parent == ((GtkWidget *) (_notebook_)))
-
-struct _GggNotebookPage
-{
-  GtkWidget *child;
-  GtkWidget *tab_label;
-  GtkWidget *menu_label;
-  GtkWidget *last_focus_child;	/* Last descendant of the page that had focus */
-
-  guint default_menu : 1;	/* If true, we create the menu label ourself */
-  guint default_tab  : 1;	/* If true, we create the tab label ourself */
-  guint expand       : 1;
-  guint fill         : 1;
-  guint pack         : 1;
-  guint reorderable  : 1;
-  guint detachable   : 1;
-
-  GtkRequisition requisition;
-  GtkAllocation allocation;
-
-  gulong mnemonic_activate_signal;
-  gulong notify_visible_handler;
-};
-
-#define GGG_NOTEBOOK_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GGG_TYPE_NOTEBOOK, GggNotebookPrivate))
-
-typedef struct _GggNotebookPrivate GggNotebookPrivate;
-
-struct _GggNotebookPrivate
-{
-  gpointer group;
-  gint  mouse_x;
-  gint  mouse_y;
-  gint  pressed_button;
-  guint dnd_timer;
-  guint switch_tab_timer;
-
-  gint  drag_begin_x;
-  gint  drag_begin_y;
-
-  gint  drag_offset_x;
-  gint  drag_offset_y;
-
-  GtkWidget *dnd_window;
-  GtkTargetList *source_targets;
-  GggNotebookDragOperation operation;
-  GdkWindow *drag_window;
-  gint drag_window_x;
-  gint drag_window_y;
-  GggNotebookPage *detached_tab;
-
-  guint32 timestamp;
-
-  guint during_reorder : 1;
-  guint during_detach  : 1;
-  guint has_scrolled   : 1;
-};
-
-static const GtkTargetEntry notebook_targets [] = {
-  { (char *)"GGG_NOTEBOOK_TAB", GTK_TARGET_SAME_APP, 0 },
-};
-
-#ifdef G_DISABLE_CHECKS
-#define CHECK_FIND_CHILD(notebook, child)                           \
- ggg_notebook_find_child (notebook, child, G_STRLOC)
-#else
-#define CHECK_FIND_CHILD(notebook, child)                           \
- ggg_notebook_find_child (notebook, child, NULL)
-#endif
-
-/*** GggNotebook Methods ***/
-static gboolean ggg_notebook_select_page         (GggNotebook      *notebook,
-						  gboolean          move_focus);
-static gboolean ggg_notebook_focus_tab           (GggNotebook      *notebook,
-						  GggNotebookTab    type);
-static gboolean ggg_notebook_change_current_page (GggNotebook      *notebook,
-						  gint              offset);
-static void     ggg_notebook_move_focus_out      (GggNotebook      *notebook,
-						  GtkDirectionType  direction_type);
-static gboolean ggg_notebook_reorder_tab         (GggNotebook      *notebook,
-						  GtkDirectionType  direction_type,
-						  gboolean          move_to_last);
-static void     ggg_notebook_remove_tab_label    (GggNotebook      *notebook,
-						  GggNotebookPage  *page);
-
-/*** GtkObject Methods ***/
-static void ggg_notebook_destroy             (GtkObject        *object);
-static void ggg_notebook_set_property	     (GObject         *object,
-					      guint            prop_id,
-					      const GValue    *value,
-					      GParamSpec      *pspec);
-static void ggg_notebook_get_property	     (GObject         *object,
-					      guint            prop_id,
-					      GValue          *value,
-					      GParamSpec      *pspec);
-
-/*** GtkWidget Methods ***/
-static void ggg_notebook_map                 (GtkWidget        *widget);
-static void ggg_notebook_unmap               (GtkWidget        *widget);
-static void ggg_notebook_realize             (GtkWidget        *widget);
-static void ggg_notebook_unrealize           (GtkWidget        *widget);
-static void ggg_notebook_size_request        (GtkWidget        *widget,
-					      GtkRequisition   *requisition);
-static void ggg_notebook_size_allocate       (GtkWidget        *widget,
-					      GtkAllocation    *allocation);
-static gint ggg_notebook_expose              (GtkWidget        *widget,
-					      GdkEventExpose   *event);
-static gboolean ggg_notebook_scroll          (GtkWidget        *widget,
-                                              GdkEventScroll   *event);
-static gint ggg_notebook_button_press        (GtkWidget        *widget,
-					      GdkEventButton   *event);
-static gint ggg_notebook_button_release      (GtkWidget        *widget,
-					      GdkEventButton   *event);
-static gboolean ggg_notebook_popup_menu      (GtkWidget        *widget);
-static gint ggg_notebook_leave_notify        (GtkWidget        *widget,
-					      GdkEventCrossing *event);
-static gint ggg_notebook_motion_notify       (GtkWidget        *widget,
-					      GdkEventMotion   *event);
-static gint ggg_notebook_focus_in            (GtkWidget        *widget,
-					      GdkEventFocus    *event);
-static gint ggg_notebook_focus_out           (GtkWidget        *widget,
-					      GdkEventFocus    *event);
-static void ggg_notebook_grab_notify         (GtkWidget          *widget,
-					      gboolean            was_grabbed);
-static void ggg_notebook_state_changed       (GtkWidget          *widget,
-					      GtkStateType        previous_state);
-static void ggg_notebook_draw_focus          (GtkWidget        *widget,
-					      GdkEventExpose   *event);
-static gint ggg_notebook_focus               (GtkWidget        *widget,
-					      GtkDirectionType  direction);
-static void ggg_notebook_style_set           (GtkWidget        *widget,
-					      GtkStyle         *previous);
-
-/*** Drag and drop Methods ***/
-static void ggg_notebook_drag_begin          (GtkWidget        *widget,
-					      GdkDragContext   *context);
-static void ggg_notebook_drag_end            (GtkWidget        *widget,
-					      GdkDragContext   *context);
-static gboolean ggg_notebook_drag_failed     (GtkWidget        *widget,
-					      GdkDragContext   *context,
-					      GtkDragResult     result,
-					      gpointer          data);
-static gboolean ggg_notebook_drag_motion     (GtkWidget        *widget,
-					      GdkDragContext   *context,
-					      gint              x,
-					      gint              y,
-					      guint             time);
-static void ggg_notebook_drag_leave          (GtkWidget        *widget,
-					      GdkDragContext   *context,
-					      guint             time);
-static gboolean ggg_notebook_drag_drop       (GtkWidget        *widget,
-					      GdkDragContext   *context,
-					      gint              x,
-					      gint              y,
-					      guint             time);
-static void ggg_notebook_drag_data_get       (GtkWidget        *widget,
-					      GdkDragContext   *context,
-					      GtkSelectionData *data,
-					      guint             info,
-					      guint             time);
-static void ggg_notebook_drag_data_received  (GtkWidget        *widget,
-					      GdkDragContext   *context,
-					      gint              x,
-					      gint              y,
-					      GtkSelectionData *data,
-					      guint             info,
-					      guint             time);
-
-/*** GtkContainer Methods ***/
-static void ggg_notebook_set_child_property  (GtkContainer     *container,
-					      GtkWidget        *child,
-					      guint             property_id,
-					      const GValue     *value,
-					      GParamSpec       *pspec);
-static void ggg_notebook_get_child_property  (GtkContainer     *container,
-					      GtkWidget        *child,
-					      guint             property_id,
-					      GValue           *value,
-					      GParamSpec       *pspec);
-static void ggg_notebook_add                 (GtkContainer     *container,
-					      GtkWidget        *widget);
-static void ggg_notebook_remove              (GtkContainer     *container,
-					      GtkWidget        *widget);
-static void ggg_notebook_set_focus_child     (GtkContainer     *container,
-					      GtkWidget        *child);
-static GType ggg_notebook_child_type       (GtkContainer     *container);
-static void ggg_notebook_forall              (GtkContainer     *container,
-					      gboolean		include_internals,
-					      GtkCallback       callback,
-					      gpointer          callback_data);
-
-/*** GggNotebook Methods ***/
-static gint ggg_notebook_real_insert_page    (GggNotebook      *notebook,
-					      GtkWidget        *child,
-					      GtkWidget        *tab_label,
-					      GtkWidget        *menu_label,
-					      gint              position);
-
-static GggNotebook *ggg_notebook_create_window (GggNotebook    *notebook,
-                                                GtkWidget      *page,
-                                                gint            x,
-                                                gint            y);
-
-/*** GggNotebook Private Functions ***/
-static void ggg_notebook_redraw_tabs         (GggNotebook      *notebook);
-static void ggg_notebook_redraw_arrows       (GggNotebook      *notebook);
-static void ggg_notebook_real_remove         (GggNotebook      *notebook,
-					      GList            *list);
-static void ggg_notebook_update_labels       (GggNotebook      *notebook);
-static gint ggg_notebook_timer               (GggNotebook      *notebook);
-static void ggg_notebook_set_scroll_timer    (GggNotebook *notebook);
-static gint ggg_notebook_page_compare        (gconstpointer     a,
-					      gconstpointer     b);
-static GList* ggg_notebook_find_child        (GggNotebook      *notebook,
-					      GtkWidget        *child,
-					      const gchar      *function);
-static gint  ggg_notebook_real_page_position (GggNotebook      *notebook,
-					      GList            *list);
-static GList * ggg_notebook_search_page      (GggNotebook      *notebook,
-					      GList            *list,
-					      gint              direction,
-					      gboolean          find_visible);
-static void  ggg_notebook_child_reordered    (GggNotebook      *notebook,
-			                      GggNotebookPage  *page);
-
-/*** GggNotebook Drawing Functions ***/
-static void ggg_notebook_paint               (GtkWidget        *widget,
-					      GdkRectangle     *area);
-static void ggg_notebook_draw_tab            (GggNotebook      *notebook,
-					      GggNotebookPage  *page,
-					      GdkRectangle     *area);
-static void ggg_notebook_draw_arrow          (GggNotebook      *notebook,
-					      GggNotebookArrow  arrow);
-
-/*** GggNotebook Size Allocate Functions ***/
-static void ggg_notebook_pages_allocate      (GggNotebook      *notebook);
-static void ggg_notebook_page_allocate       (GggNotebook      *notebook,
-					      GggNotebookPage  *page);
-static void ggg_notebook_calc_tabs           (GggNotebook      *notebook,
-			                      GList            *start,
-					      GList           **end,
-					      gint             *tab_space,
-					      guint             direction);
-
-/*** GggNotebook Page Switch Methods ***/
-static void ggg_notebook_real_switch_page    (GggNotebook      *notebook,
-					      GggNotebookPage  *page,
-					      guint             page_num);
-
-/*** GggNotebook Page Switch Functions ***/
-static void ggg_notebook_switch_page         (GggNotebook      *notebook,
-					      GggNotebookPage  *page);
-static gint ggg_notebook_page_select         (GggNotebook      *notebook,
-					      gboolean          move_focus);
-static void ggg_notebook_switch_focus_tab    (GggNotebook      *notebook,
-                                              GList            *new_child);
-static void ggg_notebook_menu_switch_page    (GtkWidget        *widget,
-					      GggNotebookPage  *page);
-
-/*** GggNotebook Menu Functions ***/
-static void ggg_notebook_menu_item_create    (GggNotebook      *notebook,
-					      GList            *list);
-static void ggg_notebook_menu_label_unparent (GtkWidget        *widget,
-					      gpointer          data);
-static void ggg_notebook_menu_detacher       (GtkWidget        *widget,
-					      GtkMenu          *menu);
-
-/*** GggNotebook Private Setters ***/
-static void ggg_notebook_set_homogeneous_tabs_internal (GggNotebook *notebook,
-							gboolean     homogeneous);
-static void ggg_notebook_set_tab_border_internal       (GggNotebook *notebook,
-							guint        border_width);
-static void ggg_notebook_set_tab_hborder_internal      (GggNotebook *notebook,
-							guint        tab_hborder);
-static void ggg_notebook_set_tab_vborder_internal      (GggNotebook *notebook,
-							guint        tab_vborder);
-
-static void ggg_notebook_update_tab_states             (GggNotebook *notebook);
-static gboolean ggg_notebook_mnemonic_activate_switch_page (GtkWidget *child,
-							    gboolean overload,
-							    gpointer data);
-
-static gboolean focus_tabs_in  (GggNotebook      *notebook);
-static gboolean focus_child_in (GggNotebook      *notebook,
-				GtkDirectionType  direction);
-
-static void stop_scrolling (GggNotebook *notebook);
-static void do_detach_tab  (GggNotebook *from,
-			    GggNotebook *to,
-			    GtkWidget   *child,
-			    gint         x,
-			    gint         y);
-
-/* GtkBuildable */
-static void ggg_notebook_buildable_init           (GtkBuildableIface *iface);
-static void ggg_notebook_buildable_add_child      (GtkBuildable *buildable,
-						   GtkBuilder   *builder,
-						   GObject      *child,
-						   const gchar  *type);
-
-static GggNotebookWindowCreationFunc window_creation_hook = NULL;
-static gpointer window_creation_hook_data;
-static GDestroyNotify window_creation_hook_destroy = NULL;
-
-static guint notebook_signals[LAST_SIGNAL] = { 0 };
-
-G_DEFINE_TYPE_WITH_CODE (GggNotebook, ggg_notebook, GTK_TYPE_CONTAINER,
-			 G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
-						ggg_notebook_buildable_init))
-
-static void
-add_tab_bindings (GtkBindingSet    *binding_set,
-		  GdkModifierType   modifiers,
-		  GtkDirectionType  direction)
-{
-  gtk_binding_entry_add_signal (binding_set, GDK_KEY_Tab, modifiers,
-                                "move_focus_out", 1,
-                                GTK_TYPE_DIRECTION_TYPE, direction);
-  gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Tab, modifiers,
-                                "move_focus_out", 1,
-                                GTK_TYPE_DIRECTION_TYPE, direction);
-}
-
-static void
-add_arrow_bindings (GtkBindingSet    *binding_set,
-		    guint             keysym,
-		    GtkDirectionType  direction)
-{
-  guint keypad_keysym = keysym - GDK_KEY_Left + GDK_KEY_KP_Left;
-
-  gtk_binding_entry_add_signal (binding_set, keysym, GDK_CONTROL_MASK,
-                                "move_focus_out", 1,
-                                GTK_TYPE_DIRECTION_TYPE, direction);
-  gtk_binding_entry_add_signal (binding_set, keypad_keysym, GDK_CONTROL_MASK,
-                                "move_focus_out", 1,
-                                GTK_TYPE_DIRECTION_TYPE, direction);
-}
-
-static void
-add_reorder_bindings (GtkBindingSet    *binding_set,
-		      guint             keysym,
-		      GtkDirectionType  direction,
-		      gboolean          move_to_last)
-{
-  guint keypad_keysym = keysym - GDK_KEY_Left + GDK_KEY_KP_Left;
-
-  gtk_binding_entry_add_signal (binding_set, keysym, GDK_MOD1_MASK,
-				"reorder_tab", 2,
-				GTK_TYPE_DIRECTION_TYPE, direction,
-				G_TYPE_BOOLEAN, move_to_last);
-  gtk_binding_entry_add_signal (binding_set, keypad_keysym, GDK_MOD1_MASK,
-				"reorder_tab", 2,
-				GTK_TYPE_DIRECTION_TYPE, direction,
-				G_TYPE_BOOLEAN, move_to_last);
-}
-
-static gboolean
-gtk_object_handled_accumulator (GSignalInvocationHint *ihint,
-                                GValue                *return_accu,
-                                const GValue          *handler_return,
-                                gpointer               dummy)
-{
-  gboolean continue_emission;
-  GObject *object;
-
-  object = g_value_get_object (handler_return);
-  g_value_set_object (return_accu, object);
-  continue_emission = !object;
-
-  return continue_emission;
-}
-
-static void
-ggg_notebook_class_init (GggNotebookClass *class)
-{
-  GObjectClass   *gobject_class = G_OBJECT_CLASS (class);
-  GtkObjectClass *object_class = GTK_OBJECT_CLASS (class);
-  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
-  GtkContainerClass *container_class = GTK_CONTAINER_CLASS (class);
-  GtkBindingSet *binding_set;
-
-  gobject_class->set_property = ggg_notebook_set_property;
-  gobject_class->get_property = ggg_notebook_get_property;
-  object_class->destroy = ggg_notebook_destroy;
-
-  widget_class->map = ggg_notebook_map;
-  widget_class->unmap = ggg_notebook_unmap;
-  widget_class->realize = ggg_notebook_realize;
-  widget_class->unrealize = ggg_notebook_unrealize;
-  widget_class->size_request = ggg_notebook_size_request;
-  widget_class->size_allocate = ggg_notebook_size_allocate;
-  widget_class->expose_event = ggg_notebook_expose;
-  widget_class->scroll_event = ggg_notebook_scroll;
-  widget_class->button_press_event = ggg_notebook_button_press;
-  widget_class->button_release_event = ggg_notebook_button_release;
-  widget_class->popup_menu = ggg_notebook_popup_menu;
-  widget_class->leave_notify_event = ggg_notebook_leave_notify;
-  widget_class->motion_notify_event = ggg_notebook_motion_notify;
-  widget_class->grab_notify = ggg_notebook_grab_notify;
-  widget_class->state_changed = ggg_notebook_state_changed;
-  widget_class->focus_in_event = ggg_notebook_focus_in;
-  widget_class->focus_out_event = ggg_notebook_focus_out;
-  widget_class->focus = ggg_notebook_focus;
-  widget_class->style_set = ggg_notebook_style_set;
-  widget_class->drag_begin = ggg_notebook_drag_begin;
-  widget_class->drag_end = ggg_notebook_drag_end;
-  widget_class->drag_motion = ggg_notebook_drag_motion;
-  widget_class->drag_leave = ggg_notebook_drag_leave;
-  widget_class->drag_drop = ggg_notebook_drag_drop;
-  widget_class->drag_data_get = ggg_notebook_drag_data_get;
-  widget_class->drag_data_received = ggg_notebook_drag_data_received;
-
-  container_class->add = ggg_notebook_add;
-  container_class->remove = ggg_notebook_remove;
-  container_class->forall = ggg_notebook_forall;
-  container_class->set_focus_child = ggg_notebook_set_focus_child;
-  container_class->get_child_property = ggg_notebook_get_child_property;
-  container_class->set_child_property = ggg_notebook_set_child_property;
-  container_class->child_type = ggg_notebook_child_type;
-
-  class->switch_page = ggg_notebook_real_switch_page;
-  class->insert_page = ggg_notebook_real_insert_page;
-
-  class->focus_tab = ggg_notebook_focus_tab;
-  class->select_page = ggg_notebook_select_page;
-  class->change_current_page = ggg_notebook_change_current_page;
-  class->move_focus_out = ggg_notebook_move_focus_out;
-  class->reorder_tab = ggg_notebook_reorder_tab;
-  class->create_window = ggg_notebook_create_window;
-
-  g_object_class_install_property (gobject_class,
-				   PROP_PAGE,
-				   g_param_spec_int ("page",
- 						     _("Page"),
- 						     _("The index of the current page"),
- 						     0,
- 						     G_MAXINT,
- 						     0,
- 						     G_PARAM_READWRITE));
-  g_object_class_install_property (gobject_class,
-				   PROP_TAB_POS,
-				   g_param_spec_enum ("tab-pos",
- 						      _("Tab Position"),
- 						      _("Which side of the notebook holds the tabs"),
- 						      GTK_TYPE_POSITION_TYPE,
- 						      GTK_POS_TOP,
- 						      G_PARAM_READWRITE));
-  g_object_class_install_property (gobject_class,
-				   PROP_TAB_BORDER,
-				   g_param_spec_uint ("tab-border",
- 						      _("Tab Border"),
- 						      _("Width of the border around the tab labels"),
- 						      0,
- 						      G_MAXUINT,
- 						      2,
- 						      G_PARAM_WRITABLE));
-  g_object_class_install_property (gobject_class,
-				   PROP_TAB_HBORDER,
-				   g_param_spec_uint ("tab-hborder",
- 						      _("Horizontal Tab Border"),
- 						      _("Width of the horizontal border of tab labels"),
- 						      0,
- 						      G_MAXUINT,
- 						      2,
- 						      G_PARAM_READWRITE));
-  g_object_class_install_property (gobject_class,
-				   PROP_TAB_VBORDER,
-				   g_param_spec_uint ("tab-vborder",
- 						      _("Vertical Tab Border"),
- 						      _("Width of the vertical border of tab labels"),
- 						      0,
- 						      G_MAXUINT,
- 						      2,
- 						      G_PARAM_READWRITE));
-  g_object_class_install_property (gobject_class,
-				   PROP_SHOW_TABS,
-				   g_param_spec_boolean ("show-tabs",
- 							 _("Show Tabs"),
- 							 _("Whether tabs should be shown or not"),
- 							 TRUE,
- 							 G_PARAM_READWRITE));
-  g_object_class_install_property (gobject_class,
-				   PROP_SHOW_BORDER,
-				   g_param_spec_boolean ("show-border",
- 							 _("Show Border"),
- 							 _("Whether the border should be shown or not"),
- 							 TRUE,
- 							 G_PARAM_READWRITE));
-  g_object_class_install_property (gobject_class,
-				   PROP_SCROLLABLE,
-				   g_param_spec_boolean ("scrollable",
- 							 _("Scrollable"),
- 							 _("If TRUE, scroll arrows are added if there are too many tabs to fit"),
- 							 FALSE,
- 							 G_PARAM_READWRITE));
-  g_object_class_install_property (gobject_class,
-				   PROP_ENABLE_POPUP,
-				   g_param_spec_boolean ("enable-popup",
- 							 _("Enable Popup"),
- 							 _("If TRUE, pressing the right mouse button on the notebook pops up a menu that you can use to go to a page"),
- 							 FALSE,
- 							 G_PARAM_READWRITE));
-  g_object_class_install_property (gobject_class,
-				   PROP_HOMOGENEOUS,
-				   g_param_spec_boolean ("homogeneous",
- 							 _("Homogeneous"),
- 							 _("Whether tabs should have homogeneous sizes"),
- 							 FALSE,
-							 G_PARAM_READWRITE));
-  g_object_class_install_property (gobject_class,
-				   PROP_GROUP_ID,
-				   g_param_spec_int ("group-id",
-						     _("Group ID"),
-						     _("Group ID for tabs drag and drop"),
-						     -1,
-						     G_MAXINT,
-						     -1,
-						     G_PARAM_READWRITE));
-
-  /**
-   * GggNotebook:group:
-   *
-   * Group for tabs drag and drop.
-   *
-   * Since: 2.12
-   */
-  g_object_class_install_property (gobject_class,
-				   PROP_GROUP,
-				   g_param_spec_pointer ("group",
-							 _("Group"),
-							 _("Group for tabs drag and drop"),
-							 G_PARAM_READWRITE));
-
-  gtk_container_class_install_child_property (container_class,
-					      CHILD_PROP_TAB_LABEL,
-					      g_param_spec_string ("tab-label",
-								   _("Tab label"),
-								   _("The string displayed on the child's tab label"),
-								   NULL,
-								   G_PARAM_READWRITE));
-  gtk_container_class_install_child_property (container_class,
-					      CHILD_PROP_MENU_LABEL,
-					      g_param_spec_string ("menu-label",
-								   _("Menu label"),
-								   _("The string displayed in the child's menu entry"),
-								   NULL,
-								   G_PARAM_READWRITE));
-  gtk_container_class_install_child_property (container_class,
-					      CHILD_PROP_POSITION,
-					      g_param_spec_int ("position",
-								_("Position"),
-								_("The index of the child in the parent"),
-								-1, G_MAXINT, 0,
-								G_PARAM_READWRITE));
-  gtk_container_class_install_child_property (container_class,
-					      CHILD_PROP_TAB_EXPAND,
-					      g_param_spec_boolean ("tab-expand",
-								    _("Tab expand"),
-								    _("Whether to expand the child's tab or not"),
-								    FALSE,
-								    G_PARAM_READWRITE));
-  gtk_container_class_install_child_property (container_class,
-					      CHILD_PROP_TAB_FILL,
-					      g_param_spec_boolean ("tab-fill",
-								    _("Tab fill"),
-								    _("Whether the child's tab should fill the allocated area or not"),
-								    TRUE,
-								    G_PARAM_READWRITE));
-  gtk_container_class_install_child_property (container_class,
-					      CHILD_PROP_TAB_PACK,
-					      g_param_spec_enum ("tab-pack",
-								 _("Tab pack type"),
-								 _("A GtkPackType indicating whether the child is packed with reference to the start or end of the parent"),
-								 GTK_TYPE_PACK_TYPE, GTK_PACK_START,
-								 G_PARAM_READWRITE));
-  gtk_container_class_install_child_property (container_class,
-					      CHILD_PROP_REORDERABLE,
-					      g_param_spec_boolean ("reorderable",
-								    _("Tab reorderable"),
-								    _("Whether the tab is reorderable by user action or not"),
-								    FALSE,
-								    G_PARAM_READWRITE));
-  gtk_container_class_install_child_property (container_class,
-					      CHILD_PROP_DETACHABLE,
-					      g_param_spec_boolean ("detachable",
-								    _("Tab detachable"),
-								    _("Whether the tab is detachable"),
-								    FALSE,
-								    G_PARAM_READWRITE));
-
-/**
- * GggNotebook:has-secondary-backward-stepper:
- *
- * The "has-secondary-backward-stepper" property determines whether
- * a second backward arrow button is displayed on the opposite end
- * of the tab area.
- *
- * Since: 2.4
- */
-  gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_boolean ("has-secondary-backward-stepper",
-								 _("Secondary backward stepper"),
-								 _("Display a second backward arrow button on the opposite end of the tab area"),
-								 FALSE,
-								 G_PARAM_READABLE));
-
-/**
- * GggNotebook:has-secondary-forward-stepper:
- *
- * The "has-secondary-forward-stepper" property determines whether
- * a second forward arrow button is displayed on the opposite end
- * of the tab area.
- *
- * Since: 2.4
- */
-  gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_boolean ("has-secondary-forward-stepper",
-								 _("Secondary forward stepper"),
-								 _("Display a second forward arrow button on the opposite end of the tab area"),
-								 FALSE,
-								 G_PARAM_READABLE));
-
-/**
- * GggNotebook:has-backward-stepper:
- *
- * The "has-backward-stepper" property determines whether
- * the standard backward arrow button is displayed.
- *
- * Since: 2.4
- */
-  gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_boolean ("has-backward-stepper",
-								 _("Backward stepper"),
-								 _("Display the standard backward arrow button"),
-								 TRUE,
-								 G_PARAM_READABLE));
-
-/**
- * GggNotebook:has-forward-stepper:
- *
- * The "has-forward-stepper" property determines whether
- * the standard forward arrow button is displayed.
- *
- * Since: 2.4
- */
-  gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_boolean ("has-forward-stepper",
-								 _("Forward stepper"),
-								 _("Display the standard forward arrow button"),
-								 TRUE,
-								 G_PARAM_READABLE));
-
-/**
- * GggNotebook:tab-overlap:
- *
- * The "tab-overlap" property defines size of tab overlap
- * area.
- *
- * Since: 2.10
- */
-  gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("tab-overlap",
-							     _("Tab overlap"),
-							     _("Size of tab overlap area"),
-							     G_MININT,
-							     G_MAXINT,
-							     2,
-							     G_PARAM_READABLE));
-
-/**
- * GggNotebook:tab-curvature:
- *
- * The "tab-curvature" property defines size of tab curvature.
- *
- * Since: 2.10
- */
-  gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("tab-curvature",
-							     _("Tab curvature"),
-							     _("Size of tab curvature"),
-							     0,
-							     G_MAXINT,
-							     1,
-							     G_PARAM_READABLE));
-
-  /**
-   * GggNotebook:arrow-spacing:
-   *
-   * The "arrow-spacing" property defines the spacing between the scroll
-   * arrows and the tabs.
-   *
-   * Since: 2.10
-   */
-  gtk_widget_class_install_style_property (widget_class,
-                                           g_param_spec_int ("arrow-spacing",
-                                                             _("Arrow spacing"),
-                                                             _("Scroll arrow spacing"),
-                                                             0,
-                                                             G_MAXINT,
-                                                             0,
-                                                             G_PARAM_READABLE));
-
-  notebook_signals[SWITCH_PAGE] =
-    g_signal_new (I_("switch_page"),
-		  G_TYPE_FROM_CLASS (gobject_class),
-		  G_SIGNAL_RUN_LAST,
-		  G_STRUCT_OFFSET (GggNotebookClass, switch_page),
-		  NULL, NULL,
-		  ggg__VOID__POINTER_UINT,
-		  G_TYPE_NONE, 2,
-		  G_TYPE_POINTER,
-		  G_TYPE_UINT);
-  notebook_signals[FOCUS_TAB] =
-    g_signal_new (I_("focus_tab"),
-                  G_TYPE_FROM_CLASS (gobject_class),
-                  G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
-                  G_STRUCT_OFFSET (GggNotebookClass, focus_tab),
-                  NULL, NULL,
-                  ggg__BOOLEAN__ENUM,
-                  G_TYPE_BOOLEAN, 1,
-                  GTK_TYPE_NOTEBOOK_TAB);
-  notebook_signals[SELECT_PAGE] =
-    g_signal_new (I_("select_page"),
-                  G_TYPE_FROM_CLASS (gobject_class),
-                  G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
-                  G_STRUCT_OFFSET (GggNotebookClass, select_page),
-                  NULL, NULL,
-                  ggg__BOOLEAN__BOOLEAN,
-                  G_TYPE_BOOLEAN, 1,
-                  G_TYPE_BOOLEAN);
-  notebook_signals[CHANGE_CURRENT_PAGE] =
-    g_signal_new (I_("change_current_page"),
-                  G_TYPE_FROM_CLASS (gobject_class),
-                  G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
-                  G_STRUCT_OFFSET (GggNotebookClass, change_current_page),
-                  NULL, NULL,
-                  ggg__BOOLEAN__INT,
-                  G_TYPE_BOOLEAN, 1,
-                  G_TYPE_INT);
-  notebook_signals[MOVE_FOCUS_OUT] =
-    g_signal_new (I_("move_focus_out"),
-                  G_TYPE_FROM_CLASS (gobject_class),
-                  G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
-                  G_STRUCT_OFFSET (GggNotebookClass, move_focus_out),
-                  NULL, NULL,
-                  ggg__VOID__ENUM,
-                  G_TYPE_NONE, 1,
-                  GTK_TYPE_DIRECTION_TYPE);
-  notebook_signals[REORDER_TAB] =
-    g_signal_new (I_("reorder_tab"),
-                  G_TYPE_FROM_CLASS (gobject_class),
-                  G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
-                  G_STRUCT_OFFSET (GggNotebookClass, reorder_tab),
-                  NULL, NULL,
-                  ggg__BOOLEAN__ENUM_BOOLEAN,
-                  G_TYPE_BOOLEAN, 2,
-                  GTK_TYPE_DIRECTION_TYPE,
-		  G_TYPE_BOOLEAN);
-  /**
-   * GggNotebook::page-reordered:
-   * @notebook: the #GggNotebook
-   * @child: the child #GtkWidget affected
-   * @page_num: the new page number for @child
-   *
-   * the ::page-reordered signal is emitted in the notebook
-   * right after a page has been reordered.
-   *
-   * Since: 2.10
-   **/
-  notebook_signals[PAGE_REORDERED] =
-    g_signal_new (I_("page_reordered"),
-                  G_TYPE_FROM_CLASS (gobject_class),
-                  G_SIGNAL_RUN_LAST,
-                  0, NULL, NULL,
-		  ggg__VOID__OBJECT_UINT,
-                  G_TYPE_NONE, 2,
-		  GTK_TYPE_WIDGET,
-		  G_TYPE_UINT);
-  /**
-   * GggNotebook::page-removed:
-   * @notebook: the #GggNotebook
-   * @child: the child #GtkWidget affected
-   * @page_num: the @child page number
-   *
-   * the ::page-removed signal is emitted in the notebook
-   * right after a page is removed from the notebook.
-   *
-   * Since: 2.10
-   **/
-  notebook_signals[PAGE_REMOVED] =
-    g_signal_new (I_("page_removed"),
-                  G_TYPE_FROM_CLASS (gobject_class),
-                  G_SIGNAL_RUN_LAST,
-                  0, NULL, NULL,
-		  ggg__VOID__OBJECT_UINT,
-                  G_TYPE_NONE, 2,
-		  GTK_TYPE_WIDGET,
-		  G_TYPE_UINT);
-  /**
-   * GggNotebook::page-added:
-   * @notebook: the #GggNotebook
-   * @child: the child #GtkWidget affected
-   * @page_num: the new page number for @child
-   *
-   * the ::page-added signal is emitted in the notebook
-   * right after a page is added to the notebook.
-   *
-   * Since: 2.10
-   **/
-  notebook_signals[PAGE_ADDED] =
-    g_signal_new (I_("page_added"),
-                  G_TYPE_FROM_CLASS (gobject_class),
-                  G_SIGNAL_RUN_LAST,
-                  0, NULL, NULL,
-		  ggg__VOID__OBJECT_UINT,
-                  G_TYPE_NONE, 2,
-		  GTK_TYPE_WIDGET,
-		  G_TYPE_UINT);
-
-  /**
-   * GggNotebook::create-window:
-   * @notebook: the #GggNotebook emitting the signal
-   * @page: the tab of @notebook that is being detached
-   * @x: the X coordinate where the drop happens
-   * @y: the Y coordinate where the drop happens
-   *
-   * The ::create-window signal is emitted when a detachable
-   * tab is dropped on the root window.
-   *
-   * A handler for this signal can create a window containing
-   * a notebook where the tab will be attached. It is also
-   * responsible for moving/resizing the window and adding the
-   * necessary properties to the notebook (e.g. the
-   * #GggNotebook:group-id ).
-   *
-   * The default handler uses the global window creation hook,
-   * if one has been set with ggg_notebook_set_window_creation_hook().
-   *
-   * Returns: a #GggNotebook that @page should be added to, or %NULL.
-   *
-   * Since: 2.12
-   */
-  notebook_signals[CREATE_WINDOW] =
-    g_signal_new (I_("create_window"),
-                  G_TYPE_FROM_CLASS (gobject_class),
-                  G_SIGNAL_RUN_LAST,
-                  G_STRUCT_OFFSET (GggNotebookClass, create_window),
-                  gtk_object_handled_accumulator, NULL,
-                  ggg__OBJECT__OBJECT_INT_INT,
-                  GGG_TYPE_NOTEBOOK, 3,
-                  GTK_TYPE_WIDGET, G_TYPE_INT, G_TYPE_INT);
-
-  binding_set = gtk_binding_set_by_class (class);
-  gtk_binding_entry_add_signal (binding_set,
-                                GDK_KEY_space, 0,
-                                "select_page", 1,
-                                G_TYPE_BOOLEAN, FALSE);
-  gtk_binding_entry_add_signal (binding_set,
-                                GDK_KP_Space, 0,
-                                "select_page", 1,
-                                G_TYPE_BOOLEAN, FALSE);
-
-  gtk_binding_entry_add_signal (binding_set,
-                                GDK_KEY_Home, 0,
-                                "focus_tab", 1,
-                                GTK_TYPE_NOTEBOOK_TAB, GGG_NOTEBOOK_TAB_FIRST);
-  gtk_binding_entry_add_signal (binding_set,
-                                GDK_KEY_KP_Home, 0,
-                                "focus_tab", 1,
-                                GTK_TYPE_NOTEBOOK_TAB, GGG_NOTEBOOK_TAB_FIRST);
-  gtk_binding_entry_add_signal (binding_set,
-                                GDK_KEY_End, 0,
-                                "focus_tab", 1,
-                                GTK_TYPE_NOTEBOOK_TAB, GGG_NOTEBOOK_TAB_LAST);
-  gtk_binding_entry_add_signal (binding_set,
-                                GDK_KEY_KP_End, 0,
-                                "focus_tab", 1,
-                                GTK_TYPE_NOTEBOOK_TAB, GGG_NOTEBOOK_TAB_LAST);
-
-  gtk_binding_entry_add_signal (binding_set,
-                                GDK_KEY_Page_Up, GDK_CONTROL_MASK,
-                                "change_current_page", 1,
-                                G_TYPE_INT, -1);
-  gtk_binding_entry_add_signal (binding_set,
-                                GDK_KEY_Page_Down, GDK_CONTROL_MASK,
-                                "change_current_page", 1,
-                                G_TYPE_INT, 1);
-
-  gtk_binding_entry_add_signal (binding_set,
-                                GDK_KEY_Page_Up, GDK_CONTROL_MASK | GDK_MOD1_MASK,
-                                "change_current_page", 1,
-                                G_TYPE_INT, -1);
-  gtk_binding_entry_add_signal (binding_set,
-                                GDK_KEY_Page_Down, GDK_CONTROL_MASK | GDK_MOD1_MASK,
-                                "change_current_page", 1,
-                                G_TYPE_INT, 1);
-
-  add_arrow_bindings (binding_set, GDK_KEY_Up, GTK_DIR_UP);
-  add_arrow_bindings (binding_set, GDK_KEY_Down, GTK_DIR_DOWN);
-  add_arrow_bindings (binding_set, GDK_KEY_Left, GTK_DIR_LEFT);
-  add_arrow_bindings (binding_set, GDK_KEY_Right, GTK_DIR_RIGHT);
-
-  add_reorder_bindings (binding_set, GDK_KEY_Up, GTK_DIR_UP, FALSE);
-  add_reorder_bindings (binding_set, GDK_KEY_Down, GTK_DIR_DOWN, FALSE);
-  add_reorder_bindings (binding_set, GDK_KEY_Left, GTK_DIR_LEFT, FALSE);
-  add_reorder_bindings (binding_set, GDK_KEY_Right, GTK_DIR_RIGHT, FALSE);
-  add_reorder_bindings (binding_set, GDK_KEY_Home, GTK_DIR_LEFT, TRUE);
-  add_reorder_bindings (binding_set, GDK_KEY_Home, GTK_DIR_UP, TRUE);
-  add_reorder_bindings (binding_set, GDK_KEY_End, GTK_DIR_RIGHT, TRUE);
-  add_reorder_bindings (binding_set, GDK_KEY_End, GTK_DIR_DOWN, TRUE);
-
-  add_tab_bindings (binding_set, GDK_CONTROL_MASK, GTK_DIR_TAB_FORWARD);
-  add_tab_bindings (binding_set, GDK_CONTROL_MASK | GDK_SHIFT_MASK, GTK_DIR_TAB_BACKWARD);
-
-  g_type_class_add_private (class, sizeof (GggNotebookPrivate));
-}
-
-static void
-ggg_notebook_init (GggNotebook *notebook)
-{
-  GggNotebookPrivate *priv;
-
-  GTK_WIDGET_SET_FLAGS (notebook, GTK_CAN_FOCUS);
-  GTK_WIDGET_SET_FLAGS (notebook, GTK_NO_WINDOW);
-
-  priv = GGG_NOTEBOOK_GET_PRIVATE (notebook);
-
-  notebook->cur_page = NULL;
-  notebook->children = NULL;
-  notebook->first_tab = NULL;
-  notebook->focus_tab = NULL;
-  notebook->event_window = NULL;
-  notebook->menu = NULL;
-
-  notebook->tab_hborder = 2;
-  notebook->tab_vborder = 2;
-
-  notebook->show_tabs = TRUE;
-  notebook->show_border = TRUE;
-  notebook->tab_pos = GTK_POS_TOP;
-  notebook->scrollable = FALSE;
-  notebook->in_child = 0;
-  notebook->click_child = 0;
-  notebook->button = 0;
-  notebook->need_timer = 0;
-  notebook->child_has_focus = FALSE;
-  notebook->have_visible_child = FALSE;
-  notebook->focus_out = FALSE;
-
-  notebook->has_before_previous = 1;
-  notebook->has_before_next     = 0;
-  notebook->has_after_previous  = 0;
-  notebook->has_after_next      = 1;
-
-  priv->group = NULL;
-  priv->pressed_button = -1;
-  priv->dnd_timer = 0;
-  priv->switch_tab_timer = 0;
-  priv->source_targets = gtk_target_list_new (notebook_targets,
-					      G_N_ELEMENTS (notebook_targets));
-  priv->operation = DRAG_OPERATION_NONE;
-  priv->detached_tab = NULL;
-  priv->during_detach = FALSE;
-  priv->has_scrolled = FALSE;
-
-  gtk_drag_dest_set (GTK_WIDGET (notebook), 0,
-		     notebook_targets, G_N_ELEMENTS (notebook_targets),
-                     GDK_ACTION_MOVE);
-
-  g_signal_connect (G_OBJECT (notebook), "drag-failed",
-		    G_CALLBACK (ggg_notebook_drag_failed), NULL);
-
-  gtk_drag_dest_set_track_motion (GTK_WIDGET (notebook), TRUE);
-}
-
-static void
-ggg_notebook_buildable_init (GtkBuildableIface *iface)
-{
-  iface->add_child = ggg_notebook_buildable_add_child;
-}
-
-static void
-ggg_notebook_buildable_add_child (GtkBuildable  *buildable,
-				  GtkBuilder    *builder,
-				  GObject       *child,
-				  const gchar   *type)
-{
-  GggNotebook *notebook = GGG_NOTEBOOK (buildable);
-
-  if (type && strcmp (type, "tab") == 0)
-    {
-      GtkWidget * page;
-
-      page = ggg_notebook_get_nth_page (notebook, -1);
-      /* To set the tab label widget, we must have already a child
-       * inside the tab container. */
-      g_assert (page != NULL);
-      ggg_notebook_set_tab_label (notebook, page, GTK_WIDGET (child));
-    }
-  else if (!type)
-    ggg_notebook_append_page (notebook, GTK_WIDGET (child), NULL);
-  else
-    GTK_BUILDER_WARN_INVALID_CHILD_TYPE (notebook, type);
-}
-
-static gboolean
-ggg_notebook_select_page (GggNotebook *notebook,
-                          gboolean     move_focus)
-{
-  if (gtk_widget_is_focus (GTK_WIDGET (notebook)) && notebook->show_tabs)
-    {
-      ggg_notebook_page_select (notebook, move_focus);
-      return TRUE;
-    }
-  else
-    return FALSE;
-}
-
-static gboolean
-ggg_notebook_focus_tab (GggNotebook       *notebook,
-                        GggNotebookTab     type)
-{
-  GList *list;
-
-  if (gtk_widget_is_focus (GTK_WIDGET (notebook)) && notebook->show_tabs)
-    {
-      switch (type)
-	{
-	case GGG_NOTEBOOK_TAB_FIRST:
-	  list = ggg_notebook_search_page (notebook, NULL, STEP_NEXT, TRUE);
-	  if (list)
-	    ggg_notebook_switch_focus_tab (notebook, list);
-	  break;
-	case GGG_NOTEBOOK_TAB_LAST:
-	  list = ggg_notebook_search_page (notebook, NULL, STEP_PREV, TRUE);
-	  if (list)
-	    ggg_notebook_switch_focus_tab (notebook, list);
-	  break;
-	}
-
-      return TRUE;
-    }
-  else
-    return FALSE;
-}
-
-static gboolean
-ggg_notebook_change_current_page (GggNotebook *notebook,
-				  gint         offset)
-{
-  GList *current = NULL;
-
-  if (!notebook->show_tabs)
-    return FALSE;
-
-  if (notebook->cur_page)
-    current = g_list_find (notebook->children, notebook->cur_page);
-
-  while (offset != 0)
-    {
-      current = ggg_notebook_search_page (notebook, current,
-                                          offset < 0 ? STEP_PREV : STEP_NEXT,
-                                          TRUE);
-
-      if (!current)
-        {
-          gboolean wrap_around;
-
-          g_object_get (gtk_widget_get_settings (GTK_WIDGET (notebook)),
-                        "gtk-keynav-wrap-around", &wrap_around,
-                        NULL);
-
-          if (wrap_around)
-            current = ggg_notebook_search_page (notebook, NULL,
-                                                offset < 0 ? STEP_PREV : STEP_NEXT,
-                                                TRUE);
-          else
-            break;
-        }
-
-      offset += offset < 0 ? 1 : -1;
-    }
-
-  if (current)
-    ggg_notebook_switch_page (notebook, current->data);
-  else
-    gtk_widget_error_bell (GTK_WIDGET (notebook));
-
-  return TRUE;
-}
-
-static GtkDirectionType
-get_effective_direction (GggNotebook      *notebook,
-			 GtkDirectionType  direction)
-{
-  /* Remap the directions into the effective direction it would be for a
-   * GTK_POS_TOP notebook
-   */
-
-#define D(rest) GTK_DIR_##rest
-
-  static const GtkDirectionType translate_direction[2][4][6] = {
-    /* LEFT */   {{ D(TAB_FORWARD),  D(TAB_BACKWARD), D(LEFT), D(RIGHT), D(UP),   D(DOWN) },
-    /* RIGHT */  { D(TAB_BACKWARD), D(TAB_FORWARD),  D(LEFT), D(RIGHT), D(DOWN), D(UP)   },
-    /* TOP */    { D(TAB_FORWARD),  D(TAB_BACKWARD), D(UP),   D(DOWN),  D(LEFT), D(RIGHT) },
-    /* BOTTOM */ { D(TAB_BACKWARD), D(TAB_FORWARD),  D(DOWN), D(UP),    D(LEFT), D(RIGHT) }},
-    /* LEFT */  {{ D(TAB_BACKWARD), D(TAB_FORWARD),  D(LEFT), D(RIGHT), D(DOWN), D(UP)   },
-    /* RIGHT */  { D(TAB_FORWARD),  D(TAB_BACKWARD), D(LEFT), D(RIGHT), D(UP),   D(DOWN) },
-    /* TOP */    { D(TAB_FORWARD),  D(TAB_BACKWARD), D(UP),   D(DOWN),  D(RIGHT), D(LEFT) },
-    /* BOTTOM */ { D(TAB_BACKWARD), D(TAB_FORWARD),  D(DOWN), D(UP),    D(RIGHT), D(LEFT) }},
-  };
-
-#undef D
-
-  int text_dir = gtk_widget_get_direction (GTK_WIDGET (notebook)) == GTK_TEXT_DIR_RTL ? 1 : 0;
-
-  return translate_direction[text_dir][notebook->tab_pos][direction];
-}
-
-static gint
-get_effective_tab_pos (GggNotebook *notebook)
-{
-  if (gtk_widget_get_direction (GTK_WIDGET (notebook)) == GTK_TEXT_DIR_RTL)
-    {
-      switch (notebook->tab_pos)
-	{
-	case GTK_POS_LEFT:
-	  return GTK_POS_RIGHT;
-	case GTK_POS_RIGHT:
-	  return GTK_POS_LEFT;
-	default: ;
-	}
-    }
-
-  return notebook->tab_pos;
-}
-
-static gint
-get_tab_gap_pos (GggNotebook *notebook)
-{
-  gint tab_pos = get_effective_tab_pos (notebook);
-  gint gap_side = GTK_POS_BOTTOM;
-
-  switch (tab_pos)
-    {
-    case GTK_POS_TOP:
-      gap_side = GTK_POS_BOTTOM;
-      break;
-    case GTK_POS_BOTTOM:
-      gap_side = GTK_POS_TOP;
-      break;
-    case GTK_POS_LEFT:
-      gap_side = GTK_POS_RIGHT;
-      break;
-    case GTK_POS_RIGHT:
-      gap_side = GTK_POS_LEFT;
-      break;
-    }
-
-  return gap_side;
-}
-
-static void
-ggg_notebook_move_focus_out (GggNotebook      *notebook,
-			     GtkDirectionType  direction_type)
-{
-  GtkDirectionType effective_direction = get_effective_direction (notebook, direction_type);
-  GtkWidget *toplevel;
-
-  if (GTK_CONTAINER (notebook)->focus_child && effective_direction == GTK_DIR_UP)
-    if (focus_tabs_in (notebook))
-      return;
-  if (gtk_widget_is_focus (GTK_WIDGET (notebook)) && effective_direction == GTK_DIR_DOWN)
-    if (focus_child_in (notebook, GTK_DIR_TAB_FORWARD))
-      return;
-
-  /* At this point, we know we should be focusing out of the notebook entirely. We
-   * do this by setting a flag, then propagating the focus motion to the notebook.
-   */
-  toplevel = gtk_widget_get_toplevel (GTK_WIDGET (notebook));
-  if (!GTK_WIDGET_TOPLEVEL (toplevel))
-    return;
-
-  g_object_ref (notebook);
-
-  notebook->focus_out = TRUE;
-  g_signal_emit_by_name (toplevel, "move_focus", direction_type);
-  notebook->focus_out = FALSE;
-
-  g_object_unref (notebook);
-}
-
-static gint
-reorder_tab (GggNotebook *notebook, GList *position, GList *tab)
-{
-  GList *elem;
-
-  if (position == tab)
-    return g_list_position (notebook->children, tab);
-
-  /* check that we aren't inserting the tab in the
-   * same relative position, taking packing into account */
-  elem = (position) ? position->prev : g_list_last (notebook->children);
-
-  while (elem && elem != tab && GGG_NOTEBOOK_PAGE (elem)->pack != GGG_NOTEBOOK_PAGE (tab)->pack)
-    elem = elem->prev;
-
-  if (elem == tab)
-    return g_list_position (notebook->children, tab);
-
-  /* now actually reorder the tab */
-  if (notebook->first_tab == tab)
-    notebook->first_tab = ggg_notebook_search_page (notebook, notebook->first_tab,
-						    STEP_NEXT, TRUE);
-
-  notebook->children = g_list_remove_link (notebook->children, tab);
-
-  if (!position)
-    elem = g_list_last (notebook->children);
-  else
-    {
-      elem = position->prev;
-      position->prev = tab;
-    }
-
-  if (elem)
-    elem->next = tab;
-  else
-    notebook->children = tab;
-
-  tab->prev = elem;
-  tab->next = position;
-
-  return g_list_position (notebook->children, tab);
-}
-
-static gboolean
-ggg_notebook_reorder_tab (GggNotebook      *notebook,
-			  GtkDirectionType  direction_type,
-			  gboolean          move_to_last)
-{
-  GtkDirectionType effective_direction = get_effective_direction (notebook, direction_type);
-  GggNotebookPage *page;
-  GList *last, *child;
-  gint page_num;
-
-  if (!gtk_widget_is_focus (GTK_WIDGET (notebook)) || !notebook->show_tabs)
-    return FALSE;
-
-  if (!notebook->cur_page ||
-      !notebook->cur_page->reorderable)
-    return FALSE;
-
-  if (effective_direction != GTK_DIR_LEFT &&
-      effective_direction != GTK_DIR_RIGHT)
-    return FALSE;
-
-  if (move_to_last)
-    {
-      child = notebook->focus_tab;
-
-      do
-	{
-	  last = child;
-	  child = ggg_notebook_search_page (notebook, last,
-					    (effective_direction == GTK_DIR_RIGHT) ? STEP_NEXT : STEP_PREV,
-					    TRUE);
-	}
-      while (child && GGG_NOTEBOOK_PAGE (last)->pack == GGG_NOTEBOOK_PAGE (child)->pack);
-
-      child = last;
-    }
-  else
-    child = ggg_notebook_search_page (notebook, notebook->focus_tab,
-				      (effective_direction == GTK_DIR_RIGHT) ? STEP_NEXT : STEP_PREV,
-				      TRUE);
-
-  if (!child || child->data == notebook->cur_page)
-    return FALSE;
-
-  page = child->data;
-
-  if (page->pack == notebook->cur_page->pack)
-    {
-      if (effective_direction == GTK_DIR_RIGHT)
-	page_num = reorder_tab (notebook, (page->pack == GTK_PACK_START) ? child->next : child, notebook->focus_tab);
-      else
-	page_num = reorder_tab (notebook, (page->pack == GTK_PACK_START) ? child : child->next, notebook->focus_tab);
-
-      ggg_notebook_pages_allocate (notebook);
-
-      g_signal_emit (notebook,
-		     notebook_signals[PAGE_REORDERED],
-		     0,
-		     ((GggNotebookPage *) notebook->focus_tab->data)->child,
-		     page_num);
-
-      return TRUE;
-    }
-
-  return FALSE;
-}
-
-/**
- * ggg_notebook_new:
- *
- * Creates a new #GggNotebook widget with no pages.
-
- * Return value: the newly created #GggNotebook
- **/
-GtkWidget*
-ggg_notebook_new (void)
-{
-  return g_object_new (GGG_TYPE_NOTEBOOK, NULL);
-}
-
-/* Private GtkObject Methods :
- *
- * ggg_notebook_destroy
- * ggg_notebook_set_arg
- * ggg_notebook_get_arg
- */
-static void
-ggg_notebook_destroy (GtkObject *object)
-{
-  GggNotebook *notebook = GGG_NOTEBOOK (object);
-  GggNotebookPrivate *priv = GGG_NOTEBOOK_GET_PRIVATE (notebook);
-
-  if (notebook->menu)
-    ggg_notebook_popup_disable (notebook);
-
-  if (priv->source_targets)
-    {
-      gtk_target_list_unref (priv->source_targets);
-      priv->source_targets = NULL;
-    }
-
-  if (priv->switch_tab_timer)
-    {
-      g_source_remove (priv->switch_tab_timer);
-      priv->switch_tab_timer = 0;
-    }
-
-  GTK_OBJECT_CLASS (ggg_notebook_parent_class)->destroy (object);
-}
-
-static void
-ggg_notebook_set_property (GObject         *object,
-			   guint            prop_id,
-			   const GValue    *value,
-			   GParamSpec      *pspec)
-{
-  GggNotebook *notebook;
-
-  notebook = GGG_NOTEBOOK (object);
-
-  switch (prop_id)
-    {
-    case PROP_SHOW_TABS:
-      ggg_notebook_set_show_tabs (notebook, g_value_get_boolean (value));
-      break;
-    case PROP_SHOW_BORDER:
-      ggg_notebook_set_show_border (notebook, g_value_get_boolean (value));
-      break;
-    case PROP_SCROLLABLE:
-      ggg_notebook_set_scrollable (notebook, g_value_get_boolean (value));
-      break;
-    case PROP_ENABLE_POPUP:
-      if (g_value_get_boolean (value))
-	ggg_notebook_popup_enable (notebook);
-      else
-	ggg_notebook_popup_disable (notebook);
-      break;
-    case PROP_HOMOGENEOUS:
-      ggg_notebook_set_homogeneous_tabs_internal (notebook, g_value_get_boolean (value));
-      break;
-    case PROP_PAGE:
-      ggg_notebook_set_current_page (notebook, g_value_get_int (value));
-      break;
-    case PROP_TAB_POS:
-      ggg_notebook_set_tab_pos (notebook, g_value_get_enum (value));
-      break;
-    case PROP_TAB_BORDER:
-      ggg_notebook_set_tab_border_internal (notebook, g_value_get_uint (value));
-      break;
-    case PROP_TAB_HBORDER:
-      ggg_notebook_set_tab_hborder_internal (notebook, g_value_get_uint (value));
-      break;
-    case PROP_TAB_VBORDER:
-      ggg_notebook_set_tab_vborder_internal (notebook, g_value_get_uint (value));
-      break;
-    case PROP_GROUP_ID:
-      ggg_notebook_set_group_id (notebook, g_value_get_int (value));
-      break;
-    case PROP_GROUP:
-      ggg_notebook_set_group (notebook, g_value_get_pointer (value));
-      break;
-    default:
-      break;
-    }
-}
-
-static void
-ggg_notebook_get_property (GObject         *object,
-			   guint            prop_id,
-			   GValue          *value,
-			   GParamSpec      *pspec)
-{
-  GggNotebook *notebook;
-  GggNotebookPrivate *priv;
-
-  notebook = GGG_NOTEBOOK (object);
-  priv = GGG_NOTEBOOK_GET_PRIVATE (notebook);
-
-  switch (prop_id)
-    {
-    case PROP_SHOW_TABS:
-      g_value_set_boolean (value, notebook->show_tabs);
-      break;
-    case PROP_SHOW_BORDER:
-      g_value_set_boolean (value, notebook->show_border);
-      break;
-    case PROP_SCROLLABLE:
-      g_value_set_boolean (value, notebook->scrollable);
-      break;
-    case PROP_ENABLE_POPUP:
-      g_value_set_boolean (value, notebook->menu != NULL);
-      break;
-    case PROP_HOMOGENEOUS:
-      g_value_set_boolean (value, notebook->homogeneous);
-      break;
-    case PROP_PAGE:
-      g_value_set_int (value, ggg_notebook_get_current_page (notebook));
-      break;
-    case PROP_TAB_POS:
-      g_value_set_enum (value, notebook->tab_pos);
-      break;
-    case PROP_TAB_HBORDER:
-      g_value_set_uint (value, notebook->tab_hborder);
-      break;
-    case PROP_TAB_VBORDER:
-      g_value_set_uint (value, notebook->tab_vborder);
-      break;
-    case PROP_GROUP_ID:
-      g_value_set_int (value, ggg_notebook_get_group_id (notebook));
-      break;
-    case PROP_GROUP:
-      g_value_set_pointer (value, priv->group);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-    }
-}
-
-/* Private GtkWidget Methods :
- *
- * ggg_notebook_map
- * ggg_notebook_unmap
- * ggg_notebook_realize
- * ggg_notebook_size_request
- * ggg_notebook_size_allocate
- * ggg_notebook_expose
- * ggg_notebook_scroll
- * ggg_notebook_button_press
- * ggg_notebook_button_release
- * ggg_notebook_popup_menu
- * ggg_notebook_leave_notify
- * ggg_notebook_motion_notify
- * ggg_notebook_focus_in
- * ggg_notebook_focus_out
- * ggg_notebook_draw_focus
- * ggg_notebook_style_set
- * ggg_notebook_drag_begin
- * ggg_notebook_drag_end
- * ggg_notebook_drag_failed
- * ggg_notebook_drag_motion
- * ggg_notebook_drag_drop
- * ggg_notebook_drag_data_get
- * ggg_notebook_drag_data_received
- */
-static gboolean
-ggg_notebook_get_event_window_position (GggNotebook  *notebook,
-					GdkRectangle *rectangle)
-{
-  GtkWidget *widget = GTK_WIDGET (notebook);
-  gint border_width = GTK_CONTAINER (notebook)->border_width;
-  GggNotebookPage *visible_page = NULL;
-  GList *tmp_list;
-  gint tab_pos = get_effective_tab_pos (notebook);
-
-  for (tmp_list = notebook->children; tmp_list; tmp_list = tmp_list->next)
-    {
-      GggNotebookPage *page = tmp_list->data;
-      if (GTK_WIDGET_VISIBLE (page->child))
-	{
-	  visible_page = page;
-	  break;
-	}
-    }
-
-  if (notebook->show_tabs && visible_page)
-    {
-      if (rectangle)
-	{
-	  rectangle->x = widget->allocation.x + border_width;
-	  rectangle->y = widget->allocation.y + border_width;
-
-	  switch (tab_pos)
-	    {
-	    case GTK_POS_TOP:
-	    case GTK_POS_BOTTOM:
-	      rectangle->width = widget->allocation.width - 2 * border_width;
-	      rectangle->height = visible_page->requisition.height;
-	      if (tab_pos == GTK_POS_BOTTOM)
-		rectangle->y += widget->allocation.height - 2 * border_width - rectangle->height;
-	      break;
-	    case GTK_POS_LEFT:
-	    case GTK_POS_RIGHT:
-	      rectangle->width = visible_page->requisition.width;
-	      rectangle->height = widget->allocation.height - 2 * border_width;
-	      if (tab_pos == GTK_POS_RIGHT)
-		rectangle->x += widget->allocation.width - 2 * border_width - rectangle->width;
-	      break;
-	    }
-	}
-
-      return TRUE;
-    }
-  else
-    {
-      if (rectangle)
-	{
-	  rectangle->x = rectangle->y = 0;
-	  rectangle->width = rectangle->height = 10;
-	}
-    }
-
-  return FALSE;
-}
-
-static void
-ggg_notebook_map (GtkWidget *widget)
-{
-  GggNotebook *notebook;
-  GggNotebookPage *page;
-  GList *children;
-
-  GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
-
-  notebook = GGG_NOTEBOOK (widget);
-
-  if (notebook->cur_page &&
-      GTK_WIDGET_VISIBLE (notebook->cur_page->child) &&
-      !GTK_WIDGET_MAPPED (notebook->cur_page->child))
-    gtk_widget_map (notebook->cur_page->child);
-
-  if (notebook->scrollable)
-    ggg_notebook_pages_allocate (notebook);
-  else
-    {
-      children = notebook->children;
-
-      while (children)
-	{
-	  page = children->data;
-	  children = children->next;
-
-	  if (page->tab_label &&
-	      GTK_WIDGET_VISIBLE (page->tab_label) &&
-	      !GTK_WIDGET_MAPPED (page->tab_label))
-	    gtk_widget_map (page->tab_label);
-	}
-    }
-
-  if (ggg_notebook_get_event_window_position (notebook, NULL))
-    gdk_window_show_unraised (notebook->event_window);
-}
-
-static void
-ggg_notebook_unmap (GtkWidget *widget)
-{
-  stop_scrolling (GGG_NOTEBOOK (widget));
-
-  GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
-
-  gdk_window_hide (GGG_NOTEBOOK (widget)->event_window);
-
-  GTK_WIDGET_CLASS (ggg_notebook_parent_class)->unmap (widget);
-}
-
-static void
-ggg_notebook_realize (GtkWidget *widget)
-{
-  GggNotebook *notebook;
-  GdkWindowAttr attributes;
-  gint attributes_mask;
-  GdkRectangle event_window_pos;
-
-  notebook = GGG_NOTEBOOK (widget);
-  GTK_WIDGET_SET_FLAGS (notebook, GTK_REALIZED);
-
-  ggg_notebook_get_event_window_position (notebook, &event_window_pos);
-
-  widget->window = gtk_widget_get_parent_window (widget);
-  g_object_ref (widget->window);
-
-  attributes.window_type = GDK_WINDOW_CHILD;
-  attributes.x = event_window_pos.x;
-  attributes.y = event_window_pos.y;
-  attributes.width = event_window_pos.width;
-  attributes.height = event_window_pos.height;
-  attributes.wclass = GDK_INPUT_ONLY;
-  attributes.event_mask = gtk_widget_get_events (widget);
-  attributes.event_mask |= (GDK_BUTTON_PRESS_MASK |
-			    GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK |
-			    GDK_POINTER_MOTION_MASK | GDK_LEAVE_NOTIFY_MASK |
-			    GDK_SCROLL_MASK);
-  attributes_mask = GDK_WA_X | GDK_WA_Y;
-
-  notebook->event_window = gdk_window_new (gtk_widget_get_parent_window (widget),
-					   &attributes, attributes_mask);
-  gdk_window_set_user_data (notebook->event_window, notebook);
-
-  widget->style = gtk_style_attach (widget->style, widget->window);
-}
-
-static void
-ggg_notebook_unrealize (GtkWidget *widget)
-{
-  GggNotebook *notebook;
-  GggNotebookPrivate *priv;
-
-  notebook = GGG_NOTEBOOK (widget);
-  priv = GGG_NOTEBOOK_GET_PRIVATE (widget);
-
-  gdk_window_set_user_data (notebook->event_window, NULL);
-  gdk_window_destroy (notebook->event_window);
-  notebook->event_window = NULL;
-
-  if (priv->drag_window)
-    {
-      gdk_window_set_user_data (priv->drag_window, NULL);
-      gdk_window_destroy (priv->drag_window);
-      priv->drag_window = NULL;
-    }
-
-  if (GTK_WIDGET_CLASS (ggg_notebook_parent_class)->unrealize)
-    (* GTK_WIDGET_CLASS (ggg_notebook_parent_class)->unrealize) (widget);
-}
-
-static void
-ggg_notebook_size_request (GtkWidget      *widget,
-			   GtkRequisition *requisition)
-{
-  GggNotebook *notebook = GGG_NOTEBOOK (widget);
-  GggNotebookPage *page;
-  GList *children;
-  GtkRequisition child_requisition;
-  gboolean switch_page = FALSE;
-  gint vis_pages;
-  gint focus_width;
-  gint tab_overlap;
-  gint tab_curvature;
-  gint arrow_spacing;
-  gint scroll_arrow_hlength;
-  gint scroll_arrow_vlength;
-
-  gtk_widget_style_get (widget,
-                        "focus-line-width", &focus_width,
-			"tab-overlap", &tab_overlap,
-			"tab-curvature", &tab_curvature,
-                        "arrow-spacing", &arrow_spacing,
-                        "scroll-arrow-hlength", &scroll_arrow_hlength,
-                        "scroll-arrow-vlength", &scroll_arrow_vlength,
-			NULL);
-
-  widget->requisition.width = 0;
-  widget->requisition.height = 0;
-
-  for (children = notebook->children, vis_pages = 0; children;
-       children = children->next)
-    {
-      page = children->data;
-
-      if (GTK_WIDGET_VISIBLE (page->child))
-	{
-	  vis_pages++;
-	  gtk_widget_size_request (page->child, &child_requisition);
-
-	  widget->requisition.width = MAX (widget->requisition.width,
-					   child_requisition.width);
-	  widget->requisition.height = MAX (widget->requisition.height,
-					    child_requisition.height);
-
-	  if (notebook->menu && page->menu_label->parent &&
-	      !GTK_WIDGET_VISIBLE (page->menu_label->parent))
-	    gtk_widget_show (page->menu_label->parent);
-	}
-      else
-	{
-	  if (page == notebook->cur_page)
-	    switch_page = TRUE;
-	  if (notebook->menu && page->menu_label->parent &&
-	      GTK_WIDGET_VISIBLE (page->menu_label->parent))
-	    gtk_widget_hide (page->menu_label->parent);
-	}
-    }
-
-  if (notebook->show_border || notebook->show_tabs)
-    {
-      widget->requisition.width += widget->style->xthickness * 2;
-      widget->requisition.height += widget->style->ythickness * 2;
-
-      if (notebook->show_tabs)
-	{
-	  gint tab_width = 0;
-	  gint tab_height = 0;
-	  gint tab_max = 0;
-	  gint padding;
-
-	  for (children = notebook->children; children;
-	       children = children->next)
-	    {
-	      page = children->data;
-
-	      if (GTK_WIDGET_VISIBLE (page->child))
-		{
-		  if (!GTK_WIDGET_VISIBLE (page->tab_label))
-		    gtk_widget_show (page->tab_label);
-
-		  gtk_widget_size_request (page->tab_label,
-					   &child_requisition);
-
-		  page->requisition.width =
-		    child_requisition.width +
-		    2 * widget->style->xthickness;
-		  page->requisition.height =
-		    child_requisition.height +
-		    2 * widget->style->ythickness;
-
-		  switch (notebook->tab_pos)
-		    {
-		    case GTK_POS_TOP:
-		    case GTK_POS_BOTTOM:
-		      page->requisition.height += 2 * (notebook->tab_vborder +
-						       focus_width);
-		      tab_height = MAX (tab_height, page->requisition.height);
-		      tab_max = MAX (tab_max, page->requisition.width);
-		      break;
-		    case GTK_POS_LEFT:
-		    case GTK_POS_RIGHT:
-		      page->requisition.width += 2 * (notebook->tab_hborder +
-						      focus_width);
-		      tab_width = MAX (tab_width, page->requisition.width);
-		      tab_max = MAX (tab_max, page->requisition.height);
-		      break;
-		    }
-		}
-	      else if (GTK_WIDGET_VISIBLE (page->tab_label))
-		gtk_widget_hide (page->tab_label);
-	    }
-
-	  children = notebook->children;
-
-	  if (vis_pages)
-	    {
-	      switch (notebook->tab_pos)
-		{
-		case GTK_POS_TOP:
-		case GTK_POS_BOTTOM:
-		  if (tab_height == 0)
-		    break;
-
-		  if (notebook->scrollable && vis_pages > 1 &&
-		      widget->requisition.width < tab_width)
-		    tab_height = MAX (tab_height, scroll_arrow_hlength);
-
-		  padding = 2 * (tab_curvature + focus_width +
-				 notebook->tab_hborder) - tab_overlap;
-		  tab_max += padding;
-		  while (children)
-		    {
-		      page = children->data;
-		      children = children->next;
-
-		      if (!GTK_WIDGET_VISIBLE (page->child))
-			continue;
-
-		      if (notebook->homogeneous)
-			page->requisition.width = tab_max;
-		      else
-			page->requisition.width += padding;
-
-		      tab_width += page->requisition.width;
-		      page->requisition.height = tab_height;
-		    }
-
-		  if (notebook->scrollable && vis_pages > 1 &&
-		      widget->requisition.width < tab_width)
-		    tab_width = tab_max + 2 * (scroll_arrow_hlength + arrow_spacing);
-
-                  if (notebook->homogeneous && !notebook->scrollable)
-                    widget->requisition.width = MAX (widget->requisition.width,
-                                                     vis_pages * tab_max +
-                                                     tab_overlap);
-                  else
-                    widget->requisition.width = MAX (widget->requisition.width,
-                                                     tab_width + tab_overlap);
-
-		  widget->requisition.height += tab_height;
-		  break;
-		case GTK_POS_LEFT:
-		case GTK_POS_RIGHT:
-		  if (tab_width == 0)
-		    break;
-
-		  if (notebook->scrollable && vis_pages > 1 &&
-		      widget->requisition.height < tab_height)
-		    tab_width = MAX (tab_width,
-                                     arrow_spacing + 2 * scroll_arrow_vlength);
-
-		  padding = 2 * (tab_curvature + focus_width +
-				 notebook->tab_vborder) - tab_overlap;
-		  tab_max += padding;
-
-		  while (children)
-		    {
-		      page = children->data;
-		      children = children->next;
-
-		      if (!GTK_WIDGET_VISIBLE (page->child))
-			continue;
-
-		      page->requisition.width   = tab_width;
-
-		      if (notebook->homogeneous)
-			page->requisition.height = tab_max;
-		      else
-			page->requisition.height += padding;
-
-		      tab_height += page->requisition.height;
-		    }
-
-		  if (notebook->scrollable && vis_pages > 1 &&
-		      widget->requisition.height < tab_height)
-		    tab_height = tab_max + (2 * scroll_arrow_vlength + arrow_spacing);
-
-		  widget->requisition.width += tab_width;
-
-                  if (notebook->homogeneous && !notebook->scrollable)
-                    widget->requisition.height =
-		      MAX (widget->requisition.height,
-			   vis_pages * tab_max + tab_overlap);
-                  else
-                    widget->requisition.height =
-		      MAX (widget->requisition.height,
-			   tab_height + tab_overlap);
-
-		  if (!notebook->homogeneous || notebook->scrollable)
-		    vis_pages = 1;
-		  widget->requisition.height = MAX (widget->requisition.height,
-						    vis_pages * tab_max +
-						    tab_overlap);
-		  break;
-		}
-	    }
-	}
-      else
-	{
-	  for (children = notebook->children; children;
-	       children = children->next)
-	    {
-	      page = children->data;
-
-	      if (page->tab_label && GTK_WIDGET_VISIBLE (page->tab_label))
-		gtk_widget_hide (page->tab_label);
-	    }
-	}
-    }
-
-  widget->requisition.width += GTK_CONTAINER (widget)->border_width * 2;
-  widget->requisition.height += GTK_CONTAINER (widget)->border_width * 2;
-
-  if (switch_page)
-    {
-      if (vis_pages)
-	{
-	  for (children = notebook->children; children;
-	       children = children->next)
-	    {
-	      page = children->data;
-	      if (GTK_WIDGET_VISIBLE (page->child))
-		{
-		  ggg_notebook_switch_page (notebook, page);
-		  break;
-		}
-	    }
-	}
-      else if (GTK_WIDGET_VISIBLE (widget))
-	{
-	  widget->requisition.width = GTK_CONTAINER (widget)->border_width * 2;
-	  widget->requisition.height= GTK_CONTAINER (widget)->border_width * 2;
-	}
-    }
-  if (vis_pages && !notebook->cur_page)
-    {
-      children = ggg_notebook_search_page (notebook, NULL, STEP_NEXT, TRUE);
-      if (children)
-	{
-	  notebook->first_tab = children;
-	  ggg_notebook_switch_page (notebook, GGG_NOTEBOOK_PAGE (children));
-	}
-    }
-}
-
-static void
-ggg_notebook_size_allocate (GtkWidget     *widget,
-			    GtkAllocation *allocation)
-{
-  GggNotebook *notebook = GGG_NOTEBOOK (widget);
-  gint tab_pos = get_effective_tab_pos (notebook);
-
-  widget->allocation = *allocation;
-  if (GTK_WIDGET_REALIZED (widget))
-    {
-      GdkRectangle position;
-
-      if (ggg_notebook_get_event_window_position (notebook, &position))
-	{
-	  gdk_window_move_resize (notebook->event_window,
-				  position.x, position.y,
-				  position.width, position.height);
-	  if (GTK_WIDGET_MAPPED (notebook))
-	    gdk_window_show_unraised (notebook->event_window);
-	}
-      else
-	gdk_window_hide (notebook->event_window);
-    }
-
-  if (notebook->children)
-    {
-      gint border_width = GTK_CONTAINER (widget)->border_width;
-      GggNotebookPage *page;
-      GtkAllocation child_allocation;
-      GList *children;
-
-      child_allocation.x = widget->allocation.x + border_width;
-      child_allocation.y = widget->allocation.y + border_width;
-      child_allocation.width = MAX (1, allocation->width - border_width * 2);
-      child_allocation.height = MAX (1, allocation->height - border_width * 2);
-
-      if (notebook->show_tabs || notebook->show_border)
-	{
-	  child_allocation.x += widget->style->xthickness;
-	  child_allocation.y += widget->style->ythickness;
-	  child_allocation.width = MAX (1, child_allocation.width -
-					widget->style->xthickness * 2);
-	  child_allocation.height = MAX (1, child_allocation.height -
-					 widget->style->ythickness * 2);
-
-	  if (notebook->show_tabs && notebook->children && notebook->cur_page)
-	    {
-	      switch (tab_pos)
-		{
-		case GTK_POS_TOP:
-		  child_allocation.y += notebook->cur_page->requisition.height;
-		case GTK_POS_BOTTOM:
-		  child_allocation.height =
-		    MAX (1, child_allocation.height -
-			 notebook->cur_page->requisition.height);
-		  break;
-		case GTK_POS_LEFT:
-		  child_allocation.x += notebook->cur_page->requisition.width;
-		case GTK_POS_RIGHT:
-		  child_allocation.width =
-		    MAX (1, child_allocation.width -
-			 notebook->cur_page->requisition.width);
-		  break;
-		}
-	    }
-	}
-
-      children = notebook->children;
-      while (children)
-	{
-	  page = children->data;
-	  children = children->next;
-
-	  if (GTK_WIDGET_VISIBLE (page->child))
-	    gtk_widget_size_allocate (page->child, &child_allocation);
-	}
-
-      ggg_notebook_pages_allocate (notebook);
-    }
-}
-
-static gint
-ggg_notebook_expose (GtkWidget      *widget,
-		     GdkEventExpose *event)
-{
-  GggNotebook *notebook;
-  GggNotebookPrivate *priv;
-
-  notebook = GGG_NOTEBOOK (widget);
-  priv = GGG_NOTEBOOK_GET_PRIVATE (widget);
-
-  if (event->window == priv->drag_window)
-    {
-      GdkRectangle area = { 0, };
-
-      gdk_drawable_get_size (priv->drag_window,
-			     &area.width, &area.height);
-      ggg_notebook_draw_tab (notebook,
-			     notebook->cur_page,
-			     &area);
-      ggg_notebook_draw_focus (widget, event);
-      gtk_container_propagate_expose (GTK_CONTAINER (notebook),
-				      notebook->cur_page->tab_label, event);
-    }
-  else if (GTK_WIDGET_DRAWABLE (widget))
-    {
-      ggg_notebook_paint (widget, &event->area);
-      if (notebook->show_tabs)
-	{
-	  GggNotebookPage *page;
-	  GList *pages;
-
-	  ggg_notebook_draw_focus (widget, event);
-	  pages = notebook->children;
-
-	  while (pages)
-	    {
-	      page = GGG_NOTEBOOK_PAGE (pages);
-	      pages = pages->next;
-
-	      if (page->tab_label->window == event->window &&
-		  GTK_WIDGET_DRAWABLE (page->tab_label))
-		gtk_container_propagate_expose (GTK_CONTAINER (notebook),
-						page->tab_label, event);
-	    }
-	}
-
-      if (notebook->cur_page)
-	gtk_container_propagate_expose (GTK_CONTAINER (notebook),
-					notebook->cur_page->child,
-					event);
-    }
-
-  return FALSE;
-}
-
-static gboolean
-ggg_notebook_show_arrows (GggNotebook *notebook)
-{
-  gboolean show_arrow = FALSE;
-  GList *children;
-
-  if (!notebook->scrollable)
-    return FALSE;
-
-  children = notebook->children;
-  while (children)
-    {
-      GggNotebookPage *page = children->data;
-
-      if (page->tab_label && !gtk_widget_get_child_visible (page->tab_label))
-	show_arrow = TRUE;
-
-      children = children->next;
-    }
-
-  return show_arrow;
-}
-
-static void
-ggg_notebook_get_arrow_rect (GggNotebook     *notebook,
-			     GdkRectangle    *rectangle,
-			     GggNotebookArrow arrow)
-{
-  GdkRectangle event_window_pos;
-  gboolean before = ARROW_IS_BEFORE (arrow);
-  gboolean left = ARROW_IS_LEFT (arrow);
-
-  if (ggg_notebook_get_event_window_position (notebook, &event_window_pos))
-    {
-      gint scroll_arrow_hlength;
-      gint scroll_arrow_vlength;
-
-      gtk_widget_style_get (GTK_WIDGET (notebook),
-                            "scroll-arrow-hlength", &scroll_arrow_hlength,
-                            "scroll-arrow-vlength", &scroll_arrow_vlength,
-                            NULL);
-
-      switch (notebook->tab_pos)
-	{
-	case GTK_POS_LEFT:
-	case GTK_POS_RIGHT:
-          rectangle->width = scroll_arrow_vlength;
-          rectangle->height = scroll_arrow_vlength;
-
-	  if ((before && (notebook->has_before_previous != notebook->has_before_next)) ||
-	      (!before && (notebook->has_after_previous != notebook->has_after_next)))
-	  rectangle->x = event_window_pos.x + (event_window_pos.width - rectangle->width) / 2;
-	  else if (left)
-	    rectangle->x = event_window_pos.x + event_window_pos.width / 2 - rectangle->width;
-	  else
-	    rectangle->x = event_window_pos.x + event_window_pos.width / 2;
-	  rectangle->y = event_window_pos.y;
-	  if (!before)
-	    rectangle->y += event_window_pos.height - rectangle->height;
-	  break;
-
-	case GTK_POS_TOP:
-	case GTK_POS_BOTTOM:
-          rectangle->width = scroll_arrow_hlength;
-          rectangle->height = scroll_arrow_hlength;
-
-	  if (before)
-	    {
-	      if (left || !notebook->has_before_previous)
-		rectangle->x = event_window_pos.x;
-	      else
-		rectangle->x = event_window_pos.x + rectangle->width;
-	    }
-	  else
-	    {
-	      if (!left || !notebook->has_after_next)
-		rectangle->x = event_window_pos.x + event_window_pos.width - rectangle->width;
-	      else
-		rectangle->x = event_window_pos.x + event_window_pos.width - 2 * rectangle->width;
-	    }
-	  rectangle->y = event_window_pos.y + (event_window_pos.height - rectangle->height) / 2;
-	  break;
-	}
-    }
-}
-
-static GggNotebookArrow
-ggg_notebook_get_arrow (GggNotebook *notebook,
-			gint         x,
-			gint         y)
-{
-  GdkRectangle arrow_rect;
-  GdkRectangle event_window_pos;
-  gint i;
-  gint x0, y0;
-  GggNotebookArrow arrow[4];
-
-  arrow[0] = notebook->has_before_previous ? ARROW_LEFT_BEFORE : ARROW_NONE;
-  arrow[1] = notebook->has_before_next ? ARROW_RIGHT_BEFORE : ARROW_NONE;
-  arrow[2] = notebook->has_after_previous ? ARROW_LEFT_AFTER : ARROW_NONE;
-  arrow[3] = notebook->has_after_next ? ARROW_RIGHT_AFTER : ARROW_NONE;
-
-  if (ggg_notebook_show_arrows (notebook))
-    {
-      ggg_notebook_get_event_window_position (notebook, &event_window_pos);
-      for (i = 0; i < 4; i++)
-	{
-	  if (arrow[i] == ARROW_NONE)
-	    continue;
-
-	  ggg_notebook_get_arrow_rect (notebook, &arrow_rect, arrow[i]);
-
-	  x0 = x - arrow_rect.x;
-	  y0 = y - arrow_rect.y;
-
-	  if (y0 >= 0 && y0 < arrow_rect.height &&
-	      x0 >= 0 && x0 < arrow_rect.width)
-	    return arrow[i];
-	}
-    }
-
-  return ARROW_NONE;
-}
-
-static void
-ggg_notebook_do_arrow (GggNotebook     *notebook,
-		       GggNotebookArrow arrow)
-{
-  GtkWidget *widget = GTK_WIDGET (notebook);
-  GtkDirectionType dir;
-  gboolean is_rtl, left;
-
-  is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
-  left = (ARROW_IS_LEFT (arrow) && !is_rtl) ||
-         (!ARROW_IS_LEFT (arrow) && is_rtl);
-
-  if (!notebook->focus_tab ||
-      ggg_notebook_search_page (notebook, notebook->focus_tab,
-				left ? STEP_PREV : STEP_NEXT,
-				TRUE))
-    {
-      if (notebook->tab_pos == GTK_POS_LEFT ||
-	  notebook->tab_pos == GTK_POS_RIGHT)
-	dir = ARROW_IS_LEFT (arrow) ? GTK_DIR_UP : GTK_DIR_DOWN;
-      else
-	dir = ARROW_IS_LEFT (arrow) ? GTK_DIR_LEFT : GTK_DIR_RIGHT;
-
-      gtk_widget_grab_focus (widget);
-      gtk_widget_child_focus (widget, dir);
-    }
-}
-
-static gboolean
-ggg_notebook_arrow_button_press (GggNotebook      *notebook,
-				 GggNotebookArrow  arrow,
-				 gint              button)
-{
-  GtkWidget *widget = GTK_WIDGET (notebook);
-  gboolean is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
-  gboolean left = (ARROW_IS_LEFT (arrow) && !is_rtl) ||
-                  (!ARROW_IS_LEFT (arrow) && is_rtl);
-
-  if (!GTK_WIDGET_HAS_FOCUS (widget))
-    gtk_widget_grab_focus (widget);
-
-  notebook->button = button;
-  notebook->click_child = arrow;
-
-  if (button == 1)
-    {
-      ggg_notebook_do_arrow (notebook, arrow);
-      ggg_notebook_set_scroll_timer (notebook);
-    }
-  else if (button == 2)
-    ggg_notebook_page_select (notebook, TRUE);
-  else if (button == 3)
-    ggg_notebook_switch_focus_tab (notebook,
-				   ggg_notebook_search_page (notebook,
-							     NULL,
-							     left ? STEP_NEXT : STEP_PREV,
-							     TRUE));
-  ggg_notebook_redraw_arrows (notebook);
-
-  return TRUE;
-}
-
-static gboolean
-get_widget_coordinates (GtkWidget *widget,
-			GdkEvent  *event,
-			gint      *x,
-			gint      *y)
-{
-  GdkWindow *window = ((GdkEventAny *)event)->window;
-  gdouble tx, ty;
-
-  if (!gdk_event_get_coords (event, &tx, &ty))
-    return FALSE;
-
-  while (window && window != widget->window)
-    {
-      gint window_x, window_y;
-
-      gdk_window_get_position (window, &window_x, &window_y);
-      tx += window_x;
-      ty += window_y;
-
-      window = gdk_window_get_parent (window);
-    }
-
-  if (window)
-    {
-      *x = tx;
-      *y = ty;
-
-      return TRUE;
-    }
-  else
-    return FALSE;
-}
-
-static gboolean
-ggg_notebook_scroll (GtkWidget      *widget,
-                     GdkEventScroll *event)
-{
-  GggNotebook *notebook = GGG_NOTEBOOK (widget);
-
-  GtkWidget* child;
-  GtkWidget* originator;
-
-  if (!notebook->cur_page)
-    return FALSE;
-
-  child = notebook->cur_page->child;
-  originator = gtk_get_event_widget ((GdkEvent *)event);
-
-  /* ignore scroll events from the content of the page */
-  if (!originator || gtk_widget_is_ancestor (originator, child) || originator == child)
-    return FALSE;
-
-  switch (event->direction)
-    {
-    case GDK_SCROLL_RIGHT:
-    case GDK_SCROLL_DOWN:
-      ggg_notebook_next_page (notebook);
-      break;
-    case GDK_SCROLL_LEFT:
-    case GDK_SCROLL_UP:
-      ggg_notebook_prev_page (notebook);
-      break;
-    }
-
-  return TRUE;
-}
-
-static GList*
-get_tab_at_pos (GggNotebook *notebook, gint x, gint y)
-{
-  GggNotebookPage *page;
-  GList *children = notebook->children;
-
-  while (children)
-    {
-      page = children->data;
-
-      if (GTK_WIDGET_VISIBLE (page->child) &&
-	  page->tab_label && GTK_WIDGET_MAPPED (page->tab_label) &&
-	  (x >= page->allocation.x) &&
-	  (y >= page->allocation.y) &&
-	  (x <= (page->allocation.x + page->allocation.width)) &&
-	  (y <= (page->allocation.y + page->allocation.height)))
-	return children;
-
-      children = children->next;
-    }
-
-  return NULL;
-}
-
-static gboolean
-ggg_notebook_button_press (GtkWidget      *widget,
-			   GdkEventButton *event)
-{
-  GggNotebook *notebook = GGG_NOTEBOOK (widget);
-  GggNotebookPrivate *priv = GGG_NOTEBOOK_GET_PRIVATE (notebook);
-  GggNotebookPage *page;
-  GList *tab;
-  GggNotebookArrow arrow;
-  gint x, y;
-
-  if (event->type != GDK_BUTTON_PRESS || !notebook->children ||
-      notebook->button)
-    return FALSE;
-
-  if (!get_widget_coordinates (widget, (GdkEvent *)event, &x, &y))
-    return FALSE;
-
-  arrow = ggg_notebook_get_arrow (notebook, x, y);
-  if (arrow)
-    return ggg_notebook_arrow_button_press (notebook, arrow, event->button);
-
-  if (event->button == 3 && notebook->menu)
-    {
-      gtk_menu_popup (GTK_MENU (notebook->menu), NULL, NULL,
-		      NULL, NULL, 3, event->time);
-      return TRUE;
-    }
-
-  if (event->button != 1)
-    return FALSE;
-
-  notebook->button = event->button;
-
-  if ((tab = get_tab_at_pos (notebook, x, y)) != NULL)
-    {
-      gboolean page_changed, was_focus;
-
-      page = tab->data;
-      page_changed = page != notebook->cur_page;
-      was_focus = gtk_widget_is_focus (widget);
-
-      ggg_notebook_switch_focus_tab (notebook, tab);
-      gtk_widget_grab_focus (widget);
-
-      if (page_changed && !was_focus)
-	gtk_widget_child_focus (page->child, GTK_DIR_TAB_FORWARD);
-
-      /* save press to possibly begin a drag */
-      if (page->reorderable || page->detachable)
-	{
-	  priv->during_detach = FALSE;
-	  priv->during_reorder = FALSE;
-	  priv->pressed_button = event->button;
-
-	  gdk_window_get_pointer (widget->window,
-				  &priv->mouse_x,
-				  &priv->mouse_y,
-				  NULL);
-
-	  priv->drag_begin_x = priv->mouse_x;
-	  priv->drag_begin_y = priv->mouse_y;
-	  priv->drag_offset_x = priv->drag_begin_x - page->allocation.x;
-	  priv->drag_offset_y = priv->drag_begin_y - page->allocation.y;
-	}
-    }
-
-  return TRUE;
-}
-
-static void
-popup_position_func (GtkMenu  *menu,
-                     gint     *x,
-                     gint     *y,
-                     gboolean *push_in,
-                     gpointer  data)
-{
-  GggNotebook *notebook = data;
-  GtkWidget *w;
-  GtkRequisition requisition;
-
-  if (notebook->focus_tab)
-    {
-      GggNotebookPage *page;
-
-      page = notebook->focus_tab->data;
-      w = page->tab_label;
-    }
-  else
-   {
-     w = GTK_WIDGET (notebook);
-   }
-
-  gdk_window_get_origin (w->window, x, y);
-  gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
-
-  if (gtk_widget_get_direction (w) == GTK_TEXT_DIR_RTL)
-    *x += w->allocation.x + w->allocation.width - requisition.width;
-  else
-    *x += w->allocation.x;
-
-  *y += w->allocation.y + w->allocation.height;
-
-  *push_in = FALSE;
-}
-
-static gboolean
-ggg_notebook_popup_menu (GtkWidget *widget)
-{
-  GggNotebook *notebook = GGG_NOTEBOOK (widget);
-
-  if (notebook->menu)
-    {
-      gtk_menu_popup (GTK_MENU (notebook->menu), NULL, NULL,
-		      popup_position_func, notebook,
-		      0, gtk_get_current_event_time ());
-      gtk_menu_shell_select_first (GTK_MENU_SHELL (notebook->menu), FALSE);
-      return TRUE;
-    }
-
-  return FALSE;
-}
-
-static void
-stop_scrolling (GggNotebook *notebook)
-{
-  if (notebook->timer)
-    {
-      g_source_remove (notebook->timer);
-      notebook->timer = 0;
-      notebook->need_timer = FALSE;
-    }
-  notebook->click_child = 0;
-  notebook->button = 0;
-  ggg_notebook_redraw_arrows (notebook);
-}
-
-static GList*
-get_drop_position (GggNotebook *notebook,
-		   guint        pack)
-{
-  GggNotebookPrivate *priv;
-  GList *children, *last_child;
-  GggNotebookPage *page;
-  gboolean is_rtl;
-  gint x, y;
-
-  priv = GGG_NOTEBOOK_GET_PRIVATE (notebook);
-  x = priv->mouse_x;
-  y = priv->mouse_y;
-
-  is_rtl = gtk_widget_get_direction ((GtkWidget *) notebook) == GTK_TEXT_DIR_RTL;
-  children = notebook->children;
-  last_child = NULL;
-
-  while (children)
-    {
-      page = children->data;
-
-      if ((priv->operation != DRAG_OPERATION_REORDER || page != notebook->cur_page) &&
-	  GTK_WIDGET_VISIBLE (page->child) &&
-	  page->tab_label &&
-	  GTK_WIDGET_MAPPED (page->tab_label) &&
-	  page->pack == pack)
-	{
-	  switch (notebook->tab_pos)
-	    {
-	    case GTK_POS_TOP:
-	    case GTK_POS_BOTTOM:
-	      if (!is_rtl)
-		{
-		  if ((page->pack == GTK_PACK_START && PAGE_MIDDLE_X (page) > x) ||
-		      (page->pack == GTK_PACK_END && PAGE_MIDDLE_X (page) < x))
-		    return children;
-		}
-	      else
-		{
-		  if ((page->pack == GTK_PACK_START && PAGE_MIDDLE_X (page) < x) ||
-		      (page->pack == GTK_PACK_END && PAGE_MIDDLE_X (page) > x))
-		    return children;
-		}
-
-	      break;
-	    case GTK_POS_LEFT:
-	    case GTK_POS_RIGHT:
-	      if ((page->pack == GTK_PACK_START && PAGE_MIDDLE_Y (page) > y) ||
-		  (page->pack == GTK_PACK_END && PAGE_MIDDLE_Y (page) < y))
-		return children;
-
-	      break;
-	    }
-
-	  last_child = children->next;
-	}
-
-      children = children->next;
-    }
-
-  return last_child;
-}
-
-static void
-show_drag_window (GggNotebook        *notebook,
-		  GggNotebookPrivate *priv,
-		  GggNotebookPage    *page)
-{
-  GtkWidget *widget = GTK_WIDGET (notebook);
-
-  if (!priv->drag_window)
-    {
-      GdkWindowAttr attributes;
-      guint attributes_mask;
-
-      attributes.x = page->allocation.x;
-      attributes.y = page->allocation.y;
-      attributes.width = page->allocation.width;
-      attributes.height = page->allocation.height;
-      attributes.window_type = GDK_WINDOW_CHILD;
-      attributes.wclass = GDK_INPUT_OUTPUT;
-      attributes.visual = gtk_widget_get_visual (widget);
-      attributes.colormap = gtk_widget_get_colormap (widget);
-      attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK;
-      attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
-
-      priv->drag_window = gdk_window_new (gtk_widget_get_parent_window (widget),
-					  &attributes,
-					  attributes_mask);
-      gdk_window_set_user_data (priv->drag_window, widget);
-    }
-
-  g_object_ref (page->tab_label);
-  gtk_widget_unparent (page->tab_label);
-  gtk_widget_set_parent_window (page->tab_label, priv->drag_window);
-  gtk_widget_set_parent (page->tab_label, widget);
-  g_object_unref (page->tab_label);
-
-  gdk_window_show (priv->drag_window);
-
-  /* the grab will dissapear when the window is hidden */
-  gdk_pointer_grab (priv->drag_window,
-		    FALSE,
-		    GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
-		    NULL, NULL, GDK_CURRENT_TIME);
-}
-
-/* This function undoes the reparenting that happens both when drag_window
- * is shown for reordering and when the DnD icon is shown for detaching
- */
-static void
-hide_drag_window (GggNotebook        *notebook,
-		  GggNotebookPrivate *priv,
-		  GggNotebookPage    *page)
-{
-  GtkWidget *widget = GTK_WIDGET (notebook);
-  GtkWidget *parent = page->tab_label->parent;
-
-  if (page->tab_label->window != widget->window ||
-      !NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page))
-    {
-      g_object_ref (page->tab_label);
-
-      if (GTK_IS_WINDOW (parent))
-	{
-	  /* parent widget is the drag window */
-	  gtk_container_remove (GTK_CONTAINER (parent), page->tab_label);
-	}
-      else
-	gtk_widget_unparent (page->tab_label);
-
-      gtk_widget_set_parent_window (page->tab_label, widget->window);
-      gtk_widget_set_parent (page->tab_label, widget);
-      g_object_unref (page->tab_label);
-    }
-
-  if (priv->drag_window &&
-      gdk_window_is_visible (priv->drag_window))
-    gdk_window_hide (priv->drag_window);
-}
-
-static void
-ggg_notebook_stop_reorder (GggNotebook *notebook)
-{
-  GggNotebookPrivate *priv;
-  GggNotebookPage *page;
-
-  priv = GGG_NOTEBOOK_GET_PRIVATE (notebook);
-
-  if (priv->operation == DRAG_OPERATION_DETACH)
-    page = priv->detached_tab;
-  else
-    page = notebook->cur_page;
-
-  if (!page || !page->tab_label)
-    return;
-
-  priv->pressed_button = -1;
-
-  if (page->reorderable || page->detachable)
-    {
-      if (priv->during_reorder)
-	{
-	  gint old_page_num, page_num;
-	  GList *element;
-
-	  element = get_drop_position (notebook, page->pack);
-	  old_page_num = g_list_position (notebook->children, notebook->focus_tab);
-	  page_num = reorder_tab (notebook, element, notebook->focus_tab);
-          ggg_notebook_child_reordered (notebook, page);
-
-	  if (priv->has_scrolled || old_page_num != page_num)
-	    g_signal_emit (notebook,
-			   notebook_signals[PAGE_REORDERED], 0,
-			   page->child, page_num);
-
-	  priv->has_scrolled = FALSE;
-          priv->during_reorder = FALSE;
-	}
-
-      hide_drag_window (notebook, priv, page);
-
-      priv->operation = DRAG_OPERATION_NONE;
-      ggg_notebook_pages_allocate (notebook);
-
-      if (priv->dnd_timer)
-	{
-	  g_source_remove (priv->dnd_timer);
-	  priv->dnd_timer = 0;
-	}
-    }
-}
-
-static gint
-ggg_notebook_button_release (GtkWidget      *widget,
-			     GdkEventButton *event)
-{
-  GggNotebook *notebook;
-  GggNotebookPrivate *priv;
-  GggNotebookPage *page;
-
-  if (event->type != GDK_BUTTON_RELEASE)
-    return FALSE;
-
-  notebook = GGG_NOTEBOOK (widget);
-  priv = GGG_NOTEBOOK_GET_PRIVATE (notebook);
-  page = notebook->cur_page;
-
-  if (!priv->during_detach &&
-      page->reorderable &&
-      event->button == priv->pressed_button)
-    ggg_notebook_stop_reorder (notebook);
-
-  if (event->button == notebook->button)
-    {
-      stop_scrolling (notebook);
-      return TRUE;
-    }
-  else
-    return FALSE;
-}
-
-static gint
-ggg_notebook_leave_notify (GtkWidget        *widget,
-			   GdkEventCrossing *event)
-{
-  GggNotebook *notebook = GGG_NOTEBOOK (widget);
-  gint x, y;
-
-  if (!get_widget_coordinates (widget, (GdkEvent *)event, &x, &y))
-    return FALSE;
-
-  if (notebook->in_child)
-    {
-      notebook->in_child = 0;
-      ggg_notebook_redraw_arrows (notebook);
-    }
-
-  return TRUE;
-}
-
-static GggNotebookPointerPosition
-get_pointer_position (GggNotebook *notebook)
-{
-  GtkWidget *widget = (GtkWidget *) notebook;
-  GtkContainer *container = (GtkContainer *) notebook;
-  GggNotebookPrivate *priv = GGG_NOTEBOOK_GET_PRIVATE (notebook);
-  gboolean is_rtl;
-
-  if (!notebook->scrollable)
-    return POINTER_BETWEEN;
-
-  if (notebook->tab_pos == GTK_POS_TOP ||
-      notebook->tab_pos == GTK_POS_BOTTOM)
-    {
-      gint x;
-
-      is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
-      x = priv->mouse_x - widget->allocation.x;
-
-      if (x > widget->allocation.width - 2 * container->border_width - SCROLL_THRESHOLD)
-	return (is_rtl) ? POINTER_BEFORE : POINTER_AFTER;
-      else if (x < SCROLL_THRESHOLD + container->border_width)
-	return (is_rtl) ? POINTER_AFTER : POINTER_BEFORE;
-      else
-	return POINTER_BETWEEN;
-    }
-  else
-    {
-      gint y;
-
-      y = priv->mouse_y - widget->allocation.y;
-      if (y > widget->allocation.height - 2 * container->border_width - SCROLL_THRESHOLD)
-	return POINTER_AFTER;
-      else if (y < SCROLL_THRESHOLD + container->border_width)
-	return POINTER_BEFORE;
-      else
-	return POINTER_BETWEEN;
-    }
-}
-
-static gboolean
-scroll_notebook_timer (gpointer data)
-{
-  GggNotebook *notebook = (GggNotebook *) data;
-  GggNotebookPrivate *priv;
-  GggNotebookPointerPosition pointer_position;
-  GList *element, *first_tab;
-
-  priv = GGG_NOTEBOOK_GET_PRIVATE (notebook);
-  pointer_position = get_pointer_position (notebook);
-
-  element = get_drop_position (notebook, notebook->cur_page->pack);
-  reorder_tab (notebook, element, notebook->focus_tab);
-  first_tab = ggg_notebook_search_page (notebook, notebook->first_tab,
-					(pointer_position == POINTER_BEFORE) ? STEP_PREV : STEP_NEXT,
-					TRUE);
-  if (first_tab)
-    {
-      notebook->first_tab = first_tab;
-      ggg_notebook_pages_allocate (notebook);
-
-      gdk_window_move_resize (priv->drag_window,
-			      priv->drag_window_x,
-			      priv->drag_window_y,
-			      notebook->cur_page->allocation.width,
-			      notebook->cur_page->allocation.height);
-      gdk_window_raise (priv->drag_window);
-    }
-
-  return TRUE;
-}
-
-static gboolean
-check_threshold (GggNotebook *notebook,
-		 gint         current_x,
-		 gint         current_y)
-{
-  GtkWidget *widget;
-  gint dnd_threshold;
-  GdkRectangle rectangle = { 0, }; /* shut up gcc */
-  GtkSettings *settings;
-
-  widget = GTK_WIDGET (notebook);
-  settings = gtk_widget_get_settings (GTK_WIDGET (notebook));
-  g_object_get (G_OBJECT (settings), "gtk-dnd-drag-threshold", &dnd_threshold, NULL);
-
-  /* we want a large threshold */
-  dnd_threshold *= DND_THRESHOLD_MULTIPLIER;
-
-  gdk_window_get_position (notebook->event_window, &rectangle.x, &rectangle.y);
-  gdk_drawable_get_size (GDK_DRAWABLE (notebook->event_window), &rectangle.width, &rectangle.height);
-
-  rectangle.x -= dnd_threshold;
-  rectangle.width += 2 * dnd_threshold;
-  rectangle.y -= dnd_threshold;
-  rectangle.height += 2 * dnd_threshold;
-
-  return (current_x < rectangle.x ||
-	  current_x > rectangle.x + rectangle.width ||
-	  current_y < rectangle.y ||
-	  current_y > rectangle.y + rectangle.height);
-}
-
-static gint
-ggg_notebook_motion_notify (GtkWidget      *widget,
-			    GdkEventMotion *event)
-{
-  GggNotebook *notebook = GGG_NOTEBOOK (widget);
-  GggNotebookPrivate *priv = GGG_NOTEBOOK_GET_PRIVATE (notebook);
-  GggNotebookPage *page;
-  GggNotebookArrow arrow;
-  GggNotebookPointerPosition pointer_position;
-  GtkSettings *settings;
-  guint timeout;
-
-  page = notebook->cur_page;
-
-  if (!page)
-    return FALSE;
-
-  if (!(event->state & GDK_BUTTON1_MASK) &&
-      priv->pressed_button != -1)
-    {
-      ggg_notebook_stop_reorder (notebook);
-      stop_scrolling (notebook);
-    }
-
-  if (event->time < priv->timestamp + MSECS_BETWEEN_UPDATES)
-    return FALSE;
-
-  priv->timestamp = event->time;
-  gdk_window_get_pointer (widget->window,
-			  &priv->mouse_x,
-			  &priv->mouse_y,
-			  NULL);
-
-  arrow = ggg_notebook_get_arrow (notebook, priv->mouse_x, priv->mouse_y);
-  if (arrow != notebook->in_child)
-    {
-      notebook->in_child = arrow;
-      ggg_notebook_redraw_arrows (notebook);
-    }
-
-  if (priv->pressed_button == -1)
-    return FALSE;
-
-  if (page->detachable &&
-      check_threshold (notebook, priv->mouse_x, priv->mouse_y))
-    {
-      priv->detached_tab = notebook->cur_page;
-      priv->during_detach = TRUE;
-
-      gtk_drag_begin (widget, priv->source_targets, GDK_ACTION_MOVE,
-		      priv->pressed_button, (GdkEvent*) event);
-      return TRUE;
-    }
-
-  if (page->reorderable &&
-      (priv->during_reorder ||
-       gtk_drag_check_threshold (widget, priv->drag_begin_x, priv->drag_begin_y, priv->mouse_x, priv->mouse_y)))
-    {
-      priv->during_reorder = TRUE;
-      pointer_position = get_pointer_position (notebook);
-
-      if (event->window == priv->drag_window &&
-	  pointer_position != POINTER_BETWEEN &&
-	  ggg_notebook_show_arrows (notebook))
-	{
-	  /* scroll tabs */
-	  if (!priv->dnd_timer)
-	    {
-	      priv->has_scrolled = TRUE;
-	      settings = gtk_widget_get_settings (GTK_WIDGET (notebook));
-	      g_object_get (settings, "gtk-timeout-repeat", &timeout, NULL);
-
-	      priv->dnd_timer = gdk_threads_add_timeout (timeout * SCROLL_DELAY_FACTOR,
-					       scroll_notebook_timer,
-					       (gpointer) notebook);
-	    }
-	}
-      else
-	{
-	  if (priv->dnd_timer)
-	    {
-	      g_source_remove (priv->dnd_timer);
-	      priv->dnd_timer = 0;
-	    }
-	}
-
-      if (event->window == priv->drag_window ||
-	  priv->operation != DRAG_OPERATION_REORDER)
-	{
-	  /* the drag operation is beginning, create the window */
-	  if (priv->operation != DRAG_OPERATION_REORDER)
-	    {
-	      priv->operation = DRAG_OPERATION_REORDER;
-	      show_drag_window (notebook, priv, page);
-	    }
-
-	  ggg_notebook_pages_allocate (notebook);
-	  gdk_window_move_resize (priv->drag_window,
-				  priv->drag_window_x,
-				  priv->drag_window_y,
-				  page->allocation.width,
-				  page->allocation.height);
-	}
-    }
-
-  return TRUE;
-}
-
-static void
-ggg_notebook_grab_notify (GtkWidget *widget,
-			  gboolean   was_grabbed)
-{
-  GggNotebook *notebook = GGG_NOTEBOOK (widget);
-
-  if (!was_grabbed)
-    {
-      ggg_notebook_stop_reorder (notebook);
-      stop_scrolling (notebook);
-    }
-}
-
-static void
-ggg_notebook_state_changed (GtkWidget    *widget,
-			    GtkStateType  previous_state)
-{
-  if (!GTK_WIDGET_IS_SENSITIVE (widget))
-    stop_scrolling (GGG_NOTEBOOK (widget));
-}
-
-static gint
-ggg_notebook_focus_in (GtkWidget     *widget,
-		       GdkEventFocus *event)
-{
-  GGG_NOTEBOOK (widget)->child_has_focus = FALSE;
-
-  ggg_notebook_redraw_tabs (GGG_NOTEBOOK (widget));
-
-  return FALSE;
-}
-
-static gint
-ggg_notebook_focus_out (GtkWidget     *widget,
-			GdkEventFocus *event)
-{
-  ggg_notebook_redraw_tabs (GGG_NOTEBOOK (widget));
-
-  return FALSE;
-}
-
-static void
-ggg_notebook_draw_focus (GtkWidget      *widget,
-			 GdkEventExpose *event)
-{
-  GggNotebook *notebook = GGG_NOTEBOOK (widget);
-
-  if (GTK_WIDGET_HAS_FOCUS (widget) && GTK_WIDGET_DRAWABLE (widget) &&
-      notebook->show_tabs && notebook->cur_page &&
-      notebook->cur_page->tab_label->window == event->window)
-    {
-      GggNotebookPage *page;
-
-      page = notebook->cur_page;
-
-      if (gtk_widget_intersect (page->tab_label, &event->area, NULL))
-        {
-          GdkRectangle area;
-          gint focus_width;
-
-          gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
-
-          area.x = page->tab_label->allocation.x - focus_width;
-          area.y = page->tab_label->allocation.y - focus_width;
-          area.width = page->tab_label->allocation.width + 2 * focus_width;
-          area.height = page->tab_label->allocation.height + 2 * focus_width;
-
-	  gtk_paint_focus (widget->style, event->window,
-                           GTK_WIDGET_STATE (widget), NULL, widget, "tab",
-			   area.x, area.y, area.width, area.height);
-        }
-    }
-}
-
-static void
-ggg_notebook_style_set  (GtkWidget *widget,
-			 GtkStyle  *previous)
-{
-  GggNotebook *notebook;
-
-  gboolean has_before_previous;
-  gboolean has_before_next;
-  gboolean has_after_previous;
-  gboolean has_after_next;
-
-  notebook = GGG_NOTEBOOK (widget);
-
-  gtk_widget_style_get (widget,
-                        "has-backward-stepper", &has_before_previous,
-                        "has-secondary-forward-stepper", &has_before_next,
-                        "has-secondary-backward-stepper", &has_after_previous,
-                        "has-forward-stepper", &has_after_next,
-                        NULL);
-
-  notebook->has_before_previous = has_before_previous;
-  notebook->has_before_next = has_before_next;
-  notebook->has_after_previous = has_after_previous;
-  notebook->has_after_next = has_after_next;
-
-  (* GTK_WIDGET_CLASS (ggg_notebook_parent_class)->style_set) (widget, previous);
-}
-
-static gboolean
-on_drag_icon_expose (GtkWidget      *widget,
-		     GdkEventExpose *event,
-		     gpointer        data)
-{
-  GtkWidget *notebook, *child = GTK_WIDGET (data);
-  GtkRequisition requisition;
-  gint gap_pos;
-
-  notebook = GTK_WIDGET (data);
-  child = GTK_BIN (widget)->child;
-  gtk_widget_size_request (widget, &requisition);
-  gap_pos = get_tab_gap_pos (GGG_NOTEBOOK (notebook));
-
-  gtk_paint_extension (notebook->style, widget->window,
-		       GTK_STATE_NORMAL, GTK_SHADOW_OUT,
-		       NULL, widget, (char*)"tab",
-		       0, 0,
-		       requisition.width, requisition.height,
-		       gap_pos);
-  if (child)
-    gtk_container_propagate_expose (GTK_CONTAINER (widget), child, event);
-
-  return TRUE;
-}
-
-static void
-ggg_notebook_drag_begin (GtkWidget        *widget,
-			 GdkDragContext   *context)
-{
-  GggNotebookPrivate *priv = GGG_NOTEBOOK_GET_PRIVATE (widget);
-  GggNotebook *notebook = (GggNotebook*) widget;
-  GtkWidget *tab_label;
-
-  if (priv->dnd_timer)
-    {
-      g_source_remove (priv->dnd_timer);
-      priv->dnd_timer = 0;
-    }
-
-  priv->operation = DRAG_OPERATION_DETACH;
-  ggg_notebook_pages_allocate (notebook);
-
-  tab_label = priv->detached_tab->tab_label;
-
-  hide_drag_window (notebook, priv, notebook->cur_page);
-  g_object_ref (tab_label);
-  gtk_widget_unparent (tab_label);
-
-  priv->dnd_window = gtk_window_new (GTK_WINDOW_POPUP);
-  gtk_container_add (GTK_CONTAINER (priv->dnd_window), tab_label);
-  gtk_widget_set_size_request (priv->dnd_window,
-			       priv->detached_tab->allocation.width,
-			       priv->detached_tab->allocation.height);
-  g_object_unref (tab_label);
-
-  g_signal_connect (G_OBJECT (priv->dnd_window), "expose-event",
-		    G_CALLBACK (on_drag_icon_expose), notebook);
-
-  gtk_drag_set_icon_widget (context, priv->dnd_window, -2, -2);
-}
-
-static void
-ggg_notebook_drag_end (GtkWidget      *widget,
-		       GdkDragContext *context)
-{
-  GggNotebookPrivate *priv = GGG_NOTEBOOK_GET_PRIVATE (widget);
-
-  ggg_notebook_stop_reorder (GGG_NOTEBOOK (widget));
-
-  if (priv->detached_tab)
-    ggg_notebook_switch_page (GGG_NOTEBOOK (widget), priv->detached_tab);
-
-  GTK_BIN (priv->dnd_window)->child = NULL;
-  gtk_widget_destroy (priv->dnd_window);
-  priv->dnd_window = NULL;
-
-  priv->operation = DRAG_OPERATION_NONE;
-}
-
-static GggNotebook *
-ggg_notebook_create_window (GggNotebook *notebook,
-                            GtkWidget   *page,
-                            gint         x,
-                            gint         y)
-{
-  if (window_creation_hook)
-    return (* window_creation_hook) (notebook, page, x, y, window_creation_hook_data);
-
-  return NULL;
-}
-
-static gboolean
-ggg_notebook_drag_failed (GtkWidget      *widget,
-			  GdkDragContext *context,
-			  GtkDragResult   result,
-			  gpointer        data)
-{
-  if (result == GTK_DRAG_RESULT_NO_TARGET)
-    {
-      GggNotebookPrivate *priv;
-      GggNotebook *notebook, *dest_notebook = NULL;
-      GdkDisplay *display;
-      gint x, y;
-
-      notebook = GGG_NOTEBOOK (widget);
-      priv = GGG_NOTEBOOK_GET_PRIVATE (notebook);
-
-      display = gtk_widget_get_display (widget);
-      gdk_display_get_pointer (display, NULL, &x, &y, NULL);
-
-      g_signal_emit (notebook, notebook_signals[CREATE_WINDOW], 0,
-                     priv->detached_tab->child, x, y, &dest_notebook);
-
-      if (dest_notebook)
-	do_detach_tab (notebook, dest_notebook, priv->detached_tab->child, 0, 0);
-
-      return TRUE;
-    }
-
-  return FALSE;
-}
-
-static gboolean
-ggg_notebook_switch_tab_timeout (gpointer data)
-{
-  GggNotebook *notebook;
-  GggNotebookPrivate *priv;
-  GList *tab;
-  gint x, y;
-
-  notebook = GGG_NOTEBOOK (data);
-  priv = GGG_NOTEBOOK_GET_PRIVATE (notebook);
-
-  priv->switch_tab_timer = 0;
-  x = priv->mouse_x;
-  y = priv->mouse_y;
-
-  if ((tab = get_tab_at_pos (notebook, x, y)) != NULL)
-    {
-      /* FIXME: hack, we don't want the
-       * focus to move fom the source widget
-       */
-      notebook->child_has_focus = FALSE;
-      ggg_notebook_switch_focus_tab (notebook, tab);
-    }
-
-  return FALSE;
-}
-
-static gboolean
-ggg_notebook_drag_motion (GtkWidget      *widget,
-			  GdkDragContext *context,
-			  gint            x,
-			  gint            y,
-			  guint           time)
-{
-  GggNotebook *notebook;
-  GggNotebookPrivate *priv;
-  GdkRectangle position;
-  GtkSettings *settings;
-  GggNotebookArrow arrow;
-  guint timeout;
-  GdkAtom target, tab_target;
-
-  notebook = GGG_NOTEBOOK (widget);
-  arrow = ggg_notebook_get_arrow (notebook,
-				  x + widget->allocation.x,
-				  y + widget->allocation.y);
-  if (arrow)
-    {
-      notebook->click_child = arrow;
-      ggg_notebook_set_scroll_timer (notebook);
-      gdk_drag_status (context, 0, time);
-      return TRUE;
-    }
-
-  stop_scrolling (notebook);
-  target = gtk_drag_dest_find_target (widget, context, NULL);
-  tab_target = gdk_atom_intern_static_string ("GGG_NOTEBOOK_TAB");
-
-  if (target == tab_target)
-    {
-      gpointer widget_group, source_widget_group;
-      GtkWidget *source_widget;
-
-      source_widget = gtk_drag_get_source_widget (context);
-      g_assert (source_widget);
-
-      widget_group = ggg_notebook_get_group (notebook);
-      source_widget_group = ggg_notebook_get_group (GGG_NOTEBOOK (source_widget));
-
-      if (widget_group && source_widget_group &&
-	  widget_group == source_widget_group &&
-	  !(widget == GGG_NOTEBOOK (source_widget)->cur_page->child ||
-	    gtk_widget_is_ancestor (widget, GGG_NOTEBOOK (source_widget)->cur_page->child)))
-	{
-	  gdk_drag_status (context, GDK_ACTION_MOVE, time);
-	  return TRUE;
-	}
-      else
-	{
-	  /* it's a tab, but doesn't share
-	   * ID with this notebook */
-	  gdk_drag_status (context, 0, time);
-	}
-    }
-
-  priv = GGG_NOTEBOOK_GET_PRIVATE (widget);
-  x += widget->allocation.x;
-  y += widget->allocation.y;
-
-  if (ggg_notebook_get_event_window_position (notebook, &position) &&
-      x >= position.x && x <= position.x + position.width &&
-      y >= position.y && y <= position.y + position.height)
-    {
-      priv->mouse_x = x;
-      priv->mouse_y = y;
-
-      if (!priv->switch_tab_timer)
-	{
-          settings = gtk_widget_get_settings (widget);
-
-          g_object_get (settings, "gtk-timeout-expand", &timeout, NULL);
-	  priv->switch_tab_timer = gdk_threads_add_timeout (timeout,
-						  ggg_notebook_switch_tab_timeout,
-						  widget);
-	}
-    }
-  else
-    {
-      if (priv->switch_tab_timer)
-	{
-	  g_source_remove (priv->switch_tab_timer);
-	  priv->switch_tab_timer = 0;
-	}
-    }
-
-  return (target == tab_target) ? TRUE : FALSE;
-}
-
-static void
-ggg_notebook_drag_leave (GtkWidget      *widget,
-			 GdkDragContext *context,
-			 guint           time)
-{
-  GggNotebookPrivate *priv;
-
-  priv = GGG_NOTEBOOK_GET_PRIVATE (widget);
-
-  if (priv->switch_tab_timer)
-    {
-      g_source_remove (priv->switch_tab_timer);
-      priv->switch_tab_timer = 0;
-    }
-
-  stop_scrolling (GGG_NOTEBOOK (widget));
-}
-
-static gboolean
-ggg_notebook_drag_drop (GtkWidget        *widget,
-			GdkDragContext   *context,
-			gint              x,
-			gint              y,
-			guint             time)
-{
-  GdkAtom target, tab_target;
-
-  target = gtk_drag_dest_find_target (widget, context, NULL);
-  tab_target = gdk_atom_intern_static_string ("GGG_NOTEBOOK_TAB");
-
-  if (target == tab_target)
-    {
-      gtk_drag_get_data (widget, context, target, time);
-      return TRUE;
-    }
-
-  return FALSE;
-}
-
-static void
-do_detach_tab (GggNotebook     *from,
-	       GggNotebook     *to,
-	       GtkWidget       *child,
-	       gint             x,
-	       gint             y)
-{
-  GggNotebookPrivate *priv;
-  GtkWidget *tab_label, *menu_label;
-  gboolean tab_expand, tab_fill, reorderable, detachable;
-  GList *element;
-  guint tab_pack;
-  gint page_num;
-
-  menu_label = ggg_notebook_get_menu_label (from, child);
-
-  if (menu_label)
-    g_object_ref (menu_label);
-
-  tab_label = ggg_notebook_get_tab_label (from, child);
-
-  if (tab_label)
-    g_object_ref (tab_label);
-
-  g_object_ref (child);
-
-  gtk_container_child_get (GTK_CONTAINER (from),
-			   child,
-			   "tab-expand", &tab_expand,
-			   "tab-fill", &tab_fill,
-			   "tab-pack", &tab_pack,
-			   "reorderable", &reorderable,
-			   "detachable", &detachable,
-			   NULL);
-
-  gtk_container_remove (GTK_CONTAINER (from), child);
-
-  priv = GGG_NOTEBOOK_GET_PRIVATE (to);
-  priv->mouse_x = x + GTK_WIDGET (to)->allocation.x;
-  priv->mouse_y = y + GTK_WIDGET (to)->allocation.y;
-
-  element = get_drop_position (to, tab_pack);
-  page_num = g_list_position (to->children, element);
-  ggg_notebook_insert_page_menu (to, child, tab_label, menu_label, page_num);
-
-  gtk_container_child_set (GTK_CONTAINER (to), child,
-			   "tab-pack", tab_pack,
-			   "tab-expand", tab_expand,
-			   "tab-fill", tab_fill,
-			   "reorderable", reorderable,
-			   "detachable", detachable,
-			   NULL);
-  if (child)
-    g_object_unref (child);
-
-  if (tab_label)
-    g_object_unref (tab_label);
-
-  if (menu_label)
-    g_object_unref (menu_label);
-
-  ggg_notebook_set_current_page (to, page_num);
-}
-
-static void
-ggg_notebook_drag_data_get (GtkWidget        *widget,
-			    GdkDragContext   *context,
-			    GtkSelectionData *data,
-			    guint             info,
-			    guint             time)
-{
-  GggNotebookPrivate *priv;
-
-  if (data->target == gdk_atom_intern_static_string ("GGG_NOTEBOOK_TAB"))
-    {
-      priv = GGG_NOTEBOOK_GET_PRIVATE (widget);
-
-      gtk_selection_data_set (data,
-			      data->target,
-			      8,
-			      (void*) &priv->detached_tab->child,
-			      sizeof (gpointer));
-    }
-}
-
-static void
-ggg_notebook_drag_data_received (GtkWidget        *widget,
-				 GdkDragContext   *context,
-				 gint              x,
-				 gint              y,
-				 GtkSelectionData *data,
-				 guint             info,
-				 guint             time)
-{
-  GggNotebook *notebook;
-  GtkWidget *source_widget;
-  GtkWidget **child;
-
-  notebook = GGG_NOTEBOOK (widget);
-  source_widget = gtk_drag_get_source_widget (context);
-
-  if (source_widget &&
-      data->target == gdk_atom_intern_static_string ("GGG_NOTEBOOK_TAB"))
-    {
-      child = (void*) data->data;
-
-      do_detach_tab (GGG_NOTEBOOK (source_widget), notebook, *child, x, y);
-      gtk_drag_finish (context, TRUE, FALSE, time);
-    }
-  else
-    gtk_drag_finish (context, FALSE, FALSE, time);
-}
-
-/* Private GtkContainer Methods :
- *
- * ggg_notebook_set_child_arg
- * ggg_notebook_get_child_arg
- * ggg_notebook_add
- * ggg_notebook_remove
- * ggg_notebook_focus
- * ggg_notebook_set_focus_child
- * ggg_notebook_child_type
- * ggg_notebook_forall
- */
-static void
-ggg_notebook_set_child_property (GtkContainer    *container,
-				 GtkWidget       *child,
-				 guint            property_id,
-				 const GValue    *value,
-				 GParamSpec      *pspec)
-{
-  gboolean expand;
-  gboolean fill;
-  GtkPackType pack_type;
-
-  /* not finding child's page is valid for menus or labels */
-  if (!ggg_notebook_find_child (GGG_NOTEBOOK (container), child, NULL))
-    return;
-
-  switch (property_id)
-    {
-    case CHILD_PROP_TAB_LABEL:
-      /* a NULL pointer indicates a default_tab setting, otherwise
-       * we need to set the associated label
-       */
-      ggg_notebook_set_tab_label_text (GGG_NOTEBOOK (container), child,
-				       g_value_get_string (value));
-      break;
-    case CHILD_PROP_MENU_LABEL:
-      ggg_notebook_set_menu_label_text (GGG_NOTEBOOK (container), child,
-					g_value_get_string (value));
-      break;
-    case CHILD_PROP_POSITION:
-      ggg_notebook_reorder_child (GGG_NOTEBOOK (container), child,
-				  g_value_get_int (value));
-      break;
-    case CHILD_PROP_TAB_EXPAND:
-      ggg_notebook_query_tab_label_packing (GGG_NOTEBOOK (container), child,
-					    &expand, &fill, &pack_type);
-      ggg_notebook_set_tab_label_packing (GGG_NOTEBOOK (container), child,
-					  g_value_get_boolean (value),
-					  fill, pack_type);
-      break;
-    case CHILD_PROP_TAB_FILL:
-      ggg_notebook_query_tab_label_packing (GGG_NOTEBOOK (container), child,
-					    &expand, &fill, &pack_type);
-      ggg_notebook_set_tab_label_packing (GGG_NOTEBOOK (container), child,
-					  expand,
-					  g_value_get_boolean (value),
-					  pack_type);
-      break;
-    case CHILD_PROP_TAB_PACK:
-      ggg_notebook_query_tab_label_packing (GGG_NOTEBOOK (container), child,
-					    &expand, &fill, &pack_type);
-      ggg_notebook_set_tab_label_packing (GGG_NOTEBOOK (container), child,
-					  expand, fill,
-					  g_value_get_enum (value));
-      break;
-    case CHILD_PROP_REORDERABLE:
-      ggg_notebook_set_tab_reorderable (GGG_NOTEBOOK (container), child,
-					g_value_get_boolean (value));
-      break;
-    case CHILD_PROP_DETACHABLE:
-      ggg_notebook_set_tab_detachable (GGG_NOTEBOOK (container), child,
-				       g_value_get_boolean (value));
-      break;
-    default:
-      GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
-      break;
-    }
-}
-
-static void
-ggg_notebook_get_child_property (GtkContainer    *container,
-				 GtkWidget       *child,
-				 guint            property_id,
-				 GValue          *value,
-				 GParamSpec      *pspec)
-{
-  GList *list;
-  GggNotebook *notebook;
-  GtkWidget *label;
-  gboolean expand;
-  gboolean fill;
-  GtkPackType pack_type;
-
-  notebook = GGG_NOTEBOOK (container);
-
-  /* not finding child's page is valid for menus or labels */
-  list = ggg_notebook_find_child (notebook, child, NULL);
-  if (!list)
-    {
-      /* nothing to set on labels or menus */
-      g_param_value_set_default (pspec, value);
-      return;
-    }
-
-  switch (property_id)
-    {
-    case CHILD_PROP_TAB_LABEL:
-      label = ggg_notebook_get_tab_label (notebook, child);
-
-      if (label && GTK_IS_LABEL (label))
-	g_value_set_string (value, GTK_LABEL (label)->label);
-      else
-	g_value_set_string (value, NULL);
-      break;
-    case CHILD_PROP_MENU_LABEL:
-      label = ggg_notebook_get_menu_label (notebook, child);
-
-      if (label && GTK_IS_LABEL (label))
-	g_value_set_string (value, GTK_LABEL (label)->label);
-      else
-	g_value_set_string (value, NULL);
-      break;
-    case CHILD_PROP_POSITION:
-      g_value_set_int (value, g_list_position (notebook->children, list));
-      break;
-    case CHILD_PROP_TAB_EXPAND:
-	ggg_notebook_query_tab_label_packing (GGG_NOTEBOOK (container), child,
-					      &expand, NULL, NULL);
-	g_value_set_boolean (value, expand);
-      break;
-    case CHILD_PROP_TAB_FILL:
-	ggg_notebook_query_tab_label_packing (GGG_NOTEBOOK (container), child,
-					      NULL, &fill, NULL);
-	g_value_set_boolean (value, fill);
-      break;
-    case CHILD_PROP_TAB_PACK:
-	ggg_notebook_query_tab_label_packing (GGG_NOTEBOOK (container), child,
-					      NULL, NULL, &pack_type);
-	g_value_set_enum (value, pack_type);
-      break;
-    case CHILD_PROP_REORDERABLE:
-      g_value_set_boolean (value,
-			   ggg_notebook_get_tab_reorderable (GGG_NOTEBOOK (container), child));
-      break;
-    case CHILD_PROP_DETACHABLE:
-      g_value_set_boolean (value,
-			   ggg_notebook_get_tab_detachable (GGG_NOTEBOOK (container), child));
-      break;
-    default:
-      GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
-      break;
-    }
-}
-
-static void
-ggg_notebook_add (GtkContainer *container,
-		  GtkWidget    *widget)
-{
-  ggg_notebook_insert_page_menu (GGG_NOTEBOOK (container), widget,
-				 NULL, NULL, -1);
-}
-
-static void
-ggg_notebook_remove (GtkContainer *container,
-		     GtkWidget    *widget)
-{
-  GggNotebook *notebook;
-  GggNotebookPage *page;
-  GList *children;
-  gint page_num = 0;
-
-  notebook = GGG_NOTEBOOK (container);
-
-  children = notebook->children;
-  while (children)
-    {
-      page = children->data;
-
-      if (page->child == widget)
-	break;
-
-      page_num++;
-      children = children->next;
-    }
-
-  if (children == NULL)
-    return;
-
-  g_object_ref (widget);
-
-  ggg_notebook_real_remove (notebook, children);
-
-  g_signal_emit (notebook,
-		 notebook_signals[PAGE_REMOVED],
-		 0,
-		 widget,
-		 page_num);
-
-  g_object_unref (widget);
-}
-
-static gboolean
-focus_tabs_in (GggNotebook *notebook)
-{
-  if (notebook->show_tabs && notebook->cur_page)
-    {
-      gtk_widget_grab_focus (GTK_WIDGET (notebook));
-
-      ggg_notebook_switch_focus_tab (notebook,
-				     g_list_find (notebook->children,
-						  notebook->cur_page));
-
-      return TRUE;
-    }
-  else
-    return FALSE;
-}
-
-static gboolean
-focus_tabs_move (GggNotebook     *notebook,
-		 GtkDirectionType direction,
-		 gint             search_direction)
-{
-  GList *new_page;
-
-  new_page = ggg_notebook_search_page (notebook, notebook->focus_tab,
-				       search_direction, TRUE);
-  if (!new_page)
-    {
-      gboolean wrap_around;
-
-      g_object_get (gtk_widget_get_settings (GTK_WIDGET (notebook)),
-                    "gtk-keynav-wrap-around", &wrap_around,
-                    NULL);
-
-      if (wrap_around)
-        new_page = ggg_notebook_search_page (notebook, NULL,
-                                             search_direction, TRUE);
-    }
-
-  if (new_page)
-    ggg_notebook_switch_focus_tab (notebook, new_page);
-  else
-    gtk_widget_error_bell (GTK_WIDGET (notebook));
-
-  return TRUE;
-}
-
-static gboolean
-focus_child_in (GggNotebook     *notebook,
-		GtkDirectionType direction)
-{
-  if (notebook->cur_page)
-    return gtk_widget_child_focus (notebook->cur_page->child, direction);
-  else
-    return FALSE;
-}
-
-/* Focus in the notebook can either be on the pages, or on
- * the tabs.
- */
-static gint
-ggg_notebook_focus (GtkWidget        *widget,
-		    GtkDirectionType  direction)
-{
-  GtkWidget *old_focus_child;
-  GggNotebook *notebook;
-  GtkDirectionType effective_direction;
-
-  gboolean widget_is_focus;
-  GtkContainer *container;
-
-  container = GTK_CONTAINER (widget);
-  notebook = GGG_NOTEBOOK (container);
-
-  if (notebook->focus_out)
-    {
-      notebook->focus_out = FALSE; /* Clear this to catch the wrap-around case */
-      return FALSE;
-    }
-
-  widget_is_focus = gtk_widget_is_focus (widget);
-  old_focus_child = container->focus_child;
-
-  effective_direction = get_effective_direction (notebook, direction);
-
-  if (old_focus_child)		/* Focus on page child */
-    {
-      if (gtk_widget_child_focus (old_focus_child, direction))
-        return TRUE;
-
-      switch (effective_direction)
-	{
-	case GTK_DIR_TAB_BACKWARD:
-	case GTK_DIR_UP:
-	  /* Focus onto the tabs */
-	  return focus_tabs_in (notebook);
-	case GTK_DIR_DOWN:
-	case GTK_DIR_TAB_FORWARD:
-	case GTK_DIR_LEFT:
-	case GTK_DIR_RIGHT:
-	  return FALSE;
-	}
-    }
-  else if (widget_is_focus)	/* Focus was on tabs */
-    {
-      switch (effective_direction)
-	{
-	case GTK_DIR_TAB_BACKWARD:
-	case GTK_DIR_UP:
-	  return FALSE;
-	case GTK_DIR_TAB_FORWARD:
-	case GTK_DIR_DOWN:
-	  /* We use TAB_FORWARD rather than direction so that we focus a more
-	   * predictable widget for the user; users may be using arrow focusing
-	   * in this situation even if they don't usually use arrow focusing.
-	   */
-	  return focus_child_in (notebook, GTK_DIR_TAB_FORWARD);
-	case GTK_DIR_LEFT:
-	  return focus_tabs_move (notebook, direction, STEP_PREV);
-	case GTK_DIR_RIGHT:
-	  return focus_tabs_move (notebook, direction, STEP_NEXT);
-	}
-    }
-  else /* Focus was not on widget */
-    {
-      switch (effective_direction)
-	{
-	case GTK_DIR_TAB_FORWARD:
-	case GTK_DIR_DOWN:
-	  if (focus_tabs_in (notebook))
-	    return TRUE;
-	  if (focus_child_in (notebook, direction))
-	    return TRUE;
-	  return FALSE;
-	case GTK_DIR_TAB_BACKWARD:
-	case GTK_DIR_UP:
-	  if (focus_child_in (notebook, direction))
-	    return TRUE;
-	  if (focus_tabs_in (notebook))
-	    return TRUE;
-	  return FALSE;
-	case GTK_DIR_LEFT:
-	case GTK_DIR_RIGHT:
-	  return focus_child_in (notebook, direction);
-	}
-    }
-
-  g_assert_not_reached ();
-  return FALSE;
-}
-
-static void
-ggg_notebook_set_focus_child (GtkContainer *container,
-			      GtkWidget    *child)
-{
-  GggNotebook *notebook = GGG_NOTEBOOK (container);
-  GtkWidget *page_child;
-  GtkWidget *toplevel;
-
-  /* If the old focus widget was within a page of the notebook,
-   * (child may either be NULL or not in this case), record it
-   * for future use if we switch to the page with a mnemonic.
-   */
-
-  toplevel = gtk_widget_get_toplevel (GTK_WIDGET (container));
-  if (toplevel && GTK_WIDGET_TOPLEVEL (toplevel))
-    {
-      page_child = GTK_WINDOW (toplevel)->focus_widget;
-      while (page_child)
-	{
-	  if (page_child->parent == GTK_WIDGET (container))
-	    {
-	      GList *list = ggg_notebook_find_child (notebook, page_child, NULL);
-	      if (list != NULL)
-		{
-		  GggNotebookPage *page = list->data;
-
-		  if (page->last_focus_child)
-		    g_object_remove_weak_pointer (G_OBJECT (page->last_focus_child), (gpointer *)&page->last_focus_child);
-
-		  page->last_focus_child = GTK_WINDOW (toplevel)->focus_widget;
-		  g_object_add_weak_pointer (G_OBJECT (page->last_focus_child), (gpointer *)&page->last_focus_child);
-
-		  break;
-		}
-	    }
-
-	  page_child = page_child->parent;
-	}
-    }
-
-  if (child)
-    {
-      g_return_if_fail (GTK_IS_WIDGET (child));
-
-      notebook->child_has_focus = TRUE;
-      if (!notebook->focus_tab)
-	{
-	  GList *children;
-	  GggNotebookPage *page;
-
-	  children = notebook->children;
-	  while (children)
-	    {
-	      page = children->data;
-	      if (page->child == child || page->tab_label == child)
-		ggg_notebook_switch_focus_tab (notebook, children);
-	      children = children->next;
-	    }
-	}
-    }
-
-  GTK_CONTAINER_CLASS (ggg_notebook_parent_class)->set_focus_child (container, child);
-}
-
-static void
-ggg_notebook_forall (GtkContainer *container,
-		     gboolean      include_internals,
-		     GtkCallback   callback,
-		     gpointer      callback_data)
-{
-  GggNotebook *notebook;
-  GList *children;
-
-  notebook = GGG_NOTEBOOK (container);
-
-  children = notebook->children;
-  while (children)
-    {
-      GggNotebookPage *page;
-
-      page = children->data;
-      children = children->next;
-      (* callback) (page->child, callback_data);
-
-      if (include_internals)
-	{
-	  if (page->tab_label)
-	    (* callback) (page->tab_label, callback_data);
-	}
-    }
-}
-
-static GType
-ggg_notebook_child_type (GtkContainer     *container)
-{
-  return GTK_TYPE_WIDGET;
-}
-
-/* Private GggNotebook Methods:
- *
- * ggg_notebook_real_insert_page
- */
-static void
-page_visible_cb (GtkWidget  *page,
-                 GParamSpec *arg,
-                 gpointer    data)
-{
-  GggNotebook *notebook = (GggNotebook *) data;
-  GList *list;
-  GList *next = NULL;
-
-  if (notebook->cur_page &&
-      notebook->cur_page->child == page &&
-      !GTK_WIDGET_VISIBLE (page))
-    {
-      list = g_list_find (notebook->children, notebook->cur_page);
-      if (list)
-        {
-          next = ggg_notebook_search_page (notebook, list, STEP_NEXT, TRUE);
-          if (!next)
-            next = ggg_notebook_search_page (notebook, list, STEP_PREV, TRUE);
-        }
-
-      if (next)
-        ggg_notebook_switch_page (notebook, GGG_NOTEBOOK_PAGE (next));
-    }
-}
-
-static gint
-ggg_notebook_real_insert_page (GggNotebook *notebook,
-			       GtkWidget   *child,
-			       GtkWidget   *tab_label,
-			       GtkWidget   *menu_label,
-			       gint         position)
-{
-  GggNotebookPage *page;
-  gint nchildren;
-
-  gtk_widget_freeze_child_notify (child);
-
-  page = g_new0 (GggNotebookPage, 1);
-  page->child = child;
-
-  nchildren = g_list_length (notebook->children);
-  if ((position < 0) || (position > nchildren))
-    position = nchildren;
-
-  notebook->children = g_list_insert (notebook->children, page, position);
-
-  if (!tab_label)
-    {
-      page->default_tab = TRUE;
-      if (notebook->show_tabs)
-	tab_label = gtk_label_new (NULL);
-    }
-  page->tab_label = tab_label;
-  page->menu_label = menu_label;
-  page->expand = FALSE;
-  page->fill = TRUE;
-  page->pack = GTK_PACK_START;
-
-  if (!menu_label)
-    page->default_menu = TRUE;
-  else
-    g_object_ref_sink (page->menu_label);
-
-  if (notebook->menu)
-    ggg_notebook_menu_item_create (notebook,
-				   g_list_find (notebook->children, page));
-
-  gtk_widget_set_parent (child, GTK_WIDGET (notebook));
-  if (tab_label)
-    gtk_widget_set_parent (tab_label, GTK_WIDGET (notebook));
-
-  ggg_notebook_update_labels (notebook);
-
-  if (!notebook->first_tab)
-    notebook->first_tab = notebook->children;
-
-  /* child visible will be turned on by switch_page below */
-  if (notebook->cur_page != page)
-    gtk_widget_set_child_visible (child, FALSE);
-
-  if (tab_label)
-    {
-      if (notebook->show_tabs && GTK_WIDGET_VISIBLE (child))
-	gtk_widget_show (tab_label);
-      else
-	gtk_widget_hide (tab_label);
-
-    page->mnemonic_activate_signal =
-      g_signal_connect (tab_label,
-			"mnemonic_activate",
-			G_CALLBACK (ggg_notebook_mnemonic_activate_switch_page),
-			notebook);
-    }
-
-  page->notify_visible_handler = g_signal_connect (child, "notify::visible",
-						   G_CALLBACK (page_visible_cb), notebook);
-
-  g_signal_emit (notebook,
-		 notebook_signals[PAGE_ADDED],
-		 0,
-		 child,
-		 position);
-
-  if (!notebook->cur_page)
-    {
-      ggg_notebook_switch_page (notebook, page);
-      /* focus_tab is set in the switch_page method */
-      ggg_notebook_switch_focus_tab (notebook, notebook->focus_tab);
-    }
-
-  ggg_notebook_update_tab_states (notebook);
-
-  gtk_widget_child_notify (child, "tab-expand");
-  gtk_widget_child_notify (child, "tab-fill");
-  gtk_widget_child_notify (child, "tab-pack");
-  gtk_widget_child_notify (child, "tab-label");
-  gtk_widget_child_notify (child, "menu-label");
-  gtk_widget_child_notify (child, "position");
-  gtk_widget_thaw_child_notify (child);
-
-  /* The page-added handler might have reordered the pages, re-get the position */
-  return ggg_notebook_page_num (notebook, child);
-}
-
-/* Private GggNotebook Functions:
- *
- * ggg_notebook_redraw_tabs
- * ggg_notebook_real_remove
- * ggg_notebook_update_labels
- * ggg_notebook_timer
- * ggg_notebook_set_scroll_timer
- * ggg_notebook_page_compare
- * ggg_notebook_real_page_position
- * ggg_notebook_search_page
- */
-static void
-ggg_notebook_redraw_tabs (GggNotebook *notebook)
-{
-  GtkWidget *widget;
-  GggNotebookPage *page;
-  GdkRectangle redraw_rect;
-  gint border;
-  gint tab_pos = get_effective_tab_pos (notebook);
-
-  widget = GTK_WIDGET (notebook);
-  border = GTK_CONTAINER (notebook)->border_width;
-
-  if (!GTK_WIDGET_MAPPED (notebook) || !notebook->first_tab)
-    return;
-
-  page = notebook->first_tab->data;
-
-  redraw_rect.x = border;
-  redraw_rect.y = border;
-
-  switch (tab_pos)
-    {
-    case GTK_POS_BOTTOM:
-      redraw_rect.y = widget->allocation.height - border -
-	page->allocation.height - widget->style->ythickness;
-
-      if (page != notebook->cur_page)
-	redraw_rect.y -= widget->style->ythickness;
-      /* fall through */
-    case GTK_POS_TOP:
-      redraw_rect.width = widget->allocation.width - 2 * border;
-      redraw_rect.height = page->allocation.height + widget->style->ythickness;
-
-      if (page != notebook->cur_page)
-	redraw_rect.height += widget->style->ythickness;
-      break;
-    case GTK_POS_RIGHT:
-      redraw_rect.x = widget->allocation.width - border -
-	page->allocation.width - widget->style->xthickness;
-
-      if (page != notebook->cur_page)
-	redraw_rect.x -= widget->style->xthickness;
-      /* fall through */
-    case GTK_POS_LEFT:
-      redraw_rect.width = page->allocation.width + widget->style->xthickness;
-      redraw_rect.height = widget->allocation.height - 2 * border;
-
-      if (page != notebook->cur_page)
-	redraw_rect.width += widget->style->xthickness;
-      break;
-    }
-
-  redraw_rect.x += widget->allocation.x;
-  redraw_rect.y += widget->allocation.y;
-
-  gdk_window_invalidate_rect (widget->window, &redraw_rect, TRUE);
-}
-
-static void
-ggg_notebook_redraw_arrows (GggNotebook *notebook)
-{
-  if (GTK_WIDGET_MAPPED (notebook) && ggg_notebook_show_arrows (notebook))
-    {
-      GdkRectangle rect;
-      gint i;
-      GggNotebookArrow arrow[4];
-
-      arrow[0] = notebook->has_before_previous ? ARROW_LEFT_BEFORE : ARROW_NONE;
-      arrow[1] = notebook->has_before_next ? ARROW_RIGHT_BEFORE : ARROW_NONE;
-      arrow[2] = notebook->has_after_previous ? ARROW_LEFT_AFTER : ARROW_NONE;
-      arrow[3] = notebook->has_after_next ? ARROW_RIGHT_AFTER : ARROW_NONE;
-
-      for (i = 0; i < 4; i++)
-	{
-	  if (arrow[i] == ARROW_NONE)
-	    continue;
-
-	  ggg_notebook_get_arrow_rect (notebook, &rect, arrow[i]);
-	  gdk_window_invalidate_rect (GTK_WIDGET (notebook)->window,
-				      &rect, FALSE);
-	}
-    }
-}
-
-static gboolean
-ggg_notebook_timer (GggNotebook *notebook)
-{
-  gboolean retval = FALSE;
-
-  if (notebook->timer)
-    {
-      ggg_notebook_do_arrow (notebook, notebook->click_child);
-
-      if (notebook->need_timer)
-	{
-          GtkSettings *settings;
-          guint        timeout;
-
-          settings = gtk_widget_get_settings (GTK_WIDGET (notebook));
-          g_object_get (settings, "gtk-timeout-repeat", &timeout, NULL);
-
-	  notebook->need_timer = FALSE;
-	  notebook->timer = gdk_threads_add_timeout (timeout * SCROLL_DELAY_FACTOR,
-					   (GSourceFunc) ggg_notebook_timer,
-					   (gpointer) notebook);
-	}
-      else
-	retval = TRUE;
-    }
-
-  return retval;
-}
-
-static void
-ggg_notebook_set_scroll_timer (GggNotebook *notebook)
-{
-  GtkWidget *widget = GTK_WIDGET (notebook);
-
-  if (!notebook->timer)
-    {
-      GtkSettings *settings = gtk_widget_get_settings (widget);
-      guint timeout;
-
-      g_object_get (settings, "gtk-timeout-initial", &timeout, NULL);
-
-      notebook->timer = gdk_threads_add_timeout (timeout,
-				       (GSourceFunc) ggg_notebook_timer,
-				       (gpointer) notebook);
-      notebook->need_timer = TRUE;
-    }
-}
-
-static gint
-ggg_notebook_page_compare (gconstpointer a,
-			   gconstpointer b)
-{
-  return (((GggNotebookPage *) a)->child != b);
-}
-
-static GList*
-ggg_notebook_find_child (GggNotebook *notebook,
-			 GtkWidget   *child,
-			 const gchar *function)
-{
-  GList *list = g_list_find_custom (notebook->children, child,
-				    ggg_notebook_page_compare);
-
-#ifndef G_DISABLE_CHECKS
-  if (!list && function)
-    g_warning ("%s: unable to find child %p in notebook %p",
-	       function, child, notebook);
-#endif
-
-  return list;
-}
-
-static void
-ggg_notebook_remove_tab_label (GggNotebook     *notebook,
-			       GggNotebookPage *page)
-{
-  if (page->tab_label)
-    {
-      if (page->mnemonic_activate_signal)
-	g_signal_handler_disconnect (page->tab_label,
-				     page->mnemonic_activate_signal);
-      page->mnemonic_activate_signal = 0;
-
-      gtk_widget_set_state (page->tab_label, GTK_STATE_NORMAL);
-      gtk_widget_unparent (page->tab_label);
-      page->tab_label = NULL;
-    }
-}
-
-static void
-ggg_notebook_real_remove (GggNotebook *notebook,
-			  GList       *list)
-{
-  GggNotebookPrivate *priv;
-  GggNotebookPage *page;
-  GList * next_list;
-  gint need_resize = FALSE;
-  GtkWidget *tab_label;
-
-  gboolean destroying;
-
-  priv = GGG_NOTEBOOK_GET_PRIVATE (notebook);
-  destroying = GTK_OBJECT_FLAGS (notebook) & GTK_IN_DESTRUCTION;
-
-  next_list = ggg_notebook_search_page (notebook, list, STEP_PREV, TRUE);
-  if (!next_list)
-    next_list = ggg_notebook_search_page (notebook, list, STEP_NEXT, TRUE);
-
-  if (notebook->cur_page == list->data)
-    {
-      notebook->cur_page = NULL;
-      if (next_list && !destroying)
-	ggg_notebook_switch_page (notebook, GGG_NOTEBOOK_PAGE (next_list));
-    }
-
-  if (priv->detached_tab == list->data)
-    priv->detached_tab = NULL;
-
-  if (list == notebook->first_tab)
-    notebook->first_tab = next_list;
-  if (list == notebook->focus_tab && !destroying)
-    ggg_notebook_switch_focus_tab (notebook, next_list);
-
-  page = list->data;
-
-  g_signal_handler_disconnect (page->child, page->notify_visible_handler);
-
-  if (GTK_WIDGET_VISIBLE (page->child) && GTK_WIDGET_VISIBLE (notebook))
-    need_resize = TRUE;
-
-  gtk_widget_unparent (page->child);
-
-  tab_label = page->tab_label;
-  if (tab_label)
-    {
-      g_object_ref (tab_label);
-      ggg_notebook_remove_tab_label (notebook, page);
-      if (destroying)
-        gtk_widget_destroy (tab_label);
-      g_object_unref (tab_label);
-    }
-
-  if (notebook->menu)
-    {
-      gtk_container_remove (GTK_CONTAINER (notebook->menu),
-			    page->menu_label->parent);
-      gtk_widget_queue_resize (notebook->menu);
-    }
-  if (!page->default_menu)
-    g_object_unref (page->menu_label);
-
-  notebook->children = g_list_remove_link (notebook->children, list);
-  g_list_free (list);
-
-  if (page->last_focus_child)
-    {
-      g_object_remove_weak_pointer (G_OBJECT (page->last_focus_child), (gpointer *)&page->last_focus_child);
-      page->last_focus_child = NULL;
-    }
-
-  g_free (page);
-
-  ggg_notebook_update_labels (notebook);
-  if (need_resize)
-    gtk_widget_queue_resize (GTK_WIDGET (notebook));
-}
-
-static void
-ggg_notebook_update_labels (GggNotebook *notebook)
-{
-  GggNotebookPage *page;
-  GList *list;
-  gchar string[32];
-  gint page_num = 1;
-
-  if (!notebook->show_tabs && !notebook->menu)
-    return;
-
-  for (list = ggg_notebook_search_page (notebook, NULL, STEP_NEXT, FALSE);
-       list;
-       list = ggg_notebook_search_page (notebook, list, STEP_NEXT, FALSE))
-    {
-      page = list->data;
-      g_snprintf (string, sizeof(string), _("Page %u"), page_num++);
-      if (notebook->show_tabs)
-	{
-	  if (page->default_tab)
-	    {
-	      if (!page->tab_label)
-		{
-		  page->tab_label = gtk_label_new (string);
-		  gtk_widget_set_parent (page->tab_label,
-					 GTK_WIDGET (notebook));
-		}
-	      else
-		gtk_label_set_text (GTK_LABEL (page->tab_label), string);
-	    }
-
-	  if (GTK_WIDGET_VISIBLE (page->child) &&
-	      !GTK_WIDGET_VISIBLE (page->tab_label))
-	    gtk_widget_show (page->tab_label);
-	  else if (!GTK_WIDGET_VISIBLE (page->child) &&
-		   GTK_WIDGET_VISIBLE (page->tab_label))
-	    gtk_widget_hide (page->tab_label);
-	}
-      if (notebook->menu && page->default_menu)
-	{
-	  if (page->tab_label && GTK_IS_LABEL (page->tab_label))
-	    gtk_label_set_text (GTK_LABEL (page->menu_label),
-			   GTK_LABEL (page->tab_label)->label);
-	  else
-	    gtk_label_set_text (GTK_LABEL (page->menu_label), string);
-	}
-    }
-}
-
-static gint
-ggg_notebook_real_page_position (GggNotebook *notebook,
-				 GList       *list)
-{
-  GList *work;
-  gint count_start;
-
-  for (work = notebook->children, count_start = 0;
-       work && work != list; work = work->next)
-    if (GGG_NOTEBOOK_PAGE (work)->pack == GTK_PACK_START)
-      count_start++;
-
-  if (!work)
-    return -1;
-
-  if (GGG_NOTEBOOK_PAGE (list)->pack == GTK_PACK_START)
-    return count_start;
-
-  return (count_start + g_list_length (list) - 1);
-}
-
-static GList *
-ggg_notebook_search_page (GggNotebook *notebook,
-			  GList       *list,
-			  gint         direction,
-			  gboolean     find_visible)
-{
-  GggNotebookPage *page = NULL;
-  GList *old_list = NULL;
-  gint flag = 0;
-
-  switch (direction)
-    {
-    case STEP_PREV:
-      flag = GTK_PACK_END;
-      break;
-
-    case STEP_NEXT:
-      flag = GTK_PACK_START;
-      break;
-    }
-
-  if (list)
-    page = list->data;
-
-  if (!page || page->pack == flag)
-    {
-      if (list)
-	{
-	  old_list = list;
-	  list = list->next;
-	}
-      else
-	list = notebook->children;
-
-      while (list)
-	{
-	  page = list->data;
-	  if (page->pack == flag &&
-	      (!find_visible ||
-	       (GTK_WIDGET_VISIBLE (page->child) &&
-		(!page->tab_label || NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page)))))
-	    return list;
-	  old_list = list;
-	  list = list->next;
-	}
-      list = old_list;
-    }
-  else
-    {
-      old_list = list;
-      list = list->prev;
-    }
-  while (list)
-    {
-      page = list->data;
-      if (page->pack != flag &&
-	  (!find_visible ||
-	   (GTK_WIDGET_VISIBLE (page->child) &&
-	    (!page->tab_label || NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page)))))
-	return list;
-      old_list = list;
-      list = list->prev;
-    }
-  return NULL;
-}
-
-/* Private GggNotebook Drawing Functions:
- *
- * ggg_notebook_paint
- * ggg_notebook_draw_tab
- * ggg_notebook_draw_arrow
- */
-static void
-ggg_notebook_paint (GtkWidget    *widget,
-		    GdkRectangle *area)
-{
-  GggNotebook *notebook;
-  GggNotebookPrivate *priv;
-  GggNotebookPage *page;
-  GList *children;
-  gboolean showarrow;
-  gint width, height;
-  gint x, y;
-  gint border_width = GTK_CONTAINER (widget)->border_width;
-  gint gap_x = 0, gap_width = 0, step = STEP_PREV;
-  gboolean is_rtl;
-  gint tab_pos;
-
-  if (!GTK_WIDGET_DRAWABLE (widget))
-    return;
-
-  notebook = GGG_NOTEBOOK (widget);
-  priv = GGG_NOTEBOOK_GET_PRIVATE (notebook);
-  is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
-  tab_pos = get_effective_tab_pos (notebook);
-
-  if ((!notebook->show_tabs && !notebook->show_border) ||
-      !notebook->cur_page || !GTK_WIDGET_VISIBLE (notebook->cur_page->child))
-    return;
-
-  x = widget->allocation.x + border_width;
-  y = widget->allocation.y + border_width;
-  width = widget->allocation.width - border_width * 2;
-  height = widget->allocation.height - border_width * 2;
-
-  if (notebook->show_border && (!notebook->show_tabs || !notebook->children))
-    {
-      gtk_paint_box (widget->style, widget->window,
-		     GTK_STATE_NORMAL, GTK_SHADOW_OUT,
-		     area, widget, (char *)"notebook",
-		     x, y, width, height);
-      return;
-    }
-
-  if (!notebook->first_tab)
-    notebook->first_tab = notebook->children;
-
-  if (!GTK_WIDGET_MAPPED (notebook->cur_page->tab_label))
-    page = GGG_NOTEBOOK_PAGE (notebook->first_tab);
-  else
-    page = notebook->cur_page;
-
-  switch (tab_pos)
-    {
-    case GTK_POS_TOP:
-      y += page->allocation.height;
-      /* fall thru */
-    case GTK_POS_BOTTOM:
-      height -= page->allocation.height;
-      break;
-    case GTK_POS_LEFT:
-      x += page->allocation.width;
-      /* fall thru */
-    case GTK_POS_RIGHT:
-      width -= page->allocation.width;
-      break;
-    }
-
-  if (!NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, notebook->cur_page) ||
-      !GTK_WIDGET_MAPPED (notebook->cur_page->tab_label))
-    {
-      gap_x = 0;
-      gap_width = 0;
-    }
-  else
-    {
-      switch (tab_pos)
-	{
-	case GTK_POS_TOP:
-	case GTK_POS_BOTTOM:
-	  if (priv->operation == DRAG_OPERATION_REORDER)
-	    gap_x = priv->drag_window_x - widget->allocation.x - border_width;
-	  else
-	    gap_x = notebook->cur_page->allocation.x - widget->allocation.x - border_width;
-
-	  gap_width = notebook->cur_page->allocation.width;
-	  step = is_rtl ? STEP_NEXT : STEP_PREV;
-	  break;
-	case GTK_POS_LEFT:
-	case GTK_POS_RIGHT:
-	  if (priv->operation == DRAG_OPERATION_REORDER)
-	    gap_x = priv->drag_window_y - border_width - widget->allocation.y;
-	  else
-	    gap_x = notebook->cur_page->allocation.y - widget->allocation.y - border_width;
-
-	  gap_width = notebook->cur_page->allocation.height;
-	  step = STEP_PREV;
-	  break;
-	}
-    }
-  gtk_paint_box_gap (widget->style, widget->window,
-		     GTK_STATE_NORMAL, GTK_SHADOW_OUT,
-		     area, widget, (char *)"notebook",
-		     x, y, width, height,
-		     tab_pos, gap_x, gap_width);
-
-  showarrow = FALSE;
-  children = ggg_notebook_search_page (notebook, NULL, step, TRUE);
-  while (children)
-    {
-      page = children->data;
-      children = ggg_notebook_search_page (notebook, children,
-					   step, TRUE);
-      if (!GTK_WIDGET_VISIBLE (page->child))
-	continue;
-      if (!GTK_WIDGET_MAPPED (page->tab_label))
-	showarrow = TRUE;
-      else if (page != notebook->cur_page)
-	ggg_notebook_draw_tab (notebook, page, area);
-    }
-
-  if (showarrow && notebook->scrollable)
-    {
-      if (notebook->has_before_previous)
-	ggg_notebook_draw_arrow (notebook, ARROW_LEFT_BEFORE);
-      if (notebook->has_before_next)
-	ggg_notebook_draw_arrow (notebook, ARROW_RIGHT_BEFORE);
-      if (notebook->has_after_previous)
-	ggg_notebook_draw_arrow (notebook, ARROW_LEFT_AFTER);
-      if (notebook->has_after_next)
-	ggg_notebook_draw_arrow (notebook, ARROW_RIGHT_AFTER);
-    }
-  ggg_notebook_draw_tab (notebook, notebook->cur_page, area);
-}
-
-static void
-ggg_notebook_draw_tab (GggNotebook     *notebook,
-		       GggNotebookPage *page,
-		       GdkRectangle    *area)
-{
-  GggNotebookPrivate *priv;
-  GdkRectangle child_area;
-  GdkRectangle page_area;
-  GtkStateType state_type;
-  GtkPositionType gap_side;
-  GdkWindow *window;
-  GtkWidget *widget;
-
-  if (!NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page) ||
-      !GTK_WIDGET_MAPPED (page->tab_label) ||
-      (page->allocation.width == 0) || (page->allocation.height == 0))
-    return;
-
-  widget = GTK_WIDGET (notebook);
-  priv = GGG_NOTEBOOK_GET_PRIVATE (notebook);
-
-  if (priv->operation == DRAG_OPERATION_REORDER && page == notebook->cur_page)
-    window = priv->drag_window;
-  else
-    window = widget->window;
-
-  page_area.x = page->allocation.x;
-  page_area.y = page->allocation.y;
-  page_area.width = page->allocation.width;
-  page_area.height = page->allocation.height;
-
-  if (gdk_rectangle_intersect (&page_area, area, &child_area))
-    {
-      gap_side = get_tab_gap_pos (notebook);
-
-      if (notebook->cur_page == page)
-	state_type = GTK_STATE_NORMAL;
-      else
-	state_type = GTK_STATE_ACTIVE;
-
-      gtk_paint_extension (widget->style, window,
-			   state_type, GTK_SHADOW_OUT,
-			   area, widget, (char *)"tab",
-			   page_area.x, page_area.y,
-			   page_area.width, page_area.height,
-			   gap_side);
-    }
-}
-
-static void
-ggg_notebook_draw_arrow (GggNotebook      *notebook,
-			 GggNotebookArrow  nbarrow)
-{
-  GtkStateType state_type;
-  GtkShadowType shadow_type;
-  GtkWidget *widget;
-  GdkRectangle arrow_rect;
-  GtkArrowType arrow;
-  gboolean is_rtl, left;
-
-  if (GTK_WIDGET_DRAWABLE (notebook))
-    {
-      gint scroll_arrow_hlength;
-      gint scroll_arrow_vlength;
-      gint arrow_size;
-
-      ggg_notebook_get_arrow_rect (notebook, &arrow_rect, nbarrow);
-
-      widget = GTK_WIDGET (notebook);
-
-      is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
-      left = (ARROW_IS_LEFT (nbarrow) && !is_rtl) ||
-             (!ARROW_IS_LEFT (nbarrow) && is_rtl);
-
-      gtk_widget_style_get (widget,
-                            "scroll-arrow-hlength", &scroll_arrow_hlength,
-                            "scroll-arrow-vlength", &scroll_arrow_vlength,
-                            NULL);
-
-      if (notebook->in_child == nbarrow)
-        {
-          if (notebook->click_child == nbarrow)
-            state_type = GTK_STATE_ACTIVE;
-          else
-            state_type = GTK_STATE_PRELIGHT;
-        }
-      else
-        state_type = GTK_WIDGET_STATE (widget);
-
-      if (notebook->click_child == nbarrow)
-        shadow_type = GTK_SHADOW_IN;
-      else
-        shadow_type = GTK_SHADOW_OUT;
-
-      if (notebook->focus_tab &&
-	  !ggg_notebook_search_page (notebook, notebook->focus_tab,
-				     left ? STEP_PREV : STEP_NEXT, TRUE))
-	{
-	  shadow_type = GTK_SHADOW_ETCHED_IN;
-	  state_type = GTK_STATE_INSENSITIVE;
-	}
-
-      if (notebook->tab_pos == GTK_POS_LEFT ||
-	  notebook->tab_pos == GTK_POS_RIGHT)
-        {
-          arrow = (ARROW_IS_LEFT (nbarrow) ? GTK_ARROW_UP : GTK_ARROW_DOWN);
-          arrow_size = scroll_arrow_vlength;
-        }
-      else
-        {
-          arrow = (ARROW_IS_LEFT (nbarrow) ? GTK_ARROW_LEFT : GTK_ARROW_RIGHT);
-          arrow_size = scroll_arrow_hlength;
-        }
-
-      gtk_paint_arrow (widget->style, widget->window, state_type,
-		       shadow_type, NULL, widget, "notebook",
-		       arrow, TRUE, arrow_rect.x, arrow_rect.y,
-		       arrow_size, arrow_size);
-    }
-}
-
-/* Private GggNotebook Size Allocate Functions:
- *
- * ggg_notebook_tab_space
- * ggg_notebook_calculate_shown_tabs
- * ggg_notebook_calculate_tabs_allocation
- * ggg_notebook_pages_allocate
- * ggg_notebook_page_allocate
- * ggg_notebook_calc_tabs
- */
-static void
-ggg_notebook_tab_space (GggNotebook *notebook,
-			gboolean    *show_arrows,
-			gint        *min,
-			gint        *max,
-			gint        *tab_space)
-{
-  GggNotebookPrivate *priv;
-  GtkWidget *widget;
-  GList *children;
-  gint tab_pos = get_effective_tab_pos (notebook);
-  gint tab_overlap;
-  gint arrow_spacing;
-  gint scroll_arrow_hlength;
-  gint scroll_arrow_vlength;
-
-  widget = GTK_WIDGET (notebook);
-  priv = GGG_NOTEBOOK_GET_PRIVATE (notebook);
-  children = notebook->children;
-
-  gtk_widget_style_get (GTK_WIDGET (notebook),
-                        "arrow-spacing", &arrow_spacing,
-                        "scroll-arrow-hlength", &scroll_arrow_hlength,
-                        "scroll-arrow-vlength", &scroll_arrow_vlength,
-                        NULL);
-
-  switch (tab_pos)
-    {
-    case GTK_POS_TOP:
-    case GTK_POS_BOTTOM:
-      *min = widget->allocation.x + GTK_CONTAINER (notebook)->border_width;
-      *max = widget->allocation.x + widget->allocation.width - GTK_CONTAINER (notebook)->border_width;
-
-      while (children)
-	{
-          GggNotebookPage *page;
-
-	  page = children->data;
-	  children = children->next;
-
-	  if (NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page) &&
-	      GTK_WIDGET_VISIBLE (page->child))
-	    *tab_space += page->requisition.width;
-	}
-      break;
-    case GTK_POS_RIGHT:
-    case GTK_POS_LEFT:
-      *min = widget->allocation.y + GTK_CONTAINER (notebook)->border_width;
-      *max = widget->allocation.y + widget->allocation.height - GTK_CONTAINER (notebook)->border_width;
-
-      while (children)
-	{
-          GggNotebookPage *page;
-
-	  page = children->data;
-	  children = children->next;
-
-	  if (NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page) &&
-	      GTK_WIDGET_VISIBLE (page->child))
-	    *tab_space += page->requisition.height;
-	}
-      break;
-    }
-
-  if (!notebook->scrollable)
-    *show_arrows = FALSE;
-  else
-    {
-      gtk_widget_style_get (widget, "tab-overlap", &tab_overlap, NULL);
-
-      switch (tab_pos)
-	{
-	case GTK_POS_TOP:
-	case GTK_POS_BOTTOM:
-	  if (*tab_space > *max - *min - tab_overlap)
-	    {
-	      *show_arrows = TRUE;
-
-	      /* take arrows into account */
-	      *tab_space = widget->allocation.width - tab_overlap -
-		2 * GTK_CONTAINER (notebook)->border_width;
-
-	      if (notebook->has_after_previous)
-		{
-		  *tab_space -= arrow_spacing + scroll_arrow_hlength;
-		  *max -= arrow_spacing + scroll_arrow_hlength;
-		}
-
-	      if (notebook->has_after_next)
-		{
-		  *tab_space -= arrow_spacing + scroll_arrow_hlength;
-		  *max -= arrow_spacing + scroll_arrow_hlength;
-		}
-
-	      if (notebook->has_before_previous)
-		{
-		  *tab_space -= arrow_spacing + scroll_arrow_hlength;
-		  *min += arrow_spacing + scroll_arrow_hlength;
-		}
-
-	      if (notebook->has_before_next)
-		{
-		  *tab_space -= arrow_spacing + scroll_arrow_hlength;
-		  *min += arrow_spacing + scroll_arrow_hlength;
-		}
-	    }
-	  break;
-	case GTK_POS_LEFT:
-	case GTK_POS_RIGHT:
-	  if (*tab_space > *max - *min - tab_overlap)
-	    {
-	      *show_arrows = TRUE;
-
-	      /* take arrows into account */
-	      *tab_space = widget->allocation.height -
-		tab_overlap - 2 * GTK_CONTAINER (notebook)->border_width;
-
-	      if (notebook->has_after_previous || notebook->has_after_next)
-		{
-		  *tab_space -= arrow_spacing + scroll_arrow_vlength;
-		  *max -= arrow_spacing + scroll_arrow_vlength;
-		}
-
-	      if (notebook->has_before_previous || notebook->has_before_next)
-		{
-		  *tab_space -= arrow_spacing + scroll_arrow_vlength;
-		  *min += arrow_spacing + scroll_arrow_vlength;
-		}
-	    }
-	  break;
-	}
-    }
-}
-
-static void
-ggg_notebook_calculate_shown_tabs (GggNotebook *notebook,
-				   gboolean     show_arrows,
-				   gint         min,
-				   gint         max,
-				   gint         tab_space,
-				   GList      **last_child,
-				   gint        *n,
-				   gint        *remaining_space)
-{
-  GtkWidget *widget;
-  GtkContainer *container;
-  GList *children;
-  GggNotebookPage *page;
-  gint tab_pos, tab_overlap;
-
-  widget = GTK_WIDGET (notebook);
-  container = GTK_CONTAINER (notebook);
-  gtk_widget_style_get (widget, "tab-overlap", &tab_overlap, NULL);
-  tab_pos = get_effective_tab_pos (notebook);
-
-  if (show_arrows) /* first_tab <- focus_tab */
-    {
-      *remaining_space = tab_space;
-
-      if (NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, notebook->cur_page) &&
-	  GTK_WIDGET_VISIBLE (notebook->cur_page->child))
-	{
-	  ggg_notebook_calc_tabs (notebook,
-				  notebook->focus_tab,
-				  &(notebook->focus_tab),
-				  remaining_space, STEP_NEXT);
-	}
-
-      if (tab_space <= 0 || *remaining_space < 0)
-	{
-	  /* show 1 tab */
-	  notebook->first_tab = notebook->focus_tab;
-	  *last_child = ggg_notebook_search_page (notebook, notebook->focus_tab,
-						  STEP_NEXT, TRUE);
-	  page = notebook->first_tab->data;
-	  *remaining_space = tab_space - page->requisition.width;
-	  *n = 1;
-	}
-      else
-	{
-	  children = NULL;
-
-	  if (notebook->first_tab && notebook->first_tab != notebook->focus_tab)
-	    {
-	      /* Is first_tab really predecessor of focus_tab? */
-	      page = notebook->first_tab->data;
-	      if (NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page) &&
-		  GTK_WIDGET_VISIBLE (page->child))
-		for (children = notebook->focus_tab;
-		     children && children != notebook->first_tab;
-		     children = ggg_notebook_search_page (notebook,
-							  children,
-							  STEP_PREV,
-							  TRUE));
-	    }
-
-	  if (!children)
-	    {
-	      if (NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, notebook->cur_page))
-		notebook->first_tab = notebook->focus_tab;
-	      else
-		notebook->first_tab = ggg_notebook_search_page (notebook, notebook->focus_tab,
-								STEP_NEXT, TRUE);
-	    }
-	  else
-	    /* calculate shown tabs counting backwards from the focus tab */
-	    ggg_notebook_calc_tabs (notebook,
-				    ggg_notebook_search_page (notebook,
-							      notebook->focus_tab,
-							      STEP_PREV,
-							      TRUE),
-				    &(notebook->first_tab), remaining_space,
-				    STEP_PREV);
-
-	  if (*remaining_space < 0)
-	    {
-	      notebook->first_tab =
-		ggg_notebook_search_page (notebook, notebook->first_tab,
-					  STEP_NEXT, TRUE);
-	      if (!notebook->first_tab)
-		notebook->first_tab = notebook->focus_tab;
-
-	      *last_child = ggg_notebook_search_page (notebook, notebook->focus_tab,
-						      STEP_NEXT, TRUE);
-	    }
-	  else /* focus_tab -> end */
-	    {
-	      if (!notebook->first_tab)
-		notebook->first_tab = ggg_notebook_search_page (notebook,
-								NULL,
-								STEP_NEXT,
-								TRUE);
-	      children = NULL;
-	      ggg_notebook_calc_tabs (notebook,
-				      ggg_notebook_search_page (notebook,
-								notebook->focus_tab,
-								STEP_NEXT,
-								TRUE),
-				      &children, remaining_space, STEP_NEXT);
-
-	      if (*remaining_space <= 0)
-		*last_child = children;
-	      else /* start <- first_tab */
-		{
-		  *last_child = NULL;
-		  children = NULL;
-
-		  ggg_notebook_calc_tabs (notebook,
-					  ggg_notebook_search_page (notebook,
-								    notebook->first_tab,
-								    STEP_PREV,
-								    TRUE),
-					  &children, remaining_space, STEP_PREV);
-
-		  if (*remaining_space == 0)
-		    notebook->first_tab = children;
-		  else
-		    notebook->first_tab = ggg_notebook_search_page(notebook,
-								   children,
-								   STEP_NEXT,
-								   TRUE);
-		}
-	    }
-
-	  if (*remaining_space < 0)
-	    {
-	      /* calculate number of tabs */
-	      *remaining_space = - (*remaining_space);
-	      *n = 0;
-
-	      for (children = notebook->first_tab;
-		   children && children != *last_child;
-		   children = ggg_notebook_search_page (notebook, children,
-							STEP_NEXT, TRUE))
-		(*n)++;
-	    }
-	  else
-	    *remaining_space = 0;
-	}
-
-      /* unmap all non-visible tabs */
-      for (children = ggg_notebook_search_page (notebook, NULL,
-						STEP_NEXT, TRUE);
-	   children && children != notebook->first_tab;
-	   children = ggg_notebook_search_page (notebook, children,
-						STEP_NEXT, TRUE))
-	{
-	  page = children->data;
-
-	  if (page->tab_label &&
-	      NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page))
-	    gtk_widget_set_child_visible (page->tab_label, FALSE);
-	}
-
-      for (children = *last_child; children;
-	   children = ggg_notebook_search_page (notebook, children,
-						STEP_NEXT, TRUE))
-	{
-	  page = children->data;
-
-	  if (page->tab_label &&
-	      NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page))
-	    gtk_widget_set_child_visible (page->tab_label, FALSE);
-	}
-    }
-  else /* !show_arrows */
-    {
-      gint c = 0;
-      *n = 0;
-
-      *remaining_space = max - min - tab_overlap - tab_space;
-      children = notebook->children;
-      notebook->first_tab = ggg_notebook_search_page (notebook, NULL,
-						      STEP_NEXT, TRUE);
-      while (children)
-	{
-	  page = children->data;
-	  children = children->next;
-
-	  if (!NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page) ||
-	      !GTK_WIDGET_VISIBLE (page->child))
-	    continue;
-
-	  c++;
-
-	  if (page->expand)
-	    (*n)++;
-	}
-
-      /* if notebook is homogeneous, all tabs are expanded */
-      if (notebook->homogeneous && *n)
-	*n = c;
-    }
-}
-
-static gboolean
-get_allocate_at_bottom (GtkWidget *widget,
-			gint       search_direction)
-{
-  gboolean is_rtl = (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL);
-  gboolean tab_pos = get_effective_tab_pos (GGG_NOTEBOOK (widget));
-
-  switch (tab_pos)
-    {
-    case GTK_POS_TOP:
-    case GTK_POS_BOTTOM:
-      if (!is_rtl)
-	return (search_direction == STEP_PREV);
-      else
-	return (search_direction == STEP_NEXT);
-
-      break;
-    case GTK_POS_RIGHT:
-    case GTK_POS_LEFT:
-      return (search_direction == STEP_PREV);
-      break;
-    }
-
-  return FALSE;
-}
-
-static gboolean
-ggg_notebook_calculate_tabs_allocation (GggNotebook  *notebook,
-					GList       **children,
-					GList        *last_child,
-					gboolean      showarrow,
-					gint          direction,
-					gint         *remaining_space,
-					gint         *expanded_tabs,
-					gint          min,
-					gint          max)
-{
-  GtkWidget *widget;
-  GtkContainer *container;
-  GggNotebookPrivate *priv;
-  GggNotebookPage *page;
-  gboolean allocate_at_bottom;
-  gint tab_overlap, tab_pos, tab_extra_space;
-  gint left_x, right_x, top_y, bottom_y, anchor;
-  gint xthickness, ythickness;
-  gboolean gap_left, packing_changed;
-  GtkAllocation child_allocation = { 0, };
-  gboolean allocation_changed = FALSE;
-
-  widget = GTK_WIDGET (notebook);
-  container = GTK_CONTAINER (notebook);
-  priv = GGG_NOTEBOOK_GET_PRIVATE (notebook);
-  gtk_widget_style_get (widget, "tab-overlap", &tab_overlap, NULL);
-  tab_pos = get_effective_tab_pos (notebook);
-  allocate_at_bottom = get_allocate_at_bottom (widget, direction);
-  anchor = 0;
-
-  child_allocation.x = widget->allocation.x + container->border_width;
-  child_allocation.y = widget->allocation.y + container->border_width;
-
-  xthickness = widget->style->xthickness;
-  ythickness = widget->style->ythickness;
-
-  switch (tab_pos)
-    {
-    case GTK_POS_BOTTOM:
-      child_allocation.y = widget->allocation.y + widget->allocation.height -
-	notebook->cur_page->requisition.height - container->border_width;
-      /* fall through */
-    case GTK_POS_TOP:
-      child_allocation.x = (allocate_at_bottom) ? max : min;
-      child_allocation.height = notebook->cur_page->requisition.height;
-      anchor = child_allocation.x;
-      break;
-
-    case GTK_POS_RIGHT:
-      child_allocation.x = widget->allocation.x + widget->allocation.width -
-	notebook->cur_page->requisition.width - container->border_width;
-      /* fall through */
-    case GTK_POS_LEFT:
-      child_allocation.y = (allocate_at_bottom) ? max : min;
-      child_allocation.width = notebook->cur_page->requisition.width;
-      anchor = child_allocation.y;
-      break;
-    }
-
-  left_x   = CLAMP (priv->mouse_x - priv->drag_offset_x,
-		    min, max - notebook->cur_page->allocation.width);
-  top_y    = CLAMP (priv->mouse_y - priv->drag_offset_y,
-		    min, max - notebook->cur_page->allocation.height);
-  right_x  = left_x + notebook->cur_page->allocation.width;
-  bottom_y = top_y + notebook->cur_page->allocation.height;
-  gap_left = packing_changed = FALSE;
-
-  while (*children && *children != last_child)
-    {
-      page = (*children)->data;
-
-      if (direction == STEP_NEXT && page->pack != GTK_PACK_START)
-	{
-	  if (!showarrow)
-	    break;
-	  else if (priv->operation == DRAG_OPERATION_REORDER)
-	    packing_changed = TRUE;
-	}
-
-      if (direction == STEP_NEXT)
-	*children = ggg_notebook_search_page (notebook, *children, direction, TRUE);
-      else
-	{
-	  *children = (*children)->next;
-
-          if (page->pack != GTK_PACK_END || !GTK_WIDGET_VISIBLE (page->child))
-	    continue;
-	}
-
-      if (!NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page))
-	continue;
-
-      tab_extra_space = 0;
-      if (*expanded_tabs && (showarrow || page->expand || notebook->homogeneous))
-	{
-	  tab_extra_space = *remaining_space / *expanded_tabs;
-	  *remaining_space -= tab_extra_space;
-	  (*expanded_tabs)--;
-	}
-
-      switch (tab_pos)
-	{
-	case GTK_POS_TOP:
-	case GTK_POS_BOTTOM:
-	  child_allocation.width = page->requisition.width + tab_overlap + tab_extra_space;
-
-	  /* make sure that the reordered tab doesn't go past the last position */
-	  if (priv->operation == DRAG_OPERATION_REORDER &&
-	      !gap_left && packing_changed)
-	    {
-	      if (!allocate_at_bottom)
-		{
-		  if ((notebook->cur_page->pack == GTK_PACK_START && left_x >= anchor) ||
-		      (notebook->cur_page->pack == GTK_PACK_END && left_x < anchor))
-		    {
-		      left_x = priv->drag_window_x = anchor;
-		      anchor += notebook->cur_page->allocation.width - tab_overlap;
-		    }
-		}
-	      else
-		{
-		  if ((notebook->cur_page->pack == GTK_PACK_START && right_x <= anchor) ||
-		      (notebook->cur_page->pack == GTK_PACK_END && right_x > anchor))
-		    {
-		      anchor -= notebook->cur_page->allocation.width;
-		      left_x = priv->drag_window_x = anchor;
-		      anchor += tab_overlap;
-		    }
-		}
-
-	      gap_left = TRUE;
-	    }
-
-	  if (priv->operation == DRAG_OPERATION_REORDER && page == notebook->cur_page)
-	    {
-	      priv->drag_window_x = left_x;
-	      priv->drag_window_y = child_allocation.y;
-	    }
- 	  else
- 	    {
- 	      if (allocate_at_bottom)
-		anchor -= child_allocation.width;
-
- 	      if (priv->operation == DRAG_OPERATION_REORDER && page->pack == notebook->cur_page->pack)
- 		{
- 		  if (!allocate_at_bottom &&
- 		      left_x >= anchor &&
- 		      left_x <= anchor + child_allocation.width / 2)
- 		    anchor += notebook->cur_page->allocation.width - tab_overlap;
- 		  else if (allocate_at_bottom &&
- 			   right_x >= anchor + child_allocation.width / 2 &&
- 			   right_x <= anchor + child_allocation.width)
- 		    anchor -= notebook->cur_page->allocation.width - tab_overlap;
- 		}
-
-	      child_allocation.x = anchor;
- 	    }
-
-	  break;
-	case GTK_POS_LEFT:
-	case GTK_POS_RIGHT:
-	  child_allocation.height = page->requisition.height + tab_overlap + tab_extra_space;
-
-	  /* make sure that the reordered tab doesn't go past the last position */
-	  if (priv->operation == DRAG_OPERATION_REORDER &&
-	      !gap_left && packing_changed)
-	    {
-	      if (!allocate_at_bottom &&
-		  ((notebook->cur_page->pack == GTK_PACK_START && top_y >= anchor) ||
-		   (notebook->cur_page->pack == GTK_PACK_END && top_y < anchor)))
-		{
-		  top_y = priv->drag_window_y = anchor;
-		  anchor += notebook->cur_page->allocation.height - tab_overlap;
-		}
-
-	      gap_left = TRUE;
-	    }
-
-	  if (priv->operation == DRAG_OPERATION_REORDER && page == notebook->cur_page)
-	    {
-	      priv->drag_window_x = child_allocation.x;
-	      priv->drag_window_y = top_y;
-	    }
- 	  else
- 	    {
-	      if (allocate_at_bottom)
-		anchor -= child_allocation.height;
-
- 	      if (priv->operation == DRAG_OPERATION_REORDER && page->pack == notebook->cur_page->pack)
-		{
-		  if (!allocate_at_bottom &&
-		      top_y >= anchor &&
-		      top_y <= anchor + child_allocation.height / 2)
-		    anchor += notebook->cur_page->allocation.height - tab_overlap;
-		  else if (allocate_at_bottom &&
-			   bottom_y >= anchor + child_allocation.height / 2 &&
-			   bottom_y <= anchor + child_allocation.height)
-		    anchor -= notebook->cur_page->allocation.height - tab_overlap;
-		}
-
-	      child_allocation.y = anchor;
- 	    }
-
-	  break;
-	}
-
-      if ((priv->operation != DRAG_OPERATION_REORDER || page != notebook->cur_page) &&
-	  (page->allocation.x != child_allocation.x ||
-	   page->allocation.y != child_allocation.y ||
-	   page->allocation.width != child_allocation.width ||
-	   page->allocation.height != child_allocation.height))
-	allocation_changed = TRUE;
-
-      page->allocation = child_allocation;
-
-      if ((page == priv->detached_tab && priv->operation == DRAG_OPERATION_DETACH) ||
-	  (page == notebook->cur_page && priv->operation == DRAG_OPERATION_REORDER))
-	{
-	  /* needs to be allocated at 0,0
-	   * to be shown in the drag window */
-	  page->allocation.x = 0;
-	  page->allocation.y = 0;
-	}
-
-      if (page != notebook->cur_page)
-	{
-	  switch (tab_pos)
-	    {
-	    case GTK_POS_TOP:
-	      page->allocation.y += ythickness;
-	      /* fall through */
-	    case GTK_POS_BOTTOM:
-	      page->allocation.height = MAX (1, page->allocation.height - ythickness);
-	      break;
-	    case GTK_POS_LEFT:
-	      page->allocation.x += xthickness;
-	      /* fall through */
-	    case GTK_POS_RIGHT:
-	      page->allocation.width = MAX (1, page->allocation.width - xthickness);
-	      break;
-	    }
-	}
-
-      /* calculate whether to leave a gap based on reorder operation or not */
-      switch (tab_pos)
-	{
-	case GTK_POS_TOP:
-	case GTK_POS_BOTTOM:
- 	  if (priv->operation != DRAG_OPERATION_REORDER ||
-	      (priv->operation == DRAG_OPERATION_REORDER && page != notebook->cur_page))
- 	    {
- 	      if (priv->operation == DRAG_OPERATION_REORDER)
- 		{
- 		  if (page->pack == notebook->cur_page->pack &&
- 		      !allocate_at_bottom &&
- 		      left_x >  anchor + child_allocation.width / 2 &&
- 		      left_x <= anchor + child_allocation.width)
- 		    anchor += notebook->cur_page->allocation.width - tab_overlap;
- 		  else if (page->pack == notebook->cur_page->pack &&
- 			   allocate_at_bottom &&
- 			   right_x >= anchor &&
- 			   right_x <= anchor + child_allocation.width / 2)
- 		    anchor -= notebook->cur_page->allocation.width - tab_overlap;
- 		}
-
- 	      if (!allocate_at_bottom)
- 		anchor += child_allocation.width - tab_overlap;
- 	      else
- 		anchor += tab_overlap;
- 	    }
-
-	  break;
-	case GTK_POS_LEFT:
-	case GTK_POS_RIGHT:
- 	  if (priv->operation != DRAG_OPERATION_REORDER  ||
-	      (priv->operation == DRAG_OPERATION_REORDER && page != notebook->cur_page))
- 	    {
- 	      if (priv->operation == DRAG_OPERATION_REORDER)
-		{
-		  if (page->pack == notebook->cur_page->pack &&
-		      !allocate_at_bottom &&
-		      top_y >= anchor + child_allocation.height / 2 &&
-		      top_y <= anchor + child_allocation.height)
-		    anchor += notebook->cur_page->allocation.height - tab_overlap;
-		  else if (page->pack == notebook->cur_page->pack &&
-			   allocate_at_bottom &&
-			   bottom_y >= anchor &&
-			   bottom_y <= anchor + child_allocation.height / 2)
-		    anchor -= notebook->cur_page->allocation.height - tab_overlap;
-		}
-
-	      if (!allocate_at_bottom)
-		anchor += child_allocation.height - tab_overlap;
-	      else
-		anchor += tab_overlap;
- 	    }
-
-	  break;
-	}
-
-      /* set child visible */
-      if (page->tab_label)
-	gtk_widget_set_child_visible (page->tab_label, TRUE);
-    }
-
-  /* Don't move the current tab past the last position during tabs reordering */
-  if (children &&
-      priv->operation == DRAG_OPERATION_REORDER &&
-      ((direction == STEP_NEXT && notebook->cur_page->pack == GTK_PACK_START) ||
-       ((direction == STEP_PREV || packing_changed) && notebook->cur_page->pack == GTK_PACK_END)))
-    {
-      switch (tab_pos)
-	{
-	case GTK_POS_TOP:
-	case GTK_POS_BOTTOM:
-	  if (allocate_at_bottom)
-	    anchor -= notebook->cur_page->allocation.width;
-
-	  if ((!allocate_at_bottom && priv->drag_window_x > anchor) ||
-	      (allocate_at_bottom && priv->drag_window_x < anchor))
-	    priv->drag_window_x = anchor;
-	  break;
-	case GTK_POS_LEFT:
-	case GTK_POS_RIGHT:
-	  if (allocate_at_bottom)
-	    anchor -= notebook->cur_page->allocation.height;
-
-	  if ((!allocate_at_bottom && priv->drag_window_y > anchor) ||
-	      (allocate_at_bottom && priv->drag_window_y < anchor))
-	    priv->drag_window_y = anchor;
-	  break;
-	}
-    }
-
-  return allocation_changed;
-}
-
-static void
-ggg_notebook_pages_allocate (GggNotebook *notebook)
-{
-  GList *children = NULL;
-  GList *last_child = NULL;
-  gboolean showarrow = FALSE;
-  gint tab_space, min, max, remaining_space;
-  gint expanded_tabs, operation;
-
-  if (!notebook->show_tabs || !notebook->children || !notebook->cur_page)
-    return;
-
-  min = max = tab_space = remaining_space = 0;
-  expanded_tabs = 1;
-
-  ggg_notebook_tab_space (notebook, &showarrow,
-			  &min, &max, &tab_space);
-
-  ggg_notebook_calculate_shown_tabs (notebook, showarrow,
-				     min, max, tab_space, &last_child,
-				     &expanded_tabs, &remaining_space);
-
-  children = notebook->first_tab;
-  ggg_notebook_calculate_tabs_allocation (notebook, &children, last_child,
-					  showarrow, STEP_NEXT,
-					  &remaining_space, &expanded_tabs, min, max);
-  if (children && children != last_child)
-    {
-      children = notebook->children;
-      ggg_notebook_calculate_tabs_allocation (notebook, &children, last_child,
-					      showarrow, STEP_PREV,
-					      &remaining_space, &expanded_tabs, min, max);
-    }
-
-  children = notebook->children;
-
-  while (children)
-    {
-      ggg_notebook_page_allocate (notebook, GGG_NOTEBOOK_PAGE (children));
-      children = children->next;
-    }
-
-  operation = GGG_NOTEBOOK_GET_PRIVATE (notebook)->operation;
-
-  if (!notebook->first_tab)
-    notebook->first_tab = notebook->children;
-
-  ggg_notebook_redraw_tabs (notebook);
-}
-
-static void
-ggg_notebook_page_allocate (GggNotebook     *notebook,
-			    GggNotebookPage *page)
-{
-  GtkWidget *widget = GTK_WIDGET (notebook);
-  GtkAllocation child_allocation;
-  GtkRequisition tab_requisition;
-  gint xthickness;
-  gint ythickness;
-  gint padding;
-  gint focus_width;
-  gint tab_curvature;
-  gint tab_pos = get_effective_tab_pos (notebook);
-
-  if (!page->tab_label)
-    return;
-
-  xthickness = widget->style->xthickness;
-  ythickness = widget->style->ythickness;
-
-  gtk_widget_get_child_requisition (page->tab_label, &tab_requisition);
-  gtk_widget_style_get (widget,
-			"focus-line-width", &focus_width,
-			"tab-curvature", &tab_curvature,
-			NULL);
-  switch (tab_pos)
-    {
-    case GTK_POS_TOP:
-    case GTK_POS_BOTTOM:
-      padding = tab_curvature + focus_width + notebook->tab_hborder;
-      if (page->fill)
-	{
-	  child_allocation.x = xthickness + focus_width + notebook->tab_hborder;
-	  child_allocation.width = MAX (1, page->allocation.width - 2 * child_allocation.x);
-	  child_allocation.x += page->allocation.x;
-	}
-      else
-	{
-	  child_allocation.x = page->allocation.x +
-	    (page->allocation.width - tab_requisition.width) / 2;
-
-	  child_allocation.width = tab_requisition.width;
-	}
-
-      child_allocation.y = notebook->tab_vborder + focus_width + page->allocation.y;
-
-      if (tab_pos == GTK_POS_TOP)
-	child_allocation.y += ythickness;
-
-      child_allocation.height = MAX (1, (page->allocation.height - ythickness -
-					 2 * (notebook->tab_vborder + focus_width)));
-      break;
-    case GTK_POS_LEFT:
-    case GTK_POS_RIGHT:
-      padding = tab_curvature + focus_width + notebook->tab_vborder;
-      if (page->fill)
-	{
-	  child_allocation.y = ythickness + padding;
-	  child_allocation.height = MAX (1, (page->allocation.height -
-					     2 * child_allocation.y));
-	  child_allocation.y += page->allocation.y;
-	}
-      else
-	{
-	  child_allocation.y = page->allocation.y +
-	    (page->allocation.height - tab_requisition.height) / 2;
-
-	  child_allocation.height = tab_requisition.height;
-	}
-
-      child_allocation.x = notebook->tab_hborder + focus_width + page->allocation.x;
-
-      if (tab_pos == GTK_POS_LEFT)
-	child_allocation.x += xthickness;
-
-      child_allocation.width = MAX (1, (page->allocation.width - xthickness -
-					2 * (notebook->tab_hborder + focus_width)));
-      break;
-    }
-
-  gtk_widget_size_allocate (page->tab_label, &child_allocation);
-}
-
-static void
-ggg_notebook_calc_tabs (GggNotebook  *notebook,
-			GList        *start,
-                        GList       **end,
-			gint         *tab_space,
-                        guint         direction)
-{
-  GggNotebookPage *page = NULL;
-  GList *children;
-  GList *last_list = NULL;
-  GList *last_calculated_child = NULL;
-  gboolean pack;
-  gint tab_pos = get_effective_tab_pos (notebook);
-  guint real_direction;
-
-  if (!start)
-    return;
-
-  children = start;
-  pack = GGG_NOTEBOOK_PAGE (start)->pack;
-  if (pack == GTK_PACK_END)
-    real_direction = (direction == STEP_PREV) ? STEP_NEXT : STEP_PREV;
-  else
-    real_direction = direction;
-
-  while (1)
-    {
-      switch (tab_pos)
-	{
-	case GTK_POS_TOP:
-	case GTK_POS_BOTTOM:
-	  while (children)
-	    {
-	      page = children->data;
-	      if (NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page) &&
-		  GTK_WIDGET_VISIBLE (page->child))
-		{
-		  if (page->pack == pack)
-		    {
-		      *tab_space -= page->requisition.width;
-		      if (*tab_space < 0 || children == *end)
-			{
-			  if (*tab_space < 0)
-			    {
-			      *tab_space = - (*tab_space +
-					      page->requisition.width);
-
-			      if (*tab_space == 0 && direction == STEP_PREV)
-				children = last_calculated_child;
-
-			      *end = children;
-			    }
-			  return;
-			}
-
-		      last_calculated_child = children;
-		    }
-		  last_list = children;
-		}
-	      if (real_direction == STEP_NEXT)
-		children = children->next;
-	      else
-		children = children->prev;
-	    }
-	  break;
-	case GTK_POS_LEFT:
-	case GTK_POS_RIGHT:
-	  while (children)
-	    {
-	      page = children->data;
-	      if (NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page) &&
-		  GTK_WIDGET_VISIBLE (page->child))
-		{
-		  if (page->pack == pack)
-		    {
-		      *tab_space -= page->requisition.height;
-		      if (*tab_space < 0 || children == *end)
-			{
-			  if (*tab_space < 0)
-			    {
-			      *tab_space = - (*tab_space +
-					      page->requisition.height);
-
-			      if (*tab_space == 0 && direction == STEP_PREV)
-				children = last_calculated_child;
-
-			      *end = children;
-			    }
-			  return;
-			}
-
-		      last_calculated_child = children;
-		    }
-		  last_list = children;
-		}
-	      if (real_direction == STEP_NEXT)
-		children = children->next;
-	      else
-		children = children->prev;
-	    }
-	  break;
-	}
-      if (real_direction == STEP_PREV)
-	return;
-      pack = (pack == GTK_PACK_END) ? GTK_PACK_START : GTK_PACK_END;
-      real_direction = STEP_PREV;
-      children = last_list;
-    }
-}
-
-static void
-ggg_notebook_update_tab_states (GggNotebook *notebook)
-{
-  GList *list;
-
-  for (list = notebook->children; list != NULL; list = list->next)
-    {
-      GggNotebookPage *page = list->data;
-
-      if (page->tab_label)
-	{
-	  if (page == notebook->cur_page)
-	    gtk_widget_set_state (page->tab_label, GTK_STATE_NORMAL);
-	  else
-	    gtk_widget_set_state (page->tab_label, GTK_STATE_ACTIVE);
-	}
-    }
-}
-
-/* Private GggNotebook Page Switch Methods:
- *
- * ggg_notebook_real_switch_page
- */
-static void
-ggg_notebook_real_switch_page (GggNotebook     *notebook,
-			       GggNotebookPage *page,
-			       guint            page_num)
-{
-  if (notebook->cur_page == page || !GTK_WIDGET_VISIBLE (page->child))
-    return;
-
-  if (notebook->cur_page)
-    gtk_widget_set_child_visible (notebook->cur_page->child, FALSE);
-
-  notebook->cur_page = page;
-
-  if (!notebook->focus_tab ||
-      notebook->focus_tab->data != (gpointer) notebook->cur_page)
-    notebook->focus_tab =
-      g_list_find (notebook->children, notebook->cur_page);
-
-  gtk_widget_set_child_visible (notebook->cur_page->child, TRUE);
-
-  /* If the focus was on the previous page, move it to the first
-   * element on the new page, if possible, or if not, to the
-   * notebook itself.
-   */
-  if (notebook->child_has_focus)
-    {
-      if (notebook->cur_page->last_focus_child &&
-	  gtk_widget_is_ancestor (notebook->cur_page->last_focus_child, notebook->cur_page->child))
-	gtk_widget_grab_focus (notebook->cur_page->last_focus_child);
-      else
-	if (!gtk_widget_child_focus (notebook->cur_page->child, GTK_DIR_TAB_FORWARD))
-	  gtk_widget_grab_focus (GTK_WIDGET (notebook));
-    }
-
-  ggg_notebook_update_tab_states (notebook);
-  gtk_widget_queue_resize (GTK_WIDGET (notebook));
-  g_object_notify (G_OBJECT (notebook), "page");
-}
-
-/* Private GggNotebook Page Switch Functions:
- *
- * ggg_notebook_switch_page
- * ggg_notebook_page_select
- * ggg_notebook_switch_focus_tab
- * ggg_notebook_menu_switch_page
- */
-static void
-ggg_notebook_switch_page (GggNotebook     *notebook,
-			  GggNotebookPage *page)
-{
-  guint page_num;
-
-  if (notebook->cur_page == page)
-    return;
-
-  page_num = g_list_index (notebook->children, page);
-
-  g_signal_emit (notebook,
-		 notebook_signals[SWITCH_PAGE],
-		 0,
-		 page,
-		 page_num);
-}
-
-static gint
-ggg_notebook_page_select (GggNotebook *notebook,
-			  gboolean     move_focus)
-{
-  GggNotebookPage *page;
-  GtkDirectionType dir = GTK_DIR_DOWN; /* Quiet GCC */
-  gint tab_pos = get_effective_tab_pos (notebook);
-
-  if (!notebook->focus_tab)
-    return FALSE;
-
-  page = notebook->focus_tab->data;
-  ggg_notebook_switch_page (notebook, page);
-
-  if (move_focus)
-    {
-      switch (tab_pos)
-	{
-	case GTK_POS_TOP:
-	  dir = GTK_DIR_DOWN;
-	  break;
-	case GTK_POS_BOTTOM:
-	  dir = GTK_DIR_UP;
-	  break;
-	case GTK_POS_LEFT:
-	  dir = GTK_DIR_RIGHT;
-	  break;
-	case GTK_POS_RIGHT:
-	  dir = GTK_DIR_LEFT;
-	  break;
-	}
-
-      if (gtk_widget_child_focus (page->child, dir))
-        return TRUE;
-    }
-  return FALSE;
-}
-
-static void
-ggg_notebook_switch_focus_tab (GggNotebook *notebook,
-			       GList       *new_child)
-{
-  GList *old_child;
-  GggNotebookPage *page;
-
-  if (notebook->focus_tab == new_child)
-    return;
-
-  old_child = notebook->focus_tab;
-  notebook->focus_tab = new_child;
-
-  if (notebook->scrollable)
-    ggg_notebook_redraw_arrows (notebook);
-
-  if (!notebook->show_tabs || !notebook->focus_tab)
-    return;
-
-  page = notebook->focus_tab->data;
-  if (GTK_WIDGET_MAPPED (page->tab_label))
-    ggg_notebook_redraw_tabs (notebook);
-  else
-    ggg_notebook_pages_allocate (notebook);
-
-  ggg_notebook_switch_page (notebook, page);
-}
-
-static void
-ggg_notebook_menu_switch_page (GtkWidget       *widget,
-			       GggNotebookPage *page)
-{
-  GggNotebook *notebook;
-  GList *children;
-  guint page_num;
-
-  notebook = GGG_NOTEBOOK (gtk_menu_get_attach_widget
-			   (GTK_MENU (widget->parent)));
-
-  if (notebook->cur_page == page)
-    return;
-
-  page_num = 0;
-  children = notebook->children;
-  while (children && children->data != page)
-    {
-      children = children->next;
-      page_num++;
-    }
-
-  g_signal_emit (notebook,
-		 notebook_signals[SWITCH_PAGE],
-		 0,
-		 page,
-		 page_num);
-}
-
-/* Private GggNotebook Menu Functions:
- *
- * ggg_notebook_menu_item_create
- * ggg_notebook_menu_label_unparent
- * ggg_notebook_menu_detacher
- */
-static void
-ggg_notebook_menu_item_create (GggNotebook *notebook,
-			       GList       *list)
-{
-  GggNotebookPage *page;
-  GtkWidget *menu_item;
-
-  page = list->data;
-  if (page->default_menu)
-    {
-      if (page->tab_label && GTK_IS_LABEL (page->tab_label))
-	page->menu_label = gtk_label_new (GTK_LABEL (page->tab_label)->label);
-      else
-	page->menu_label = gtk_label_new ("");
-      gtk_misc_set_alignment (GTK_MISC (page->menu_label), 0.0, 0.5);
-    }
-
-  gtk_widget_show (page->menu_label);
-  menu_item = gtk_menu_item_new ();
-  gtk_container_add (GTK_CONTAINER (menu_item), page->menu_label);
-  gtk_menu_shell_insert (GTK_MENU_SHELL (notebook->menu), menu_item,
-			 ggg_notebook_real_page_position (notebook, list));
-  g_signal_connect (menu_item, "activate",
-		    G_CALLBACK (ggg_notebook_menu_switch_page), page);
-  if (GTK_WIDGET_VISIBLE (page->child))
-    gtk_widget_show (menu_item);
-}
-
-static void
-ggg_notebook_menu_label_unparent (GtkWidget *widget,
-				  gpointer  data)
-{
-  gtk_widget_unparent (GTK_BIN (widget)->child);
-  GTK_BIN (widget)->child = NULL;
-}
-
-static void
-ggg_notebook_menu_detacher (GtkWidget *widget,
-			    GtkMenu   *menu)
-{
-  GggNotebook *notebook;
-
-  notebook = GGG_NOTEBOOK (widget);
-  g_return_if_fail (notebook->menu == (GtkWidget*) menu);
-
-  notebook->menu = NULL;
-}
-
-/* Private GggNotebook Setter Functions:
- *
- * ggg_notebook_set_homogeneous_tabs_internal
- * ggg_notebook_set_tab_border_internal
- * ggg_notebook_set_tab_hborder_internal
- * ggg_notebook_set_tab_vborder_internal
- */
-static void
-ggg_notebook_set_homogeneous_tabs_internal (GggNotebook *notebook,
-				            gboolean     homogeneous)
-{
-  if (homogeneous == notebook->homogeneous)
-    return;
-
-  notebook->homogeneous = homogeneous;
-  gtk_widget_queue_resize (GTK_WIDGET (notebook));
-
-  g_object_notify (G_OBJECT (notebook), "homogeneous");
-}
-
-static void
-ggg_notebook_set_tab_border_internal (GggNotebook *notebook,
-				      guint        border_width)
-{
-  notebook->tab_hborder = border_width;
-  notebook->tab_vborder = border_width;
-
-  if (GTK_WIDGET_VISIBLE (notebook) && notebook->show_tabs)
-    gtk_widget_queue_resize (GTK_WIDGET (notebook));
-
-  g_object_freeze_notify (G_OBJECT (notebook));
-  g_object_notify (G_OBJECT (notebook), "tab-hborder");
-  g_object_notify (G_OBJECT (notebook), "tab-vborder");
-  g_object_thaw_notify (G_OBJECT (notebook));
-}
-
-static void
-ggg_notebook_set_tab_hborder_internal (GggNotebook *notebook,
-				       guint        tab_hborder)
-{
-  if (notebook->tab_hborder == tab_hborder)
-    return;
-
-  notebook->tab_hborder = tab_hborder;
-
-  if (GTK_WIDGET_VISIBLE (notebook) && notebook->show_tabs)
-    gtk_widget_queue_resize (GTK_WIDGET (notebook));
-
-  g_object_notify (G_OBJECT (notebook), "tab-hborder");
-}
-
-static void
-ggg_notebook_set_tab_vborder_internal (GggNotebook *notebook,
-				       guint        tab_vborder)
-{
-  if (notebook->tab_vborder == tab_vborder)
-    return;
-
-  notebook->tab_vborder = tab_vborder;
-
-  if (GTK_WIDGET_VISIBLE (notebook) && notebook->show_tabs)
-    gtk_widget_queue_resize (GTK_WIDGET (notebook));
-
-  g_object_notify (G_OBJECT (notebook), "tab-vborder");
-}
-
-/* Public GggNotebook Page Insert/Remove Methods :
- *
- * ggg_notebook_append_page
- * ggg_notebook_append_page_menu
- * ggg_notebook_prepend_page
- * ggg_notebook_prepend_page_menu
- * ggg_notebook_insert_page
- * ggg_notebook_insert_page_menu
- * ggg_notebook_remove_page
- */
-/**
- * ggg_notebook_append_page:
- * @notebook: a #GggNotebook
- * @child: the #GtkWidget to use as the contents of the page.
- * @tab_label: the #GtkWidget to be used as the label for the page,
- *             or %NULL to use the default label, 'page N'.
- *
- * Appends a page to @notebook.
- *
- * Return value: the index (starting from 0) of the appended
- * page in the notebook, or -1 if function fails
- **/
-gint
-ggg_notebook_append_page (GggNotebook *notebook,
-			  GtkWidget   *child,
-			  GtkWidget   *tab_label)
-{
-  g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), -1);
-  g_return_val_if_fail (GTK_IS_WIDGET (child), -1);
-  g_return_val_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label), -1);
-
-  return ggg_notebook_insert_page_menu (notebook, child, tab_label, NULL, -1);
-}
-
-/**
- * ggg_notebook_append_page_menu:
- * @notebook: a #GggNotebook
- * @child: the #GtkWidget to use as the contents of the page.
- * @tab_label: the #GtkWidget to be used as the label for the page,
- *             or %NULL to use the default label, 'page N'.
- * @menu_label: the widget to use as a label for the page-switch
- *              menu, if that is enabled. If %NULL, and @tab_label
- *              is a #GtkLabel or %NULL, then the menu label will be
- *              a newly created label with the same text as @tab_label;
- *              If @tab_label is not a #GtkLabel, @menu_label must be
- *              specified if the page-switch menu is to be used.
- *
- * Appends a page to @notebook, specifying the widget to use as the
- * label in the popup menu.
- *
- * Return value: the index (starting from 0) of the appended
- * page in the notebook, or -1 if function fails
- **/
-gint
-ggg_notebook_append_page_menu (GggNotebook *notebook,
-			       GtkWidget   *child,
-			       GtkWidget   *tab_label,
-			       GtkWidget   *menu_label)
-{
-  g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), -1);
-  g_return_val_if_fail (GTK_IS_WIDGET (child), -1);
-  g_return_val_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label), -1);
-  g_return_val_if_fail (menu_label == NULL || GTK_IS_WIDGET (menu_label), -1);
-
-  return ggg_notebook_insert_page_menu (notebook, child, tab_label, menu_label, -1);
-}
-
-/**
- * ggg_notebook_prepend_page:
- * @notebook: a #GggNotebook
- * @child: the #GtkWidget to use as the contents of the page.
- * @tab_label: the #GtkWidget to be used as the label for the page,
- *             or %NULL to use the default label, 'page N'.
- *
- * Prepends a page to @notebook.
- *
- * Return value: the index (starting from 0) of the prepended
- * page in the notebook, or -1 if function fails
- **/
-gint
-ggg_notebook_prepend_page (GggNotebook *notebook,
-			   GtkWidget   *child,
-			   GtkWidget   *tab_label)
-{
-  g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), -1);
-  g_return_val_if_fail (GTK_IS_WIDGET (child), -1);
-  g_return_val_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label), -1);
-
-  return ggg_notebook_insert_page_menu (notebook, child, tab_label, NULL, 0);
-}
-
-/**
- * ggg_notebook_prepend_page_menu:
- * @notebook: a #GggNotebook
- * @child: the #GtkWidget to use as the contents of the page.
- * @tab_label: the #GtkWidget to be used as the label for the page,
- *             or %NULL to use the default label, 'page N'.
- * @menu_label: the widget to use as a label for the page-switch
- *              menu, if that is enabled. If %NULL, and @tab_label
- *              is a #GtkLabel or %NULL, then the menu label will be
- *              a newly created label with the same text as @tab_label;
- *              If @tab_label is not a #GtkLabel, @menu_label must be
- *              specified if the page-switch menu is to be used.
- *
- * Prepends a page to @notebook, specifying the widget to use as the
- * label in the popup menu.
- *
- * Return value: the index (starting from 0) of the prepended
- * page in the notebook, or -1 if function fails
- **/
-gint
-ggg_notebook_prepend_page_menu (GggNotebook *notebook,
-				GtkWidget   *child,
-				GtkWidget   *tab_label,
-				GtkWidget   *menu_label)
-{
-  g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), -1);
-  g_return_val_if_fail (GTK_IS_WIDGET (child), -1);
-  g_return_val_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label), -1);
-  g_return_val_if_fail (menu_label == NULL || GTK_IS_WIDGET (menu_label), -1);
-
-  return ggg_notebook_insert_page_menu (notebook, child, tab_label, menu_label, 0);
-}
-
-/**
- * ggg_notebook_insert_page:
- * @notebook: a #GggNotebook
- * @child: the #GtkWidget to use as the contents of the page.
- * @tab_label: the #GtkWidget to be used as the label for the page,
- *             or %NULL to use the default label, 'page N'.
- * @position: the index (starting at 0) at which to insert the page,
- *            or -1 to append the page after all other pages.
- *
- * Insert a page into @notebook at the given position.
- *
- * Return value: the index (starting from 0) of the inserted
- * page in the notebook, or -1 if function fails
- **/
-gint
-ggg_notebook_insert_page (GggNotebook *notebook,
-			  GtkWidget   *child,
-			  GtkWidget   *tab_label,
-			  gint         position)
-{
-  g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), -1);
-  g_return_val_if_fail (GTK_IS_WIDGET (child), -1);
-  g_return_val_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label), -1);
-
-  return ggg_notebook_insert_page_menu (notebook, child, tab_label, NULL, position);
-}
-
-
-static gint
-ggg_notebook_page_compare_tab (gconstpointer a,
-			       gconstpointer b)
-{
-  return (((GggNotebookPage *) a)->tab_label != b);
-}
-
-static gboolean
-ggg_notebook_mnemonic_activate_switch_page (GtkWidget *child,
-					    gboolean overload,
-					    gpointer data)
-{
-  GggNotebook *notebook = GGG_NOTEBOOK (data);
-  GList *list;
-
-  list = g_list_find_custom (notebook->children, child,
-			     ggg_notebook_page_compare_tab);
-  if (list)
-    {
-      GggNotebookPage *page = list->data;
-
-      gtk_widget_grab_focus (GTK_WIDGET (notebook));	/* Do this first to avoid focusing new page */
-      ggg_notebook_switch_page (notebook, page);
-      focus_tabs_in (notebook);
-    }
-
-  return TRUE;
-}
-
-/**
- * ggg_notebook_insert_page_menu:
- * @notebook: a #GggNotebook
- * @child: the #GtkWidget to use as the contents of the page.
- * @tab_label: the #GtkWidget to be used as the label for the page,
- *             or %NULL to use the default label, 'page N'.
- * @menu_label: the widget to use as a label for the page-switch
- *              menu, if that is enabled. If %NULL, and @tab_label
- *              is a #GtkLabel or %NULL, then the menu label will be
- *              a newly created label with the same text as @tab_label;
- *              If @tab_label is not a #GtkLabel, @menu_label must be
- *              specified if the page-switch menu is to be used.
- * @position: the index (starting at 0) at which to insert the page,
- *            or -1 to append the page after all other pages.
- *
- * Insert a page into @notebook at the given position, specifying
- * the widget to use as the label in the popup menu.
- *
- * Return value: the index (starting from 0) of the inserted
- * page in the notebook
- **/
-gint
-ggg_notebook_insert_page_menu (GggNotebook *notebook,
-			       GtkWidget   *child,
-			       GtkWidget   *tab_label,
-			       GtkWidget   *menu_label,
-			       gint         position)
-{
-  GggNotebookClass *class;
-
-  g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), -1);
-  g_return_val_if_fail (GTK_IS_WIDGET (child), -1);
-  g_return_val_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label), -1);
-  g_return_val_if_fail (menu_label == NULL || GTK_IS_WIDGET (menu_label), -1);
-
-  class = GGG_NOTEBOOK_GET_CLASS (notebook);
-
-  return (class->insert_page) (notebook, child, tab_label, menu_label, position);
-}
-
-/**
- * ggg_notebook_remove_page:
- * @notebook: a #GggNotebook.
- * @page_num: the index of a notebook page, starting
- *            from 0. If -1, the last page will
- *            be removed.
- *
- * Removes a page from the notebook given its index
- * in the notebook.
- **/
-void
-ggg_notebook_remove_page (GggNotebook *notebook,
-			  gint         page_num)
-{
-  GList *list = NULL;
-
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-
-  if (page_num >= 0)
-    list = g_list_nth (notebook->children, page_num);
-  else
-    list = g_list_last (notebook->children);
-
-  if (list)
-    gtk_container_remove (GTK_CONTAINER (notebook),
-			  ((GggNotebookPage *) list->data)->child);
-}
-
-/* Public GggNotebook Page Switch Methods :
- * ggg_notebook_get_current_page
- * ggg_notebook_page_num
- * ggg_notebook_set_current_page
- * ggg_notebook_next_page
- * ggg_notebook_prev_page
- */
-/**
- * ggg_notebook_get_current_page:
- * @notebook: a #GggNotebook
- *
- * Returns the page number of the current page.
- *
- * Return value: the index (starting from 0) of the current
- * page in the notebook. If the notebook has no pages, then
- * -1 will be returned.
- **/
-gint
-ggg_notebook_get_current_page (GggNotebook *notebook)
-{
-  g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), -1);
-
-  if (!notebook->cur_page)
-    return -1;
-
-  return g_list_index (notebook->children, notebook->cur_page);
-}
-
-/**
- * ggg_notebook_get_nth_page:
- * @notebook: a #GggNotebook
- * @page_num: the index of a page in the notebook, or -1
- *            to get the last page.
- *
- * Returns the child widget contained in page number @page_num.
- *
- * Return value: the child widget, or %NULL if @page_num is
- * out of bounds.
- **/
-GtkWidget*
-ggg_notebook_get_nth_page (GggNotebook *notebook,
-			   gint         page_num)
-{
-  GggNotebookPage *page;
-  GList *list;
-
-  g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), NULL);
-
-  if (page_num >= 0)
-    list = g_list_nth (notebook->children, page_num);
-  else
-    list = g_list_last (notebook->children);
-
-  if (list)
-    {
-      page = list->data;
-      return page->child;
-    }
-
-  return NULL;
-}
-
-/**
- * ggg_notebook_get_n_pages:
- * @notebook: a #GggNotebook
- *
- * Gets the number of pages in a notebook.
- *
- * Return value: the number of pages in the notebook.
- *
- * Since: 2.2
- **/
-gint
-ggg_notebook_get_n_pages (GggNotebook *notebook)
-{
-  g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), 0);
-
-  return g_list_length (notebook->children);
-}
-
-/**
- * ggg_notebook_page_num:
- * @notebook: a #GggNotebook
- * @child: a #GtkWidget
- *
- * Finds the index of the page which contains the given child
- * widget.
- *
- * Return value: the index of the page containing @child, or
- *   -1 if @child is not in the notebook.
- **/
-gint
-ggg_notebook_page_num (GggNotebook      *notebook,
-		       GtkWidget        *child)
-{
-  GList *children;
-  gint num;
-
-  g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), -1);
-
-  num = 0;
-  children = notebook->children;
-  while (children)
-    {
-      GggNotebookPage *page =  children->data;
-
-      if (page->child == child)
-	return num;
-
-      children = children->next;
-      num++;
-    }
-
-  return -1;
-}
-
-/**
- * ggg_notebook_set_current_page:
- * @notebook: a #GggNotebook
- * @page_num: index of the page to switch to, starting from 0.
- *            If negative, the last page will be used. If greater
- *            than the number of pages in the notebook, nothing
- *            will be done.
- *
- * Switches to the page number @page_num.
- *
- * Note that due to historical reasons, GggNotebook refuses
- * to switch to a page unless the child widget is visible.
- * Therefore, it is recommended to show child widgets before
- * adding them to a notebook.
- */
-void
-ggg_notebook_set_current_page (GggNotebook *notebook,
-			       gint         page_num)
-{
-  GList *list;
-
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-
-  if (page_num < 0)
-    page_num = g_list_length (notebook->children) - 1;
-
-  list = g_list_nth (notebook->children, page_num);
-  if (list)
-    ggg_notebook_switch_page (notebook, GGG_NOTEBOOK_PAGE (list));
-}
-
-/**
- * ggg_notebook_next_page:
- * @notebook: a #GggNotebook
- *
- * Switches to the next page. Nothing happens if the current page is
- * the last page.
- **/
-void
-ggg_notebook_next_page (GggNotebook *notebook)
-{
-  GList *list;
-
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-
-  list = g_list_find (notebook->children, notebook->cur_page);
-  if (!list)
-    return;
-
-  list = ggg_notebook_search_page (notebook, list, STEP_NEXT, TRUE);
-  if (!list)
-    return;
-
-  ggg_notebook_switch_page (notebook, GGG_NOTEBOOK_PAGE (list));
-}
-
-/**
- * ggg_notebook_prev_page:
- * @notebook: a #GggNotebook
- *
- * Switches to the previous page. Nothing happens if the current page
- * is the first page.
- **/
-void
-ggg_notebook_prev_page (GggNotebook *notebook)
-{
-  GList *list;
-
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-
-  list = g_list_find (notebook->children, notebook->cur_page);
-  if (!list)
-    return;
-
-  list = ggg_notebook_search_page (notebook, list, STEP_PREV, TRUE);
-  if (!list)
-    return;
-
-  ggg_notebook_switch_page (notebook, GGG_NOTEBOOK_PAGE (list));
-}
-
-/* Public GggNotebook/Tab Style Functions
- *
- * ggg_notebook_set_show_border
- * ggg_notebook_set_show_tabs
- * ggg_notebook_set_tab_pos
- * ggg_notebook_set_homogeneous_tabs
- * ggg_notebook_set_tab_border
- * ggg_notebook_set_tab_hborder
- * ggg_notebook_set_tab_vborder
- * ggg_notebook_set_scrollable
- */
-/**
- * ggg_notebook_set_show_border:
- * @notebook: a #GggNotebook
- * @show_border: %TRUE if a bevel should be drawn around the notebook.
- *
- * Sets whether a bevel will be drawn around the notebook pages.
- * This only has a visual effect when the tabs are not shown.
- * See ggg_notebook_set_show_tabs().
- **/
-void
-ggg_notebook_set_show_border (GggNotebook *notebook,
-			      gboolean     show_border)
-{
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-
-  if (notebook->show_border != show_border)
-    {
-      notebook->show_border = show_border;
-
-      if (GTK_WIDGET_VISIBLE (notebook))
-	gtk_widget_queue_resize (GTK_WIDGET (notebook));
-
-      g_object_notify (G_OBJECT (notebook), "show-border");
-    }
-}
-
-/**
- * ggg_notebook_get_show_border:
- * @notebook: a #GggNotebook
- *
- * Returns whether a bevel will be drawn around the notebook pages. See
- * ggg_notebook_set_show_border().
- *
- * Return value: %TRUE if the bevel is drawn
- **/
-gboolean
-ggg_notebook_get_show_border (GggNotebook *notebook)
-{
-  g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), FALSE);
-
-  return notebook->show_border;
-}
-
-/**
- * ggg_notebook_set_show_tabs:
- * @notebook: a #GggNotebook
- * @show_tabs: %TRUE if the tabs should be shown.
- *
- * Sets whether to show the tabs for the notebook or not.
- **/
-void
-ggg_notebook_set_show_tabs (GggNotebook *notebook,
-			    gboolean     show_tabs)
-{
-  GggNotebookPage *page;
-  GList *children;
-
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-
-  show_tabs = show_tabs != FALSE;
-
-  if (notebook->show_tabs == show_tabs)
-    return;
-
-  notebook->show_tabs = show_tabs;
-  children = notebook->children;
-
-  if (!show_tabs)
-    {
-      GTK_WIDGET_UNSET_FLAGS (notebook, GTK_CAN_FOCUS);
-
-      while (children)
-	{
-	  page = children->data;
-	  children = children->next;
-	  if (page->default_tab)
-	    {
-	      gtk_widget_destroy (page->tab_label);
-	      page->tab_label = NULL;
-	    }
-	  else
-	    gtk_widget_hide (page->tab_label);
-	}
-    }
-  else
-    {
-      GTK_WIDGET_SET_FLAGS (notebook, GTK_CAN_FOCUS);
-      ggg_notebook_update_labels (notebook);
-    }
-  gtk_widget_queue_resize (GTK_WIDGET (notebook));
-
-  g_object_notify (G_OBJECT (notebook), "show-tabs");
-}
-
-/**
- * ggg_notebook_get_show_tabs:
- * @notebook: a #GggNotebook
- *
- * Returns whether the tabs of the notebook are shown. See
- * ggg_notebook_set_show_tabs().
- *
- * Return value: %TRUE if the tabs are shown
- **/
-gboolean
-ggg_notebook_get_show_tabs (GggNotebook *notebook)
-{
-  g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), FALSE);
-
-  return notebook->show_tabs;
-}
-
-/**
- * ggg_notebook_set_tab_pos:
- * @notebook: a #GggNotebook.
- * @pos: the edge to draw the tabs at.
- *
- * Sets the edge at which the tabs for switching pages in the
- * notebook are drawn.
- **/
-void
-ggg_notebook_set_tab_pos (GggNotebook     *notebook,
-			  GtkPositionType  pos)
-{
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-
-  if (notebook->tab_pos != pos)
-    {
-      notebook->tab_pos = pos;
-      if (GTK_WIDGET_VISIBLE (notebook))
-	gtk_widget_queue_resize (GTK_WIDGET (notebook));
-    }
-
-  g_object_notify (G_OBJECT (notebook), "tab-pos");
-}
-
-/**
- * ggg_notebook_get_tab_pos:
- * @notebook: a #GggNotebook
- *
- * Gets the edge at which the tabs for switching pages in the
- * notebook are drawn.
- *
- * Return value: the edge at which the tabs are drawn
- **/
-GtkPositionType
-ggg_notebook_get_tab_pos (GggNotebook *notebook)
-{
-  g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), GTK_POS_TOP);
-
-  return notebook->tab_pos;
-}
-
-/**
- * ggg_notebook_set_homogeneous_tabs:
- * @notebook: a #GggNotebook
- * @homogeneous: %TRUE if all tabs should be the same size.
- *
- * Sets whether the tabs must have all the same size or not.
- **/
-void
-ggg_notebook_set_homogeneous_tabs (GggNotebook *notebook,
-				   gboolean     homogeneous)
-{
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-
-  ggg_notebook_set_homogeneous_tabs_internal (notebook, homogeneous);
-}
-
-/**
- * ggg_notebook_set_tab_border:
- * @notebook: a #GggNotebook
- * @border_width: width of the border around the tab labels.
- *
- * Sets the width the border around the tab labels
- * in a notebook. This is equivalent to calling
- * ggg_notebook_set_tab_hborder (@notebook, @border_width) followed
- * by ggg_notebook_set_tab_vborder (@notebook, @border_width).
- **/
-void
-ggg_notebook_set_tab_border (GggNotebook *notebook,
-			     guint        border_width)
-{
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-
-  ggg_notebook_set_tab_border_internal (notebook, border_width);
-}
-
-/**
- * ggg_notebook_set_tab_hborder:
- * @notebook: a #GggNotebook
- * @tab_hborder: width of the horizontal border of tab labels.
- *
- * Sets the width of the horizontal border of tab labels.
- **/
-void
-ggg_notebook_set_tab_hborder (GggNotebook *notebook,
-			      guint        tab_hborder)
-{
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-
-  ggg_notebook_set_tab_hborder_internal (notebook, tab_hborder);
-}
-
-/**
- * ggg_notebook_set_tab_vborder:
- * @notebook: a #GggNotebook
- * @tab_vborder: width of the vertical border of tab labels.
- *
- * Sets the width of the vertical border of tab labels.
- **/
-void
-ggg_notebook_set_tab_vborder (GggNotebook *notebook,
-			      guint        tab_vborder)
-{
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-
-  ggg_notebook_set_tab_vborder_internal (notebook, tab_vborder);
-}
-
-/**
- * ggg_notebook_set_scrollable:
- * @notebook: a #GggNotebook
- * @scrollable: %TRUE if scroll arrows should be added
- *
- * Sets whether the tab label area will have arrows for scrolling if
- * there are too many tabs to fit in the area.
- **/
-void
-ggg_notebook_set_scrollable (GggNotebook *notebook,
-			     gboolean     scrollable)
-{
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-
-  scrollable = (scrollable != FALSE);
-
-  if (scrollable != notebook->scrollable)
-    {
-      notebook->scrollable = scrollable;
-
-      if (GTK_WIDGET_VISIBLE (notebook))
-	gtk_widget_queue_resize (GTK_WIDGET (notebook));
-
-      g_object_notify (G_OBJECT (notebook), "scrollable");
-    }
-}
-
-/**
- * ggg_notebook_get_scrollable:
- * @notebook: a #GggNotebook
- *
- * Returns whether the tab label area has arrows for scrolling. See
- * ggg_notebook_set_scrollable().
- *
- * Return value: %TRUE if arrows for scrolling are present
- **/
-gboolean
-ggg_notebook_get_scrollable (GggNotebook *notebook)
-{
-  g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), FALSE);
-
-  return notebook->scrollable;
-}
-
-/* Public GggNotebook Popup Menu Methods:
- *
- * ggg_notebook_popup_enable
- * ggg_notebook_popup_disable
- */
-
-
-/**
- * ggg_notebook_popup_enable:
- * @notebook: a #GggNotebook
- *
- * Enables the popup menu: if the user clicks with the right mouse button on
- * the bookmarks, a menu with all the pages will be popped up.
- **/
-void
-ggg_notebook_popup_enable (GggNotebook *notebook)
-{
-  GList *list;
-
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-
-  if (notebook->menu)
-    return;
-
-  notebook->menu = gtk_menu_new ();
-  for (list = ggg_notebook_search_page (notebook, NULL, STEP_NEXT, FALSE);
-       list;
-       list = ggg_notebook_search_page (notebook, list, STEP_NEXT, FALSE))
-    ggg_notebook_menu_item_create (notebook, list);
-
-  ggg_notebook_update_labels (notebook);
-  gtk_menu_attach_to_widget (GTK_MENU (notebook->menu),
-			     GTK_WIDGET (notebook),
-			     ggg_notebook_menu_detacher);
-
-  g_object_notify (G_OBJECT (notebook), "enable-popup");
-}
-
-/**
- * ggg_notebook_popup_disable:
- * @notebook: a #GggNotebook
- *
- * Disables the popup menu.
- **/
-void
-ggg_notebook_popup_disable  (GggNotebook *notebook)
-{
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-
-  if (!notebook->menu)
-    return;
-
-  gtk_container_foreach (GTK_CONTAINER (notebook->menu),
-			 (GtkCallback) ggg_notebook_menu_label_unparent, NULL);
-  gtk_widget_destroy (notebook->menu);
-
-  g_object_notify (G_OBJECT (notebook), "enable-popup");
-}
-
-/* Public GggNotebook Page Properties Functions:
- *
- * ggg_notebook_get_tab_label
- * ggg_notebook_set_tab_label
- * ggg_notebook_set_tab_label_text
- * ggg_notebook_get_menu_label
- * ggg_notebook_set_menu_label
- * ggg_notebook_set_menu_label_text
- * ggg_notebook_set_tab_label_packing
- * ggg_notebook_query_tab_label_packing
- * ggg_notebook_get_tab_reorderable
- * ggg_notebook_set_tab_reorderable
- * ggg_notebook_get_tab_detachable
- * ggg_notebook_set_tab_detachable
- */
-
-/**
- * ggg_notebook_get_tab_label:
- * @notebook: a #GggNotebook
- * @child: the page
- *
- * Returns the tab label widget for the page @child. %NULL is returned
- * if @child is not in @notebook or if no tab label has specifically
- * been set for @child.
- *
- * Return value: the tab label
- **/
-GtkWidget *
-ggg_notebook_get_tab_label (GggNotebook *notebook,
-			    GtkWidget   *child)
-{
-  GList *list;
-
-  g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), NULL);
-  g_return_val_if_fail (GTK_IS_WIDGET (child), NULL);
-
-  list = CHECK_FIND_CHILD (notebook, child);
-  if (!list)
-    return NULL;
-
-  if (GGG_NOTEBOOK_PAGE (list)->default_tab)
-    return NULL;
-
-  return GGG_NOTEBOOK_PAGE (list)->tab_label;
-}
-
-/**
- * ggg_notebook_set_tab_label:
- * @notebook: a #GggNotebook
- * @child: the page
- * @tab_label: the tab label widget to use, or %NULL for default tab
- *             label.
- *
- * Changes the tab label for @child. If %NULL is specified
- * for @tab_label, then the page will have the label 'page N'.
- **/
-void
-ggg_notebook_set_tab_label (GggNotebook *notebook,
-			    GtkWidget   *child,
-			    GtkWidget   *tab_label)
-{
-  GggNotebookPage *page;
-  GList *list;
-
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-  g_return_if_fail (GTK_IS_WIDGET (child));
-
-  list = CHECK_FIND_CHILD (notebook, child);
-  if (!list)
-    return;
-
-  /* a NULL pointer indicates a default_tab setting, otherwise
-   * we need to set the associated label
-   */
-  page = list->data;
-
-  if (page->tab_label == tab_label)
-    return;
-
-
-  ggg_notebook_remove_tab_label (notebook, page);
-
-  if (tab_label)
-    {
-      page->default_tab = FALSE;
-      page->tab_label = tab_label;
-      gtk_widget_set_parent (page->tab_label, GTK_WIDGET (notebook));
-    }
-  else
-    {
-      page->default_tab = TRUE;
-      page->tab_label = NULL;
-
-      if (notebook->show_tabs)
-	{
-	  gchar string[32];
-
-	  g_snprintf (string, sizeof(string), _("Page %u"),
-		      ggg_notebook_real_page_position (notebook, list));
-	  page->tab_label = gtk_label_new (string);
-	  gtk_widget_set_parent (page->tab_label, GTK_WIDGET (notebook));
-	}
-    }
-
-  if (page->tab_label)
-    page->mnemonic_activate_signal =
-      g_signal_connect (page->tab_label,
-			"mnemonic_activate",
-			G_CALLBACK (ggg_notebook_mnemonic_activate_switch_page),
-			notebook);
-
-  if (notebook->show_tabs && GTK_WIDGET_VISIBLE (child))
-    {
-      gtk_widget_show (page->tab_label);
-      gtk_widget_queue_resize (GTK_WIDGET (notebook));
-    }
-
-  ggg_notebook_update_tab_states (notebook);
-  gtk_widget_child_notify (child, "tab-label");
-}
-
-/**
- * ggg_notebook_set_tab_label_text:
- * @notebook: a #GggNotebook
- * @child: the page
- * @tab_text: the label text
- *
- * Creates a new label and sets it as the tab label for the page
- * containing @child.
- **/
-void
-ggg_notebook_set_tab_label_text (GggNotebook *notebook,
-				 GtkWidget   *child,
-				 const gchar *tab_text)
-{
-  GtkWidget *tab_label = NULL;
-
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-
-  if (tab_text)
-    tab_label = gtk_label_new (tab_text);
-  ggg_notebook_set_tab_label (notebook, child, tab_label);
-  gtk_widget_child_notify (child, "tab-label");
-}
-
-/**
- * ggg_notebook_get_tab_label_text:
- * @notebook: a #GggNotebook
- * @child: a widget contained in a page of @notebook
- *
- * Retrieves the text of the tab label for the page containing
- *    @child.
- *
- * Return value: the text of the tab label, or %NULL if the
- *               tab label widget is not a #GtkLabel. The
- *               string is owned by the widget and must not
- *               be freed.
- **/
-G_CONST_RETURN gchar *
-ggg_notebook_get_tab_label_text (GggNotebook *notebook,
-				 GtkWidget   *child)
-{
-  GtkWidget *tab_label;
-
-  g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), NULL);
-  g_return_val_if_fail (GTK_IS_WIDGET (child), NULL);
-
-  tab_label = ggg_notebook_get_tab_label (notebook, child);
-
-  if (tab_label && GTK_IS_LABEL (tab_label))
-    return gtk_label_get_text (GTK_LABEL (tab_label));
-  else
-    return NULL;
-}
-
-/**
- * ggg_notebook_get_menu_label:
- * @notebook: a #GggNotebook
- * @child: a widget contained in a page of @notebook
- *
- * Retrieves the menu label widget of the page containing @child.
- *
- * Return value: the menu label, or %NULL if the
- *               notebook page does not have a menu label other
- *               than the default (the tab label).
- **/
-GtkWidget*
-ggg_notebook_get_menu_label (GggNotebook *notebook,
-			     GtkWidget   *child)
-{
-  GList *list;
-
-  g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), NULL);
-  g_return_val_if_fail (GTK_IS_WIDGET (child), NULL);
-
-  list = CHECK_FIND_CHILD (notebook, child);
-  if (!list)
-    return NULL;
-
-  if (GGG_NOTEBOOK_PAGE (list)->default_menu)
-    return NULL;
-
-  return GGG_NOTEBOOK_PAGE (list)->menu_label;
-}
-
-/**
- * ggg_notebook_set_menu_label:
- * @notebook: a #GggNotebook
- * @child: the child widget
- * @menu_label: the menu label, or NULL for default
- *
- * Changes the menu label for the page containing @child.
- **/
-void
-ggg_notebook_set_menu_label (GggNotebook *notebook,
-			     GtkWidget   *child,
-			     GtkWidget   *menu_label)
-{
-  GggNotebookPage *page;
-  GList *list;
-
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-  g_return_if_fail (GTK_IS_WIDGET (child));
-
-  list = CHECK_FIND_CHILD (notebook, child);
-  if (!list)
-    return;
-
-  page = list->data;
-  if (page->menu_label)
-    {
-      if (notebook->menu)
-	gtk_container_remove (GTK_CONTAINER (notebook->menu),
-			      page->menu_label->parent);
-
-      if (!page->default_menu)
-	g_object_unref (page->menu_label);
-    }
-
-  if (menu_label)
-    {
-      page->menu_label = menu_label;
-      g_object_ref_sink (page->menu_label);
-      page->default_menu = FALSE;
-    }
-  else
-    page->default_menu = TRUE;
-
-  if (notebook->menu)
-    ggg_notebook_menu_item_create (notebook, list);
-  gtk_widget_child_notify (child, "menu-label");
-}
-
-/**
- * ggg_notebook_set_menu_label_text:
- * @notebook: a #GggNotebook
- * @child: the child widget
- * @menu_text: the label text
- *
- * Creates a new label and sets it as the menu label of @child.
- **/
-void
-ggg_notebook_set_menu_label_text (GggNotebook *notebook,
-				  GtkWidget   *child,
-				  const gchar *menu_text)
-{
-  GtkWidget *menu_label = NULL;
-
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-
-  if (menu_text)
-    {
-      menu_label = gtk_label_new (menu_text);
-      gtk_misc_set_alignment (GTK_MISC (menu_label), 0.0, 0.5);
-    }
-  ggg_notebook_set_menu_label (notebook, child, menu_label);
-  gtk_widget_child_notify (child, "menu-label");
-}
-
-/**
- * ggg_notebook_get_menu_label_text:
- * @notebook: a #GggNotebook
- * @child: the child widget of a page of the notebook.
- *
- * Retrieves the text of the menu label for the page containing
- *    @child.
- *
- * Return value: the text of the tab label, or %NULL if the
- *               widget does not have a menu label other than
- *               the default menu label, or the menu label widget
- *               is not a #GtkLabel. The string is owned by
- *               the widget and must not be freed.
- **/
-G_CONST_RETURN gchar *
-ggg_notebook_get_menu_label_text (GggNotebook *notebook,
-				  GtkWidget *child)
-{
-  GtkWidget *menu_label;
-
-  g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), NULL);
-  g_return_val_if_fail (GTK_IS_WIDGET (child), NULL);
-
-  menu_label = ggg_notebook_get_menu_label (notebook, child);
-
-  if (menu_label && GTK_IS_LABEL (menu_label))
-    return gtk_label_get_text (GTK_LABEL (menu_label));
-  else
-    return NULL;
-}
-
-/* Helper function called when pages are reordered
- */
-static void
-ggg_notebook_child_reordered (GggNotebook     *notebook,
-			      GggNotebookPage *page)
-{
-  if (notebook->menu)
-    {
-      GtkWidget *menu_item;
-
-      menu_item = page->menu_label->parent;
-      gtk_container_remove (GTK_CONTAINER (menu_item), page->menu_label);
-      gtk_container_remove (GTK_CONTAINER (notebook->menu), menu_item);
-      ggg_notebook_menu_item_create (notebook, g_list_find (notebook->children, page));
-    }
-
-  ggg_notebook_update_tab_states (notebook);
-  ggg_notebook_update_labels (notebook);
-}
-
-/**
- * ggg_notebook_set_tab_label_packing:
- * @notebook: a #GggNotebook
- * @child: the child widget
- * @expand: whether to expand the bookmark or not
- * @fill: whether the bookmark should fill the allocated area or not
- * @pack_type: the position of the bookmark
- *
- * Sets the packing parameters for the tab label of the page
- * containing @child. See gtk_box_pack_start() for the exact meaning
- * of the parameters.
- **/
-void
-ggg_notebook_set_tab_label_packing (GggNotebook *notebook,
-				    GtkWidget   *child,
-				    gboolean     expand,
-				    gboolean     fill,
-				    GtkPackType  pack_type)
-{
-  GggNotebookPage *page;
-  GList *list;
-
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-  g_return_if_fail (GTK_IS_WIDGET (child));
-
-  list = CHECK_FIND_CHILD (notebook, child);
-  if (!list)
-    return;
-
-  page = list->data;
-  expand = expand != FALSE;
-  fill = fill != FALSE;
-  if (page->pack == pack_type && page->expand == expand && page->fill == fill)
-    return;
-
-  gtk_widget_freeze_child_notify (child);
-  page->expand = expand;
-  gtk_widget_child_notify (child, "tab-expand");
-  page->fill = fill;
-  gtk_widget_child_notify (child, "tab-fill");
-  if (page->pack != pack_type)
-    {
-      page->pack = pack_type;
-      ggg_notebook_child_reordered (notebook, page);
-    }
-  gtk_widget_child_notify (child, "tab-pack");
-  gtk_widget_child_notify (child, "position");
-  if (notebook->show_tabs)
-    ggg_notebook_pages_allocate (notebook);
-  gtk_widget_thaw_child_notify (child);
-}
-
-/**
- * ggg_notebook_query_tab_label_packing:
- * @notebook: a #GggNotebook
- * @child: the page
- * @expand: location to store the expand value (or NULL)
- * @fill: location to store the fill value (or NULL)
- * @pack_type: location to store the pack_type (or NULL)
- *
- * Query the packing attributes for the tab label of the page
- * containing @child.
- **/
-void
-ggg_notebook_query_tab_label_packing (GggNotebook *notebook,
-				      GtkWidget   *child,
-				      gboolean    *expand,
-				      gboolean    *fill,
-				      GtkPackType *pack_type)
-{
-  GList *list;
-
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-  g_return_if_fail (GTK_IS_WIDGET (child));
-
-  list = CHECK_FIND_CHILD (notebook, child);
-  if (!list)
-    return;
-
-  if (expand)
-    *expand = GGG_NOTEBOOK_PAGE (list)->expand;
-  if (fill)
-    *fill = GGG_NOTEBOOK_PAGE (list)->fill;
-  if (pack_type)
-    *pack_type = GGG_NOTEBOOK_PAGE (list)->pack;
-}
-
-/**
- * ggg_notebook_reorder_child:
- * @notebook: a #GggNotebook
- * @child: the child to move
- * @position: the new position, or -1 to move to the end
- *
- * Reorders the page containing @child, so that it appears in position
- * @position. If @position is greater than or equal to the number of
- * children in the list or negative, @child will be moved to the end
- * of the list.
- **/
-void
-ggg_notebook_reorder_child (GggNotebook *notebook,
-			    GtkWidget   *child,
-			    gint         position)
-{
-  GList *list, *new_list;
-  GggNotebookPage *page;
-  gint old_pos;
-  gint max_pos;
-
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-  g_return_if_fail (GTK_IS_WIDGET (child));
-
-  list = CHECK_FIND_CHILD (notebook, child);
-  if (!list)
-    return;
-
-  max_pos = g_list_length (notebook->children) - 1;
-  if (position < 0 || position > max_pos)
-    position = max_pos;
-
-  old_pos = g_list_position (notebook->children, list);
-
-  if (old_pos == position)
-    return;
-
-  page = list->data;
-  notebook->children = g_list_delete_link (notebook->children, list);
-
-  notebook->children = g_list_insert (notebook->children, page, position);
-  new_list = g_list_nth (notebook->children, position);
-
-  /* Fix up GList references in GggNotebook structure */
-  if (notebook->first_tab == list)
-    notebook->first_tab = new_list;
-  if (notebook->focus_tab == list)
-    notebook->focus_tab = new_list;
-
-  gtk_widget_freeze_child_notify (child);
-
-  /* Move around the menu items if necessary */
-  ggg_notebook_child_reordered (notebook, page);
-  gtk_widget_child_notify (child, "tab-pack");
-  gtk_widget_child_notify (child, "position");
-
-  if (notebook->show_tabs)
-    ggg_notebook_pages_allocate (notebook);
-
-  gtk_widget_thaw_child_notify (child);
-
-  g_signal_emit (notebook,
-		 notebook_signals[PAGE_REORDERED],
-		 0,
-		 child,
-		 position);
-}
-
-/**
- * ggg_notebook_set_window_creation_hook:
- * @func: the #GggNotebookWindowCreationFunc, or %NULL
- * @data: user data for @func
- * @destroy: Destroy notifier for @data, or %NULL
- *
- * Installs a global function used to create a window
- * when a detached tab is dropped in an empty area.
- *
- * Since: 2.10
- **/
-void
-ggg_notebook_set_window_creation_hook (GggNotebookWindowCreationFunc  func,
-				       gpointer                       data,
-                                       GDestroyNotify                 destroy)
-{
-  if (window_creation_hook_destroy)
-    window_creation_hook_destroy (window_creation_hook_data);
-
-  window_creation_hook = func;
-  window_creation_hook_data = data;
-  window_creation_hook_destroy = destroy;
-}
-
-/**
- * ggg_notebook_set_group_id:
- * @notebook: a #GggNotebook
- * @group_id: a group identificator, or -1 to unset it
- *
- * Sets an group identificator for @notebook, notebooks sharing
- * the same group identificator will be able to exchange tabs
- * via drag and drop. A notebook with group identificator -1 will
- * not be able to exchange tabs with any other notebook.
- *
- * Since: 2.10
- * Deprecated:2.12: use ggg_notebook_set_group() instead.
- */
-void
-ggg_notebook_set_group_id (GggNotebook *notebook,
-			   gint         group_id)
-{
-  gpointer group;
-
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-
-  /* add 1 to get rid of the -1/NULL difference */
-  group = GINT_TO_POINTER (group_id + 1);
-  ggg_notebook_set_group (notebook, group);
-}
-
-/**
- * ggg_notebook_set_group:
- * @notebook: a #GggNotebook
- * @group: a pointer to identify the notebook group, or %NULL to unset it
- *
- * Sets a group identificator pointer for @notebook, notebooks sharing
- * the same group identificator pointer will be able to exchange tabs
- * via drag and drop. A notebook with a %NULL group identificator will
- * not be able to exchange tabs with any other notebook.
- *
- * Since: 2.12
- */
-void
-ggg_notebook_set_group (GggNotebook *notebook,
-			gpointer     group)
-{
-  GggNotebookPrivate *priv;
-
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-
-  priv = GGG_NOTEBOOK_GET_PRIVATE (notebook);
-
-  if (priv->group != group)
-    {
-      priv->group = group;
-      g_object_notify (G_OBJECT (notebook), "group-id");
-      g_object_notify (G_OBJECT (notebook), "group");
-    }
-}
-
-/**
- * ggg_notebook_get_group_id:
- * @notebook: a #GggNotebook
- *
- * Gets the current group identificator for @notebook.
- *
- * Return Value: the group identificator, or -1 if none is set.
- *
- * Since: 2.10
- * Deprecated:2.12: use ggg_notebook_get_group() instead.
- */
-gint
-ggg_notebook_get_group_id (GggNotebook *notebook)
-{
-  GggNotebookPrivate *priv;
-
-  g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), -1);
-
-  priv = GGG_NOTEBOOK_GET_PRIVATE (notebook);
-
-  /* substract 1 to get rid of the -1/NULL difference */
-  return GPOINTER_TO_INT (priv->group) - 1;
-}
-
-/**
- * ggg_notebook_get_group:
- * @notebook: a #GggNotebook
- *
- * Gets the current group identificator pointer for @notebook.
- *
- * Return Value: the group identificator, or %NULL if none is set.
- *
- * Since: 2.12
- **/
-gpointer
-ggg_notebook_get_group (GggNotebook *notebook)
-{
-  GggNotebookPrivate *priv;
-
-  g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), NULL);
-
-  priv = GGG_NOTEBOOK_GET_PRIVATE (notebook);
-  return priv->group;
-}
-
-/**
- * ggg_notebook_get_tab_reorderable:
- * @notebook: a #GggNotebook
- * @child: a child #GtkWidget
- *
- * Gets whether the tab can be reordered via drag and drop or not.
- *
- * Return Value: %TRUE if the tab is reorderable.
- *
- * Since: 2.10
- **/
-gboolean
-ggg_notebook_get_tab_reorderable (GggNotebook *notebook,
-				  GtkWidget   *child)
-{
-  GList *list;
-
-  g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), FALSE);
-  g_return_val_if_fail (GTK_IS_WIDGET (child), FALSE);
-
-  list = CHECK_FIND_CHILD (notebook, child);
-  if (!list)
-    return FALSE;
-
-  return GGG_NOTEBOOK_PAGE (list)->reorderable;
-}
-
-/**
- * ggg_notebook_set_tab_reorderable:
- * @notebook: a #GggNotebook
- * @child: a child #GtkWidget
- * @reorderable: whether the tab is reorderable or not.
- *
- * Sets whether the notebook tab can be reordered
- * via drag and drop or not.
- *
- * Since: 2.10
- **/
-void
-ggg_notebook_set_tab_reorderable (GggNotebook *notebook,
-				  GtkWidget   *child,
-				  gboolean     reorderable)
-{
-  GList *list;
-
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-  g_return_if_fail (GTK_IS_WIDGET (child));
-
-  list = CHECK_FIND_CHILD (notebook, child);
-  if (!list)
-    return;
-
-  if (GGG_NOTEBOOK_PAGE (list)->reorderable != reorderable)
-    {
-      GGG_NOTEBOOK_PAGE (list)->reorderable = (reorderable == TRUE);
-      gtk_widget_child_notify (child, "reorderable");
-    }
-}
-
-/**
- * ggg_notebook_get_tab_detachable:
- * @notebook: a #GggNotebook
- * @child: a child #GtkWidget
- *
- * Returns whether the tab contents can be detached from @notebook.
- *
- * Return Value: TRUE if the tab is detachable.
- *
- * Since: 2.10
- **/
-gboolean
-ggg_notebook_get_tab_detachable (GggNotebook *notebook,
-				 GtkWidget   *child)
-{
-  GList *list;
-
-  g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), FALSE);
-  g_return_val_if_fail (GTK_IS_WIDGET (child), FALSE);
-
-  list = CHECK_FIND_CHILD (notebook, child);
-  if (!list)
-    return FALSE;
-
-  return GGG_NOTEBOOK_PAGE (list)->detachable;
-}
-
-/**
- * ggg_notebook_set_tab_detachable:
- * @notebook: a #GggNotebook
- * @child: a child #GtkWidget
- * @detachable: whether the tab is detachable or not
- *
- * Sets whether the tab can be detached from @notebook to another
- * notebook or widget.
- *
- * Note that 2 notebooks must share a common group identificator
- * (see ggg_notebook_set_group_id ()) to allow automatic tabs
- * interchange between them.
- *
- * If you want a widget to interact with a notebook through DnD
- * (i.e.: accept dragged tabs from it) it must be set as a drop
- * destination and accept the target "GGG_NOTEBOOK_TAB". The notebook
- * will fill the selection with a GtkWidget** pointing to the child
- * widget that corresponds to the dropped tab.
- *
- * <informalexample><programlisting>
- *  static void
- *  on_drop_zone_drag_data_received (GtkWidget        *widget,
- *                                   GdkDragContext   *context,
- *                                   gint              x,
- *                                   gint              y,
- *                                   GtkSelectionData *selection_data,
- *                                   guint             info,
- *                                   guint             time,
- *                                   gpointer          user_data)
- *  {
- *    GtkWidget *notebook;
- *    GtkWidget **child;
- *
- *    notebook = gtk_drag_get_source_widget (context);
- *    child = (void*) selection_data->data;
- *
- *    process_widget (*child);
- *    gtk_container_remove (GTK_CONTAINER (notebook), *child);
- *  }
- * </programlisting></informalexample>
- *
- * If you want a notebook to accept drags from other widgets,
- * you will have to set your own DnD code to do it.
- *
- * Since: 2.10
- **/
-void
-ggg_notebook_set_tab_detachable (GggNotebook *notebook,
-				 GtkWidget  *child,
-				 gboolean    detachable)
-{
-  GList *list;
-
-  g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
-  g_return_if_fail (GTK_IS_WIDGET (child));
-
-  list = CHECK_FIND_CHILD (notebook, child);
-  if (!list)
-    return;
-
-  if (GGG_NOTEBOOK_PAGE (list)->detachable != detachable)
-    {
-      GGG_NOTEBOOK_PAGE (list)->detachable = (detachable == TRUE);
-      gtk_widget_child_notify (child, "detachable");
-    }
-}
-
-#define __GGG_NOTEBOOK_C__
-
-
-/* ========================================================================= */
-/* Redirect all GtkNotebook symbols we use to GggNotebook.  */
-
-#define GtkNotebook GggNotebook
-#define GtkNotebookClass GggNotebookClass
-#define gtk_notebook_get_nth_page ggg_notebook_get_nth_page
-#define gtk_notebook_get_nth_page ggg_notebook_get_nth_page
-#define gtk_notebook_set_current_page ggg_notebook_set_current_page
-#define gtk_notebook_prev_page ggg_notebook_prev_page
-#define gtk_notebook_next_page ggg_notebook_next_page
-#define gtk_notebook_insert_page ggg_notebook_insert_page
-#define gtk_notebook_get_tab_label ggg_notebook_get_tab_label
-#define gtk_notebook_reorder_child ggg_notebook_reorder_child
-#undef GTK_NOTEBOOK
-#define GTK_NOTEBOOK(nb_) GGG_NOTEBOOK(nb_)
-#undef GTK_TYPE_NOTEBOOK
-#define GTK_TYPE_NOTEBOOK GGG_TYPE_NOTEBOOK
-#endif
-
 struct _GnmNotebook {
 	GtkNotebook parent;
 
@@ -8274,16 +44,6 @@ static GtkNotebookClass *gnm_notebook_parent_class;
 #define DUMMY_KEY "GNM-NOTEBOOK-DUMMY-WIDGET"
 
 static void
-gnm_notebook_size_request (GtkWidget      *widget,
-			   GtkRequisition *requisition)
-{
-	((GtkWidgetClass *)gnm_notebook_parent_class)->size_request
-		(widget, requisition);
-	widget->requisition.height -=
-		gtk_widget_get_style (widget)->ythickness;
-}
-
-static void
 gnm_notebook_size_allocate (GtkWidget     *widget,
 			    GtkAllocation *allocation)
 {
@@ -8301,7 +61,6 @@ gnm_notebook_size_allocate (GtkWidget     *widget,
 		gtk_widget_get_allocation (page, &a);
 		h = MAX (h, a.height);
 	}
-	h += gtk_widget_get_style (widget)->ythickness;
 
 	gnb->dummy_height = h;
 
@@ -8310,50 +69,11 @@ gnm_notebook_size_allocate (GtkWidget     *widget,
 		(widget, &alc);
 }
 
-static gint
-gnm_notebook_expose (GtkWidget      *widget,
-		     GdkEventExpose *event)
-{
-	GnmNotebook *gnb = (GnmNotebook *)widget;
-	GdkEvent *ev = gdk_event_copy ((GdkEvent *)event);
-	GdkEventExpose *eve = (GdkEventExpose *)ev;
-	GtkAllocation alc;
-	int res = FALSE;
-
-	gtk_widget_get_allocation (widget, &alc);
-
-	alc.y += gnb->dummy_height;
-	if (gdk_rectangle_intersect (&alc, &eve->area, &eve->area)) {
-		GdkRegion *reg = gdk_region_rectangle (&eve->area);
-		gdk_region_intersect (reg, eve->region);
-		gdk_region_destroy (eve->region);
-		eve->region = reg;
-
-		gdk_window_begin_paint_region (eve->window, reg);
-		res = ((GtkWidgetClass *)gnm_notebook_parent_class)->expose_event (widget, eve);
-		gdk_window_end_paint (eve->window);
-	}
-
-	gdk_event_free (ev);
-
-	return res;
-}
-
 static void
-gnm_notebook_class_init (GtkObjectClass *klass)
+gnm_notebook_class_init (GtkWidgetClass *klass)
 {
-	GtkWidgetClass *widget_class = (GtkWidgetClass *)klass;
-
 	gnm_notebook_parent_class = g_type_class_peek (GTK_TYPE_NOTEBOOK);
-	widget_class->size_request = gnm_notebook_size_request;
-	widget_class->size_allocate = gnm_notebook_size_allocate;
-	widget_class->expose_event = gnm_notebook_expose;
-
-	gtk_rc_parse_string ("style \"gnm-notebook-default-style\" {\n"
-			     "  ythickness = 0\n"
-			     "}\n"
-			     "class \"GnmNotebook\" style \"gnm-notebook-default-style\"\n"
-		);
+	klass->size_allocate = gnm_notebook_size_allocate;
 }
 
 static void
@@ -8412,7 +132,7 @@ cb_label_visibility (GtkWidget *label,
 void
 gnm_notebook_insert_tab (GnmNotebook *nb, GtkWidget *label, int pos)
 {
-	GtkWidget *dummy_page = gtk_hbox_new (FALSE, 0);
+	GtkWidget *dummy_page = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
 	gtk_widget_set_size_request (dummy_page, 1, 1);
 
 	g_object_set_data (G_OBJECT (label), DUMMY_KEY, dummy_page);
diff --git a/src/widgets/gnumeric-cell-renderer-expr-entry.c b/src/widgets/gnumeric-cell-renderer-expr-entry.c
index 3390869..01e6d06 100644
--- a/src/widgets/gnumeric-cell-renderer-expr-entry.c
+++ b/src/widgets/gnumeric-cell-renderer-expr-entry.c
@@ -34,8 +34,8 @@ static GtkCellEditable *gnumeric_cell_renderer_expr_entry_start_editing
 							      GdkEvent             *event,
 							      GtkWidget            *widget,
 							      const gchar          *path,
-							      GdkRectangle        *background_area,
-							      GdkRectangle         *cell_area,
+							      GdkRectangle const   *background_area,
+							      GdkRectangle const   *cell_area,
 							      GtkCellRendererState  flags);
 
 GType
@@ -112,8 +112,8 @@ gnumeric_cell_renderer_expr_entry_start_editing (GtkCellRenderer      *cell,
 				      G_GNUC_UNUSED GdkEvent *event,
 				      G_GNUC_UNUSED GtkWidget *widget,
 				      const gchar          *path,
-				      G_GNUC_UNUSED GdkRectangle *background_area,
-				      G_GNUC_UNUSED GdkRectangle *cell_area,
+				      G_GNUC_UNUSED GdkRectangle const *background_area,
+				      G_GNUC_UNUSED GdkRectangle const *cell_area,
 				      G_GNUC_UNUSED GtkCellRendererState flags)
 {
   GnumericCellRendererExprEntry *celltext;
diff --git a/src/widgets/gnumeric-cell-renderer-text.c b/src/widgets/gnumeric-cell-renderer-text.c
index 815387e..c1319b7 100644
--- a/src/widgets/gnumeric-cell-renderer-text.c
+++ b/src/widgets/gnumeric-cell-renderer-text.c
@@ -54,17 +54,15 @@ gnumeric_cell_renderer_text_get_type (void)
 
 static void
 gnumeric_cell_renderer_text_render (GtkCellRenderer     *cell,
-				    GdkWindow           *window,
+				    cairo_t           	*cr,
 				    GtkWidget           *widget,
-				    GdkRectangle        *background_area,
-				    GdkRectangle        *cell_area,
-				    GdkRectangle        *expose_area,
+				    GdkRectangle const  *background_area,
+				    GdkRectangle const  *cell_area,
 				    GtkCellRendererState flags)
 
 {
 	GtkCellRendererText *celltext = (GtkCellRendererText *) cell;
 	GtkStateType state, frame_state;
-	cairo_t *cr = gdk_cairo_create (window);
 
 	if ((flags & GTK_CELL_RENDERER_SELECTED) == GTK_CELL_RENDERER_SELECTED)	{
 		frame_state = GTK_STATE_ACTIVE;
@@ -86,11 +84,6 @@ gnumeric_cell_renderer_text_render (GtkCellRenderer     *cell,
 		gnm_cell_renderer_text_copy_background_to_cairo
 			(celltext, cr);
 
-		if (expose_area) {
-			gdk_cairo_rectangle (cr, background_area);
-			cairo_clip (cr);
-		}
-
 		gtk_cell_renderer_get_padding (cell, NULL, &ypad);
 		cairo_rectangle (cr,
 				 background_area->x,
@@ -99,29 +92,29 @@ gnumeric_cell_renderer_text_render (GtkCellRenderer     *cell,
 				 background_area->height - 2 * ypad);
 		cairo_fill (cr);
 
-		if (expose_area)
-			cairo_reset_clip (cr);
 	}
 
 	if (gtk_cell_renderer_text_get_editable (celltext)) {
-		GtkStyle *style = gtk_widget_get_style (widget);
-		gdk_cairo_set_source_color (cr, &style->bg[frame_state]);
+		GtkStyleContext *ctxt = gtk_widget_get_style_context (widget);
+		GdkRGBA rgba;
+		gtk_style_context_get_background_color (ctxt, frame_state, &rgba);
+		gdk_cairo_set_source_rgba (cr, &rgba);
 		gdk_cairo_rectangle (cr, background_area);
+		cairo_save (cr);
 		cairo_clip (cr);
 		gdk_cairo_rectangle (cr, background_area);
 		cairo_stroke (cr);
+		cairo_restore (cr);
 	}
 
-	cairo_destroy (cr);
-
 	if (gtk_cell_renderer_text_get_foreground_set (celltext)) {
 		GTK_CELL_RENDERER_CLASS (parent_class)->render
-			(cell, window, widget, background_area,
-			 cell_area, expose_area, 0);
+			(cell, cr, widget, background_area,
+			 cell_area, 0);
 	} else
 		GTK_CELL_RENDERER_CLASS (parent_class)->render
-			(cell, window, widget, background_area,
-			 cell_area, expose_area, flags);
+			(cell, cr, widget, background_area,
+			 cell_area, flags);
 }
 
 static void
diff --git a/src/widgets/gnumeric-cell-renderer-toggle.c b/src/widgets/gnumeric-cell-renderer-toggle.c
index c65b218..daae60c 100644
--- a/src/widgets/gnumeric-cell-renderer-toggle.c
+++ b/src/widgets/gnumeric-cell-renderer-toggle.c
@@ -36,18 +36,17 @@ static void gnumeric_cell_renderer_toggle_set_property  (GObject         *object
 
 static void gnumeric_cell_renderer_toggle_get_size   (GtkCellRenderer            *cell,
 						      GtkWidget                  *widget,
-						      GdkRectangle               *cell_area,
+						      GdkRectangle const         *cell_area,
 						      gint                       *x_offset,
 						      gint                       *y_offset,
 						      gint                       *width,
 						      gint                       *height);
 
 static void gnumeric_cell_renderer_toggle_render (GtkCellRenderer *cell,
-						  GdkWindow       *window,
+						  cairo_t         *cr,
 						  GtkWidget       *widget,
-						  GdkRectangle    *background_area,
-						  GdkRectangle    *cell_area,
-						  GdkRectangle    *expose_area,
+						  GdkRectangle const *background_area,
+						  GdkRectangle const  *cell_area,
 						  GtkCellRendererState flags);
 
 static void gnumeric_cell_renderer_toggle_class_init
@@ -165,7 +164,7 @@ gnumeric_cell_renderer_toggle_set_property (GObject      *object,
 static void
 gnumeric_cell_renderer_toggle_get_size (GtkCellRenderer *cell,
 					G_GNUC_UNUSED GtkWidget *widget,
-					GdkRectangle    *cell_area,
+					GdkRectangle const *cell_area,
 					gint            *x_offset,
 					gint            *y_offset,
 					gint            *width,
@@ -221,11 +220,10 @@ gnumeric_cell_renderer_toggle_get_size (GtkCellRenderer *cell,
 
 static void
 gnumeric_cell_renderer_toggle_render (GtkCellRenderer *cell,
-				      GdkWindow       *window,
+				      cairo_t         *cr,
 				      GtkWidget       *widget,
-				      G_GNUC_UNUSED GdkRectangle *background_area,
-				      GdkRectangle    *cell_area,
-				      G_GNUC_UNUSED GdkRectangle *expose_area,
+				      G_GNUC_UNUSED GdkRectangle const *background_area,
+				      GdkRectangle const *cell_area,
 				      G_GNUC_UNUSED GtkCellRendererState flags)
 {
 	GnumericCellRendererToggle *cellpixbuf = (GnumericCellRendererToggle *) cell;
@@ -252,11 +250,10 @@ gnumeric_cell_renderer_toggle_render (GtkCellRenderer *cell,
 	pix_rect.width -= xpad * 2;
 	pix_rect.height -= ypad * 2;
 
-	if (gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect))
-		gdk_draw_pixbuf (window, NULL, pixbuf,
-				 /* pixbuf 0, 0 is at pix_rect.x, pix_rect.y */
-				 draw_rect.x - pix_rect.x, draw_rect.y - pix_rect.y,
-				 draw_rect.x, draw_rect.y,
-				 draw_rect.width, draw_rect.height,
-				 GDK_RGB_DITHER_NORMAL, 0, 0);
+	if (gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect)) {
+		gdk_cairo_set_source_pixbuf (cr, pixbuf,
+		                 draw_rect.x, draw_rect.y);
+		cairo_rectangle (cr, draw_rect.x, draw_rect.y, draw_rect.width, draw_rect.height);
+		cairo_fill (cr);
+	}
 }
diff --git a/src/widgets/gnumeric-expr-entry.c b/src/widgets/gnumeric-expr-entry.c
index b38452f..4efda1e 100644
--- a/src/widgets/gnumeric-expr-entry.c
+++ b/src/widgets/gnumeric-expr-entry.c
@@ -81,6 +81,21 @@
 #define  TOKEN_BRACE_OPEN 123
 #define  TOKEN_BRACE_CLOSED 125
 
+GType
+gnm_update_type_get_type (void)
+{
+  static GType etype = 0;
+  if (etype == 0) {
+    static const GEnumValue values[] = {
+      { GNM_UPDATE_CONTINUOUS, "GNM_UPDATE_CONTINUOUS", "continuous" },
+      { GNM_UPDATE_DISCONTINUOUS, "GNM_UPDATE_DISCONTINUOUS", "discontinuous" },
+      { GNM_UPDATE_DELAYED, "GNM_UPDATE_DELAYED", "delayed" },
+      { 0, NULL, NULL }
+    };
+    etype = g_enum_register_static (g_intern_static_string ("GnmUpdateType"), values);
+  }
+  return etype;
+}
 
 typedef struct {
 	GnmRangeRef ref;
@@ -90,7 +105,7 @@ typedef struct {
 } Rangesel;
 
 struct _GnmExprEntry {
-	GtkHBox	parent;
+	GtkBox	parent;
 
 	GtkEntry		*entry;
 	GtkWidget               *calendar_combo;
@@ -105,7 +120,7 @@ struct _GnmExprEntry {
 	GnmExprEntryFlags	 flags;
 	int			 freeze_count;
 
-	GtkUpdateType		 update_policy;
+	GnmUpdateType		 update_policy;
 	guint			 update_timeout_id;
 
 	gboolean                 is_cell_renderer;  /* as cell_editable */
@@ -133,7 +148,7 @@ struct _GnmExprEntry {
 };
 
 typedef struct _GnmExprEntryClass {
-	GtkHBoxClass base;
+	GtkBoxClass base;
 
 	void (* update)   (GnmExprEntry *gee, gboolean user_requested_update);
 	void (* changed)  (GnmExprEntry *gee);
@@ -175,7 +190,7 @@ static void     gee_remove_update_timer (GnmExprEntry *range);
 static void     cb_gee_notify_cursor_position (GnmExprEntry *gee);
 
 static gboolean gee_debug;
-static GtkObjectClass *parent_class = NULL;
+static GtkWidgetClass *parent_class = NULL;
 
 static gboolean
 gee_is_editing (GnmExprEntry *gee)
@@ -1264,7 +1279,7 @@ cb_gee_key_press_event (GtkEntry	*entry,
 			wbcg_edit_finish (wbcg, WBC_EDIT_REJECT, NULL);
 		return TRUE;
 
-	case GDK_KP_Enter:
+	case GDK_KEY_KP_Enter:
 	case GDK_KEY_Return:
 		if (gee->is_cell_renderer)
 			return FALSE;
@@ -1431,7 +1446,7 @@ gee_init (GnmExprEntry *gee)
 	gee->wbcg = NULL;
 	gee->freeze_count = 0;
 	gee->update_timeout_id = 0;
-	gee->update_policy = GTK_UPDATE_CONTINUOUS;
+	gee->update_policy = GNM_UPDATE_CONTINUOUS;
 	gee->feedback_disabled = FALSE;
 	gee->lexer_items = NULL;
 	gee->texpr = NULL;
@@ -1585,7 +1600,7 @@ gee_class_init (GObjectClass *gobject_class)
 		 g_param_spec_enum ("update-policy",
 				    _("Update policy"),
 				    _("How frequently changes to the entry should be applied"),
-				    GTK_TYPE_UPDATE_TYPE, GTK_UPDATE_CONTINUOUS,
+				    GNM_TYPE_UPDATE_TYPE, GNM_UPDATE_CONTINUOUS,
 				    GSF_PARAM_STATIC | G_PARAM_READWRITE));
 
 	g_object_class_install_property
@@ -1658,7 +1673,7 @@ gee_cell_editable_init (GtkCellEditableIface *iface)
 
 GSF_CLASS_FULL (GnmExprEntry, gnm_expr_entry,
 		NULL, NULL, gee_class_init, NULL,
-		gee_init, GTK_TYPE_HBOX, 0,
+		gee_init, GTK_TYPE_BOX, 0,
 		GSF_INTERFACE (gee_cell_editable_init, GTK_TYPE_CELL_EDITABLE);
 		GSF_INTERFACE (gee_go_plot_data_editor_init, GOG_TYPE_DATA_EDITOR))
 
@@ -1738,7 +1753,7 @@ gee_rangesel_update_text (GnmExprEntry *gee)
 		else
 			/* We don't call gtk_editable_delete_text since we don't want */
 			/* to emit a signal yet */
-			GTK_EDITABLE_GET_CLASS (gee->entry)->delete_text (editable,
+			GTK_EDITABLE_GET_IFACE (gee->entry)->delete_text (editable,
 									  rs->text_start,
 									  rs->text_end);
 		rs->text_end = rs->text_start;
@@ -2105,17 +2120,17 @@ gnm_expr_entry_signal_update (GnmExprEntry *gee, gboolean user_requested)
  * @gee: a #GnmExprEntry
  * @policy: update policy
  *
- * Sets the update policy for the expr-entry. #GTK_UPDATE_CONTINUOUS means that
+ * Sets the update policy for the expr-entry. #GNM_UPDATE_CONTINUOUS means that
  * anytime the entry's content changes, the update signal will be emitted.
- * #GTK_UPDATE_DELAYED means that the signal will be emitted after a brief
+ * #GNM_UPDATE_DELAYED means that the signal will be emitted after a brief
  * timeout when no changes occur, so updates are spaced by a short time rather
- * than continuous. #GTK_UPDATE_DISCONTINUOUS means that the signal will only
+ * than continuous. #GNM_UPDATE_DISCONTINUOUS means that the signal will only
  * be emitted when the user releases the button and ends the rangeselection.
  *
  **/
 void
 gnm_expr_entry_set_update_policy (GnmExprEntry *gee,
-				       GtkUpdateType  policy)
+				       GnmUpdateType  policy)
 {
 	g_return_if_fail (IS_GNM_EXPR_ENTRY (gee));
 
@@ -2162,15 +2177,15 @@ gnm_expr_entry_thaw (GnmExprEntry *gee)
 	if (gee->freeze_count > 0 && (--gee->freeze_count) == 0) {
 		gee_rangesel_update_text (gee);
 		switch (gee->update_policy) {
-		case GTK_UPDATE_DELAYED :
+		case GNM_UPDATE_DELAYED :
 			gee_reset_update_timer (gee, FALSE);
 			break;
 
 		default :
-		case GTK_UPDATE_DISCONTINUOUS :
+		case GNM_UPDATE_DISCONTINUOUS :
 			if (gee->scg->rangesel.active)
 				break;
-		case GTK_UPDATE_CONTINUOUS:
+		case GNM_UPDATE_CONTINUOUS:
 			g_signal_emit (G_OBJECT (gee), signals[UPDATE], 0, FALSE);
 		}
 	}
diff --git a/src/widgets/gnumeric-expr-entry.h b/src/widgets/gnumeric-expr-entry.h
index 025e00b..2274569 100644
--- a/src/widgets/gnumeric-expr-entry.h
+++ b/src/widgets/gnumeric-expr-entry.h
@@ -67,9 +67,17 @@ void	 gnm_expr_entry_load_from_expr	  (GnmExprEntry *gee,
 					   GnmParsePos const *pp);
 gboolean gnm_expr_entry_load_from_range   (GnmExprEntry *gee,
 					   Sheet *sheet, GnmRange const *r);
+typedef enum
+{
+	GNM_UPDATE_CONTINUOUS,
+	GNM_UPDATE_DISCONTINUOUS,
+	GNM_UPDATE_DELAYED
+} GnmUpdateType;
+#define GNM_TYPE_UPDATE_TYPE (gnm_update_type_get_type())
+GType gnm_update_type_get_type (void);
 
 void gnm_expr_entry_set_update_policy (GnmExprEntry *gee,
-					    GtkUpdateType  policy);
+					    GnmUpdateType  policy);
 void gnm_expr_entry_grab_focus (GnmExprEntry *gee, gboolean select_all);
 
 void    gnm_expr_entry_disable_highlight (GnmExprEntry *gee);
diff --git a/src/widgets/gnumeric-text-view.c b/src/widgets/gnumeric-text-view.c
index 40a591e..94c006b 100644
--- a/src/widgets/gnumeric-text-view.c
+++ b/src/widgets/gnumeric-text-view.c
@@ -32,7 +32,7 @@
 #include <dead-kittens.h>
 
 struct _GnmTextView {
-	GtkVBox	parent;
+	GtkBox	parent;
 
 	GtkTextBuffer *buffer;
 	GtkTextView *view;
@@ -43,7 +43,7 @@ struct _GnmTextView {
 };
 
 typedef struct _GnmTextViewClass {
-	GtkVBoxClass base;
+	GtkBoxClass base;
 
 	void (* changed)  (GnmTextView *gtv);
 } GnmTextViewClass;
@@ -274,6 +274,7 @@ gtv_build_button_bold (GtkWidget *tb, GnmTextView *gtv)
 
 static GObjectClass *parent_class = NULL;
 
+/* Do we realy need a finalize method there? */
 static void
 gtv_destroy (GtkWidget *widget)
 {
@@ -343,6 +344,8 @@ gtv_init (GnmTextView *gtv)
 	GtkWidget *tb = gtk_toolbar_new ();
 	GtkWidget *sw = gtk_scrolled_window_new (NULL, NULL);
 
+	g_object_set (G_OBJECT (gtv), "orientation", GTK_ORIENTATION_VERTICAL, NULL);
+
 	gtv->view = GTK_TEXT_VIEW (gtk_text_view_new ());
 	gtv->buffer = gtk_text_view_get_buffer (gtv->view);
 	gnm_create_std_tags_for_buffer (gtv->buffer);
@@ -416,7 +419,7 @@ gtv_class_init (GObjectClass *gobject_class)
 
 GSF_CLASS (GnmTextView, gnm_text_view,
 	   gtv_class_init,
-	   gtv_init, GTK_TYPE_VBOX)
+	   gtv_init, GTK_TYPE_BOX)
 
 
 /**
diff --git a/src/widgets/widget-editable-label.c b/src/widgets/widget-editable-label.c
index d49cdb4..3bf4b03 100644
--- a/src/widgets/widget-editable-label.c
+++ b/src/widgets/widget-editable-label.c
@@ -39,7 +39,7 @@ static GtkWidgetClass *parent_class = NULL;
 struct _EditableLabel {
 	GtkEntry  entry;
 
-	GdkColor  base, text;
+	GdkRGBA  base, text;
 	char	 *unedited_text;
 	unsigned int base_set;
 	unsigned int text_set;
@@ -67,10 +67,10 @@ static void
 el_set_style_entry (EditableLabel *el)
 {
 	GtkWidget *w = GTK_WIDGET (el);
-	gtk_widget_modify_base (w, GTK_STATE_NORMAL, NULL);
-	gtk_widget_modify_text (w, GTK_STATE_NORMAL, NULL);
-	gtk_widget_modify_base (w, GTK_STATE_ACTIVE, NULL);
-	gtk_widget_modify_text (w, GTK_STATE_ACTIVE, NULL);
+	gtk_widget_override_background_color (w, GTK_STATE_NORMAL, NULL);
+	gtk_widget_override_color (w, GTK_STATE_NORMAL, NULL);
+	gtk_widget_override_background_color (w, GTK_STATE_ACTIVE, NULL);
+	gtk_widget_override_color (w, GTK_STATE_ACTIVE, NULL);
 }
 
 static void
@@ -78,27 +78,28 @@ el_set_style_label (EditableLabel *el)
 {
 	GtkWidget *w = GTK_WIDGET (el);
 
-	gtk_widget_modify_base (w, GTK_STATE_NORMAL,
+	gtk_widget_override_background_color (w, GTK_STATE_NORMAL,
 				el->base_set ? &el->base : NULL);
-	gtk_widget_modify_text (w, GTK_STATE_NORMAL,
+	gtk_widget_override_color (w, GTK_STATE_NORMAL,
 				el->text_set ? &el->text : NULL);
 
-	gtk_widget_modify_base (w, GTK_STATE_ACTIVE,
+	gtk_widget_override_background_color (w, GTK_STATE_ACTIVE,
 				el->base_set ? &el->base : NULL);
-	gtk_widget_modify_text (w, GTK_STATE_ACTIVE,
+	gtk_widget_override_color (w, GTK_STATE_ACTIVE,
 				el->text_set ? &el->text : NULL);
 }
 
 static void
 el_set_cursor (GtkEntry *entry, GdkCursorType cursor_type)
 {
-	if (gtk_entry_get_text_area (entry)) {
-		GdkDisplay *display =
-			gtk_widget_get_display (GTK_WIDGET (entry));
+	GdkDisplay *display =
+		gtk_widget_get_display (GTK_WIDGET (entry));
+	GdkWindow *window = gtk_widget_get_window (GTK_WIDGET (entry));
+	if (display && window) {
 		GdkCursor *cursor =
 			gdk_cursor_new_for_display (display, cursor_type);
-		gdk_window_set_cursor (gtk_entry_get_text_area (entry), cursor);
-		gdk_cursor_unref (cursor);
+		gdk_window_set_cursor (window, cursor);
+		g_object_unref (cursor);
 	}
 }
 
@@ -158,7 +159,6 @@ el_destroy (GtkWidget *widget)
 	EditableLabel *el = EDITABLE_LABEL (widget);
 
 	el_cancel_editing (el);
-
 	gnm_destroy_class_chain (parent_class, widget);
 }
 
@@ -167,8 +167,7 @@ el_button_press_event (GtkWidget *widget, GdkEventButton *button)
 {
 	EditableLabel *el = EDITABLE_LABEL (widget);
 
-	if (button->window != gtk_widget_get_window (widget) &&
-	    button->window != gtk_entry_get_text_area (&el->entry)) {
+	if (button->window != gtk_widget_get_window (widget)) {
 		/* Accept the name change */
 		el_entry_activate (GTK_ENTRY (el), NULL);
 		gdk_event_put ((GdkEvent *)button);
@@ -208,16 +207,15 @@ el_key_press_event (GtkWidget *w, GdkEventKey *event)
 }
 
 static void
-el_size_request (GtkWidget *w, GtkRequisition *req)
+el_get_preferred_width (GtkWidget *w, gint *minimal_width, gint *natural_width)
 {
 	PangoRectangle logical_rect;
 	PangoLayout *layout;
 
-	parent_class->size_request (w, req);
 	layout = gtk_entry_get_layout (GTK_ENTRY (w));
 	pango_layout_get_extents (layout, NULL, &logical_rect);
 
-	req->width = logical_rect.width / PANGO_SCALE + 2 * 2;
+	*minimal_width = *natural_width = logical_rect.width / PANGO_SCALE + 2 * 2;
 }
 
 static void
@@ -230,7 +228,8 @@ el_entry_realize (GtkWidget *widget)
 static void
 el_state_changed (GtkWidget *widget, GtkStateType previous_state)
 {
-	parent_class->state_changed (widget, previous_state);
+	if (parent_class->state_changed)
+		parent_class->state_changed (widget, previous_state);
 	/* GtkEntry::state_changed changes the cursor */
 	if (gtk_widget_get_realized (widget))
 		el_set_cursor (GTK_ENTRY (widget), GDK_HAND2);
@@ -255,16 +254,14 @@ el_motion_notify (GtkWidget      *widget,
 static void
 el_class_init (GObjectClass *object_class)
 {
-	GtkWidgetClass *widget_class;
+	GtkWidgetClass *widget_class = (GtkWidgetClass *) object_class;
 
 	parent_class = g_type_class_peek_parent (object_class);
 
 	gnm_destroy_class_set (object_class, el_destroy);
-
-	widget_class = (GtkWidgetClass *) object_class;
 	widget_class->button_press_event  = el_button_press_event;
 	widget_class->key_press_event	  = el_key_press_event;
-	widget_class->size_request	  = el_size_request;
+	widget_class->get_preferred_width = el_get_preferred_width;
 	widget_class->realize		  = el_entry_realize;
 	widget_class->motion_notify_event = el_motion_notify;
 	widget_class->state_changed	  = el_state_changed;
@@ -318,7 +315,7 @@ editable_label_get_text  (EditableLabel const *el)
  * assign the specified colours.  If we are editing just store them for later use.
  */
 void
-editable_label_set_color (EditableLabel *el, GdkColor *base_color, GdkColor *text_color)
+editable_label_set_color (EditableLabel *el, GdkRGBA *base_color, GdkRGBA *text_color)
 {
 	g_return_if_fail (IS_EDITABLE_LABEL (el));
 
@@ -339,17 +336,20 @@ editable_label_set_color (EditableLabel *el, GdkColor *base_color, GdkColor *tex
 }
 
 GtkWidget *
-editable_label_new (char const *text, GdkColor *base_color,
-				      GdkColor *text_color)
+editable_label_new (char const *text, GdkRGBA *base_color,
+				      GdkRGBA *text_color)
 {
 	EditableLabel *el = g_object_new (EDITABLE_LABEL_TYPE,
 		"has-frame",		FALSE,
 		"editable",		FALSE,
 		NULL);
 
-	GtkStyle *s = gtk_widget_get_default_style ();
-	el->base = s->bg [GTK_STATE_NORMAL];
-	el->text = s->fg [GTK_STATE_NORMAL];
+	GtkStyleContext *ctxt = gtk_widget_get_style_context (GTK_WIDGET (el));
+	gtk_style_context_save (ctxt);
+	gtk_style_context_add_class (ctxt, GTK_STYLE_CLASS_BUTTON);
+	gtk_style_context_get_background_color (ctxt, GTK_STATE_NORMAL, &el->base);
+	gtk_style_context_get_color (ctxt, GTK_STATE_NORMAL, &el->text);
+	gtk_style_context_restore (ctxt);
 
 	editable_label_set_color (el, base_color, text_color);
 
diff --git a/src/widgets/widget-editable-label.h b/src/widgets/widget-editable-label.h
index 1102921..35d3f9e 100644
--- a/src/widgets/widget-editable-label.h
+++ b/src/widgets/widget-editable-label.h
@@ -12,11 +12,11 @@ G_BEGIN_DECLS
 typedef struct _EditableLabel EditableLabel;
 
 GType     editable_label_get_type (void);
-GtkWidget  *editable_label_new       (char const *text, GdkColor *base_color,
-				      GdkColor *text_color);
+GtkWidget  *editable_label_new       (char const *text, GdkRGBA *base_color,
+				      GdkRGBA *text_color);
 void        editable_label_set_text  (EditableLabel *el, char const *text);
 char const *editable_label_get_text  (EditableLabel const *el);
-void        editable_label_set_color (EditableLabel *el, GdkColor *base, GdkColor *text);
+void        editable_label_set_color (EditableLabel *el, GdkRGBA *base, GdkRGBA *text);
 void        editable_label_start_editing (EditableLabel *el);
 gboolean    editable_label_get_editable (EditableLabel *el);
 void        editable_label_set_editable (EditableLabel *el, gboolean editable);
diff --git a/src/widgets/widget-font-selector.c b/src/widgets/widget-font-selector.c
index c962ca7..9e1893b 100644
--- a/src/widgets/widget-font-selector.c
+++ b/src/widgets/widget-font-selector.c
@@ -31,7 +31,7 @@
 #include <string.h>
 
 struct _FontSelector {
-	GtkHBox box;
+	GtkBox box;
 	GtkBuilder *gui;
 
 	GtkWidget *font_name_entry;
@@ -51,7 +51,7 @@ struct _FontSelector {
 };
 
 typedef struct {
-	GtkHBoxClass parent_class;
+	GtkBoxClass parent_class;
 
 	void (* font_changed) (FontSelector *fs, GnmStyle *mstyle);
 } FontSelectorClass;
@@ -67,7 +67,7 @@ typedef struct {
 typedef FontSelector Fs;
 typedef FontSelectorClass FsClass;
 
-static GtkHBoxClass *fs_parent_class;
+static GtkBoxClass *fs_parent_class;
 
 /* Signals we emit */
 enum {
@@ -110,12 +110,16 @@ cb_list_adjust (GtkTreeView* view)
 	GdkRectangle rect;
 	GtkAdjustment *adj;
 	int pos, height, child_height;
+	GtkAllocation alloc;
+	GtkRequisition req;
 
 	if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (view), &model, &iter)) {
 		path = gtk_tree_model_get_path (model, &iter);
 		scroll = GTK_SCROLLED_WINDOW (gtk_widget_get_parent (GTK_WIDGET (view)));
-		height = GTK_WIDGET (view)->allocation.height;
-		child_height = GTK_WIDGET (view)->requisition.height;
+		gtk_widget_get_allocation (GTK_WIDGET (view), &alloc);
+		height =alloc.height;
+		gtk_widget_get_preferred_size (GTK_WIDGET (view), &req, NULL);
+		child_height = req.height;
 		if (height < child_height) {
 			gtk_tree_view_get_cell_area (view, path, NULL, &rect);
 			adj = gtk_scrolled_window_get_vadjustment (scroll);
@@ -390,6 +394,7 @@ fs_init (FontSelector *fs)
 	w = g_object_new (GOC_TYPE_CANVAS, NULL);
 	fs->font_preview_canvas = GOC_CANVAS (w);
 	goc_canvas_scroll_to (fs->font_preview_canvas, 0, 0);
+	gtk_widget_override_background_color (w, GTK_STATE_NORMAL, &gs_white);
 	gtk_widget_show_all (w);
 	w = go_gtk_builder_get_widget (fs->gui, "font-preview-frame");
 	gtk_container_add (GTK_CONTAINER (w), GTK_WIDGET (fs->font_preview_canvas));
@@ -441,7 +446,7 @@ fs_class_init (GObjectClass *klass)
 {
 	gnm_destroy_class_set (klass, fs_destroy);
 
-	fs_parent_class = g_type_class_peek (gtk_hbox_get_type ());
+	fs_parent_class = g_type_class_peek (gtk_box_get_type ());
 
 	fs_signals[FONT_CHANGED] =
 		g_signal_new (
@@ -455,7 +460,7 @@ fs_class_init (GObjectClass *klass)
 }
 
 GSF_CLASS (FontSelector, font_selector,
-	   fs_class_init, fs_init, GTK_TYPE_HBOX)
+	   fs_class_init, fs_init, GTK_TYPE_BOX)
 
 GtkWidget *
 font_selector_new (void)
diff --git a/src/xml-sax-write.c b/src/xml-sax-write.c
index bef73f4..4a1e9f6 100644
--- a/src/xml-sax-write.c
+++ b/src/xml-sax-write.c
@@ -82,9 +82,9 @@ typedef struct {
 void
 gnm_xml_out_add_gocolor (GsfXMLOut *o, char const *id, GOColor c)
 {
-	GdkColor tmp;
-	go_color_to_gdk (c, &tmp);
-	gsf_xml_out_add_color (o, id, tmp.red, tmp.green, tmp.blue);
+	GdkRGBA tmp;
+	go_color_to_gdk_rgba (c, &tmp);
+	gsf_xml_out_add_color (o, id, tmp.red * 65535, tmp.green * 65535, tmp.blue * 65535);
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]