From 2d8e7b8884602858b388a71cc6ad7f25e2acc422 Mon Sep 17 00:00:00 2001
From: GTK3 Migration <patch@example.com>
Date: Thu, 9 Apr 2026 18:27:00 +0000
Subject: [PATCH] Port from gtk-sharp-2.0 to GtkSharp 3.22 (GTK3)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Port from gtk-sharp-2.0 to GtkSharp 3.22 (GTK3)

The gtk-sharp-2.0 / mono Gtk# binding targets GTK 2 and is no longer
maintained.  This commit migrates the entire codebase to GtkSharp 3.x
(the community-maintained gtk-sharp-3.0 / GtkSharp NuGet package) which
wraps GTK 3.22+.

Build system (meson.build, src/meson.build)
-------------------------------------------
* Replace pkg-config dependency  gtk-sharp-2.0 -> gtk-sharp-3.0
* Replace pkg-config dependency  glib-sharp-2.0 -> glib-sharp-3.0
* Rename internal meson variables accordingly (gtk_sharp_2_dep ->
  gtk_sharp_dep, glib_sharp_2_dep -> glib_sharp_dep)

Drawing subsystem – complete rewrite (Drawers + Areas)
-------------------------------------------------------
GTK 2 used server-side Gdk.Pixmap / Gdk.GC / Gdk.Drawable for all
off-screen drawing.  GTK 3 removes these entirely in favour of Cairo
surfaces.  The following changes were made:

* Drawer.cs – Replace Gdk.Pixmap[,] / Gdk.GC[,] fields with
  Cairo.ImageSurface[,] / Cairo.Color[,].  All Create() overrides now
  return Cairo.ImageSurface; Draw() overrides now accept Cairo.Context
  instead of (Gdk.GC, Gdk.Drawable).  DrawNormal/DrawHighlight and
  GetBackgroundGC (renamed GetBackgroundColor) updated accordingly.
  Drawer.Color now wraps Gdk.RGBA (not Gdk.Color).
  Information.SetupHighlight() obtains theme colours via
  StyleContext.GetColor/GetBackgroundColor instead of
  widget.Style.TextColors/BaseColors[StateType.Selected].

* PixmapManager.cs – Replaced with SurfaceManager backed by
  Cairo.ImageSurface; old PixmapManager left as a thin alias for
  backward source compatibility.

* AsciiDrawer, BinaryDrawer, DecimalDrawer, HexDrawer, OctalDrawer –
  Rewritten to draw into Cairo.ImageSurface using Cairo.Context /
  Pango.CairoHelper.ShowLayout.  Surface blitting in Draw() uses
  cr.SetSourceSurface + clip + Paint instead of
  Gdk.Drawable.DrawDrawable.

* Area.cs – backPixmap (Gdk.Drawable) replaced by backCr
  (Cairo.Context, injected per draw call from DataViewDisplay.OnDrawn).
  Gdk.GC cursor fields replaced with Cairo.Color.  DrawRectangle calls
  replaced with a new DrawFilledRect(Cairo.Context, Cairo.Color, ...)
  helper.  ParseDisplayType uses Gdk.RGBA.Parse instead of
  Gdk.Color.Parse + Gdk.Colormap.System.AllocColor.  Realize() no longer
  creates Gdk.GC objects.  BeginPaintRect/EndPaint/BeginPaintRegion are
  now no-ops (GTK3 manages double-buffering automatically).
  Menu.Popup() -> Menu.PopupAtPointer(null).

* GroupedArea, AsciiArea, OffsetArea, SeparatorArea – All Gdk.GC
  background-colour variables replaced with Cairo.Color; DrawNormal /
  DrawHighlight calls updated to pass backCr.  SeparatorArea.RenderExtra
  draws the separator line with Cairo strokes instead of
  Gdk.Drawable.DrawLine.

* AreaGroup.cs – SetChanged() no longer calls
  GdkWindow.BeginPaintRect/EndPaint; instead it queues a QueueDraw().
  ExposeManually() likewise delegates to QueueDraw().  GdkWindow null
  check replaced with IsRealized check.

DataViewDisplay.cs
------------------
* ExposeEvent handler (OnExposed) replaced with Drawn handler (OnDrawn)
  which receives the Cairo.Context and injects it into every Area before
  calling Render().
* ModifyBg(StateType.Normal, …) -> OverrideBackgroundColor(StateFlags.Normal, …)
* Benchmark() no longer wraps Render() in BeginPaintRect/EndPaint.

DataViewControl.cs, StatisticsPlugin.cs
----------------------------------------
* Gdk.Window.GetPointer (removed in GTK3) replaced with
  Gdk.Display.Default.GetPointer.
* StatisticsPlugin.StatisticsDrawWidget.OnExposeEvent -> OnDrawn
  (Cairo.Context passed directly; Gdk.CairoHelper.Create no longer
  needed).  GetGeometry(…, out depth) -> AllocatedWidth/AllocatedHeight.
  Cairo.Context.Color (obsolete) -> SetSourceRGB.

Widget hierarchy
----------------
* Gtk.HBox / Gtk.VBox (removed in GTK3) -> Gtk.Box with explicit
  Orientation constructor argument throughout all plugin and dialog files.
* Classes that previously extended Gtk.HBox/VBox now call
  base(Gtk.Orientation.Horizontal/Vertical, 0) in their constructors.
* Type-string check "Gtk.HBox" in GuiPlugin.cs updated to "Gtk.Box".

Stock icons
-----------
* All Gtk.Stock.* references replaced with freedesktop named icon
  strings (document-open, edit-cut, etc.).
* Gtk.Image(Stock, IconSize) constructors replaced with
  Gtk.Image(iconName, IconSize) or SetFromIconName.
* Dialog AddButton stock-ID strings replaced with plain English labels
  ("OK", "Cancel", "Yes", "No") or icon-name strings where appropriate.

README
------
* Updated dependency versions: GTK+ >= 3.22, GtkSharp 3.x, mono >= 4.0.

plugins: Add 64bit support to ConversionTable

Populate the 64bit conversion entries in the ConversionTable.

Fixes #34

ui: Add 64bit conversion entries in ConversionTable

Update the ConversionTable to add 64bit signed/unsigned
integer entries, and reorganize the entries to keep
the overall width reasonable.

gui: Clear selection on revert

The selection may become invalid when reloading the file from disk,
since the file size may have changed.

Fixes #43

Release v0.6.3

Fix project links in user documentation

Add build and test github workflow

Improve information visibility in statusbar

Rework the statusbar layout to ensure the offset/selection information
is always visible.

This also removes the interal statusbar pane resize handle (split
between message and offset/selection info) and also the window resize
handle at the bottom right. The former is not very useful due to the way
the new statusbar layout autohandles the sizes. The latter is not useful
since proper window managers support window resizing without any
application help.

Fixes #14

Add binary and ASCII layout file

Add a bless-binary-ascii.layout file for a binary and ASCII area layout.

Fixes #23

Handle all IO exceptions when opening plugins directory

This ensures we don't crash regardless of the reason the plugins
directory is inaccessible.

Fixes #32

Co-Authored-By: andrsmllr <andrsmllr@bananatronics.org>

The great meson-ification

Replace autotools/bless-builder with meson, get rid of support for various
obsolete tools (like scrollkeeper). Also update installation to use
the currently recommended paths for icons and help documentation.

tests: Fix "Range is an ambiguous reference" build error

Ensure we don't end up with an unaligned view offset

The current view offset should always be aligned with the current bytes
per row value. Ensure this alignment when creating the view or resizing.

Replace libglade UI loading with Gtk.Builder

Fixes #2

Use our own TTF version of Courier font by default

On some systems the Type 1 Courier font as shipped by texlive [1] will
be used as the default display font. For unknown reasons this doesn't
render well in Bless on some systems.

This commit adds our own TTF version of the aforementioned Courier font,
to ensure we have a nice looking default Courier font even on systems
that don't ship one, or on which the (Type 1) Courier font is problematic.

The font name of bless-courier.ttf is 'BlessCourier', to allow using the
'Courier' font name for system-wide Courier font if needed.

[1] https://www.tug.org/texlive/Contents/live/texmf-dist/fonts/type1/adobe/courier/pcrr8a.pfb

Fixes #25

Fix building error CS0104: 'Range' is an ambiguous reference

plugins: Add CopyOffset plugin

Add a plugin to support copying to the clipboard the current cursor
offset or selection range offsets.

Fixes #15

plugins: Load the BitwiseOperations plugin after the EditOperations plugin

This ensures that the menu items show up in the correct positions in the
menu.

Fix scrollkeeper check

Release v0.6.2

Update the installation instructions

build: Require a more recent version of gettext

Recent autotools handle detection of "mkdir -p" differently than older
versions. Require a more recent (>= 0.16) gettext version which supports
the new way of "mkdir -p" detection.

Fixes #8

gui: Add the FileChangedBar to the parent container once

Add the FileChangedBar to the Dataview VBox once, instead of every time
we want to show the bar. This avoids logging a series of Gtk-CRITICAL
errors when the bar is shown.

buffers: Silence SharingViolation exceptions

Allow multiple FileStreams to refer to the same file for both reading
and writing. This is fine since we control when such operations happen
and ensure correctness.

buffers: Only notify for external file content changes

This is the only change mode we currently support properly.

Fixes #7

util: Fix byte array string parsing

Don't make assumptions about the length of the byte array based on the
minimum number of digits of the canonical string form of the used
number base.

Fixes #3

drawers: Avoid ligatures in character pixmaps

Some monospace fonts support ligatures, which mess with the character
rendering in the pixmaps. Avoid such ligatures by inserting the Zero
Width Non-Joiner character U+200C between characters that commonly have
ligatures.

Fixes #1

Release v0.6.1

Fix make check

Update project site info in README

Replace bzr references with git equivalents

Add .gitignore

Fix warnings

Fix crash when trying to save to file without write permissions

Fix reading from and writing to XML config files

buffers: Use the system temp path if supplied tempDir value is empty

This fixes saving when the file size has changed and the temp dir
hasn't been explicitly specified in the config file.

Fix support for overriding the compiler

Use unified mono compiler 'mcs' by default

# Fixed exporting in ASCII.
# Fixed problem with translation of menubar items.
# Fixed issues with i18n.
# Workaround for gna.org #13254.
# Fixed bug "Bless ignores black color in layouts" (gna.org #13049).
# Correctly set FileBuffer attributes even when not using unix specific features.
# Fixes for make install.
# Update files for 0.6.0 release.
# Fix mouse selection bug.
# Fixed various problems related to selecting data.
# Fix bug triggered when overwriting selected data.
# Merge changes from refactor-threading branch.
# Check if the AreaGroup is still valid when running the draw delegate.
# Adhere to policy: change model immediately, change view when idle.
# Changed ByteBuffer thread safety handling: it is now the event recipient's responsibility to execute code within the main GTK thread if this is needed.
# Fix crash that occurs when changing the pattern match preference while there is no open file.
# Make sure that preferences widgets are removed from the preferences dialog, so they can be shown again at a later invocation.
# Make sure "Temporary Directory" preference is updated when it is changed in the preferences dialog.
+ Allow manual activation of progress report in ThreadedAsyncOperation.
# Fix visual glitches in SaveOperation progress report.
# Refactored ThreadedAsyncOperation class.
# Refactored Save*Operation classes.
# Update docs for version 0.5.9.
# Fix Help->About.
# Fix renames done by glade-3 that lead to crashes.
# Add the new "Undo.KeepAfterSave" preference to the preferences dialog and rearrange it for better usability.
# Decide how to handle the undo history after saving a file according to a preference.
# Don't clip highlights before breaking them down because 1. we are changing the originals (eg the selection) leading to bugs 2. they are clipped later on anyway
# Limit the size of highlighted selection patterns matches.
# Minimize the number of highlights by merging overlapping pattern matches together.

+ Added Portable class to handle OS specific functions in a uniform way.
# Changed code to use the Portable class methods.
# Fix bug in Segment.MakePrivateCopyOfData() that causes data corruption when doing a Change->Save->Undo.
# Fix names of Progress bar widgets so that ProgressDisplayPlugin can bind them.
# Use the directory name instead of the full path in the call to statvfs() because the file may not exist yet.
# More Buffer refactoring.
# Refactored IBuffer interface.
# Added forgotten calls to create private copies.
+ Added preferences for PatternMatchHighlight plugin.
+ Added proper support for plugin preferences.
# Added property to get all loaded plugin managers.
- Removed unused "Default Number Base" option.
# Initial refactoring of preferences subsystem.
# Use gettext 0.15 instead of 0.14 in configure.ac (fixes gna.org #9660)
# Fix bless build with mono 1.9
# Fix export problem (gna.org #11397)
# Make sure we have a bytebuffer when rendering (fixes crash when changing layouts).
# Fixed highlighting bugs.
# Make sure view remains in a consistent state when deleting or cutting bytes.
# Cursor is correctly cleared when it is at (or beyond) the EOF.
# Fixed silly errors which caused crashes (eg when closing a file).
# Removed forgotten debug message.
# Make sure the cursor always becomes visible after clearing a selection.
# Made application respond immediately to ByteBuffer events.
# Removed obsolete code.
# Fixed build warnings.
# Fixed cursor issues (visual glitches and focus).
+ Cached buffer data used when rendering the areas. Got a substantial performance increase!
+ Added PatternMatchHighlightPlugin.
# Fixed visual highlighting glitches.
# Fixed cursor rendering.
# Fixed drawing of highlights.
+ Added comments.
+ Implemented differential highlight rendering.
# First attempt at refactoring Bless.Areas.
+ Added IntervalTree class.
+ Added IRange interface.
+ Added Range.Overlaps() method.
- Remove extra selection sorts. (Every selection is sorted in SetSelection()).
+ Added a generic RedBlackTree class to Bless.Util.
# Fixed support for 'make check'.
+ Added support for dummy modules to bless-builder.
+ Added support for per module outputdir to bless-builder.
# Don't allow users to execute actions that change the size of a non-resizable buffer.
+ Added support for reading from and writing to block devices.
# Try to open files using both escaped and unescaped URI interpretations. Fixes gna.org #10378.
# Added forgotten file in EXTRA_DIST.
# Fixed needed GTK version in manual.

# Make sure make recurses into all src/ subdirs (not for building, but for cleaning).
- Remove extraneous debug messages.
+ Added some Bless API documentation.
# Fixes in automake scripts (closes gna.org #9659)
# Fixed typo bug (closes gna.org #9664)
# doc/user/Makefile.am: Workaround for annoying $(wildcard) issue. Fixes gna.org #9543.
# src/util/Makefile.am: Filename changed.
# Fixes for bless.desktop. Closes gna.org patch #769.
# Moved Area plugins to Bless.Gui.Areas.Plugins namespace.
# Install Bless in more standard locations (patch by Emmanuel Fleury).
# Added FileResourcePath.GetDataPath() to get the path of files in the bless data directory.
  So now the installation data path doesn't need to be <assembly_dir>/../data.

# Changed files to use the new GetDataPath().

# Beautified the source code
# Plugin-ified Areas subsystem.
# Moved XML area configuration code from Layout to each separate Area.
+ Bless builder can now detect cyclic module dependencies and exit with a meaningful message.
# Update forgotten bless.spec, doc/user/Makefile.am
# Make sure file names with underscores are displayed correctly in tab labels.
# Properly handle local files with non-[URI compliant] characters (eg ':') (fixes gna.org #9313)
# Updated documentation and build system for 0.5.1
# Make sure the user can't perform an operation with an empty byte pattern.
+ Add icon for perform byte operation action item.
# Fix for missing "Select All" label introduced by previous patch.
- Removed 'Stock.SelectAll' so we don't depend on Gtk+ 2.10 yet.
# Improved BitwiseOperations gui.
+ Added documentation for the bitwise operations in the manual.

# General cleanup in Bless.Buffers.*
# Changed MultiAction to use a generic List<>.
# Make sure edit shortcuts (eg Ctrl-C) are working properly in the various text entries (fixes gna.org #9094)
# Fixed "Replace All" bug caused by change in ByteBuffer.ReadAllowed semantics (fixes gna.org #9084)
# Refactoring of MakePrivateCopyOfData()
+ Added SegmentCollection.GetRange()
# Make sure undo/redo information stays valid after saving (fixes #8916)
+ Made Util.Deque and Util.List implement IEnumerable.
# Workaround for string.IndexOf(...) bug in mono 1.1.x, when performing case-insensitive comparison. Fixes #8975.
+ Added plugin to perform bitwise operations
# Made Util.List and Util.Deque generic
# Fixed all code to use the generic classes
# Changed IBuffer interface to make it more versatile
# Make sure the infobar updates the selection even when the cursor hasn't moved
+ Added new progress display infrastructure
+ Added new UIService to hold UI related service
# Changed save operations to use the new infrastructure
# Save operations progress now displays the name of the file being saved

+ Added "select all" operation
+ Added Range property to ByteBuffer
# Always copy data instead of assigning reference, because the referenced data may be change externally
+ Added right-click popup menu in DataView areas
# Updated documentation and build system for 0.5.0
- Removed el.po as it is not complete
# We don't need to depend on Mono.Cairo.dll
# Using Gtk.AboutDialog instead of custom one.
# Try to highlight selection pattern matches only if selection has a reasonable size (<=1024 bytes)
# More GC related cleanup.
# Thoroughly cleanup resources to help the GC collect objects
# Fixed bug: newly opened files that replaced empty views didn't correctly notify about changes (eg no undo/redo).
# Fixed innocent gtk warnings
# Make sure the PluginManager tries to load only .dll plugin files.
# Documentation update for 0.5.0rc1
# Require mono 1.1.14 and gtk# 2.8
+ Include autogen.sh in distribution package
# Make sure bless can be built and executed in a path with spaces.
# configure.ac: Make sure user has a proper mono and gmcs installed.
+ Added $(DESTDIR) support in Makefiles
# Really minor fix.
# Improved installability (for lack of better term)
# Misc bug fixes.
+ Updated documentation.
+ BlessBuilder now passes command line options to MCS
# Pre-release cleanup.
+ Improved user guide.
# DataViewControl.cs: Fixed TAB key problem.
+ *Area.cs: Added support for numpad numerical entry.
# Refactored DataViewControl event handling code.
+ Added type('t') option support in export pattern commands
+ Added default values for various export pattern command options
+ Updated export section in manual
+ BaseConverter.cs: Added option whether to use lowercase when converting.
# Cleaned up console debug messages
# Save memory by loading the same pixmaps only once.
- Don't need to share layouts to conserve memory anymore
# Applied patch from Thomas Liebetraut for garbled display problem (fixes gna.org #6158)
# More compiler warning fixes
# Fixed compiler warnings
+ Added ignore tag support in build system .bi files.
# Improved Statistics plugin, but it is far from ready so it is disabled.
# Updated documentation and build system for 0.5.0beta1
# SelectRangePlugin.cs: Correctly calculate range with negative length.
# DataView.cs: Make sure range is sorted beforing setting selection.
+ Added HistoryPlugin and improved history infrastructure
# Improved pre-build and i18n support.
+ Added "Temporary Directory" preference
+ Added forgotten Makefiles.
+ Added I18N
- Removed obsolete widgets.
+ Store export patterns for later usage.
+ Added SelectRange plugin
+ Added export support
+ Added plugin dependency support
+ Changed BlessBuilder so that the user can specify the set of modules to build.
# Changed interface to BaseConverter.ConvertToString() to explicitly accept the
  minimum number of digits to use.
# Changed module builder to use gmcs instead of mcs.
# Cleaned up makefiles nad changed the to use the new 'buffers' directory.
# Refactored Bless.Buffers
+ Initial commit
---
 .gitignore                                    |   1 +
 README                                        |   8 +-
 data/ui/BitwiseOperationsPlugin.ui            |  32 +-
 data/ui/ConversionTablePlugin.ui              | 550 +++++++-----------
 data/ui/ExportDialog.ui                       |  97 ++-
 data/ui/FindReplacePlugin.ui                  | 295 ++++------
 data/ui/GotoOffsetPlugin.ui                   |  70 ++-
 data/ui/LayoutSelectionDialog.ui              |  10 +-
 data/ui/MainWindow.ui                         |  22 +-
 data/ui/PreferencesDialog.ui                  | 150 ++---
 data/ui/ProgressDialog.ui                     |  12 +-
 data/ui/ProgressDisplayPlugin.ui              |  10 +-
 data/ui/SelectRangePlugin.ui                  |  76 ++-
 meson.build                                   |   4 +-
 src/gui/DataBook.cs                           |   5 +-
 src/gui/DataViewControl.cs                    |  56 +-
 src/gui/DataViewDisplay.cs                    |  46 +-
 src/gui/FileChangedBar.cs                     |   5 +-
 src/gui/FileService.cs                        |   4 +-
 src/gui/MainWindow.cs                         |   6 +-
 src/gui/WidgetGroup.cs                        |   6 +-
 src/gui/areas/Area.cs                         | 266 ++++-----
 src/gui/areas/AreaGroup.cs                    |  22 +-
 src/gui/areas/AsciiArea.cs                    |  21 +-
 src/gui/areas/GroupedArea.cs                  |  21 +-
 src/gui/areas/OffsetArea.cs                   |  11 +-
 src/gui/areas/SeparatorArea.cs                |  16 +-
 src/gui/dialogs/Alert.cs                      |  13 +-
 src/gui/dialogs/ErrorAlert.cs                 |   4 +-
 src/gui/dialogs/ExportDialog.cs               |  13 +-
 src/gui/dialogs/FileOverwriteAlert.cs         |   4 +-
 src/gui/dialogs/InformationAlert.cs           |   4 +-
 src/gui/dialogs/LayoutSelectionDialog.cs      |   9 +-
 src/gui/dialogs/PreferencesDialog.cs          |  14 +-
 src/gui/dialogs/ProgressDialog.cs             |   2 +-
 src/gui/dialogs/RevertConfirmationAlert.cs    |   6 +-
 src/gui/dialogs/SaveConfirmationAlert.cs      |   6 +-
 src/gui/dialogs/SaveConfirmationMultiAlert.cs |  14 +-
 src/gui/dialogs/WarningAlert.cs               |   6 +-
 src/gui/drawers/AsciiDrawer.cs                |  46 +-
 src/gui/drawers/BinaryDrawer.cs               |  61 +-
 src/gui/drawers/DecimalDrawer.cs              |  50 +-
 src/gui/drawers/Drawer.cs                     | 239 ++++----
 src/gui/drawers/HexDrawer.cs                  |  71 +--
 src/gui/drawers/OctalDrawer.cs                |  47 +-
 src/gui/drawers/PixmapManager.cs              |  81 ++-
 src/gui/plugins/BitwiseOperationsPlugin.cs    |  12 +-
 src/gui/plugins/ConversionTablePlugin.cs      |   5 +-
 src/gui/plugins/CopyOffsetPlugin.cs           |  15 +-
 src/gui/plugins/EditOperationsPlugin.cs       |  14 +-
 src/gui/plugins/FileOperationsPlugin.cs       |  26 +-
 src/gui/plugins/FindReplacePlugin.cs          |  12 +-
 src/gui/plugins/GotoOffsetPlugin.cs           |   9 +-
 src/gui/plugins/HelpOperationsPlugin.cs       |   4 +-
 src/gui/plugins/InfobarPlugin.cs              |   5 +-
 .../plugins/PatternMatchHighlightPlugin.cs    |   3 +-
 src/gui/plugins/ProgressDisplayPlugin.cs      |  12 +-
 src/gui/plugins/SelectRangePlugin.cs          |   9 +-
 src/gui/plugins/StatisticsPlugin.cs           |  48 +-
 src/meson.build                               |  18 +-
 src/plugins/GuiPlugin.cs                      |  74 +--
 61 files changed, 1284 insertions(+), 1494 deletions(-)

diff --git a/.gitignore b/.gitignore
index 8b5c82a..ffa149a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@ po/**
 !po/LINGUAS
 !po/Makevars
 !po/POTFILES.in
+src/util/ConfigureDefines.cs
diff --git a/README b/README
index 52b0876..5e50143 100644
--- a/README
+++ b/README
@@ -63,9 +63,9 @@ uses are cross-platform, so bless should be able to run without problems
 on all the major platforms (GNU/Linux, *BSD, Solaris, Win32).
 
 To build and run the current version of bless you need:
-    * GTK+ >= 2.8.x (Included in all modern GNU/Linux distributions, http://www.gtk.org)
-    * mono/.NET runtime and C# compiler >= 1.1.14 (http://www.mono-project.com)
-    * Gtk# bindings >= 2.8 for GTK+ (http://gtk-sharp.sourceforge.net)
+    * GTK+ >= 3.22.x (Included in all modern GNU/Linux distributions, http://www.gtk.org)
+    * mono/.NET runtime and C# compiler >= 4.0 (http://www.mono-project.com)
+    * GtkSharp 3.x bindings for GTK+ 3 (https://github.com/GtkSharp/GtkSharp)
     * pkg-config (Included in all modern GNU/Linux distributions)
     * meson >= 0.46
     * nunit and nunit-console, if you want to build and run tests
@@ -124,7 +124,7 @@ Become root and type 'ninja -C build install'.
 5. Running
 ----------
 If you chose to install the program, just type 'bless'. In any case you can
-run the program by typing 'mono build/src/bless.exe' from within the top source
+run the program by typing 'mono build/src/bless.exe' (or 'dotnet build/src/bless.exe') from within the top source
 directory.  Enjoy!
 
 ----------------
diff --git a/data/ui/BitwiseOperationsPlugin.ui b/data/ui/BitwiseOperationsPlugin.ui
index 5ce9c6e..e94fe16 100644
--- a/data/ui/BitwiseOperationsPlugin.ui
+++ b/data/ui/BitwiseOperationsPlugin.ui
@@ -1,8 +1,8 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <object class="GtkListStore" id="model3">
     <columns>
-      <column type="gchararray"/>
+      <column type="gchararray" />
     </columns>
     <data>
       <row>
@@ -21,7 +21,7 @@
   </object>
   <object class="GtkListStore" id="model4">
     <columns>
-      <column type="gchararray"/>
+      <column type="gchararray" />
     </columns>
     <data>
       <row>
@@ -41,14 +41,15 @@
       </row>
     </data>
   </object>
-  <object class="GtkHBox" id="BitwiseOperationsHBox">
+  <object class="GtkBox" id="BitwiseOperationsHBox">
+    <property name="orientation">horizontal</property>
     <property name="visible">True</property>
     <property name="border_width">6</property>
     <property name="spacing">6</property>
     <child>
       <object class="GtkEventBox" id="SourceLabelEB">
         <property name="visible">True</property>
-        <signal handler="OnSourceLabelButtonPress" name="button_press_event"/>
+        <signal handler="OnSourceLabelButtonPress" name="button_press_event" />
         <child>
           <object class="GtkLabel" id="SourceLabel">
             <property name="visible">True</property>
@@ -65,10 +66,10 @@
     <child>
       <object class="GtkComboBox" id="OperationComboBox">
         <property name="visible">True</property>
-        <signal handler="OnOperationComboBoxChanged" name="changed"/>
+        <signal handler="OnOperationComboBoxChanged" name="changed" />
         <property name="model">model3</property>
         <child>
-          <object class="GtkCellRendererText" id="renderer3"/>
+          <object class="GtkCellRendererText" id="renderer3" />
           <attributes>
             <attribute name="text">0</attribute>
           </attributes>
@@ -83,8 +84,8 @@
     <child>
       <object class="GtkEntry" id="OperandEntry">
         <property name="visible">True</property>
-        <signal handler="OnOperandEntryChanged" name="changed"/>
-        <signal handler="OnOperandEntryActivated" name="activate"/>
+        <signal handler="OnOperandEntryChanged" name="changed" />
+        <signal handler="OnOperandEntryActivated" name="activate" />
       </object>
       <packing>
         <property name="position">2</property>
@@ -106,7 +107,7 @@
         <property name="visible">True</property>
         <property name="model">model4</property>
         <child>
-          <object class="GtkCellRendererText" id="renderer4"/>
+          <object class="GtkCellRendererText" id="renderer4" />
           <attributes>
             <attribute name="text">0</attribute>
           </attributes>
@@ -119,9 +120,8 @@
     <child>
       <object class="GtkButton" id="DoOperationButton">
         <property name="visible">True</property>
-        <property name="label" translatable="no">gtk-execute</property>
-        <property name="use_stock">True</property>
-        <signal handler="OnDoOperationClicked" name="clicked"/>
+        <property name="label" translatable="yes">Execute</property>
+        <signal handler="OnDoOperationClicked" name="clicked" />
       </object>
       <packing>
         <property name="expand">False</property>
@@ -133,14 +133,14 @@
       <object class="GtkButton" id="CloseButton">
         <property name="visible">True</property>
         <property name="can_focus">True</property>
-        <property name="relief">GTK_RELIEF_NONE</property>
+        <property name="relief">none</property>
         <property name="focus_on_click">False</property>
-        <signal handler="OnCloseButtonClicked" name="clicked"/>
+        <signal handler="OnCloseButtonClicked" name="clicked" />
         <child>
           <object class="GtkImage" id="image8">
             <property name="visible">True</property>
-            <property name="stock">gtk-close</property>
             <property name="icon_size">1</property>
+            <property name="icon-name">window-close</property>
           </object>
         </child>
       </object>
diff --git a/data/ui/ConversionTablePlugin.ui b/data/ui/ConversionTablePlugin.ui
index 4b2359f..f6d6ebe 100644
--- a/data/ui/ConversionTablePlugin.ui
+++ b/data/ui/ConversionTablePlugin.ui
@@ -1,124 +1,86 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <object class="GtkTable" id="ConversionTableWidget">
+  <object class="GtkGrid" id="ConversionTableWidget">
     <property name="visible">True</property>
     <property name="border_width">6</property>
-    <property name="n_rows">7</property>
-    <property name="n_columns">7</property>
     <child>
-      <placeholder/>
+      <placeholder />
     </child>
     <child>
-      <placeholder/>
+      <placeholder />
     </child>
     <child>
-      <placeholder/>
+      <placeholder />
     </child>
     <child>
-      <placeholder/>
+      <placeholder />
     </child>
     <child>
       <object class="GtkButton" id="CloseButton">
         <property name="visible">True</property>
         <property name="can_focus">True</property>
-        <property name="relief">GTK_RELIEF_NONE</property>
+        <property name="relief">none</property>
         <property name="focus_on_click">False</property>
-        <signal handler="OnCloseButtonClicked" name="clicked"/>
+        <signal handler="OnCloseButtonClicked" name="clicked" />
         <child>
           <object class="GtkImage" id="image1332">
             <property name="visible">True</property>
-            <property name="stock">gtk-close</property>
             <property name="icon_size">1</property>
+            <property name="icon-name">window-close</property>
           </object>
         </child>
       </object>
       <packing>
-        <property name="left_attach">6</property>
-        <property name="right_attach">7</property>
-        <property name="x_options">GTK_FILL</property>
-        <property name="y_options"/>
+        <property name="left-attach">6</property>
+        <property name="top-attach">0</property>
       </packing>
     </child>
     <child>
-      <object class="GtkAlignment" id="alignment46">
+      <object class="GtkEntry" id="AsciiEntry">
         <property name="visible">True</property>
-        <property name="xalign">0</property>
-        <property name="xscale">0</property>
-        <child>
-          <object class="GtkEntry" id="AsciiEntry">
-            <property name="visible">True</property>
-            <property name="editable">False</property>
-            <property name="width_chars">8</property>
-          </object>
-        </child>
+        <property name="editable">False</property>
+        <property name="width_chars">8</property>
+        <property name="halign">start</property>
       </object>
       <packing>
-        <property name="left_attach">5</property>
-        <property name="right_attach">6</property>
-        <property name="top_attach">4</property>
-        <property name="bottom_attach">5</property>
-        <property name="y_options"/>
+        <property name="left-attach">5</property>
+        <property name="top-attach">4</property>
       </packing>
     </child>
     <child>
-      <object class="GtkAlignment" id="alignment45">
+      <object class="GtkEntry" id="OctalEntry">
         <property name="visible">True</property>
-        <property name="xalign">0</property>
-        <property name="xscale">0</property>
-        <child>
-          <object class="GtkEntry" id="OctalEntry">
-            <property name="visible">True</property>
-            <property name="editable">False</property>
-            <property name="width_chars">16</property>
-          </object>
-        </child>
+        <property name="editable">False</property>
+        <property name="width_chars">16</property>
+        <property name="halign">start</property>
       </object>
       <packing>
-        <property name="left_attach">5</property>
-        <property name="right_attach">6</property>
-        <property name="top_attach">2</property>
-        <property name="bottom_attach">3</property>
-        <property name="y_options"/>
+        <property name="left-attach">5</property>
+        <property name="top-attach">2</property>
       </packing>
     </child>
     <child>
-      <object class="GtkAlignment" id="alignment44">
+      <object class="GtkEntry" id="DecimalEntry">
         <property name="visible">True</property>
-        <property name="xalign">0</property>
-        <property name="xscale">0</property>
-        <child>
-          <object class="GtkEntry" id="DecimalEntry">
-            <property name="visible">True</property>
-            <property name="editable">False</property>
-            <property name="width_chars">16</property>
-          </object>
-        </child>
+        <property name="editable">False</property>
+        <property name="width_chars">16</property>
+        <property name="halign">start</property>
       </object>
       <packing>
-        <property name="left_attach">5</property>
-        <property name="right_attach">6</property>
-        <property name="top_attach">1</property>
-        <property name="bottom_attach">2</property>
-        <property name="y_options"/>
+        <property name="left-attach">5</property>
+        <property name="top-attach">1</property>
       </packing>
     </child>
     <child>
-      <object class="GtkAlignment" id="alignment43">
+      <object class="GtkEntry" id="HexadecimalEntry">
         <property name="visible">True</property>
-        <property name="xalign">0</property>
-        <property name="xscale">0</property>
-        <child>
-          <object class="GtkEntry" id="HexadecimalEntry">
-            <property name="visible">True</property>
-            <property name="editable">False</property>
-            <property name="width_chars">16</property>
-          </object>
-        </child>
+        <property name="editable">False</property>
+        <property name="width_chars">16</property>
+        <property name="halign">start</property>
       </object>
       <packing>
-        <property name="left_attach">5</property>
-        <property name="right_attach">6</property>
-        <property name="y_options"/>
+        <property name="left-attach">5</property>
+        <property name="top-attach">0</property>
       </packing>
     </child>
     <child>
@@ -127,11 +89,8 @@
         <property name="editable">False</property>
       </object>
       <packing>
-        <property name="left_attach">5</property>
-        <property name="right_attach">6</property>
-        <property name="top_attach">3</property>
-        <property name="bottom_attach">4</property>
-        <property name="y_options"/>
+        <property name="left-attach">5</property>
+        <property name="top-attach">3</property>
       </packing>
     </child>
     <child>
@@ -139,266 +98,163 @@
         <property name="visible">True</property>
         <property name="xalign">1</property>
         <property name="label" translatable="yes">ASCII Text:</property>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
       </object>
       <packing>
-        <property name="left_attach">4</property>
-        <property name="right_attach">5</property>
-        <property name="top_attach">4</property>
-        <property name="bottom_attach">5</property>
-        <property name="x_options">GTK_FILL</property>
-        <property name="y_options"/>
-        <property name="x_padding">6</property>
+        <property name="left-attach">4</property>
+        <property name="top-attach">4</property>
       </packing>
     </child>
     <child>
-      <object class="GtkAlignment" id="alignment42">
+      <object class="GtkCheckButton" id="UnsignedAsHexCheckButton">
         <property name="visible">True</property>
-        <property name="xscale">0</property>
-        <child>
-          <object class="GtkCheckButton" id="UnsignedAsHexCheckButton">
-            <property name="visible">True</property>
-            <property name="label" translatable="yes">Show unsigned as hexadecimal</property>
-            <property name="use_underline">True</property>
-            <property name="draw_indicator">True</property>
-            <signal handler="OnUnsignedAsHexToggled" name="toggled"/>
-          </object>
-        </child>
+        <property name="label" translatable="yes">Show unsigned as hexadecimal</property>
+        <property name="use_underline">True</property>
+        <property name="draw_indicator">True</property>
+        <property name="halign">start</property>
+        <signal handler="OnUnsignedAsHexToggled" name="toggled" />
       </object>
       <packing>
-        <property name="left_attach">2</property>
-        <property name="right_attach">4</property>
-        <property name="top_attach">6</property>
-        <property name="bottom_attach">7</property>
-        <property name="x_options">GTK_FILL</property>
-        <property name="y_options"/>
+        <property name="left-attach">2</property>
+        <property name="top-attach">6</property>
+        <property name="width">2</property>
       </packing>
     </child>
     <child>
-      <object class="GtkAlignment" id="alignment41">
+      <object class="GtkCheckButton" id="LittleEndianCheckButton">
         <property name="visible">True</property>
-        <property name="xscale">0</property>
-        <child>
-          <object class="GtkCheckButton" id="LittleEndianCheckButton">
-            <property name="visible">True</property>
-            <property name="label" translatable="yes">Show little endian decoding</property>
-            <property name="use_underline">True</property>
-            <property name="active">True</property>
-            <property name="draw_indicator">True</property>
-            <signal handler="OnLittleEndianToggled" name="toggled"/>
-          </object>
-        </child>
+        <property name="label" translatable="yes">Show little endian decoding</property>
+        <property name="use_underline">True</property>
+        <property name="active">True</property>
+        <property name="draw_indicator">True</property>
+        <property name="halign">start</property>
+        <signal handler="OnLittleEndianToggled" name="toggled" />
       </object>
       <packing>
-        <property name="right_attach">2</property>
-        <property name="top_attach">6</property>
-        <property name="bottom_attach">7</property>
-        <property name="y_options"/>
+        <property name="left-attach">0</property>
+        <property name="top-attach">6</property>
+        <property name="width">2</property>
       </packing>
     </child>
     <child>
-      <object class="GtkAlignment" id="alignment36">
+      <object class="GtkEntry" id="Float64bitEntry">
         <property name="visible">True</property>
-        <property name="xalign">0</property>
-        <property name="xscale">0</property>
-        <child>
-          <object class="GtkEntry" id="Float64bitEntry">
-            <property name="visible">True</property>
-            <property name="editable">False</property>
-            <property name="width_chars">22</property>
-          </object>
-        </child>
+        <property name="editable">False</property>
+        <property name="width_chars">22</property>
+        <property name="halign">start</property>
       </object>
       <packing>
-        <property name="left_attach">3</property>
-        <property name="right_attach">4</property>
-        <property name="top_attach">3</property>
-        <property name="bottom_attach">4</property>
-        <property name="y_options"/>
+        <property name="left-attach">3</property>
+        <property name="top-attach">3</property>
       </packing>
     </child>
     <child>
-      <object class="GtkAlignment" id="alignment35">
+      <object class="GtkEntry" id="Float32bitEntry">
         <property name="visible">True</property>
-        <property name="xalign">0</property>
-        <property name="xscale">0</property>
-        <child>
-          <object class="GtkEntry" id="Float32bitEntry">
-            <property name="visible">True</property>
-            <property name="editable">False</property>
-            <property name="width_chars">16</property>
-          </object>
-        </child>
+        <property name="editable">False</property>
+        <property name="width_chars">16</property>
+        <property name="halign">start</property>
       </object>
       <packing>
-        <property name="left_attach">3</property>
-        <property name="right_attach">4</property>
-        <property name="top_attach">2</property>
-        <property name="bottom_attach">3</property>
-        <property name="y_options"/>
+        <property name="left-attach">3</property>
+        <property name="top-attach">2</property>
       </packing>
     </child>
     <child>
-      <object class="GtkAlignment" id="alignment48">
+      <object class="GtkEntry" id="Unsigned64bitEntry">
         <property name="visible">True</property>
-        <property name="xalign">0</property>
-        <property name="xscale">0</property>
-        <child>
-          <object class="GtkEntry" id="Unsigned64bitEntry">
-            <property name="visible">True</property>
-            <property name="editable">False</property>
-            <property name="width_chars">22</property>
-          </object>
-        </child>
+        <property name="editable">False</property>
+        <property name="width_chars">22</property>
+        <property name="halign">start</property>
       </object>
       <packing>
-        <property name="left_attach">3</property>
-        <property name="right_attach">4</property>
-        <property name="top_attach">1</property>
-        <property name="bottom_attach">2</property>
-        <property name="y_options"/>
+        <property name="left-attach">3</property>
+        <property name="top-attach">1</property>
       </packing>
     </child>
     <child>
-      <object class="GtkAlignment" id="alignment47">
+      <object class="GtkEntry" id="Signed64bitEntry">
         <property name="visible">True</property>
-        <property name="xalign">0</property>
-        <property name="xscale">0</property>
-        <child>
-          <object class="GtkEntry" id="Signed64bitEntry">
-            <property name="visible">True</property>
-            <property name="editable">False</property>
-            <property name="width_chars">22</property>
-          </object>
-        </child>
+        <property name="editable">False</property>
+        <property name="width_chars">22</property>
+        <property name="halign">start</property>
       </object>
       <packing>
-        <property name="left_attach">3</property>
-        <property name="right_attach">4</property>
-        <property name="y_options"/>
+        <property name="left-attach">3</property>
+        <property name="top-attach">0</property>
       </packing>
     </child>
     <child>
-      <object class="GtkAlignment" id="alignment34">
+      <object class="GtkEntry" id="Unsigned32bitEntry">
         <property name="visible">True</property>
-        <property name="xalign">0</property>
-        <property name="xscale">0</property>
-        <child>
-          <object class="GtkEntry" id="Unsigned32bitEntry">
-            <property name="visible">True</property>
-            <property name="editable">False</property>
-            <property name="width_chars">12</property>
-          </object>
-        </child>
+        <property name="editable">False</property>
+        <property name="width_chars">12</property>
+        <property name="halign">start</property>
       </object>
       <packing>
-        <property name="left_attach">1</property>
-        <property name="right_attach">2</property>
-        <property name="top_attach">5</property>
-        <property name="bottom_attach">6</property>
-        <property name="y_options"/>
+        <property name="left-attach">1</property>
+        <property name="top-attach">5</property>
       </packing>
     </child>
     <child>
-      <object class="GtkAlignment" id="alignment33">
+      <object class="GtkEntry" id="Signed32bitEntry">
         <property name="visible">True</property>
-        <property name="xalign">0</property>
-        <property name="xscale">0</property>
-        <child>
-          <object class="GtkEntry" id="Signed32bitEntry">
-            <property name="visible">True</property>
-            <property name="editable">False</property>
-            <property name="width_chars">12</property>
-          </object>
-        </child>
+        <property name="editable">False</property>
+        <property name="width_chars">12</property>
+        <property name="halign">start</property>
       </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 name="left-attach">1</property>
+        <property name="top-attach">4</property>
       </packing>
     </child>
     <child>
-      <object class="GtkAlignment" id="alignment32">
+      <object class="GtkEntry" id="Signed16bitEntry">
         <property name="visible">True</property>
-        <property name="xalign">0</property>
-        <property name="xscale">0</property>
-        <child>
-          <object class="GtkEntry" id="Signed16bitEntry">
-            <property name="visible">True</property>
-            <property name="editable">False</property>
-            <property name="width_chars">8</property>
-          </object>
-        </child>
+        <property name="editable">False</property>
+        <property name="width_chars">8</property>
+        <property name="halign">start</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 name="left-attach">1</property>
+        <property name="top-attach">2</property>
       </packing>
     </child>
     <child>
-      <object class="GtkAlignment" id="alignment31">
+      <object class="GtkEntry" id="Unsigned8bitEntry">
         <property name="visible">True</property>
-        <property name="xalign">0</property>
-        <property name="xscale">0</property>
-        <child>
-          <object class="GtkEntry" id="Unsigned8bitEntry">
-            <property name="visible">True</property>
-            <property name="editable">False</property>
-            <property name="width_chars">8</property>
-          </object>
-        </child>
+        <property name="editable">False</property>
+        <property name="width_chars">8</property>
+        <property name="halign">start</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 name="left-attach">1</property>
+        <property name="top-attach">1</property>
       </packing>
     </child>
     <child>
-      <object class="GtkAlignment" id="alignment30">
+      <object class="GtkEntry" id="Signed8bitEntry">
         <property name="visible">True</property>
-        <property name="xalign">0</property>
-        <property name="xscale">0</property>
-        <child>
-          <object class="GtkEntry" id="Signed8bitEntry">
-            <property name="visible">True</property>
-            <property name="editable">False</property>
-            <property name="width_chars">8</property>
-          </object>
-        </child>
+        <property name="editable">False</property>
+        <property name="width_chars">8</property>
+        <property name="halign">start</property>
       </object>
       <packing>
-        <property name="left_attach">1</property>
-        <property name="right_attach">2</property>
-        <property name="y_options"/>
+        <property name="left-attach">1</property>
+        <property name="top-attach">0</property>
       </packing>
     </child>
     <child>
-      <object class="GtkAlignment" id="alignment29">
+      <object class="GtkEntry" id="Unsigned16bitEntry">
         <property name="visible">True</property>
-        <property name="xalign">0</property>
-        <property name="xscale">0</property>
-        <child>
-          <object class="GtkEntry" id="Unsigned16bitEntry">
-            <property name="visible">True</property>
-            <property name="editable">False</property>
-            <property name="width_chars">8</property>
-          </object>
-        </child>
+        <property name="editable">False</property>
+        <property name="width_chars">8</property>
+        <property name="halign">start</property>
       </object>
       <packing>
-        <property name="left_attach">1</property>
-        <property name="right_attach">2</property>
-        <property name="top_attach">3</property>
-        <property name="bottom_attach">4</property>
-        <property name="y_options"/>
+        <property name="left-attach">1</property>
+        <property name="top-attach">3</property>
       </packing>
     </child>
     <child>
@@ -406,15 +262,12 @@
         <property name="visible">True</property>
         <property name="xalign">1</property>
         <property name="label" translatable="yes">Binary:</property>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
       </object>
       <packing>
-        <property name="left_attach">4</property>
-        <property name="right_attach">5</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 name="x_padding">6</property>
+        <property name="left-attach">4</property>
+        <property name="top-attach">3</property>
       </packing>
     </child>
     <child>
@@ -422,15 +275,12 @@
         <property name="visible">True</property>
         <property name="xalign">1</property>
         <property name="label" translatable="yes">Octal:</property>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
       </object>
       <packing>
-        <property name="left_attach">4</property>
-        <property name="right_attach">5</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 name="x_padding">6</property>
+        <property name="left-attach">4</property>
+        <property name="top-attach">2</property>
       </packing>
     </child>
     <child>
@@ -438,15 +288,12 @@
         <property name="visible">True</property>
         <property name="xalign">1</property>
         <property name="label" translatable="yes">Decimal:</property>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
       </object>
       <packing>
-        <property name="left_attach">4</property>
-        <property name="right_attach">5</property>
-        <property name="top_attach">1</property>
-        <property name="bottom_attach">2</property>
-        <property name="x_options">GTK_FILL</property>
-        <property name="y_options"/>
-        <property name="x_padding">6</property>
+        <property name="left-attach">4</property>
+        <property name="top-attach">1</property>
       </packing>
     </child>
     <child>
@@ -454,13 +301,12 @@
         <property name="visible">True</property>
         <property name="xalign">1</property>
         <property name="label" translatable="yes">Hexadecimal:</property>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
       </object>
       <packing>
-        <property name="left_attach">4</property>
-        <property name="right_attach">5</property>
-        <property name="x_options">GTK_FILL</property>
-        <property name="y_options"/>
-        <property name="x_padding">6</property>
+        <property name="left-attach">4</property>
+        <property name="top-attach">0</property>
       </packing>
     </child>
     <child>
@@ -468,16 +314,14 @@
         <property name="visible">True</property>
         <property name="xalign">1</property>
         <property name="label" translatable="yes">Float 64 bit:</property>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
+        <property name="margin-top">6</property>
+        <property name="margin-bottom">6</property>
       </object>
       <packing>
-        <property name="left_attach">2</property>
-        <property name="right_attach">3</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 name="x_padding">6</property>
-        <property name="y_padding">6</property>
+        <property name="left-attach">2</property>
+        <property name="top-attach">3</property>
       </packing>
     </child>
     <child>
@@ -485,16 +329,14 @@
         <property name="visible">True</property>
         <property name="xalign">1</property>
         <property name="label" translatable="yes">Float 32 bit:</property>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
+        <property name="margin-top">6</property>
+        <property name="margin-bottom">6</property>
       </object>
       <packing>
-        <property name="left_attach">2</property>
-        <property name="right_attach">3</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 name="x_padding">6</property>
-        <property name="y_padding">6</property>
+        <property name="left-attach">2</property>
+        <property name="top-attach">2</property>
       </packing>
     </child>
     <child>
@@ -502,16 +344,14 @@
         <property name="visible">True</property>
         <property name="xalign">1</property>
         <property name="label" translatable="yes">Unsigned 64 bit:</property>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
+        <property name="margin-top">6</property>
+        <property name="margin-bottom">6</property>
       </object>
       <packing>
-        <property name="left_attach">2</property>
-        <property name="right_attach">3</property>
-        <property name="top_attach">1</property>
-        <property name="bottom_attach">2</property>
-        <property name="x_options">GTK_FILL</property>
-        <property name="y_options"/>
-        <property name="x_padding">6</property>
-        <property name="y_padding">6</property>
+        <property name="left-attach">2</property>
+        <property name="top-attach">1</property>
       </packing>
     </child>
     <child>
@@ -519,14 +359,14 @@
         <property name="visible">True</property>
         <property name="xalign">1</property>
         <property name="label" translatable="yes">Signed 64 bit:</property>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
+        <property name="margin-top">6</property>
+        <property name="margin-bottom">6</property>
       </object>
       <packing>
-        <property name="left_attach">2</property>
-        <property name="right_attach">3</property>
-        <property name="x_options">GTK_FILL</property>
-        <property name="y_options"/>
-        <property name="x_padding">6</property>
-        <property name="y_padding">6</property>
+        <property name="left-attach">2</property>
+        <property name="top-attach">0</property>
       </packing>
     </child>
     <child>
@@ -534,14 +374,14 @@
         <property name="visible">True</property>
         <property name="xalign">1</property>
         <property name="label" translatable="yes">Unsigned 32 bit:</property>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
+        <property name="margin-top">6</property>
+        <property name="margin-bottom">6</property>
       </object>
       <packing>
-        <property name="top_attach">5</property>
-        <property name="bottom_attach">6</property>
-        <property name="x_options">GTK_FILL</property>
-        <property name="y_options"/>
-        <property name="x_padding">6</property>
-        <property name="y_padding">6</property>
+        <property name="left-attach">0</property>
+        <property name="top-attach">5</property>
       </packing>
     </child>
     <child>
@@ -549,14 +389,14 @@
         <property name="visible">True</property>
         <property name="xalign">1</property>
         <property name="label" translatable="yes">Signed 32 bit:</property>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
+        <property name="margin-top">6</property>
+        <property name="margin-bottom">6</property>
       </object>
       <packing>
-        <property name="top_attach">4</property>
-        <property name="bottom_attach">5</property>
-        <property name="x_options">GTK_FILL</property>
-        <property name="y_options"/>
-        <property name="x_padding">6</property>
-        <property name="y_padding">6</property>
+        <property name="left-attach">0</property>
+        <property name="top-attach">4</property>
       </packing>
     </child>
     <child>
@@ -564,14 +404,14 @@
         <property name="visible">True</property>
         <property name="xalign">1</property>
         <property name="label" translatable="yes">Unsigned 16 bit:</property>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
+        <property name="margin-top">6</property>
+        <property name="margin-bottom">6</property>
       </object>
       <packing>
-        <property name="top_attach">3</property>
-        <property name="bottom_attach">4</property>
-        <property name="x_options">GTK_FILL</property>
-        <property name="y_options"/>
-        <property name="x_padding">6</property>
-        <property name="y_padding">6</property>
+        <property name="left-attach">0</property>
+        <property name="top-attach">3</property>
       </packing>
     </child>
     <child>
@@ -579,14 +419,14 @@
         <property name="visible">True</property>
         <property name="xalign">1</property>
         <property name="label" translatable="yes">Signed 16 bit:</property>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
+        <property name="margin-top">6</property>
+        <property name="margin-bottom">6</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 name="x_padding">6</property>
-        <property name="y_padding">6</property>
+        <property name="left-attach">0</property>
+        <property name="top-attach">2</property>
       </packing>
     </child>
     <child>
@@ -594,14 +434,14 @@
         <property name="visible">True</property>
         <property name="xalign">1</property>
         <property name="label" translatable="yes">Unsigned 8 bit:</property>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
+        <property name="margin-top">6</property>
+        <property name="margin-bottom">6</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 name="x_padding">6</property>
-        <property name="y_padding">6</property>
+        <property name="left-attach">0</property>
+        <property name="top-attach">1</property>
       </packing>
     </child>
     <child>
@@ -609,12 +449,14 @@
         <property name="visible">True</property>
         <property name="xalign">1</property>
         <property name="label" translatable="yes">Signed 8 bit:</property>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
+        <property name="margin-top">6</property>
+        <property name="margin-bottom">6</property>
       </object>
       <packing>
-        <property name="x_options">GTK_FILL</property>
-        <property name="y_options"/>
-        <property name="x_padding">6</property>
-        <property name="y_padding">6</property>
+        <property name="left-attach">0</property>
+        <property name="top-attach">0</property>
       </packing>
     </child>
   </object>
diff --git a/data/ui/ExportDialog.ui b/data/ui/ExportDialog.ui
index 14a259d..b06a106 100644
--- a/data/ui/ExportDialog.ui
+++ b/data/ui/ExportDialog.ui
@@ -1,38 +1,35 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <object class="GtkVBox" id="ExportDialogVBox">
+  <object class="GtkBox" id="ExportDialogVBox">
+    <property name="orientation">vertical</property>
     <property name="visible">True</property>
     <property name="spacing">6</property>
     <child>
-      <object class="GtkTable" id="table3">
+      <object class="GtkGrid" id="table3">
         <property name="visible">True</property>
-        <property name="n_rows">3</property>
-        <property name="n_columns">2</property>
         <property name="column_spacing">6</property>
         <property name="row_spacing">6</property>
         <child>
-          <object class="GtkHBox" id="hbox7">
+          <object class="GtkBox" id="hbox7">
+            <property name="orientation">horizontal</property>
             <property name="visible">True</property>
             <property name="spacing">6</property>
             <child>
-              <object class="GtkComboBoxEntry" id="ExportPatternComboEntry">
+              <object class="GtkComboBoxText" id="ExportPatternComboEntry">
                 <property name="visible">True</property>
-                <child internal-child="entry">
-                  <object class="GtkEntry" id="comboboxentry-entry1">
-                    <property name="visible">True</property>
-                  </object>
-                </child>
+                <property name="has-entry">True</property>
               </object>
             </child>
             <child>
               <object class="GtkButton" id="SavePatternButton">
                 <property name="visible">True</property>
                 <property name="tooltip-text" translatable="yes">Save Pattern</property>
-                <signal handler="OnSavePatternButtonClicked" name="clicked"/>
+                <signal handler="OnSavePatternButtonClicked" name="clicked" />
                 <child>
                   <object class="GtkImage" id="image4">
                     <property name="visible">True</property>
-                    <property name="stock">gtk-save</property>
+                    <property name="icon-name">document-save</property>
+            <property name="icon_size">3</property>
                   </object>
                 </child>
               </object>
@@ -45,11 +42,12 @@
             <child>
               <object class="GtkButton" id="DeletePatternButton">
                 <property name="visible">True</property>
-                <signal handler="OnDeletePatternButtonClicked" name="clicked"/>
+                <signal handler="OnDeletePatternButtonClicked" name="clicked" />
                 <child>
                   <object class="GtkImage" id="image5">
                     <property name="visible">True</property>
-                    <property name="stock">gtk-delete</property>
+                    <property name="icon-name">edit-delete</property>
+            <property name="icon_size">3</property>
                   </object>
                 </child>
               </object>
@@ -61,29 +59,18 @@
             </child>
           </object>
           <packing>
-            <property name="left_attach">1</property>
-            <property name="right_attach">2</property>
-            <property name="top_attach">2</property>
-            <property name="bottom_attach">3</property>
-            <property name="y_options"/>
+            <property name="left-attach">1</property>
+            <property name="top-attach">2</property>
           </packing>
         </child>
         <child>
-          <object class="GtkAlignment" id="alignment1">
+          <object class="GtkComboBox" id="ExportAsCombo">
             <property name="visible">True</property>
-            <property name="xalign">0</property>
-            <property name="xscale">0</property>
-            <child>
-              <object class="GtkComboBox" id="ExportAsCombo">
-                <property name="visible">True</property>
-              </object>
-            </child>
+            <property name="halign">start</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="left-attach">1</property>
+            <property name="top-attach">1</property>
           </packing>
         </child>
         <child>
@@ -94,13 +81,13 @@
             <property name="use_underline">True</property>
           </object>
           <packing>
-            <property name="top_attach">2</property>
-            <property name="bottom_attach">3</property>
-            <property name="x_options">GTK_FILL</property>
+            <property name="left-attach">0</property>
+            <property name="top-attach">2</property>
           </packing>
         </child>
         <child>
-          <object class="GtkHBox" id="hbox2">
+          <object class="GtkBox" id="hbox2">
+            <property name="orientation">horizontal</property>
             <property name="visible">True</property>
             <property name="spacing">6</property>
             <child>
@@ -111,11 +98,12 @@
             <child>
               <object class="GtkButton" id="SelectFileButton">
                 <property name="visible">True</property>
-                <signal handler="OnSelectFileButtonClicked" name="clicked"/>
+                <signal handler="OnSelectFileButtonClicked" name="clicked" />
                 <child>
                   <object class="GtkImage" id="image2">
                     <property name="visible">True</property>
-                    <property name="stock">gtk-open</property>
+                    <property name="icon-name">document-open</property>
+            <property name="icon_size">3</property>
                   </object>
                 </child>
               </object>
@@ -126,8 +114,8 @@
             </child>
           </object>
           <packing>
-            <property name="left_attach">1</property>
-            <property name="right_attach">2</property>
+            <property name="left-attach">1</property>
+            <property name="top-attach">0</property>
           </packing>
         </child>
         <child>
@@ -138,9 +126,8 @@
             <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="left-attach">0</property>
+            <property name="top-attach">1</property>
           </packing>
         </child>
         <child>
@@ -151,7 +138,8 @@
             <property name="use_underline">True</property>
           </object>
           <packing>
-            <property name="x_options">GTK_FILL</property>
+            <property name="left-attach">0</property>
+            <property name="top-attach">0</property>
           </packing>
         </child>
       </object>
@@ -172,7 +160,8 @@
       </packing>
     </child>
     <child>
-      <object class="GtkHBox" id="hbox3">
+      <object class="GtkBox" id="hbox3">
+        <property name="orientation">horizontal</property>
         <property name="visible">True</property>
         <child>
           <object class="GtkLabel" id="label9">
@@ -181,7 +170,8 @@
           </object>
         </child>
         <child>
-          <object class="GtkVBox" id="vbox2">
+          <object class="GtkBox" id="vbox2">
+            <property name="orientation">vertical</property>
             <property name="visible">True</property>
             <child>
               <object class="GtkRadioButton" id="WholeFileRadio">
@@ -210,7 +200,8 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="hbox6">
+              <object class="GtkBox" id="hbox6">
+                <property name="orientation">horizontal</property>
                 <property name="visible">True</property>
                 <property name="spacing">6</property>
                 <child>
@@ -220,7 +211,7 @@
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">WholeFileRadio</property>
-                    <signal handler="OnRangeRadioToggled" name="toggled"/>
+                    <signal handler="OnRangeRadioToggled" name="toggled" />
                   </object>
                 </child>
                 <child>
@@ -270,7 +261,8 @@
       </packing>
     </child>
     <child>
-      <object class="GtkHBox" id="ProgressHBox">
+      <object class="GtkBox" id="ProgressHBox">
+        <property name="orientation">horizontal</property>
         <property name="visible">True</property>
         <property name="spacing">6</property>
         <child>
@@ -281,9 +273,8 @@
         <child>
           <object class="GtkButton" id="CancelButton">
             <property name="visible">True</property>
-            <property name="label" translatable="no">gtk-cancel</property>
-            <property name="use_stock">True</property>
-            <signal handler="OnExportCancelClicked" name="clicked"/>
+            <property name="label" translatable="yes">Cancel</property>
+            <signal handler="OnExportCancelClicked" name="clicked" />
           </object>
           <packing>
             <property name="expand">False</property>
diff --git a/data/ui/FindReplacePlugin.ui b/data/ui/FindReplacePlugin.ui
index 65078f5..84d2f13 100644
--- a/data/ui/FindReplacePlugin.ui
+++ b/data/ui/FindReplacePlugin.ui
@@ -1,8 +1,8 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <object class="GtkListStore" id="model1">
     <columns>
-      <column type="gchararray"/>
+      <column type="gchararray" />
     </columns>
     <data>
       <row>
@@ -22,56 +22,48 @@
       </row>
     </data>
   </object>
-  <object class="GtkTable" id="FindReplaceTable">
+  <object class="GtkGrid" id="FindReplaceTable">
     <property name="visible">True</property>
     <property name="border_width">6</property>
-    <property name="n_rows">2</property>
-    <property name="n_columns">7</property>
     <property name="column_spacing">6</property>
     <property name="row_spacing">6</property>
     <child>
-      <placeholder/>
+      <placeholder />
     </child>
     <child>
       <object class="GtkComboBox" id="ReplaceAsComboBox">
         <property name="visible">True</property>
         <property name="focus_on_click">False</property>
-        <signal handler="OnReplaceAsComboBoxChanged" name="changed"/>
+        <signal handler="OnReplaceAsComboBoxChanged" name="changed" />
         <property name="model">model1</property>
         <child>
-          <object class="GtkCellRendererText" id="renderer1"/>
+          <object class="GtkCellRendererText" id="renderer1" />
           <attributes>
             <attribute name="text">0</attribute>
           </attributes>
         </child>
       </object>
       <packing>
-        <property name="left_attach">3</property>
-        <property name="right_attach">4</property>
-        <property name="top_attach">1</property>
-        <property name="bottom_attach">2</property>
-        <property name="x_options">GTK_FILL</property>
-        <property name="y_options">GTK_FILL</property>
+        <property name="left-attach">3</property>
+        <property name="top-attach">1</property>
       </packing>
     </child>
     <child>
       <object class="GtkComboBox" id="SearchAsComboBox">
         <property name="visible">True</property>
         <property name="focus_on_click">False</property>
-        <signal handler="OnSearchAsComboBoxChanged" name="changed"/>
+        <signal handler="OnSearchAsComboBoxChanged" name="changed" />
         <property name="model">model1</property>
         <child>
-          <object class="GtkCellRendererText" id="renderer2"/>
+          <object class="GtkCellRendererText" id="renderer2" />
           <attributes>
             <attribute name="text">0</attribute>
           </attributes>
         </child>
       </object>
       <packing>
-        <property name="left_attach">3</property>
-        <property name="right_attach">4</property>
-        <property name="x_options">GTK_FILL</property>
-        <property name="y_options">GTK_FILL</property>
+        <property name="left-attach">3</property>
+        <property name="top-attach">0</property>
       </packing>
     </child>
     <child>
@@ -79,51 +71,47 @@
         <property name="visible">True</property>
         <property name="sensitive">False</property>
         <property name="can_focus">True</property>
-        <property name="relief">GTK_RELIEF_NONE</property>
+        <property name="relief">none</property>
         <property name="focus_on_click">False</property>
-        <signal handler="OnFindNextButtonClicked" name="clicked"/>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
+        <signal handler="OnFindNextButtonClicked" name="clicked" />
         <child>
-          <object class="GtkAlignment" id="alignment51">
+          <object class="GtkBox" id="hbox30">
+            <property name="orientation">horizontal</property>
             <property name="visible">True</property>
-            <property name="xscale">0</property>
-            <property name="yscale">0</property>
+            <property name="spacing">2</property>
+            <property name="halign">start</property>
+            <property name="valign">center</property>
             <child>
-              <object class="GtkHBox" id="hbox30">
+              <object class="GtkImage" id="image1329">
                 <property name="visible">True</property>
-                <property name="spacing">2</property>
-                <child>
-                  <object class="GtkImage" id="image1329">
-                    <property name="visible">True</property>
-                    <property name="stock">gtk-go-down</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label77">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Find Next</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>
+                <property name="icon-name">go-down</property>
+            <property name="icon_size">3</property>
               </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label77">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Find Next</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>
       <packing>
-        <property name="left_attach">4</property>
-        <property name="right_attach">5</property>
-        <property name="x_options"/>
-        <property name="y_options"/>
-        <property name="x_padding">6</property>
+        <property name="left-attach">4</property>
+        <property name="top-attach">0</property>
       </packing>
     </child>
     <child>
@@ -131,81 +119,71 @@
         <property name="visible">True</property>
         <property name="sensitive">False</property>
         <property name="can_focus">True</property>
-        <property name="relief">GTK_RELIEF_NONE</property>
+        <property name="relief">none</property>
         <property name="focus_on_click">False</property>
-        <signal handler="OnReplaceButtonClicked" name="clicked"/>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
+        <signal handler="OnReplaceButtonClicked" name="clicked" />
         <child>
-          <object class="GtkAlignment" id="alignment53">
+          <object class="GtkBox" id="hbox32">
+            <property name="orientation">horizontal</property>
             <property name="visible">True</property>
-            <property name="xscale">0</property>
-            <property name="yscale">0</property>
+            <property name="spacing">2</property>
+            <property name="halign">start</property>
+            <property name="valign">center</property>
+            <child>
+              <object class="GtkImage" id="image1331">
+                <property name="visible">True</property>
+                <property name="icon-name">edit-find-replace</property>
+            <property name="icon_size">3</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
             <child>
-              <object class="GtkHBox" id="hbox32">
+              <object class="GtkLabel" id="label79">
                 <property name="visible">True</property>
-                <property name="spacing">2</property>
-                <child>
-                  <object class="GtkImage" id="image1331">
-                    <property name="visible">True</property>
-                    <property name="stock">gtk-find-and-replace</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label79">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Replace</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>
+                <property name="label" translatable="yes">Replace</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>
       <packing>
-        <property name="left_attach">4</property>
-        <property name="right_attach">5</property>
-        <property name="top_attach">1</property>
-        <property name="bottom_attach">2</property>
-        <property name="x_options">GTK_FILL</property>
-        <property name="y_options"/>
-        <property name="x_padding">6</property>
+        <property name="left-attach">4</property>
+        <property name="top-attach">1</property>
       </packing>
     </child>
     <child>
       <object class="GtkLabel" id="ReplaceAsLabel">
         <property name="visible">True</property>
         <property name="label" translatable="yes">as</property>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
       </object>
       <packing>
-        <property name="left_attach">2</property>
-        <property name="right_attach">3</property>
-        <property name="top_attach">1</property>
-        <property name="bottom_attach">2</property>
-        <property name="x_options">GTK_FILL</property>
-        <property name="y_options"/>
-        <property name="x_padding">6</property>
+        <property name="left-attach">2</property>
+        <property name="top-attach">1</property>
       </packing>
     </child>
     <child>
       <object class="GtkLabel" id="SearchAsLabel">
         <property name="visible">True</property>
         <property name="label" translatable="yes">as</property>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
       </object>
       <packing>
-        <property name="left_attach">2</property>
-        <property name="right_attach">3</property>
-        <property name="x_options">GTK_FILL</property>
-        <property name="y_options"/>
-        <property name="x_padding">6</property>
+        <property name="left-attach">2</property>
+        <property name="top-attach">0</property>
       </packing>
     </child>
     <child>
@@ -214,18 +192,14 @@
         <property name="sensitive">False</property>
         <property name="can_focus">True</property>
         <property name="label" translatable="yes">Replace All</property>
-        <property name="relief">GTK_RELIEF_NONE</property>
+        <property name="relief">none</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
-        <signal handler="OnReplaceAllButtonClicked" name="clicked"/>
+        <signal handler="OnReplaceAllButtonClicked" name="clicked" />
       </object>
       <packing>
-        <property name="left_attach">5</property>
-        <property name="right_attach">6</property>
-        <property name="top_attach">1</property>
-        <property name="bottom_attach">2</property>
-        <property name="x_options">GTK_FILL</property>
-        <property name="y_options"/>
+        <property name="left-attach">5</property>
+        <property name="top-attach">1</property>
       </packing>
     </child>
     <child>
@@ -233,51 +207,46 @@
         <property name="visible">True</property>
         <property name="sensitive">False</property>
         <property name="can_focus">True</property>
-        <property name="relief">GTK_RELIEF_NONE</property>
+        <property name="relief">none</property>
         <property name="focus_on_click">False</property>
-        <signal handler="OnFindPreviousButtonClicked" name="clicked"/>
+        <signal handler="OnFindPreviousButtonClicked" name="clicked" />
         <child>
-          <object class="GtkAlignment" id="alignment52">
+          <object class="GtkBox" id="hbox31">
+            <property name="orientation">horizontal</property>
             <property name="visible">True</property>
-            <property name="xscale">0</property>
-            <property name="yscale">0</property>
+            <property name="spacing">2</property>
+            <property name="halign">start</property>
+            <property name="valign">center</property>
+            <child>
+              <object class="GtkImage" id="image1330">
+                <property name="visible">True</property>
+                <property name="icon-name">go-up</property>
+            <property name="icon_size">3</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
             <child>
-              <object class="GtkHBox" id="hbox31">
+              <object class="GtkLabel" id="label78">
                 <property name="visible">True</property>
-                <property name="spacing">2</property>
-                <child>
-                  <object class="GtkImage" id="image1330">
-                    <property name="visible">True</property>
-                    <property name="stock">gtk-go-up</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label78">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Find Previous</property>
-                    <property name="use_underline">True</property>
-                    <property name="width_chars">10</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
+                <property name="label" translatable="yes">Find Previous</property>
+                <property name="use_underline">True</property>
+                <property name="width_chars">10</property>
               </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
             </child>
           </object>
         </child>
       </object>
       <packing>
-        <property name="left_attach">5</property>
-        <property name="right_attach">6</property>
-        <property name="x_options">GTK_FILL</property>
-        <property name="y_options"/>
+        <property name="left-attach">5</property>
+        <property name="top-attach">0</property>
       </packing>
     </child>
     <child>
@@ -285,14 +254,11 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="activates_default">True</property>
-        <signal handler="OnReplacePatternEntryChanged" name="changed"/>
+        <signal handler="OnReplacePatternEntryChanged" name="changed" />
       </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 name="left-attach">1</property>
+        <property name="top-attach">1</property>
       </packing>
     </child>
     <child>
@@ -300,12 +266,11 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="activates_default">True</property>
-        <signal handler="OnSearchPatternEntryChanged" name="changed"/>
+        <signal handler="OnSearchPatternEntryChanged" name="changed" />
       </object>
       <packing>
-        <property name="left_attach">1</property>
-        <property name="right_attach">2</property>
-        <property name="y_options"/>
+        <property name="left-attach">1</property>
+        <property name="top-attach">0</property>
       </packing>
     </child>
     <child>
@@ -316,10 +281,8 @@
         <property name="use_markup">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 name="left-attach">0</property>
+        <property name="top-attach">1</property>
       </packing>
     </child>
     <child>
@@ -330,28 +293,26 @@
         <property name="use_markup">True</property>
       </object>
       <packing>
-        <property name="x_options">GTK_FILL</property>
-        <property name="y_options"/>
+        <property name="left-attach">0</property>
+        <property name="top-attach">0</property>
       </packing>
     </child>
     <child>
       <object class="GtkButton" id="CloseButton">
         <property name="visible">True</property>
-        <property name="relief">GTK_RELIEF_NONE</property>
-        <signal handler="OnCloseButtonClicked" name="clicked"/>
+        <property name="relief">none</property>
+        <signal handler="OnCloseButtonClicked" name="clicked" />
         <child>
           <object class="GtkImage" id="image3">
             <property name="visible">True</property>
-            <property name="stock">gtk-close</property>
             <property name="icon_size">1</property>
+            <property name="icon-name">window-close</property>
           </object>
         </child>
       </object>
       <packing>
-        <property name="left_attach">6</property>
-        <property name="right_attach">7</property>
-        <property name="x_options">GTK_FILL</property>
-        <property name="y_options">GTK_FILL</property>
+        <property name="left-attach">6</property>
+        <property name="top-attach">0</property>
       </packing>
     </child>
   </object>
diff --git a/data/ui/GotoOffsetPlugin.ui b/data/ui/GotoOffsetPlugin.ui
index afae5cc..45a9479 100644
--- a/data/ui/GotoOffsetPlugin.ui
+++ b/data/ui/GotoOffsetPlugin.ui
@@ -1,6 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <object class="GtkHBox" id="GotoOffsetHBox">
+  <object class="GtkBox" id="GotoOffsetHBox">
+    <property name="orientation">horizontal</property>
     <property name="visible">True</property>
     <property name="border_width">6</property>
     <property name="spacing">6</property>
@@ -20,8 +21,8 @@
       <object class="GtkEntry" id="OffsetEntry">
         <property name="visible">True</property>
         <property name="can_focus">True</property>
-        <signal handler="OnOffsetEntryChanged" name="changed"/>
-        <signal handler="OnOffsetEntryActivated" name="activate"/>
+        <signal handler="OnOffsetEntryChanged" name="changed" />
+        <signal handler="OnOffsetEntryActivated" name="activate" />
       </object>
       <packing>
         <property name="position">1</property>
@@ -31,41 +32,38 @@
       <object class="GtkButton" id="GotoOffsetButton">
         <property name="visible">True</property>
         <property name="can_focus">True</property>
-        <property name="relief">GTK_RELIEF_NONE</property>
+        <property name="relief">none</property>
         <property name="focus_on_click">False</property>
-        <signal handler="OnGotoOffsetClicked" name="clicked"/>
+        <signal handler="OnGotoOffsetClicked" name="clicked" />
         <child>
-          <object class="GtkAlignment" id="alignment54">
+          <object class="GtkBox" id="hbox34">
+            <property name="orientation">horizontal</property>
             <property name="visible">True</property>
-            <property name="xscale">0</property>
-            <property name="yscale">0</property>
+            <property name="spacing">2</property>
+            <property name="halign">start</property>
+            <property name="valign">center</property>
             <child>
-              <object class="GtkHBox" id="hbox34">
+              <object class="GtkImage" id="image1333">
                 <property name="visible">True</property>
-                <property name="spacing">2</property>
-                <child>
-                  <object class="GtkImage" id="image1333">
-                    <property name="visible">True</property>
-                    <property name="stock">gtk-jump-to</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label81">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Go to Offset</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>
+                <property name="icon-name">go-jump</property>
+            <property name="icon_size">3</property>
               </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label81">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Go to Offset</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>
@@ -81,14 +79,14 @@
       <object class="GtkButton" id="CloseButton">
         <property name="visible">True</property>
         <property name="can_focus">True</property>
-        <property name="relief">GTK_RELIEF_NONE</property>
+        <property name="relief">none</property>
         <property name="focus_on_click">False</property>
-        <signal handler="OnCloseButtonClicked" name="clicked"/>
+        <signal handler="OnCloseButtonClicked" name="clicked" />
         <child>
           <object class="GtkImage" id="image1334">
             <property name="visible">True</property>
-            <property name="stock">gtk-close</property>
             <property name="icon_size">1</property>
+            <property name="icon-name">window-close</property>
           </object>
         </child>
       </object>
diff --git a/data/ui/LayoutSelectionDialog.ui b/data/ui/LayoutSelectionDialog.ui
index e7d552c..ba39b1f 100644
--- a/data/ui/LayoutSelectionDialog.ui
+++ b/data/ui/LayoutSelectionDialog.ui
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <object class="GtkHPaned" id="LayoutSelectionPaned">
+  <object class="GtkPaned" id="LayoutSelectionPaned">
+    <property name="orientation">horizontal</property>
     <property name="visible">True</property>
     <property name="can_focus">True</property>
     <child>
@@ -11,14 +12,13 @@
           <object class="GtkScrolledWindow" id="scrolledwindow1">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
-            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+            <property name="hscrollbar_policy">policy_never</property>
+            <property name="vscrollbar_policy">policy_automatic</property>
             <child>
               <object class="GtkTreeView" id="LayoutList">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="headers_visible">False</property>
-                <property name="rules_hint">True</property>
               </object>
             </child>
           </object>
@@ -40,7 +40,7 @@
         <property name="visible">True</property>
         <property name="label_xalign">0</property>
         <child>
-          <placeholder/>
+          <placeholder />
         </child>
         <child type="label">
           <object class="GtkLabel" id="label3">
diff --git a/data/ui/MainWindow.ui b/data/ui/MainWindow.ui
index c376e1f..fc13cb2 100644
--- a/data/ui/MainWindow.ui
+++ b/data/ui/MainWindow.ui
@@ -5,35 +5,39 @@
     <property name="title">Bless - Gtk# Hex Editor</property>
     <property name="default_width">400</property>
     <property name="default_height">400</property>
-    <signal handler="OnMainWindowDeleteEvent" name="delete_event"/>
+    <signal handler="OnMainWindowDeleteEvent" name="delete_event" />
     <child>
-      <object class="GtkVBox" id="MainVBox">
+      <object class="GtkBox" id="MainVBox">
+        <property name="orientation">vertical</property>
         <property name="visible">True</property>
         <child>
-          <placeholder/>
+          <placeholder />
         </child>
         <child>
-          <placeholder/>
+          <placeholder />
         </child>
         <child>
-          <object class="GtkHBox" id="DataViewBox">
+          <object class="GtkBox" id="DataViewBox">
+            <property name="orientation">horizontal</property>
             <property name="visible">True</property>
             <child>
-              <placeholder/>
+              <placeholder />
             </child>
             <child>
-              <placeholder/>
+              <placeholder />
             </child>
             <child>
-              <placeholder/>
+              <placeholder />
             </child>
           </object>
           <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
             <property name="position">2</property>
           </packing>
         </child>
         <child>
-          <placeholder/>
+          <placeholder />
         </child>
       </object>
     </child>
diff --git a/data/ui/PreferencesDialog.ui b/data/ui/PreferencesDialog.ui
index f81844c..29433e8 100644
--- a/data/ui/PreferencesDialog.ui
+++ b/data/ui/PreferencesDialog.ui
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <object class="GtkAdjustment" id="adjustment1">
     <property name="upper">1000</property>
@@ -9,7 +9,7 @@
   </object>
   <object class="GtkListStore" id="model1">
     <columns>
-      <column type="gchararray"/>
+      <column type="gchararray" />
     </columns>
     <data>
       <row>
@@ -31,7 +31,7 @@
   </object>
   <object class="GtkListStore" id="model5">
     <columns>
-      <column type="gchararray"/>
+      <column type="gchararray" />
     </columns>
     <data>
       <row>
@@ -42,7 +42,8 @@
       </row>
     </data>
   </object>
-  <object class="GtkHPaned" id="PreferencesPaned">
+  <object class="GtkPaned" id="PreferencesPaned">
+    <property name="orientation">horizontal</property>
     <property name="visible">True</property>
     <property name="can_focus">True</property>
     <child>
@@ -58,15 +59,17 @@
       </packing>
     </child>
     <child>
-      <placeholder/>
+      <placeholder />
     </child>
   </object>
-  <object class="GtkVBox" id="GeneralPreferencesVBox">
+  <object class="GtkBox" id="GeneralPreferencesVBox">
+    <property name="orientation">vertical</property>
     <property name="visible">True</property>
     <property name="border_width">12</property>
     <property name="spacing">12</property>
     <child>
-      <object class="GtkVBox" id="vbox13">
+      <object class="GtkBox" id="vbox13">
+        <property name="orientation">vertical</property>
         <property name="visible">True</property>
         <property name="spacing">6</property>
         <child>
@@ -82,7 +85,8 @@
           </packing>
         </child>
         <child>
-          <object class="GtkHBox" id="hbox20">
+          <object class="GtkBox" id="hbox20">
+            <property name="orientation">horizontal</property>
             <property name="visible">True</property>
             <child>
               <object class="GtkLabel" id="label48">
@@ -95,11 +99,13 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox14">
+              <object class="GtkBox" id="vbox14">
+                <property name="orientation">vertical</property>
                 <property name="visible">True</property>
                 <property name="spacing">6</property>
                 <child>
-                  <object class="GtkHBox" id="hbox21">
+                  <object class="GtkBox" id="hbox21">
+                    <property name="orientation">horizontal</property>
                     <property name="visible">True</property>
                     <property name="spacing">6</property>
                     <child>
@@ -128,37 +134,34 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <child>
-                          <object class="GtkAlignment" id="alignment50">
+                          <object class="GtkBox" id="hbox27">
+                            <property name="orientation">horizontal</property>
                             <property name="visible">True</property>
-                            <property name="xscale">0</property>
-                            <property name="yscale">0</property>
+                            <property name="spacing">2</property>
+                            <property name="halign">start</property>
+                            <property name="valign">center</property>
                             <child>
-                              <object class="GtkHBox" id="hbox27">
+                              <object class="GtkImage" id="image1238">
                                 <property name="visible">True</property>
-                                <property name="spacing">2</property>
-                                <child>
-                                  <object class="GtkImage" id="image1238">
-                                    <property name="visible">True</property>
-                                    <property name="stock">gtk-open</property>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="label60">
-                                    <property name="visible">True</property>
-                                    <property name="label" translatable="yes">_Select Layout</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>
+                                <property name="icon-name">document-open</property>
+            <property name="icon_size">3</property>
                               </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label60">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">_Select Layout</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>
@@ -210,7 +213,8 @@
       </packing>
     </child>
     <child>
-      <object class="GtkVBox" id="vbox17">
+      <object class="GtkBox" id="vbox17">
+        <property name="orientation">vertical</property>
         <property name="visible">True</property>
         <property name="spacing">6</property>
         <child>
@@ -226,7 +230,8 @@
           </packing>
         </child>
         <child>
-          <object class="GtkHBox" id="hbox25">
+          <object class="GtkBox" id="hbox25">
+            <property name="orientation">horizontal</property>
             <property name="visible">True</property>
             <child>
               <object class="GtkLabel" id="label55">
@@ -239,14 +244,13 @@
               </packing>
             </child>
             <child>
-              <object class="GtkTable" id="table2">
+              <object class="GtkGrid" id="table2">
                 <property name="visible">True</property>
-                <property name="n_rows">2</property>
-                <property name="n_columns">2</property>
                 <property name="column_spacing">6</property>
                 <property name="row_spacing">6</property>
                 <child>
-                  <object class="GtkHBox" id="hbox4">
+                  <object class="GtkBox" id="hbox4">
+                    <property name="orientation">horizontal</property>
                     <property name="visible">True</property>
                     <child>
                       <object class="GtkEntry" id="TempDirEntry">
@@ -259,7 +263,8 @@
                         <child>
                           <object class="GtkImage" id="image7">
                             <property name="visible">True</property>
-                            <property name="stock">gtk-open</property>
+                            <property name="icon-name">document-open</property>
+            <property name="icon_size">3</property>
                           </object>
                         </child>
                       </object>
@@ -270,10 +275,8 @@
                     </child>
                   </object>
                   <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
+                    <property name="left-attach">1</property>
+                    <property name="top-attach">1</property>
                   </packing>
                 </child>
                 <child>
@@ -283,8 +286,8 @@
                     <property name="label" translatable="yes">Temporary Directory:</property>
                   </object>
                   <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
+                    <property name="left-attach">0</property>
+                    <property name="top-attach">1</property>
                   </packing>
                 </child>
                 <child>
@@ -295,8 +298,8 @@
                     <property name="use_underline">True</property>
                   </object>
                   <packing>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"/>
+                    <property name="left-attach">0</property>
+                    <property name="top-attach">0</property>
                   </packing>
                 </child>
                 <child>
@@ -304,17 +307,15 @@
                     <property name="visible">True</property>
                     <property name="model">model5</property>
                     <child>
-                      <object class="GtkCellRendererText" id="renderer5"/>
+                      <object class="GtkCellRendererText" id="renderer5" />
                       <attributes>
                         <attribute name="text">0</attribute>
                       </attributes>
                     </child>
                   </object>
                   <packing>
-                    <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="left-attach">1</property>
+                    <property name="top-attach">0</property>
                   </packing>
                 </child>
               </object>
@@ -339,7 +340,8 @@
       </packing>
     </child>
   </object>
-  <object class="GtkVBox" id="SessionPreferencesVBox">
+  <object class="GtkBox" id="SessionPreferencesVBox">
+    <property name="orientation">vertical</property>
     <property name="visible">True</property>
     <property name="border_width">12</property>
     <property name="spacing">6</property>
@@ -358,7 +360,8 @@
       </packing>
     </child>
     <child>
-      <object class="GtkHBox" id="hbox19">
+      <object class="GtkBox" id="hbox19">
+        <property name="orientation">horizontal</property>
         <property name="visible">True</property>
         <child>
           <object class="GtkLabel" id="label46">
@@ -371,7 +374,8 @@
           </packing>
         </child>
         <child>
-          <object class="GtkVBox" id="vbox11">
+          <object class="GtkBox" id="vbox11">
+            <property name="orientation">vertical</property>
             <property name="visible">True</property>
             <property name="spacing">6</property>
             <child>
@@ -432,12 +436,14 @@
       </packing>
     </child>
   </object>
-  <object class="GtkVBox" id="UndoPreferencesVBox">
+  <object class="GtkBox" id="UndoPreferencesVBox">
+    <property name="orientation">vertical</property>
     <property name="visible">True</property>
     <property name="border_width">12</property>
     <property name="spacing">12</property>
     <child>
-      <object class="GtkVBox" id="vbox15">
+      <object class="GtkBox" id="vbox15">
+        <property name="orientation">vertical</property>
         <property name="visible">True</property>
         <property name="spacing">6</property>
         <child>
@@ -453,7 +459,8 @@
           </packing>
         </child>
         <child>
-          <object class="GtkHBox" id="hbox22">
+          <object class="GtkBox" id="hbox22">
+            <property name="orientation">horizontal</property>
             <property name="visible">True</property>
             <child>
               <object class="GtkLabel" id="label51">
@@ -466,11 +473,13 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox16">
+              <object class="GtkBox" id="vbox16">
+                <property name="orientation">vertical</property>
                 <property name="visible">True</property>
                 <property name="spacing">6</property>
                 <child>
-                  <object class="GtkHBox" id="hbox23">
+                  <object class="GtkBox" id="hbox23">
+                    <property name="orientation">horizontal</property>
                     <property name="visible">True</property>
                     <property name="spacing">6</property>
                     <child>
@@ -493,7 +502,7 @@
                         <property name="adjustment">adjustment1</property>
                         <property name="climb_rate">1</property>
                         <property name="numeric">True</property>
-                        <property name="update_policy">GTK_UPDATE_IF_VALID</property>
+                        <property name="update_policy">update_if_valid</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -553,7 +562,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="spacing">6</property>
         <child>
@@ -569,7 +579,8 @@
           </packing>
         </child>
         <child>
-          <object class="GtkHBox" id="hbox5">
+          <object class="GtkBox" id="hbox5">
+            <property name="orientation">horizontal</property>
             <property name="visible">True</property>
             <child>
               <object class="GtkLabel" id="label13">
@@ -582,7 +593,8 @@
               </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="spacing">6</property>
                 <child>
diff --git a/data/ui/ProgressDialog.ui b/data/ui/ProgressDialog.ui
index 33c9c2e..960a083 100644
--- a/data/ui/ProgressDialog.ui
+++ b/data/ui/ProgressDialog.ui
@@ -1,6 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <object class="GtkVBox" id="ProgressVBox">
+  <object class="GtkBox" id="ProgressVBox">
+    <property name="orientation">vertical</property>
     <property name="visible">True</property>
     <property name="border_width">7</property>
     <property name="spacing">12</property>
@@ -38,16 +39,17 @@
       </packing>
     </child>
     <child>
-      <object class="GtkHButtonBox" id="hbuttonbox9">
+      <object class="GtkButtonBox" id="hbuttonbox9">
+        <property name="orientation">horizontal</property>
         <property name="visible">True</property>
-        <property name="layout_style">GTK_BUTTONBOX_END</property>
+        <property name="layout_style">buttonbox_end</property>
         <child>
           <object class="GtkButton" id="button2">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="label" translatable="yes">Cancel</property>
             <property name="use_underline">True</property>
-            <signal handler="OnCancelButtonClicked" name="clicked"/>
+            <signal handler="OnCancelButtonClicked" name="clicked" />
           </object>
         </child>
       </object>
diff --git a/data/ui/ProgressDisplayPlugin.ui b/data/ui/ProgressDisplayPlugin.ui
index 49d6bf0..b44198e 100644
--- a/data/ui/ProgressDisplayPlugin.ui
+++ b/data/ui/ProgressDisplayPlugin.ui
@@ -1,6 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <object class="GtkHBox" id="ProgressBarHBox">
+  <object class="GtkBox" id="ProgressBarHBox">
+    <property name="orientation">horizontal</property>
     <property name="visible">True</property>
     <property name="border_width">6</property>
     <property name="spacing">6</property>
@@ -13,9 +14,8 @@
     <child>
       <object class="GtkButton" id="CancelButton">
         <property name="visible">True</property>
-        <property name="label" translatable="no">gtk-cancel</property>
-        <property name="use_stock">True</property>
-        <signal handler="OnCancelButtonClicked" name="clicked"/>
+        <property name="label" translatable="yes">Cancel</property>
+        <signal handler="OnCancelButtonClicked" name="clicked" />
       </object>
       <packing>
         <property name="expand">False</property>
diff --git a/data/ui/SelectRangePlugin.ui b/data/ui/SelectRangePlugin.ui
index 729cc10..86e5502 100644
--- a/data/ui/SelectRangePlugin.ui
+++ b/data/ui/SelectRangePlugin.ui
@@ -1,6 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <object class="GtkHBox" id="SelectRangeHBox">
+  <object class="GtkBox" id="SelectRangeHBox">
+    <property name="orientation">horizontal</property>
     <property name="visible">True</property>
     <property name="border_width">6</property>
     <property name="spacing">6</property>
@@ -18,8 +19,8 @@
       <object class="GtkEntry" id="FromEntry">
         <property name="visible">True</property>
         <property name="can_focus">True</property>
-        <signal handler="OnEntryChanged" name="changed"/>
-        <signal handler="OnEntryActivated" name="activate"/>
+        <signal handler="OnEntryChanged" name="changed" />
+        <signal handler="OnEntryActivated" name="activate" />
       </object>
       <packing>
         <property name="position">1</property>
@@ -28,7 +29,7 @@
     <child>
       <object class="GtkLabel" id="label83">
         <property name="visible">True</property>
-        <property name="label" translatable="yes">to/&#xB1;length</property>
+        <property name="label" translatable="yes">to/±length</property>
       </object>
       <packing>
         <property name="expand">False</property>
@@ -41,8 +42,8 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="tooltip-text">Use +/- to specify selection length instead of the absolute ending offset</property>
-        <signal handler="OnEntryChanged" name="changed"/>
-        <signal handler="OnEntryActivated" name="activate"/>
+        <signal handler="OnEntryChanged" name="changed" />
+        <signal handler="OnEntryActivated" name="activate" />
       </object>
       <packing>
         <property name="position">3</property>
@@ -52,41 +53,38 @@
       <object class="GtkButton" id="SelectButton">
         <property name="visible">True</property>
         <property name="can_focus">True</property>
-        <property name="relief">GTK_RELIEF_NONE</property>
+        <property name="relief">none</property>
         <property name="focus_on_click">False</property>
-        <signal handler="OnSelectButtonClicked" name="clicked"/>
+        <signal handler="OnSelectButtonClicked" name="clicked" />
         <child>
-          <object class="GtkAlignment" id="alignment55">
+          <object class="GtkBox" id="hbox36">
+            <property name="orientation">horizontal</property>
             <property name="visible">True</property>
-            <property name="xscale">0</property>
-            <property name="yscale">0</property>
+            <property name="spacing">2</property>
+            <property name="halign">start</property>
+            <property name="valign">center</property>
             <child>
-              <object class="GtkHBox" id="hbox36">
+              <object class="GtkImage" id="image1642">
                 <property name="visible">True</property>
-                <property name="spacing">2</property>
-                <child>
-                  <object class="GtkImage" id="image1642">
-                    <property name="visible">True</property>
-                    <property name="stock">gtk-apply</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label84">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Select</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>
+                <property name="icon-name">emblem-default</property>
+            <property name="icon_size">3</property>
               </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label84">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Select</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>
@@ -101,14 +99,14 @@
       <object class="GtkButton" id="CloseButton">
         <property name="visible">True</property>
         <property name="can_focus">True</property>
-        <property name="relief">GTK_RELIEF_NONE</property>
+        <property name="relief">none</property>
         <property name="focus_on_click">False</property>
-        <signal handler="OnCloseButtonClicked" name="clicked"/>
+        <signal handler="OnCloseButtonClicked" name="clicked" />
         <child>
           <object class="GtkImage" id="image1643">
             <property name="visible">True</property>
-            <property name="stock">gtk-close</property>
             <property name="icon_size">1</property>
+            <property name="icon-name">window-close</property>
           </object>
         </child>
       </object>
diff --git a/meson.build b/meson.build
index c0c9929..fb05eb1 100644
--- a/meson.build
+++ b/meson.build
@@ -8,8 +8,8 @@ project(
 
 add_project_arguments('-d:ENABLE_UNIX_SPECIFIC', language: 'cs')
 
-gtk_sharp_2_dep = dependency('gtk-sharp-2.0')
-glib_sharp_2_dep = dependency('glib-sharp-2.0')
+gtk_sharp_dep = dependency('gtk-sharp-3.0')
+glib_sharp_dep = dependency('glib-sharp-3.0')
 
 subdir('src')
 subdir('data')
diff --git a/src/gui/DataBook.cs b/src/gui/DataBook.cs
index 4d84e34..993c6c6 100644
--- a/src/gui/DataBook.cs
+++ b/src/gui/DataBook.cs
@@ -218,7 +218,7 @@ public class DataBook : Gtk.Notebook
 }
 
 ///<summary>A widget to display on each tab label</summary>
-class DataBookTabLabel : Gtk.HBox
+class DataBookTabLabel : Gtk.Box
 {
 	Gtk.Label label;
 	Gtk.Button closeButton;
@@ -235,6 +235,7 @@ class DataBookTabLabel : Gtk.HBox
 	}
 
 	public DataBookTabLabel(DataView dv, CloseViewDelegate deleg, string str)
+		: base(Gtk.Orientation.Horizontal, 2)
 	{
 		dataView = dv;
 		doCloseFile = deleg;
@@ -245,7 +246,7 @@ class DataBookTabLabel : Gtk.HBox
 		label.UseMarkup = true;
 		label.UseUnderline = false;
 
-		Gtk.Image img = new Gtk.Image(Gtk.Stock.Close, Gtk.IconSize.Menu);
+		Gtk.Image img = new Gtk.Image("window-close", Gtk.IconSize.Button);
 		img.SetSizeRequest(8, 8);
 
 		// This doesn't compile in 1.0.2 and older,
diff --git a/src/gui/DataViewControl.cs b/src/gui/DataViewControl.cs
index 590bcac..f33605e 100644
--- a/src/gui/DataViewControl.cs
+++ b/src/gui/DataViewControl.cs
@@ -274,12 +274,16 @@ public class DataViewControl
 	internal void OnMotionNotify(object o, MotionNotifyEventArgs args)
 	{
 		Gdk.EventMotion e = args.Event;
-		Gtk.DrawingArea da = (Gtk.DrawingArea)o;
 		int x, y;
 		Gdk.ModifierType state;
 
-		if (e.IsHint)
-			da.GdkWindow.GetPointer(out x, out y, out state);
+		if (e.IsHint) {
+			// GTK3: use device position to dereference pointer hints
+			int ex, ey;
+			Gdk.ModifierType pstate;
+			e.Window.GetDevicePosition(e.Device, out ex, out ey, out pstate);
+			x = ex; y = ey; state = pstate;
+		}
 		else {
 			x = (int)e.X;
 			y = (int)e.Y;
@@ -479,23 +483,45 @@ public class DataViewControl
 		// do nothing
 	}
 
+	// Accumulated fractional scroll delta for smooth/touchpad scrolling.
+	double smoothScrollAccum = 0.0;
+
 	internal void OnMouseWheel(object o, ScrollEventArgs args)
 	{
 		Gdk.EventScroll e = args.Event;
-
-		if (e.Direction == Gdk.ScrollDirection.Down) {
-			double newValue = dvDisplay.VScroll.Value + dvDisplay.VScroll.Adjustment.StepIncrement;
-			if (newValue <= dvDisplay.VScroll.Adjustment.Upper - dvDisplay.VScroll.Adjustment.PageSize)
-				dvDisplay.VScroll.Value = newValue;
-			else
-				dvDisplay.VScroll.Value = dvDisplay.VScroll.Adjustment.Upper - dvDisplay.VScroll.Adjustment.PageSize;
+		Gtk.Adjustment adj = dvDisplay.VScroll.Adjustment;
+		double step = adj.StepIncrement;
+		double lower = adj.Lower;
+		double upper = adj.Upper - adj.PageSize;
+
+		double delta = 0.0;
+
+		if (e.Direction == Gdk.ScrollDirection.Smooth) {
+			// GTK3 smooth scrolling (touchpads, hi-res mice).
+			// delta_y > 0 means scroll down; < 0 means scroll up.
+			double dx, dy;
+			e.GetScrollDeltas(out dx, out dy);
+			smoothScrollAccum += dy * step;
+			// Consume whole-row increments from the accumulator.
+			double whole = System.Math.Truncate(smoothScrollAccum);
+			if (System.Math.Abs(whole) >= 1.0) {
+				delta = whole;
+				smoothScrollAccum -= whole;
+			}
+		}
+		else if (e.Direction == Gdk.ScrollDirection.Down) {
+			delta = step;
+			smoothScrollAccum = 0.0;
 		}
 		else if (e.Direction == Gdk.ScrollDirection.Up) {
-			double newValue = dvDisplay.VScroll.Value - dvDisplay.VScroll.Adjustment.StepIncrement;
-			if (newValue >= dvDisplay.VScroll.Adjustment.Lower)
-				dvDisplay.VScroll.Value = newValue;
-			else
-				dvDisplay.VScroll.Value = dvDisplay.VScroll.Adjustment.Lower;
+			delta = -step;
+			smoothScrollAccum = 0.0;
+		}
+
+		if (delta != 0.0) {
+			double newValue = System.Math.Max(lower,
+				System.Math.Min(upper, dvDisplay.VScroll.Value + delta));
+			dvDisplay.VScroll.Value = newValue;
 		}
 	}
 
diff --git a/src/gui/DataViewDisplay.cs b/src/gui/DataViewDisplay.cs
index 39d17ae..92e499e 100644
--- a/src/gui/DataViewDisplay.cs
+++ b/src/gui/DataViewDisplay.cs
@@ -29,13 +29,13 @@ using Bless.Util;
 namespace Bless.Gui {
 
 ///<summary>A widget that displays data from a buffer</summary>
-public class DataViewDisplay : Gtk.VBox {
+public class DataViewDisplay : Gtk.Box {
 	Layout layout;
-	Gtk.HBox hbox;
+	Gtk.Box hbox;
 	Gtk.DrawingArea drawingArea;
 	//static Gtk.DrawingArea drawingArea=new Gtk.DrawingArea();
 	Gtk.VScrollbar vscroll;
-	Gtk.HBox fileChangedBar;
+	Gtk.Box fileChangedBar;
 	bool widgetRealized;
 
 	DataViewControl dvControl;
@@ -108,6 +108,7 @@ public class DataViewDisplay : Gtk.VBox {
 
 	///<summary>Create a DataViewDisplay</summary>
 	public DataViewDisplay(DataView dv)
+		: base(Gtk.Orientation.Vertical, 0)
 	{
 		dataView = dv;
 
@@ -124,9 +125,12 @@ public class DataViewDisplay : Gtk.VBox {
 		// initialize drawing area
 		drawingArea = new Gtk.DrawingArea();
 		drawingArea.Realized += OnRealized;
-		drawingArea.ExposeEvent += OnExposed;
+		drawingArea.Drawn += OnDrawn;
 		drawingArea.ConfigureEvent += OnConfigured;
-		drawingArea.ModifyBg(StateType.Normal, new Gdk.Color(0xff, 0xff, 0xff));
+		// Set white background via CSS (OverrideBackgroundColor is obsolete in GTK 3.16+)
+		var cssProvider = new Gtk.CssProvider();
+		cssProvider.LoadFromData("* { background-color: white; }");
+		drawingArea.StyleContext.AddProvider(cssProvider, (uint)Gtk.StyleProviderPriority.Application);
 
 		// add events that we want to handle
 		drawingArea.AddEvents((int)Gdk.EventMask.ButtonPressMask);
@@ -135,15 +139,17 @@ public class DataViewDisplay : Gtk.VBox {
 		drawingArea.AddEvents((int)Gdk.EventMask.PointerMotionHintMask);
 		drawingArea.AddEvents((int)Gdk.EventMask.KeyPressMask);
 		drawingArea.AddEvents((int)Gdk.EventMask.KeyReleaseMask);
+		drawingArea.AddEvents((int)Gdk.EventMask.ScrollMask);
+		drawingArea.AddEvents((int)Gdk.EventMask.SmoothScrollMask);
 
 		drawingArea.CanFocus = true; // needed to catch key events
 
-		hbox = new Gtk.HBox();
+		hbox = new Gtk.Box(Gtk.Orientation.Horizontal, 0);
 
 		hbox.PackStart(drawingArea , true, true, 0);
 		hbox.PackStart(vscroll , false, false, 0);
 
-		this.PackStart(hbox);
+		this.PackStart(hbox, true, true, 0);
 	}
 
 	///<summary>Force a complete redraw of the view</summary>
@@ -228,37 +234,22 @@ public class DataViewDisplay : Gtk.VBox {
 		return bestBpr;
 	}
 
-	///<summary>Benchmark the rendering</summary>
+	///<summary>Benchmark the rendering (GTK3: no manual double-buffering)</summary>
 	public void Benchmark()
 	{
-
 		System.DateTime t1;
 		System.DateTime t2;
-
 		int sum = 0;
-
-		Gdk.Window win = drawingArea.GdkWindow;
 		Gdk.Rectangle alloc = drawingArea.Allocation;
-		Gdk.Rectangle rect1 = new Gdk.Rectangle(0, 0, alloc.Width, alloc.Height);
 
 		for (int i = 0; i < 100; i++) {
 			t1 = System.DateTime.Now;
-
-			win.BeginPaintRect(rect1);
-
 			layout.AreaGroup.Render(true);
-
-			win.EndPaint();
-
 			t2 = System.DateTime.Now;
-
 			sum += (t2 - t1).Milliseconds;
 		}
 
-
-		Gdk.Rectangle rect = drawingArea.Allocation;
-		Console.WriteLine("100 render screen ({0},{1}): {2} ms", rect.Width, rect.Height, sum / 100);
-
+		Console.WriteLine("100 render screen ({0},{1}): {2} ms", alloc.Width, alloc.Height, sum / 100);
 	}
 
 	private void SetupScrollbarRange()
@@ -345,9 +336,12 @@ public class DataViewDisplay : Gtk.VBox {
 		MakeOffsetVisible(dataView.Offset, ShowType.Start);
 	}
 
-	///<summary>Handle the Expose Event</summary>
-	void OnExposed (object o, ExposeEventArgs args)
+	///<summary>Handle the GTK3 Draw signal - delivers a Cairo context</summary>
+	void OnDrawn (object o, DrawnArgs args)
 	{
+		// Inject the Cairo context so Area drawing methods can use it
+		foreach (Bless.Gui.Areas.Area a in layout.AreaGroup.Areas)
+			a.SetBackContext(args.Cr);
 		layout.AreaGroup.Render(true);
 	}
 
diff --git a/src/gui/FileChangedBar.cs b/src/gui/FileChangedBar.cs
index 7da5d68..579b227 100644
--- a/src/gui/FileChangedBar.cs
+++ b/src/gui/FileChangedBar.cs
@@ -31,17 +31,18 @@ namespace Bless.Gui
 /// A widget that notifies the user that the file has changed
 /// and prompts them to reload or ignore.
 ///</summary>
-public class FileChangedBar : Gtk.HBox
+public class FileChangedBar : Gtk.Box
 {
 	DataView dataView;
 
 	public FileChangedBar(DataView dv)
+		: base(Gtk.Orientation.Horizontal, 0)
 	{
 		dataView = dv;
 
 		this.BorderWidth = 3;
 
-		Gtk.Image img = new Gtk.Image(Gtk.Stock.DialogWarning, Gtk.IconSize.SmallToolbar);
+		Gtk.Image img = new Gtk.Image("dialog-warning", Gtk.IconSize.SmallToolbar);
 
 		Gtk.Label label = new Gtk.Label(Catalog.GetString("This file has been changed on disk. You may choose to ignore the changes but reloading is the only safe option."));
 		label.LineWrap = true;
diff --git a/src/gui/FileService.cs b/src/gui/FileService.cs
index 4463f30..4946113 100644
--- a/src/gui/FileService.cs
+++ b/src/gui/FileService.cs
@@ -305,8 +305,8 @@ public class FileService
 
 		// otherwise prompt user for a name
 		Gtk.FileChooserDialog fs = new Gtk.FileChooserDialog(Catalog.GetString("Save File As"), mainWindow, FileChooserAction.Save,
-								   Gtk.Stock.Cancel, ResponseType.Cancel,
-								   Gtk.Stock.Save, ResponseType.Accept);
+								   "Cancel", ResponseType.Cancel,
+								   "document-save", ResponseType.Accept);
 
 		bool done = false;
 		bool fileSaved = true;
diff --git a/src/gui/MainWindow.cs b/src/gui/MainWindow.cs
index ae1c190..5d7768f 100644
--- a/src/gui/MainWindow.cs
+++ b/src/gui/MainWindow.cs
@@ -36,9 +36,9 @@ using Mono.Unix;
 
 public class BlessMain
 {
-	[Gtk.Builder.Object] Gtk.HBox DataViewBox;
+	[Gtk.Builder.Object] Gtk.Box DataViewBox;
 	[Gtk.Builder.Object] Gtk.Window MainWindow;
-	[Gtk.Builder.Object] Gtk.VBox MainVBox;
+	[Gtk.Builder.Object] Gtk.Box MainVBox;
 
 	const string uiXml =
 		"<menubar>" +
@@ -159,7 +159,7 @@ public class BlessMain
 		dataBook.Removed += new RemovedHandler(OnDataViewRemoved);
 		dataBook.SwitchPage += new SwitchPageHandler(OnSwitchPage);
 
-		DataViewBox.PackStart(dataBook);
+		DataViewBox.PackStart(dataBook, true, true, 0);
 
 
 		// create the widget groups that hold utility widgets
diff --git a/src/gui/WidgetGroup.cs b/src/gui/WidgetGroup.cs
index 90a317b..578f7e6 100644
--- a/src/gui/WidgetGroup.cs
+++ b/src/gui/WidgetGroup.cs
@@ -23,12 +23,10 @@ using Gtk;
 namespace Bless.Gui
 {
 
-public class WidgetGroup : HBox
+public class WidgetGroup : Gtk.Box
 {
+	public WidgetGroup() : base(Gtk.Orientation.Horizontal, 0) {}
 
-	public WidgetGroup()
-	{
-	}
 
 	protected override void OnAdded(Widget w)
 	{
diff --git a/src/gui/areas/Area.cs b/src/gui/areas/Area.cs
index 65f7758..05ae7f6 100644
--- a/src/gui/areas/Area.cs
+++ b/src/gui/areas/Area.cs
@@ -20,6 +20,7 @@
  */
 
 using Bless.Gui.Drawers;
+using Cairo;
 using Bless.Util;
 using Bless.Buffers;
 using Bless.Tools.Find;
@@ -46,23 +47,26 @@ public abstract class Area
 	protected int bpr;
 	protected int dpb; // digits per byte
 	protected int fixedBpr;
-	protected Gdk.Drawable backPixmap;
+	protected Cairo.Context backCr; // set per draw call
+
+	/// <summary>Inject the Cairo context for the current draw pass.</summary>
+	public void SetBackContext(Cairo.Context cr) { backCr = cr; }
 	protected bool manualDoubleBuffer;
 	protected bool isAreaRealized;
 
-	// GC's
-	protected Gdk.GC cursorGC;
-	protected Gdk.GC activeCursorGC;
-	protected Gdk.GC inactiveCursorGC;
+	// cursor colors
+	protected Cairo.Color cursorColor;
+	protected Cairo.Color activeCursorColor;
+	protected Cairo.Color inactiveCursorColor;
+
 
-	
 	protected int cursorDigit;
 	protected bool cursorFocus;
 	protected bool canFocus;
-	
+
 	public enum RenderMergeFlags {None = 0, Left = 1, Right = 2}
 	// Abstract methods
-	
+
 	/// <summary>
 	/// Render (a part of) a row normally (without highlighting)
 	/// </summary>
@@ -79,7 +83,7 @@ public abstract class Area
 	/// Whether to blank the background before rendering.
 	/// </param>
 	abstract protected void RenderRowNormal(int i, int p, int n, bool blank);
-	
+
 	/// <summary>
 	/// Render (a part of) a row with highlighting.
 	/// </summary>
@@ -118,7 +122,7 @@ public abstract class Area
 	abstract public void GetDisplayInfoByOffset(long off, out int orow, out int obyte, out int ox, out int oy);
 
 	/// <summary>
-	/// Flags containing extra info about positions in the view. 
+	/// Flags containing extra info about positions in the view.
 	/// </summary>
 	public enum GetOffsetFlags {
 		/// <summary>Position is beyond the end of file</summary>
@@ -126,7 +130,7 @@ public abstract class Area
 		/// <summary>Position is between bytes (in the so-called abyss)</summary>
 		Abyss = 2
 	}
-	
+
 	/// <summary>
 	/// Gets the offset in the buffer that is displayed at specified location in the area
 	/// </summary>
@@ -148,7 +152,7 @@ public abstract class Area
 	abstract public long GetOffsetByDisplayInfo(int x, int y, out int digit, out GetOffsetFlags rflags);
 
 	/// <summary>
-	/// Special key handler for the area. 
+	/// Special key handler for the area.
 	/// </summary>
 	/// <param name="key">
 	/// The key that was pressed.
@@ -174,12 +178,12 @@ public abstract class Area
 	/// A delegate that creates instances of area types.
 	/// </summary>
 	public delegate Area AreaCreatorFunc(AreaGroup ag);
-	
+
 	/// <summary>
 	/// A dictionary to hold area type names and creation functions
 	/// </summary>
 	static private Dictionary<string, AreaCreatorFunc> pluginTable;
-	
+
 	/// <summary>
 	/// Adds a new area type to the factory.
 	/// </summary>
@@ -224,7 +228,7 @@ public abstract class Area
 		return null;
 	}
 
-	
+
 	/// <summary>
 	/// Create an area.
 	/// </summary>
@@ -234,7 +238,7 @@ public abstract class Area
 	public Area(AreaGroup areaGroup)
 	{
 		this.areaGroup = areaGroup;
-		
+
 		drawerInformation = new Drawer.Information();
 
 		canFocus = false;
@@ -315,15 +319,13 @@ public abstract class Area
 		bg = null;
 		XmlNodeList childNodes = parentNode.ChildNodes;
 		foreach(XmlNode node in childNodes) {
-			Gdk.Color col = new Gdk.Color();
+			Gdk.RGBA col = new Gdk.RGBA();
 			if (node.Name == "foreground") {
-				Gdk.Color.Parse(node.InnerText, ref col);
-				Gdk.Colormap.System.AllocColor(ref col, false, true);
+				col.Parse(node.InnerText);
 				fg = new Drawer.Color(col);
 			}
 			if (node.Name == "background") {
-				Gdk.Color.Parse(node.InnerText, ref col);
-				Gdk.Colormap.System.AllocColor(ref col, false, true);
+				col.Parse(node.InnerText);
 				bg = new Drawer.Color(col);
 			}
 		}
@@ -334,21 +336,9 @@ public abstract class Area
 	///</summary>
 	public virtual void Realize()
 	{
-		Gtk.DrawingArea da = areaGroup.DrawingArea;
-
-		backPixmap = da.GdkWindow;
-
-		activeCursorGC = new Gdk.GC(da.GdkWindow);
-		inactiveCursorGC = new Gdk.GC(da.GdkWindow);
-
-		Gdk.Color col = new Gdk.Color();
-
-
-		Gdk.Color.Parse("red", ref col);
-		activeCursorGC.RgbFgColor = col;
-		Gdk.Color.Parse("gray", ref col);
-		inactiveCursorGC.RgbFgColor = col;
-		cursorGC = activeCursorGC;
+		activeCursorColor   = new Cairo.Color(1.0, 0.0, 0.0); // red
+		inactiveCursorColor = new Cairo.Color(0.5, 0.5, 0.5); // gray
+		cursorColor = activeCursorColor;
 
 		isAreaRealized = true;
 	}
@@ -393,7 +383,7 @@ public abstract class Area
 		get { return cursorDigit; }
 		set { if (value >= dpb) cursorDigit = dpb - 1; else cursorDigit = value; }
 	}
-	
+
 	public bool HasCursorFocus {
 		set { cursorFocus = value; }
 		get { return cursorFocus;}
@@ -419,17 +409,17 @@ public abstract class Area
 
 	public bool IsActive {
 		set {
-			if (value == true)
-				cursorGC = activeCursorGC;
+				if (value == true)
+				cursorColor = activeCursorColor;
 			else
-				cursorGC = inactiveCursorGC;
+				cursorColor = inactiveCursorColor;
 
 			// doesn't actually change cursor position
 			// just redraws it with correct color
 			//MoveCursor(cursorOffset, cursorDigit);
 		}
 
-		get { return cursorGC == activeCursorGC; }
+		get { return cursorColor.R == activeCursorColor.R && cursorColor.G == activeCursorColor.G; }
 	}
 
 	/// <summary>
@@ -438,10 +428,10 @@ public abstract class Area
 	/// </summary>
 	internal protected virtual void RenderExtra()
 	{
-	
+
 	}
-	
-	
+
+
 	void RenderRangeHelper(Drawer.HighlightType ht, int rstart, int bstart, int len)
 	{
 		if (ht != Drawer.HighlightType.Normal)
@@ -462,35 +452,35 @@ public abstract class Area
 	/// </param>
 	/// <remarks>
 	/// This method doesn't check whether the merge flags are correct (eg there is indeed
-	/// a similar adjacent highlight). It just draws the highlight in such a way as 
+	/// a similar adjacent highlight). It just draws the highlight in such a way as
 	/// to appear merged to any similar highlights if they exist.
 	///</remarks>
 	internal protected virtual void RenderHighlight(Highlight h, Drawer.HighlightType left, Drawer.HighlightType right)
 	{
 		if (isAreaRealized == false)
 			return;
-		
+
 		int rstart, bstart, xstart, ystart;
 		int rend, bend, xend, yend;
 		bool odd;
-		Gdk.GC gc;
-		Gdk.GC oddGC;
-		Gdk.GC evenGC;
-		Gdk.GC leftGC;
-		Gdk.GC rightGC;
-		
-		oddGC = drawer.GetBackgroundGC(Drawer.RowType.Odd, h.Type);
-		evenGC = drawer.GetBackgroundGC(Drawer.RowType.Even, h.Type);
-		
+		Cairo.Color gc;
+		Cairo.Color oddGC;
+		Cairo.Color evenGC;
+		Cairo.Color leftGC;
+		Cairo.Color rightGC;
+
+		oddGC = drawer.GetBackgroundColor(Drawer.RowType.Odd, h.Type);
+		evenGC = drawer.GetBackgroundColor(Drawer.RowType.Even, h.Type);
+
 
 		GetDisplayInfoByOffset(h.Start, out rstart, out bstart, out xstart, out ystart);
 		GetDisplayInfoByOffset(h.End, out rend, out bend, out xend, out yend);
-		
+
 		//System.Console.WriteLine("Start {0:x} {1} {2} x:{3} y:{4}", h.Start, rstart, bstart, xstart, ystart);
 		//System.Console.WriteLine("End {0:x} {1} {2} x:{3} y:{4}", h.End, rend, bend, xend, yend);
 		bool drawLeft = false;
 		int dxstart = xstart;
-		
+
 		if (bstart > 0) {
 			int digit;
 			GetOffsetFlags gof;
@@ -500,10 +490,10 @@ public abstract class Area
 				drawLeft = true;
 			}
 		}
-		
+
 		bool drawRight = false;
 		int dxend = xend;
-		
+
 		if (bend < bpr - 1) {
 			int digit;
 			GetOffsetFlags gof;
@@ -513,7 +503,7 @@ public abstract class Area
 				drawRight = true;
 			}
 		}
-		
+
 		// if the whole range is on one row
 		if (rstart == rend) {
 			if (areaGroup.ManualDoubleBuffer) {
@@ -523,64 +513,48 @@ public abstract class Area
 			odd = (((h.Start / bpr) % 2) == 1);
 			if (odd) {
 				gc = oddGC;
-				leftGC = drawer.GetBackgroundGC(Drawer.RowType.Odd, left);
-				rightGC = drawer.GetBackgroundGC(Drawer.RowType.Odd, right);
+				leftGC = drawer.GetBackgroundColor(Drawer.RowType.Odd, left);
+				rightGC = drawer.GetBackgroundColor(Drawer.RowType.Odd, right);
 			}
 			else {
 				gc = evenGC;
-				leftGC = drawer.GetBackgroundGC(Drawer.RowType.Even, left);
-				rightGC = drawer.GetBackgroundGC(Drawer.RowType.Even, right);
+				leftGC = drawer.GetBackgroundColor(Drawer.RowType.Even, left);
+				rightGC = drawer.GetBackgroundColor(Drawer.RowType.Even, right);
 			}
-			
+
 			//render
 			if (drawLeft)
-				backPixmap.DrawRectangle(leftGC, true, x + dxstart, y + ystart, drawer.Width, drawer.Height);
+				DrawFilledRect(backCr, leftGC, x + dxstart, y + ystart, drawer.Width, drawer.Height);
 			if (drawRight)
-				backPixmap.DrawRectangle(rightGC, true, x + xend + dpb*drawer.Width, y + yend, drawer.Width, drawer.Height);
-			
-			backPixmap.DrawRectangle(gc, true, x + xstart, y + ystart, xend - xstart + dpb*drawer.Width, drawer.Height);
+				DrawFilledRect(backCr, rightGC, x + xend + dpb*drawer.Width, y + yend, drawer.Width, drawer.Height);
+
+			DrawFilledRect(backCr, gc, x + xstart, y + ystart, xend - xstart + dpb*drawer.Width, drawer.Height);
 
 			RenderRangeHelper(h.Type, rstart, bstart, bend - bstart + 1);
 		}
 		else { // multi-row range
 
 			if (areaGroup.ManualDoubleBuffer) {
-				// handle double-buffering
-				Gdk.Region paintRegion = new Gdk.Region();
-
-				Gdk.Rectangle rectStart = new Gdk.Rectangle(x + dxstart, y + ystart, width - dxstart, drawer.Height);
-
-				Gdk.Rectangle rectMiddle;
-				if (rend > rstart + 1)
-					rectMiddle = new Gdk.Rectangle(x, y + ystart + drawer.Height, width, yend - ystart - drawer.Height);
-				else
-					rectMiddle = Gdk.Rectangle.Zero;
-
-				Gdk.Rectangle rectEnd = new Gdk.Rectangle(x, y + yend, dxend + dpb*drawer.Width, drawer.Height);
-
-				paintRegion.UnionWithRect(rectStart);
-				paintRegion.UnionWithRect(rectMiddle);
-				paintRegion.UnionWithRect(rectEnd);
-
-				BeginPaintRegion(paintRegion);
+				// GTK3 handles double-buffering automatically
+				BeginPaint(x + dxstart, y + ystart, width + (dxend - dxstart + dpb*drawer.Width), yend - ystart + drawer.Height);
 			}
 
 			// render first row
 			odd = (((h.Start / bpr) % 2) == 1);
 			if (odd) {
 				gc = oddGC;
-				leftGC = drawer.GetBackgroundGC(Drawer.RowType.Odd, left);
-				rightGC = drawer.GetBackgroundGC(Drawer.RowType.Odd, right);
+				leftGC = drawer.GetBackgroundColor(Drawer.RowType.Odd, left);
+				rightGC = drawer.GetBackgroundColor(Drawer.RowType.Odd, right);
 			}
 			else {
 				gc = evenGC;
-				leftGC = drawer.GetBackgroundGC(Drawer.RowType.Even, left);
-				rightGC = drawer.GetBackgroundGC(Drawer.RowType.Even, right);
+				leftGC = drawer.GetBackgroundColor(Drawer.RowType.Even, left);
+				rightGC = drawer.GetBackgroundColor(Drawer.RowType.Even, right);
 			}
-			
+
 			if (drawLeft)
-				backPixmap.DrawRectangle(leftGC, true, x + dxstart, y + ystart, drawer.Width, drawer.Height);
-			backPixmap.DrawRectangle(gc, true, x + xstart, y + ystart, width - xstart, drawer.Height);
+				DrawFilledRect(backCr, leftGC, x + dxstart, y + ystart, drawer.Width, drawer.Height);
+			DrawFilledRect(backCr, gc, x + xstart, y + ystart, width - xstart, drawer.Height);
 
 			RenderRangeHelper(h.Type, rstart, bstart, bpr - bstart);
 
@@ -593,7 +567,7 @@ public abstract class Area
 					gc = oddGC;
 				else
 					gc = evenGC;
-				backPixmap.DrawRectangle(gc, true, x, y + i*drawer.Height, width, drawer.Height);
+				DrawFilledRect(backCr, gc, x, y + i*drawer.Height, width, drawer.Height);
 				RenderRangeHelper(h.Type, i, 0, bpr);
 				curOffset += bpr;
 			}
@@ -602,18 +576,18 @@ public abstract class Area
 			odd = (((h.End / bpr) % 2) == 1);
 			if (odd) {
 				gc = oddGC;
-				leftGC = drawer.GetBackgroundGC(Drawer.RowType.Odd, left);
-				rightGC = drawer.GetBackgroundGC(Drawer.RowType.Odd, right);
+				leftGC = drawer.GetBackgroundColor(Drawer.RowType.Odd, left);
+				rightGC = drawer.GetBackgroundColor(Drawer.RowType.Odd, right);
 			}
 			else {
 				gc = evenGC;
-				leftGC = drawer.GetBackgroundGC(Drawer.RowType.Even, left);
-				rightGC = drawer.GetBackgroundGC(Drawer.RowType.Even, right);
+				leftGC = drawer.GetBackgroundColor(Drawer.RowType.Even, left);
+				rightGC = drawer.GetBackgroundColor(Drawer.RowType.Even, right);
 			}
-			
+
 			if (drawRight)
-				backPixmap.DrawRectangle(rightGC, true, x + xend + dpb*drawer.Width, y + yend, drawer.Width, drawer.Height);
-			backPixmap.DrawRectangle(gc, true, x, y + yend, xend + dpb*drawer.Width, drawer.Height);
+				DrawFilledRect(backCr, rightGC, x + xend + dpb*drawer.Width, y + yend, drawer.Width, drawer.Height);
+			DrawFilledRect(backCr, gc, x, y + yend, xend + dpb*drawer.Width, drawer.Height);
 			RenderRangeHelper(h.Type, rend, 0, bend + 1);
 		}
 
@@ -622,7 +596,7 @@ public abstract class Area
 		}
 
 	}
-	
+
 	/// <summary>
 	/// Blanks the selected offset
 	/// </summary>
@@ -631,21 +605,21 @@ public abstract class Area
 	/// </param>
 	internal protected void BlankOffset(long offs)
 	{
-		if (isAreaRealized == false) 
-			return; 
+		if (isAreaRealized == false)
+			return;
 
-		int nrows = height / drawer.Height; 
-		long bytesInView = nrows * bpr; 
+		int nrows = height / drawer.Height;
+		long bytesInView = nrows * bpr;
 
 		if (offs >= areaGroup.Offset && offs < areaGroup.Offset + bytesInView) {
-			int pcRow, pcByte, pcX, pcY; 
-			GetDisplayInfoByOffset(offs, out pcRow, out pcByte, out pcX, out pcY); 
-			Gdk.GC backEvenGC = drawer.GetBackgroundGC(Drawer.RowType.Even, Drawer.HighlightType.Normal); 
-			backPixmap.DrawRectangle(backEvenGC, true, x + pcX, y + pcY, drawer.Width*dpb, drawer.Height); 
-		} 
-	
-	}
-	
+			int pcRow, pcByte, pcX, pcY;
+			GetDisplayInfoByOffset(offs, out pcRow, out pcByte, out pcX, out pcY);
+			Cairo.Color backEvenGC = drawer.GetBackgroundColor(Drawer.RowType.Even, Drawer.HighlightType.Normal);
+			DrawFilledRect(backCr, backEvenGC, x + pcX, y + pcY, drawer.Width*dpb, drawer.Height);
+		}
+
+	}
+
 	///<summary>Render the cursor</summary>
 	internal protected void RenderCursor()
 	{
@@ -655,12 +629,12 @@ public abstract class Area
 		int cRow, cByte, cX, cY;
 		GetDisplayInfoByOffset(areaGroup.CursorOffset, out cRow, out cByte, out cX, out cY);
 
-		backPixmap.DrawRectangle(cursorGC, true, x + cX, y + cY + drawer.Height - 2, drawer.Width*dpb, 2);
+		DrawFilledRect(backCr, cursorColor, x + cX, y + cY + drawer.Height - 2, drawer.Width*dpb, 2);
 		if (cursorFocus) {
-			backPixmap.DrawRectangle(cursorGC, true, x + cX + cursorDigit*drawer.Width, y + cY, 1, drawer.Height - 2);
+			DrawFilledRect(backCr, cursorColor, x + cX + cursorDigit*drawer.Width, y + cY, 1, drawer.Height - 2);
 		}
 	}
-	
+
 	/// <summary>
 	/// Dispose the (server side) pixmaps used by this area.
 	/// </summary>
@@ -669,53 +643,45 @@ public abstract class Area
 		if (isAreaRealized == false)
 			return;
 
-		backPixmap.Dispose();
-		drawer.DisposePixmaps();
+		drawer.DisposeSurfaces();
 	}
 
-	
-	void BeginPaintRegion(Gdk.Region r)
-	{
-		Gdk.Window win = areaGroup.DrawingArea.GdkWindow;
 
-		win.BeginPaintRegion(r);
-	}
+	// GTK3: double-buffering is handled automatically; these are no-ops.
+	void BeginPaintRegion(object r) { }
+	void BeginPaint() { }
+	void BeginPaint(int x, int y, int w, int h) { }
+	void EndPaint() { }
 
-	void BeginPaint()
+	internal virtual void BlankBackground()
 	{
-		BeginPaint(this.x, this.y, this.width, this.height);
+		Cairo.Color backEvenGC = drawer.GetBackgroundColor(Drawer.RowType.Even, Drawer.HighlightType.Normal);
+		DrawFilledRect(backCr, backEvenGC, x, y, width, height);
 	}
 
-	void BeginPaint(int x, int y, int w, int h)
+	internal virtual void BlankEof()
 	{
-		Gdk.Window win = areaGroup.DrawingArea.GdkWindow;
-
-		win.BeginPaintRect(new Gdk.Rectangle(x, y, w, h));
+		int pcRow, pcByte, pcX, pcY;
+		GetDisplayInfoByOffset(areaGroup.Buffer.Size, out pcRow, out pcByte, out pcX, out pcY);
+		Cairo.Color backEvenGC = drawer.GetBackgroundColor(Drawer.RowType.Even, Drawer.HighlightType.Normal);
+		DrawFilledRect(backCr, backEvenGC, x + pcX, y + pcY, drawer.Width*dpb, drawer.Height);
 	}
 
-	void EndPaint()
+	/// <summary>Draw a filled rectangle using a Cairo.Color as fill color</summary>
+	protected void DrawFilledRect(Cairo.Context cr, Cairo.Color color, int rx, int ry, int rw, int rh)
 	{
-		areaGroup.DrawingArea.GdkWindow.EndPaint();
+		if (cr == null) return;
+		cr.Save();
+		cr.SetSourceRGB(color.R, color.G, color.B);
+		cr.Rectangle(rx, ry, rw, rh);
+		cr.Fill();
+		cr.Restore();
 	}
 
-	internal virtual void BlankBackground()
-	{
-		Gdk.GC backEvenGC = drawer.GetBackgroundGC(Drawer.RowType.Even, Drawer.HighlightType.Normal);
-		backPixmap.DrawRectangle(backEvenGC, true, x, y, width, height);
-	}
-	
-	internal virtual void BlankEof()
-	{
-		int pcRow, pcByte, pcX, pcY;
-		GetDisplayInfoByOffset(areaGroup.Buffer.Size, out pcRow, out pcByte, out pcX, out pcY);
-		Gdk.GC backEvenGC = drawer.GetBackgroundGC(Drawer.RowType.Even, Drawer.HighlightType.Normal);
-		backPixmap.DrawRectangle(backEvenGC, true, x + pcX, y + pcY, drawer.Width*dpb, drawer.Height);
-	}
-	
-	public virtual void ShowPopup(Gtk.UIManager uim)
+		public virtual void ShowPopup(Gtk.UIManager uim)
 	{
 		Gtk.Widget popup = uim.GetWidget("/DefaultAreaPopup");
-		(popup as Gtk.Menu).Popup();
+		(popup as Gtk.Menu).PopupAtPointer(null);
 	}
 
 }// Area
diff --git a/src/gui/areas/AreaGroup.cs b/src/gui/areas/AreaGroup.cs
index 4a27190..ecb434f 100644
--- a/src/gui/areas/AreaGroup.cs
+++ b/src/gui/areas/AreaGroup.cs
@@ -313,30 +313,22 @@ public class AreaGroup
 		
 			
 		Gtk.Application.Invoke(delegate {
-			if (drawingArea == null || drawingArea.GdkWindow == null)
+			if (drawingArea == null || !drawingArea.IsRealized)
 				return;
 
-			if (HasChanged(Changes.Offset)) {
-				Gdk.Rectangle view = drawingArea.Allocation;
-				view.X = 0;
-				view.Y = 0;
-				drawingArea.GdkWindow.BeginPaintRect(view);
-				Render(false);
-				drawingArea.GdkWindow.EndPaint();
-			}
-			else 
-				ExposeManually();
+			// In GTK3 all drawing happens inside the draw signal handler.
+			// Queue a redraw; DataViewDisplay.OnDrawn will call Render(true).
+			drawingArea.QueueDraw();
 		});
 	}
 	
 	/// <summary>
-	/// Render this group, manually handling the double buffering
+	/// GTK3: double-buffering is automatic; just queue a redraw.
 	/// </summary>
 	private void ExposeManually()
 	{
-		manualDoubleBuffer = true;
-		Render(false);
-		manualDoubleBuffer = false;
+		if (drawingArea != null)
+			drawingArea.QueueDraw();
 	}
 	
 	/// <summary>
diff --git a/src/gui/areas/AsciiArea.cs b/src/gui/areas/AsciiArea.cs
index bb4bd77..3b55bc1 100644
--- a/src/gui/areas/AsciiArea.cs
+++ b/src/gui/areas/AsciiArea.cs
@@ -21,6 +21,7 @@
 using System;
 using Gtk;
 using Gdk;
+using Cairo;
 using Bless.Gui.Drawers;
 using Bless.Plugins;
 
@@ -58,8 +59,8 @@ public class AsciiArea : Area {
 		int ry = i * drawer.Height + y;
 		long roffset = areaGroup.Offset + i * bpr + p;
 		bool odd;
-		Gdk.GC backEvenGC = drawer.GetBackgroundGC(Drawer.RowType.Even, Drawer.HighlightType.Normal);
-		Gdk.GC backOddGC = drawer.GetBackgroundGC(Drawer.RowType.Odd, Drawer.HighlightType.Normal);
+		Cairo.Color backEvenGC = drawer.GetBackgroundColor(Drawer.RowType.Even, Drawer.HighlightType.Normal);
+		Cairo.Color backOddGC = drawer.GetBackgroundColor(Drawer.RowType.Odd, Drawer.HighlightType.Normal);
 
 
 		// odd row?
@@ -67,9 +68,9 @@ public class AsciiArea : Area {
 
 		if (blank == true) {
 			if (odd)
-				backPixmap.DrawRectangle(backOddGC, true, rx, ry, width, drawer.Height);
+				DrawFilledRect(backCr, backOddGC, rx, ry, width, drawer.Height);
 			else
-				backPixmap.DrawRectangle(backEvenGC, true, rx, ry, width, drawer.Height);
+				DrawFilledRect(backCr, backEvenGC, rx, ry, width, drawer.Height);
 		}
 
 		Drawer.RowType rowType;
@@ -84,7 +85,7 @@ public class AsciiArea : Area {
 		while (true) {
 
 			if (pos >= p) { //don't draw until we reach p
-				drawer.DrawNormal(backEvenGC, backPixmap, rx, ry, areaGroup.GetCachedByte(roffset++), rowType, Drawer.ColumnType.Even);
+				drawer.DrawNormal(backCr, rx, ry, areaGroup.GetCachedByte(roffset++), rowType, Drawer.ColumnType.Even);
 				if (--n <= 0)
 					break;
 			}
@@ -101,17 +102,17 @@ public class AsciiArea : Area {
 		int ry = i * drawer.Height + y;
 		long roffset = areaGroup.Offset + i * bpr + p;
 		bool odd;
-		Gdk.GC backEvenGC = drawer.GetBackgroundGC(Drawer.RowType.Even, Drawer.HighlightType.Normal);
-		Gdk.GC backOddGC = drawer.GetBackgroundGC(Drawer.RowType.Odd, Drawer.HighlightType.Normal);
+		Cairo.Color backEvenGC = drawer.GetBackgroundColor(Drawer.RowType.Even, Drawer.HighlightType.Normal);
+		Cairo.Color backOddGC = drawer.GetBackgroundColor(Drawer.RowType.Odd, Drawer.HighlightType.Normal);
 
 		// odd row?
 		odd = (((roffset / bpr) % 2) == 1);
 
 		if (blank == true) {
 			if (odd)
-				backPixmap.DrawRectangle(backOddGC, true, rx, ry, width, drawer.Height);
+				DrawFilledRect(backCr, backOddGC, rx, ry, width, drawer.Height);
 			else
-				backPixmap.DrawRectangle(backEvenGC, true, rx, ry, width, drawer.Height);
+				DrawFilledRect(backCr, backEvenGC, rx, ry, width, drawer.Height);
 		}
 
 		Drawer.RowType rowType;
@@ -126,7 +127,7 @@ public class AsciiArea : Area {
 		while (true) {
 
 			if (pos >= p) { //don't draw until we reach p
-				drawer.DrawHighlight(backEvenGC, backPixmap, rx, ry, areaGroup.GetCachedByte(roffset++), rowType, ht);
+				drawer.DrawHighlight(backCr, rx, ry, areaGroup.GetCachedByte(roffset++), rowType, ht);
 				if (--n <= 0)
 					break;
 			}
diff --git a/src/gui/areas/GroupedArea.cs b/src/gui/areas/GroupedArea.cs
index f3933af..2bb2ce1 100644
--- a/src/gui/areas/GroupedArea.cs
+++ b/src/gui/areas/GroupedArea.cs
@@ -21,6 +21,7 @@
 using System;
 using Gtk;
 using Gdk;
+using Cairo;
 using Bless.Gui.Drawers;
 using System.Xml;
 
@@ -51,17 +52,17 @@ abstract public class GroupedArea : Area {
 		int ry = i * drawer.Height + y;
 		long roffset = areaGroup.Offset + i * bpr + p;
 		bool odd;
-		Gdk.GC backEvenGC = drawer.GetBackgroundGC(Drawer.RowType.Even, Drawer.HighlightType.Normal);
-		Gdk.GC backOddGC = drawer.GetBackgroundGC(Drawer.RowType.Odd, Drawer.HighlightType.Normal);
+		Cairo.Color backEvenGC = drawer.GetBackgroundColor(Drawer.RowType.Even, Drawer.HighlightType.Normal);
+		Cairo.Color backOddGC = drawer.GetBackgroundColor(Drawer.RowType.Odd, Drawer.HighlightType.Normal);
 
 		// odd row?
 		odd = (((roffset / bpr) % 2) == 1);
 
 		if (blank == true) {
 			if (odd)
-				backPixmap.DrawRectangle(backOddGC, true, rx, ry, width, drawer.Height);
+				DrawFilledRect(backCr, backOddGC, rx, ry, width, drawer.Height);
 			else
-				backPixmap.DrawRectangle(backEvenGC, true, rx, ry, width, drawer.Height);
+				DrawFilledRect(backCr, backEvenGC, rx, ry, width, drawer.Height);
 		}
 
 		Drawer.ColumnType colType;
@@ -82,7 +83,7 @@ abstract public class GroupedArea : Area {
 				else
 					colType = Drawer.ColumnType.Odd;
 
-				drawer.DrawNormal(backEvenGC, backPixmap, rx, ry, areaGroup.GetCachedByte(roffset++), rowType, colType);
+				drawer.DrawNormal(backCr, rx, ry, areaGroup.GetCachedByte(roffset++), rowType, colType);
 				if (--n <= 0)
 					break;
 			}
@@ -103,17 +104,17 @@ abstract public class GroupedArea : Area {
 		int ry = i * drawer.Height + y;
 		long roffset = areaGroup.Offset + i * bpr + p;
 		bool odd;
-		Gdk.GC backEvenGC = drawer.GetBackgroundGC(Drawer.RowType.Even, Drawer.HighlightType.Normal);
-		Gdk.GC backOddGC = drawer.GetBackgroundGC(Drawer.RowType.Odd, Drawer.HighlightType.Normal);
+		Cairo.Color backEvenGC = drawer.GetBackgroundColor(Drawer.RowType.Even, Drawer.HighlightType.Normal);
+		Cairo.Color backOddGC = drawer.GetBackgroundColor(Drawer.RowType.Odd, Drawer.HighlightType.Normal);
 
 		// odd row?
 		odd = (((roffset / bpr) % 2) == 1);
 
 		if (blank == true) {
 			if (odd)
-				backPixmap.DrawRectangle(backOddGC, true, rx, ry, width, drawer.Height);
+				DrawFilledRect(backCr, backOddGC, rx, ry, width, drawer.Height);
 			else
-				backPixmap.DrawRectangle(backEvenGC, true, rx, ry, width, drawer.Height);
+				DrawFilledRect(backCr, backEvenGC, rx, ry, width, drawer.Height);
 		}
 
 		Drawer.RowType rowType;
@@ -128,7 +129,7 @@ abstract public class GroupedArea : Area {
 		while (true) {
 
 			if (pos >= p) { //don't draw until we reach p
-				drawer.DrawHighlight(backEvenGC, backPixmap, rx, ry, areaGroup.GetCachedByte(roffset++), rowType, ht);
+				drawer.DrawHighlight(backCr, rx, ry, areaGroup.GetCachedByte(roffset++), rowType, ht);
 				if (--n <= 0)
 					break;
 			}
diff --git a/src/gui/areas/OffsetArea.cs b/src/gui/areas/OffsetArea.cs
index c419d07..38822da 100644
--- a/src/gui/areas/OffsetArea.cs
+++ b/src/gui/areas/OffsetArea.cs
@@ -22,6 +22,7 @@
 using System;
 using Gtk;
 using Gdk;
+using Cairo;
 using Bless.Gui.Drawers;
 using Bless.Util;
 using System.Xml;
@@ -95,17 +96,17 @@ public class OffsetArea : Area {
 		int ry = i * drawer.Height + y;
 		long roffset = areaGroup.Offset + i * bpr;
 		bool odd;
-		Gdk.GC backEvenGC = drawer.GetBackgroundGC(Drawer.RowType.Even, Drawer.HighlightType.Normal);
-		Gdk.GC backOddGC = drawer.GetBackgroundGC(Drawer.RowType.Odd, Drawer.HighlightType.Normal);
+		Cairo.Color backEvenGC = drawer.GetBackgroundColor(Drawer.RowType.Even, Drawer.HighlightType.Normal);
+		Cairo.Color backOddGC = drawer.GetBackgroundColor(Drawer.RowType.Odd, Drawer.HighlightType.Normal);
 
 		// odd row?
 		odd = (((roffset / bpr) % 2) == 1);
 
 		if (blank == true) {
 			if (odd)
-				backPixmap.DrawRectangle(backOddGC, true, x, ry, width, drawer.Height);
+				DrawFilledRect(backCr, backOddGC, x, ry, width, drawer.Height);
 			else
-				backPixmap.DrawRectangle(backEvenGC, true, x, ry, width, drawer.Height);
+				DrawFilledRect(backCr, backEvenGC, x, ry, width, drawer.Height);
 		}
 
 		Drawer.RowType rowType;
@@ -121,7 +122,7 @@ public class OffsetArea : Area {
 
 		// draw offsets
 		for (int j = 0; j < bytes; j++) {
-			drawer.DrawNormal(backEvenGC, backPixmap, rx, ry, (byte)(roffset & 0xff), rowType, Drawer.ColumnType.Even);
+			drawer.DrawNormal(backCr, rx, ry, (byte)(roffset & 0xff), rowType, Drawer.ColumnType.Even);
 			roffset = roffset >> 8;
 			rx = rx - 2 * drawer.Width;
 		}
diff --git a/src/gui/areas/SeparatorArea.cs b/src/gui/areas/SeparatorArea.cs
index 3a2c5b5..440abfc 100644
--- a/src/gui/areas/SeparatorArea.cs
+++ b/src/gui/areas/SeparatorArea.cs
@@ -22,6 +22,7 @@ using System;
 using Gtk;
 using Gdk;
 using Bless.Gui.Drawers;
+using Cairo;
 using Bless.Util;
 using Bless.Plugins;
 
@@ -44,7 +45,7 @@ public class SeparatorAreaPlugin : AreaPlugin
 ///<summary>An area that contains a vertical separator line</summary>
 public class SeparatorArea : Area
 {
-	Gdk.GC lineGC;
+	Cairo.Color lineColor;
 
 	public SeparatorArea(AreaGroup ag)
 			: base(ag)
@@ -58,9 +59,7 @@ public class SeparatorArea : Area
 		
 		drawer = new DummyDrawer(da, drawerInformation);
 
-		lineGC = new Gdk.GC(da.GdkWindow);
-
-		lineGC.RgbFgColor = drawer.Info.fgNormal[(int)Drawer.RowType.Even, (int)Drawer.ColumnType.Even].GdkColor;
+		lineColor = drawer.Info.fgNormal[(int)Drawer.RowType.Even, (int)Drawer.ColumnType.Even].ToCairo();
 		
 		base.Realize();
 	}
@@ -104,7 +103,14 @@ public class SeparatorArea : Area
 			return; 
 
 		// draw seperator 
-		backPixmap.DrawLine(lineGC, x + drawer.Width / 2, 0, x + drawer.Width / 2, drawer.Height*rfull);
+		if (backCr != null) {
+			backCr.Save();
+			backCr.SetSourceRGB(lineColor.R, lineColor.G, lineColor.B);
+			backCr.MoveTo(x + drawer.Width / 2, 0);
+			backCr.LineTo(x + drawer.Width / 2, drawer.Height * rfull);
+			backCr.Stroke();
+			backCr.Restore();
+		}
 	}
 
 	public override int CalcWidth(int n, bool force)
diff --git a/src/gui/dialogs/Alert.cs b/src/gui/dialogs/Alert.cs
index 80418b0..87cb2aa 100644
--- a/src/gui/dialogs/Alert.cs
+++ b/src/gui/dialogs/Alert.cs
@@ -27,8 +27,8 @@ namespace Bless.Gui.Dialogs {
 ///<summary>An alert dialog box as recommended in the Gnome HIG</summary>
 abstract public class Alert : Gtk.Dialog
 {
-	protected Gtk.HBox hbox;
-	protected Gtk.VBox labelBox;
+	protected Gtk.Box hbox;
+	protected Gtk.Box labelBox;
 	protected Gtk.Image image;
 	protected Gtk.Label labelPrimary;
 	protected Gtk.Label labelSecondary;
@@ -40,15 +40,14 @@ abstract public class Alert : Gtk.Dialog
 		this.Modal = true;
 		//this.TypeHint=Gdk.WindowTypeHint.Utility;
 		this.BorderWidth = 6;
-		this.HasSeparator = false;
 		this.Resizable = false;
 
-		this.VBox.Spacing = 12;
+		this.ContentArea.Spacing = 12;
 
-		hbox = new Gtk.HBox();
+		hbox = new Gtk.Box(Gtk.Orientation.Horizontal, 0);
 		hbox.Spacing = 12;
 		hbox.BorderWidth = 6;
-		this.VBox.Add(hbox);
+		this.ContentArea.Add(hbox);
 
 		// set-up image
 		image = new Gtk.Image();
@@ -71,7 +70,7 @@ abstract public class Alert : Gtk.Dialog
 		labelPrimary.Markup = "<span weight=\"bold\" size=\"larger\">" + primary + "</span>";
 		labelSecondary.Markup = "\n" + secondary;
 
-		labelBox = new VBox();
+		labelBox = new Gtk.Box(Gtk.Orientation.Vertical, 0);
 		labelBox.Add(labelPrimary);
 		labelBox.Add(labelSecondary);
 
diff --git a/src/gui/dialogs/ErrorAlert.cs b/src/gui/dialogs/ErrorAlert.cs
index c734b0d..3d9e6f7 100644
--- a/src/gui/dialogs/ErrorAlert.cs
+++ b/src/gui/dialogs/ErrorAlert.cs
@@ -30,8 +30,8 @@ public class ErrorAlert : Alert
 	public ErrorAlert(string primary, string secondary, Gtk.Window parent)
 			: base(primary, secondary, parent)
 	{
-		image.SetFromStock(Gtk.Stock.DialogError, Gtk.IconSize.Dialog);
-		this.AddButton(Gtk.Stock.Ok, ResponseType.Ok);
+		image = new Gtk.Image("dialog-error", Gtk.IconSize.Dialog);
+		this.AddButton("OK", ResponseType.Ok);
 
 		this.ShowAll();
 	}
diff --git a/src/gui/dialogs/ExportDialog.cs b/src/gui/dialogs/ExportDialog.cs
index 6b9c113..64ce5f2 100644
--- a/src/gui/dialogs/ExportDialog.cs
+++ b/src/gui/dialogs/ExportDialog.cs
@@ -38,9 +38,9 @@ public class ExportDialog : Dialog
 	DataBook dataBook;
 	Gtk.Window mainWindow;
 
-	[Gtk.Builder.Object] Gtk.VBox ExportDialogVBox;
+	[Gtk.Builder.Object] Gtk.Box ExportDialogVBox;
 	[Gtk.Builder.Object] Gtk.ComboBox ExportAsCombo;
-	[Gtk.Builder.Object] Gtk.ComboBoxEntry ExportPatternComboEntry;
+	[Gtk.Builder.Object] Gtk.ComboBox ExportPatternComboEntry;
 	[Gtk.Builder.Object] Gtk.ProgressBar ExportProgressBar;
 	[Gtk.Builder.Object] Gtk.Entry ExportFileEntry;
 	[Gtk.Builder.Object] Gtk.RadioButton WholeFileRadio;
@@ -48,7 +48,7 @@ public class ExportDialog : Dialog
 	[Gtk.Builder.Object] Gtk.RadioButton RangeRadio;
 	[Gtk.Builder.Object] Gtk.Entry RangeFromEntry;
 	[Gtk.Builder.Object] Gtk.Entry RangeToEntry;
-	[Gtk.Builder.Object] Gtk.HBox ProgressHBox;
+	[Gtk.Builder.Object] Gtk.Box ProgressHBox;
 	Gtk.Button CloseButton;
 	Gtk.Button ExportButton;
 
@@ -79,7 +79,7 @@ public class ExportDialog : Dialog
 		SetupExportPlugins();
 
 		ExportPatternComboEntry.Model = new ListStore (typeof (string));
-		ExportPatternComboEntry.TextColumn = 0;
+		ExportPatternComboEntry.EntryTextColumn = 0;
 		LoadFromPatternFile((ListStore)ExportPatternComboEntry.Model);
 
 		ProgressHBox.Visible = false;
@@ -87,11 +87,10 @@ public class ExportDialog : Dialog
 
 		this.Modal = false;
 		this.BorderWidth = 6;
-		this.HasSeparator = false;
-		CloseButton = (Gtk.Button)this.AddButton(Gtk.Stock.Close, ResponseType.Close);
+		CloseButton = (Gtk.Button)this.AddButton("window-close", ResponseType.Close);
 		ExportButton = (Gtk.Button)this.AddButton(Catalog.GetString("Export"), ResponseType.Ok);
 		this.Response += new ResponseHandler(OnDialogResponse);
-		this.VBox.Add(ExportDialogVBox);
+		this.ContentArea.Add(ExportDialogVBox);
 	}
 
 	private void SetupExportPlugins()
diff --git a/src/gui/dialogs/FileOverwriteAlert.cs b/src/gui/dialogs/FileOverwriteAlert.cs
index 8ecb6ce..fcfa2b5 100644
--- a/src/gui/dialogs/FileOverwriteAlert.cs
+++ b/src/gui/dialogs/FileOverwriteAlert.cs
@@ -33,9 +33,9 @@ public class FileOverwriteAlert : Alert
 	public FileOverwriteAlert(string primary, Gtk.Window parent)
 			: base(string.Format(msg1, primary), msg2, parent)
 	{
-		image.SetFromStock(Gtk.Stock.DialogWarning, Gtk.IconSize.Dialog);
+		image = new Gtk.Image("dialog-warning", Gtk.IconSize.Dialog);
 
-		this.AddButton(Gtk.Stock.Cancel, ResponseType.Cancel);
+		this.AddButton("Cancel", ResponseType.Cancel);
 		this.AddButton(Catalog.GetString("Replace"), ResponseType.Ok);
 
 		this.DefaultResponse = ResponseType.Cancel;
diff --git a/src/gui/dialogs/InformationAlert.cs b/src/gui/dialogs/InformationAlert.cs
index e67ecf3..fbf2ffb 100644
--- a/src/gui/dialogs/InformationAlert.cs
+++ b/src/gui/dialogs/InformationAlert.cs
@@ -30,8 +30,8 @@ public class InformationAlert : Alert
 	public InformationAlert(string primary, string secondary, Gtk.Window parent)
 			: base(primary, secondary, parent)
 	{
-		image.SetFromStock(Gtk.Stock.DialogInfo, Gtk.IconSize.Dialog);
-		this.AddButton(Gtk.Stock.Ok, ResponseType.Ok);
+		image = new Gtk.Image("dialog-information", Gtk.IconSize.Dialog);
+		this.AddButton("OK", ResponseType.Ok);
 
 		this.ShowAll();
 	}
diff --git a/src/gui/dialogs/LayoutSelectionDialog.cs b/src/gui/dialogs/LayoutSelectionDialog.cs
index f1c91e4..5ddca8a 100644
--- a/src/gui/dialogs/LayoutSelectionDialog.cs
+++ b/src/gui/dialogs/LayoutSelectionDialog.cs
@@ -77,11 +77,10 @@ public class LayoutSelectionDialog : Dialog {
 		this.DefaultHeight = 300;
 		this.Modal = false;
 		this.BorderWidth = 6;
-		this.HasSeparator = false;
-		this.AddButton(Gtk.Stock.Close, ResponseType.Close);
-		this.AddButton(Gtk.Stock.Ok, ResponseType.Ok);
+		this.AddButton("window-close", ResponseType.Close);
+		this.AddButton("OK", ResponseType.Ok);
 		this.Response += new ResponseHandler(OnDialogResponse);
-		this.VBox.Add(LayoutSelectionPaned);
+		this.ContentArea.Add(LayoutSelectionPaned);
 	}
 
 	///<summary>Populate the layout list</summary>
@@ -122,7 +121,7 @@ public class LayoutSelectionDialog : Dialog {
 	public void OnLayoutListSelectionChanged (object o, EventArgs args)
 	{
 		TreeSelection sel = (TreeSelection)o;
-		TreeModel tm;
+		ITreeModel tm;
 		TreeIter ti;
 
 		if (sel.GetSelected(out tm, out ti)) {
diff --git a/src/gui/dialogs/PreferencesDialog.cs b/src/gui/dialogs/PreferencesDialog.cs
index 5110fbe..0644753 100644
--- a/src/gui/dialogs/PreferencesDialog.cs
+++ b/src/gui/dialogs/PreferencesDialog.cs
@@ -61,10 +61,10 @@ public class PreferencesDialog : Dialog
 		this.Modal = false;
 		this.TransientFor = parent;
 		this.BorderWidth = 6;
-		this.AddButton(Gtk.Stock.Close, ResponseType.Close);
+		this.AddButton("window-close", ResponseType.Close);
 		this.Response += new ResponseHandler(OnDialogResponse);
-		this.VBox.Add(PreferencesPaned);
-		this.VBox.ShowAll();
+		this.ContentArea.Add(PreferencesPaned);
+		this.ContentArea.ShowAll();
 	}
 	
 	void LoadPreferencesTreeView()
@@ -93,7 +93,7 @@ public class PreferencesDialog : Dialog
 	void OnPreferencesTreeViewSelectionChanged (object o, EventArgs args)
 	{
 		TreeSelection sel = (TreeSelection)o;
-		TreeModel tm;
+		ITreeModel tm;
 		TreeIter ti;
 
 		if (sel.GetSelected(out tm, out ti)) {
@@ -130,7 +130,7 @@ public class PreferencesDialog : Dialog
 
 class GeneralPreferences : IPluginPreferences
 {
-	[Gtk.Builder.Object] Gtk.VBox GeneralPreferencesVBox;
+	[Gtk.Builder.Object] Gtk.Box GeneralPreferencesVBox;
 
 	[Gtk.Builder.Object] Entry LayoutFileEntry;
 	[Gtk.Builder.Object] CheckButton UseCurrentLayoutCheckButton;
@@ -290,7 +290,7 @@ class SessionPreferences : IPluginPreferences
 {
 	Preferences prefs;
 
-	[Gtk.Builder.Object] Gtk.VBox SessionPreferencesVBox;
+	[Gtk.Builder.Object] Gtk.Box SessionPreferencesVBox;
 	
 	[Gtk.Builder.Object] CheckButton LoadPreviousSessionCheckButton;
 	[Gtk.Builder.Object] CheckButton AskBeforeLoadingSessionCheckButton;
@@ -408,7 +408,7 @@ class UndoPreferences : IPluginPreferences
 {
 	Preferences prefs;
 
-	[Gtk.Builder.Object] Gtk.VBox UndoPreferencesVBox;
+	[Gtk.Builder.Object] Gtk.Box UndoPreferencesVBox;
 	
 	[Gtk.Builder.Object] RadioButton UndoLimitedRadioButton;
 	[Gtk.Builder.Object] RadioButton UndoUnlimitedRadioButton;
diff --git a/src/gui/dialogs/ProgressDialog.cs b/src/gui/dialogs/ProgressDialog.cs
index a8ef334..cb05241 100644
--- a/src/gui/dialogs/ProgressDialog.cs
+++ b/src/gui/dialogs/ProgressDialog.cs
@@ -30,7 +30,7 @@ namespace Bless.Gui.Dialogs {
 ///</summary>
 public class ProgressDialog : Gtk.Window {
 
-	[Gtk.Builder.Object] Gtk.VBox ProgressVBox;
+	[Gtk.Builder.Object] Gtk.Box ProgressVBox;
 	[Gtk.Builder.Object] Gtk.ProgressBar ProgressBar;
 	[Gtk.Builder.Object] Gtk.Label MessageLabel;
 	[Gtk.Builder.Object] Gtk.Label DetailsLabel;
diff --git a/src/gui/dialogs/RevertConfirmationAlert.cs b/src/gui/dialogs/RevertConfirmationAlert.cs
index 1eaef05..d234d5e 100644
--- a/src/gui/dialogs/RevertConfirmationAlert.cs
+++ b/src/gui/dialogs/RevertConfirmationAlert.cs
@@ -32,10 +32,10 @@ public class RevertConfirmationAlert : Alert
 			: base(string.Format(Catalog.GetString("Revert file '{0}' to its last saved state?"), primary),
 				   Catalog.GetString("If you revert, all changes made since the last save will be lost."), parent)
 	{
-		image.SetFromStock(Gtk.Stock.DialogWarning, Gtk.IconSize.Dialog);
+		image = new Gtk.Image("dialog-warning", Gtk.IconSize.Dialog);
 
-		this.AddButton(Gtk.Stock.Cancel, ResponseType.Cancel);
-		this.AddButton(Gtk.Stock.RevertToSaved, ResponseType.Ok);
+		this.AddButton("Cancel", ResponseType.Cancel);
+		this.AddButton("document-revert", ResponseType.Ok);
 
 		this.ShowAll();
 	}
diff --git a/src/gui/dialogs/SaveConfirmationAlert.cs b/src/gui/dialogs/SaveConfirmationAlert.cs
index f544adf..84752f9 100644
--- a/src/gui/dialogs/SaveConfirmationAlert.cs
+++ b/src/gui/dialogs/SaveConfirmationAlert.cs
@@ -31,11 +31,11 @@ public class SaveConfirmationAlert : Alert
 			: base(string.Format(Catalog.GetString("Save changes to file '{0}' before closing?"), primary),
 				   Catalog.GetString("If you don't save, all changes made since the last save will be lost."), parent)
 	{
-		image.SetFromStock(Gtk.Stock.DialogWarning, Gtk.IconSize.Dialog);
+		image = new Gtk.Image("dialog-warning", Gtk.IconSize.Dialog);
 
 		this.AddButton(Catalog.GetString("Close without Saving"), ResponseType.No);
-		this.AddButton(Gtk.Stock.Cancel, ResponseType.Cancel);
-		this.AddButton(Gtk.Stock.Save, ResponseType.Ok);
+		this.AddButton("Cancel", ResponseType.Cancel);
+		this.AddButton("document-save", ResponseType.Ok);
 
 		this.DefaultResponse = ResponseType.Cancel;
 
diff --git a/src/gui/dialogs/SaveConfirmationMultiAlert.cs b/src/gui/dialogs/SaveConfirmationMultiAlert.cs
index 1b1f97b..83bd364 100644
--- a/src/gui/dialogs/SaveConfirmationMultiAlert.cs
+++ b/src/gui/dialogs/SaveConfirmationMultiAlert.cs
@@ -48,22 +48,22 @@ public class SaveConfirmationMultiAlert : Alert
 	{
 		fileList = list;
 
-		image.SetFromStock(Gtk.Stock.DialogWarning, Gtk.IconSize.Dialog);
+		image = new Gtk.Image("dialog-warning", Gtk.IconSize.Dialog);
 
 		Label label = new Label(Catalog.GetString("\nSelect the files you want to save:\n"));
 		label.Xalign = 0.0f;
 
-		VBox vb = new VBox();
-		vb.PackStart(label);
+		Gtk.Box vb = new Gtk.Box(Gtk.Orientation.Vertical, 0);
+		vb.PackStart(label, false, false, 0);
 		treeView = CreateView(list);
-		vb.PackStart(treeView);
+		vb.PackStart(treeView, true, true, 0);
 
-		labelBox.PackStart(vb);
+		labelBox.PackStart(vb, true, true, 0);
 		labelBox.ReorderChild(vb, 1);
 
 		this.AddButton(Catalog.GetString("Close without Saving"), ResponseType.No);
-		this.AddButton(Gtk.Stock.Cancel, ResponseType.Cancel);
-		this.AddButton(Gtk.Stock.Save, ResponseType.Ok);
+		this.AddButton("Cancel", ResponseType.Cancel);
+		this.AddButton("document-save", ResponseType.Ok);
 
 		this.DefaultResponse = ResponseType.Cancel;
 
diff --git a/src/gui/dialogs/WarningAlert.cs b/src/gui/dialogs/WarningAlert.cs
index adb9221..d1901e6 100644
--- a/src/gui/dialogs/WarningAlert.cs
+++ b/src/gui/dialogs/WarningAlert.cs
@@ -30,10 +30,10 @@ public class WarningAlert : Alert
 	public WarningAlert(string primary, string secondary, Gtk.Window parent)
 			: base(primary, secondary, parent)
 	{
-		image.SetFromStock(Gtk.Stock.DialogWarning, Gtk.IconSize.Dialog);
+		image = new Gtk.Image("dialog-warning", Gtk.IconSize.Dialog);
 
-		this.AddButton(Gtk.Stock.Cancel, ResponseType.Cancel);
-		this.AddButton(Gtk.Stock.Ok, ResponseType.Ok);
+		this.AddButton("Cancel", ResponseType.Cancel);
+		this.AddButton("OK", ResponseType.Ok);
 
 		this.ShowAll();
 	}
diff --git a/src/gui/drawers/AsciiDrawer.cs b/src/gui/drawers/AsciiDrawer.cs
index 0cc2800..d47de44 100644
--- a/src/gui/drawers/AsciiDrawer.cs
+++ b/src/gui/drawers/AsciiDrawer.cs
@@ -19,6 +19,8 @@
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+using Cairo;
+
 namespace Bless.Gui.Drawers {
 
 ///<summary>Draws the ascii representation of a byte</summary>
@@ -32,34 +34,30 @@ public class AsciiDrawer : Drawer {
 	{
 	}
 
-	protected override void Draw(Gdk.GC gc, Gdk.Drawable dest, int x, int y, byte b, Gdk.Pixmap pix)
+	protected override void Draw(Cairo.Context cr, int x, int y, byte b, Cairo.ImageSurface surf)
 	{
-		dest.DrawDrawable(gc, pix, b*width, 0, x, y, width, height);
+		cr.Save();
+		cr.SetSourceSurface(surf, x - b * width, y);
+		cr.Rectangle(x, y, width, height);
+		cr.Clip();
+		cr.Paint();
+		cr.Restore();
 	}
 
-	protected override Gdk.Pixmap Create(Gdk.Color fg, Gdk.Color bg)
+	protected override Cairo.ImageSurface Create(Drawer.Color fg, Drawer.Color bg)
 	{
-		Gdk.Window win = widget.GdkWindow;
-
-		Gdk.GC gc = new Gdk.GC(win);
-		Gdk.Pixmap pix = new Gdk.Pixmap(win, 256*width, height, -1);
-
-		// draw the background
-		gc.RgbFgColor = bg;
-		pix.DrawRectangle(gc, true, 0, 0, 256*width, height);
-
-		// render the bytes
-		string s = AsciiDrawer.AsciiTable;
-
-		//System.Console.WriteLine(s);
-
-		pangoLayout.SetText(s);
-
-
-		gc.RgbFgColor = fg;
-		pix.DrawLayout(gc, 0, 0, pangoLayout);
-
-		return pix;
+		Cairo.ImageSurface surf = new Cairo.ImageSurface(Cairo.Format.RGB24, 256 * width, height);
+		using (Cairo.Context cr = new Cairo.Context(surf)) {
+			// draw the background
+			cr.SetSourceRGB(bg.RgbaColor.Red, bg.RgbaColor.Green, bg.RgbaColor.Blue);
+			cr.Paint();
+
+			// render the bytes
+			cr.SetSourceRGB(fg.RgbaColor.Red, fg.RgbaColor.Green, fg.RgbaColor.Blue);
+			pangoLayout.SetText(AsciiTable);
+			Pango.CairoHelper.ShowLayout(cr, pangoLayout);
+		}
+		return surf;
 	}
 
 }
diff --git a/src/gui/drawers/BinaryDrawer.cs b/src/gui/drawers/BinaryDrawer.cs
index b9a2118..6d5e3cb 100644
--- a/src/gui/drawers/BinaryDrawer.cs
+++ b/src/gui/drawers/BinaryDrawer.cs
@@ -19,6 +19,8 @@
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+using Cairo;
+
 namespace Bless.Gui.Drawers {
 
 ///<summary>Draws the binary representation of a byte</summary>
@@ -29,45 +31,38 @@ public class BinaryDrawer : Drawer {
 	{
 	}
 
-
-	protected override void Draw(Gdk.GC gc, Gdk.Drawable dest, int x, int y, byte b, Gdk.Pixmap pix)
+	protected override void Draw(Cairo.Context cr, int x, int y, byte b, Cairo.ImageSurface surf)
 	{
-		// draw from the end backwards
-		x += 6 * width;
+		// draw from the end backwards, 2 bits at a time
+		int xpos = x + 6 * width;
+		byte bval = b;
 		for (int i = 0; i < 4; i++) {
-			byte k = (byte)(b & 3);
-			dest.DrawDrawable(gc, pix, k*2*width, 0, x, y, 2*width, height);
-			x -= 2 * width;
-			b = (byte)(b >> 2);
+			byte k = (byte)(bval & 3);
+			cr.Save();
+			cr.SetSourceSurface(surf, xpos - k * 2 * width, y);
+			cr.Rectangle(xpos, y, 2 * width, height);
+			cr.Clip();
+			cr.Paint();
+			cr.Restore();
+			xpos -= 2 * width;
+			bval = (byte)(bval >> 2);
 		}
 	}
 
-	protected override Gdk.Pixmap Create(Gdk.Color fg, Gdk.Color bg)
+	protected override Cairo.ImageSurface Create(Drawer.Color fg, Drawer.Color bg)
 	{
-		Gdk.Window win = widget.GdkWindow;
-
-		Gdk.GC gc = new Gdk.GC(win);
-		Gdk.Pixmap pix = new Gdk.Pixmap(win, 4*2*width, height, -1);
-
-		// draw the background
-		gc.RgbFgColor = bg;
-		pix.DrawRectangle(gc, true, 0, 0, 4*2*width, height);
-
-		// render the bytes
-		string s = "00011011";
-
-
-		//Console.WriteLine(s);
-
-		pangoLayout.SetText(s);
-
-
-		gc.RgbFgColor = fg;
-		pix.DrawLayout(gc, 0, 0, pangoLayout);
-
-		return pix;
+		// Surface holds the 4 two-bit patterns: 00, 01, 10, 11
+		Cairo.ImageSurface surf = new Cairo.ImageSurface(Cairo.Format.RGB24, 4 * 2 * width, height);
+		using (Cairo.Context cr = new Cairo.Context(surf)) {
+			cr.SetSourceRGB(bg.RgbaColor.Red, bg.RgbaColor.Green, bg.RgbaColor.Blue);
+			cr.Paint();
+			cr.SetSourceRGB(fg.RgbaColor.Red, fg.RgbaColor.Green, fg.RgbaColor.Blue);
+			pangoLayout.SetText("00011011");
+			cr.MoveTo(0, 0);
+			Pango.CairoHelper.ShowLayout(cr, pangoLayout);
+		}
+		return surf;
 	}
-
 }
 
-} //namespace
\ No newline at end of file
+} //namespace
diff --git a/src/gui/drawers/DecimalDrawer.cs b/src/gui/drawers/DecimalDrawer.cs
index 1e07681..725344e 100644
--- a/src/gui/drawers/DecimalDrawer.cs
+++ b/src/gui/drawers/DecimalDrawer.cs
@@ -18,6 +18,9 @@
  *   along with Bless; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
+
+using Cairo;
+
 namespace Bless.Gui.Drawers {
 
 ///<summary>Draws the decimal representation of a byte</summary>
@@ -30,38 +33,29 @@ public class DecimalDrawer : Drawer {
 	{
 	}
 
-	protected override void Draw(Gdk.GC gc, Gdk.Drawable dest, int x, int y, byte b, Gdk.Pixmap pix)
+	protected override void Draw(Cairo.Context cr, int x, int y, byte b, Cairo.ImageSurface surf)
 	{
-		dest.DrawDrawable(gc, pix, b*3*width, 0, x, y, 3*width, height);
+		cr.Save();
+		cr.SetSourceSurface(surf, x - b * 3 * width, y);
+		cr.Rectangle(x, y, 3 * width, height);
+		cr.Clip();
+		cr.Paint();
+		cr.Restore();
 	}
 
-	protected override Gdk.Pixmap Create(Gdk.Color fg, Gdk.Color bg)
+	protected override Cairo.ImageSurface Create(Drawer.Color fg, Drawer.Color bg)
 	{
-		Gdk.Window win = widget.GdkWindow;
-
-		Gdk.GC gc = new Gdk.GC(win);
-		Gdk.Pixmap pix = new Gdk.Pixmap(win, 256*3*width, height, -1);
-
-		// draw the background
-		gc.RgbFgColor = bg;
-		pix.DrawRectangle(gc, true, 0, 0, 256*3*width, height);
-
-		// render the bytes
-		string s = DecimalDrawer.DecimalTable;
-
-		//System.Console.WriteLine(s);
-
-		pangoLayout.SetText(s);
-
-
-		gc.RgbFgColor = fg;
-		pix.DrawLayout(gc, 0, 0, pangoLayout);
-
-		return pix;
+		Cairo.ImageSurface surf = new Cairo.ImageSurface(Cairo.Format.RGB24, 256 * 3 * width, height);
+		using (Cairo.Context cr = new Cairo.Context(surf)) {
+			cr.SetSourceRGB(bg.RgbaColor.Red, bg.RgbaColor.Green, bg.RgbaColor.Blue);
+			cr.Paint();
+			cr.SetSourceRGB(fg.RgbaColor.Red, fg.RgbaColor.Green, fg.RgbaColor.Blue);
+			pangoLayout.SetText(DecimalTable);
+			cr.MoveTo(0, 0);
+			Pango.CairoHelper.ShowLayout(cr, pangoLayout);
+		}
+		return surf;
 	}
-
-
-
 }
 
-} //namespace
\ No newline at end of file
+} //namespace
diff --git a/src/gui/drawers/Drawer.cs b/src/gui/drawers/Drawer.cs
index 21a1124..b7b8360 100644
--- a/src/gui/drawers/Drawer.cs
+++ b/src/gui/drawers/Drawer.cs
@@ -24,19 +24,30 @@ using System.Collections.Specialized;
 using Gtk;
 using Gdk;
 using Pango;
+using Cairo;
 
 namespace Bless.Gui.Drawers {
 
-///<summary>Fast font drawing class</summary>
+///<summary>Fast font drawing class using Cairo surfaces</summary>
 public abstract class Drawer {
 
 	public class Color {
-		public Color(Gdk.Color color)
+		public Color(Gdk.RGBA color)
 		{
-			this.GdkColor = color;
+			this.RgbaColor = color;
 		}
 
-		public Gdk.Color GdkColor;
+		public Color(double r, double g, double b)
+		{
+			RgbaColor = new Gdk.RGBA { Red = r, Green = g, Blue = b, Alpha = 1.0 };
+		}
+
+		public Gdk.RGBA RgbaColor;
+
+		public Cairo.Color ToCairo()
+		{
+			return new Cairo.Color(RgbaColor.Red, RgbaColor.Green, RgbaColor.Blue, RgbaColor.Alpha);
+		}
 	}
 
 	public class Information {
@@ -63,24 +74,24 @@ public abstract class Drawer {
 			bgHighlight = new Drawer.Color[2, (int)HighlightType.Sentinel];
 
 			for (int i = 0; i < 2; i++) {
-				fgNormal[0, i] = new Drawer.Color(Gdk.Color.Zero);
-				fgNormal[1, i] = new Drawer.Color(Gdk.Color.Zero);
-				bgNormal[0, i] = new Drawer.Color(Gdk.Color.Zero);
-				bgNormal[1, i] = new Drawer.Color(Gdk.Color.Zero);
+				fgNormal[0, i] = new Drawer.Color(0, 0, 0);
+				fgNormal[1, i] = new Drawer.Color(0, 0, 0);
+				bgNormal[0, i] = new Drawer.Color(1, 1, 1);
+				bgNormal[1, i] = new Drawer.Color(1, 1, 1);
 			}
 
 			// initialize default colors
-			Gdk.Color.Parse("black", ref fgNormal[(int)RowType.Even, (int)ColumnType.Even].GdkColor);
-			Gdk.Color.Parse("white", ref bgNormal[(int)RowType.Even, (int)ColumnType.Even].GdkColor);
+			fgNormal[(int)RowType.Even, (int)ColumnType.Even] = new Drawer.Color(0, 0, 0);       // black
+			bgNormal[(int)RowType.Even, (int)ColumnType.Even] = new Drawer.Color(1, 1, 1);       // white
 
-			Gdk.Color.Parse("blue", ref fgNormal[(int)RowType.Even, (int)ColumnType.Odd].GdkColor);
-			Gdk.Color.Parse("white", ref bgNormal[(int)RowType.Even, (int)ColumnType.Odd].GdkColor);
+			fgNormal[(int)RowType.Even, (int)ColumnType.Odd]  = new Drawer.Color(0, 0, 1);       // blue
+			bgNormal[(int)RowType.Even, (int)ColumnType.Odd]  = new Drawer.Color(1, 1, 1);       // white
 
-			Gdk.Color.Parse("black", ref fgNormal[(int)RowType.Odd, (int)ColumnType.Even].GdkColor);
-			Gdk.Color.Parse("white", ref bgNormal[(int)RowType.Odd, (int)ColumnType.Even].GdkColor);
+			fgNormal[(int)RowType.Odd, (int)ColumnType.Even]  = new Drawer.Color(0, 0, 0);       // black
+			bgNormal[(int)RowType.Odd, (int)ColumnType.Even]  = new Drawer.Color(1, 1, 1);       // white
 
-			Gdk.Color.Parse("blue", ref fgNormal[(int)RowType.Odd, (int)ColumnType.Odd].GdkColor);
-			Gdk.Color.Parse("white", ref bgNormal[(int)RowType.Odd, (int)ColumnType.Odd].GdkColor);
+			fgNormal[(int)RowType.Odd, (int)ColumnType.Odd]   = new Drawer.Color(0, 0, 1);       // blue
+			bgNormal[(int)RowType.Odd, (int)ColumnType.Odd]   = new Drawer.Color(1, 1, 1);       // white
 
 			// leave unspecified...
 			// if not specified by user they will
@@ -96,91 +107,93 @@ public abstract class Drawer {
 			Uppercase = false;
 		}
 
-		// setup unspecified hightlight colors using theme default colors
+		// setup unspecified highlight colors using theme default colors
 		public void SetupHighlight(Gtk.Widget widget)
 		{
-			Gdk.Color selFg;
-			Gdk.Color selBg;
-			Gdk.Color patMatchFg;
-			Gdk.Color patMatchBg;
+			Gdk.RGBA selFg, selBg, patMatchFg, patMatchBg;
+
+			// Query theme-defined named colors via Gtk.StyleContext.LookupColor().
+			// Standard GTK themes (Adwaita, Clearlooks, Arc, etc.) all define
+			// "theme_selected_bg_color" and "theme_selected_fg_color".
+			// This API is available and non-deprecated in all GTK 3.x / GtkSharp 3.x.
+			var tempView = new Gtk.TextView();
+			var ctx = tempView.StyleContext;
+
+			if (!ctx.LookupColor("theme_selected_fg_color", out selFg))
+				selFg = new Gdk.RGBA { Red = 1.0, Green = 1.0, Blue = 1.0, Alpha = 1.0 };
+
+			if (!ctx.LookupColor("theme_selected_bg_color", out selBg))
+				selBg = new Gdk.RGBA { Red = 0.26, Green = 0.56, Blue = 0.85, Alpha = 1.0 };
+
+			tempView.Destroy();
 
-			selFg = widget.Style.TextColors[(int)StateType.Selected];
-			selBg = widget.Style.BaseColors[(int)StateType.Selected];
 			patMatchBg = MakeColorLighter(selBg, 0.6);
 			patMatchFg = MakeColorDarker(selFg, 0.4);
 
 			// Selection
 			if (fgHighlight[(int)RowType.Even, (int)HighlightType.Selection] == null)
 				fgHighlight[(int)RowType.Even, (int)HighlightType.Selection] = new Drawer.Color(selFg);
-
 			if (bgHighlight[(int)RowType.Even, (int)HighlightType.Selection] == null)
 				bgHighlight[(int)RowType.Even, (int)HighlightType.Selection] = new Drawer.Color(selBg);
-
 			if (fgHighlight[(int)RowType.Odd, (int)HighlightType.Selection] == null)
 				fgHighlight[(int)RowType.Odd, (int)HighlightType.Selection] = new Drawer.Color(selFg);
-
 			if (bgHighlight[(int)RowType.Odd, (int)HighlightType.Selection] == null)
 				bgHighlight[(int)RowType.Odd, (int)HighlightType.Selection] = new Drawer.Color(selBg);
 
 			// Secondary selection
 			if (fgHighlight[(int)RowType.Even, (int)HighlightType.PatternMatch] == null)
 				fgHighlight[(int)RowType.Even, (int)HighlightType.PatternMatch] = new Drawer.Color(patMatchFg);
-
 			if (bgHighlight[(int)RowType.Even, (int)HighlightType.PatternMatch] == null)
 				bgHighlight[(int)RowType.Even, (int)HighlightType.PatternMatch] = new Drawer.Color(patMatchBg);
-
 			if (fgHighlight[(int)RowType.Odd, (int)HighlightType.PatternMatch] == null)
 				fgHighlight[(int)RowType.Odd, (int)HighlightType.PatternMatch] = new Drawer.Color(patMatchFg);
-
 			if (bgHighlight[(int)RowType.Odd, (int)HighlightType.PatternMatch] == null)
 				bgHighlight[(int)RowType.Odd, (int)HighlightType.PatternMatch] = new Drawer.Color(patMatchBg);
 		}
 
+
 		// Make a color lighter while keeping its hue
-		Gdk.Color MakeColorLighter(Gdk.Color col, double factor)
+		Gdk.RGBA MakeColorLighter(Gdk.RGBA col, double factor)
 		{
-			Gdk.Color light = new Gdk.Color();
-
-			light.Red = (ushort)(col.Red + (ushort.MaxValue - col.Red) * factor);
-			light.Blue = (ushort)(col.Blue + (ushort.MaxValue - col.Blue) * factor);
-			light.Green = (ushort)(col.Green + (ushort.MaxValue - col.Green) * factor);
-			return light;
+			return new Gdk.RGBA {
+				Red   = col.Red   + (1.0 - col.Red)   * factor,
+				Green = col.Green + (1.0 - col.Green) * factor,
+				Blue  = col.Blue  + (1.0 - col.Blue)  * factor,
+				Alpha = col.Alpha
+			};
 		}
 
 		// Make a color darker while keeping its hue
-		Gdk.Color MakeColorDarker(Gdk.Color col, double factor)
+		Gdk.RGBA MakeColorDarker(Gdk.RGBA col, double factor)
 		{
-			Gdk.Color dark = new Gdk.Color();
-
-			dark.Red = (ushort)(col.Red * factor);
-			dark.Blue = (ushort)(col.Blue * factor);
-			dark.Green = (ushort)(col.Green * factor);
-			return dark;
+			return new Gdk.RGBA {
+				Red   = col.Red   * factor,
+				Green = col.Green * factor,
+				Blue  = col.Blue  * factor,
+				Alpha = col.Alpha
+			};
 		}
+
 	}
 	
 	// the order of this enumeration denotes the drawing priority of each highlight type
-	// For example if a Bookmark and PatternMatch highlight are to be drawn on the same offset
-	// the PatternMatch type will be drawn. In the same manner the Selection highlight
-	// is always drawn, whereas the Normal highlight is always drawn over.
 	public enum HighlightType { Normal, Bookmark, PatternMatch, Selection, Sentinel }
 	public enum RowType { Even, Odd }
 	public enum ColumnType { Even, Odd }
 
-	// the widget the font will finally
-	// be printed on (used for info only)
+	// the widget the font will finally be printed on
 	protected Gtk.Widget widget;
 	protected Pango.FontDescription fontDescription;
 	protected Information info;
 
-	protected Gdk.Pixmap[,] pixmapsNormal;
-	protected Gdk.Pixmap[,] pixmapsHighlight;
-	protected StringCollection pixmapIds;
+	protected Cairo.ImageSurface[,] surfacesNormal;
+	protected Cairo.ImageSurface[,] surfacesHighlight;
+	protected StringCollection surfaceIds;
 
 	// pango layout used for rendering text
 	protected Pango.Layout pangoLayout;
 
-	protected Gdk.GC[,] backGC;
+	protected Cairo.Color[,] backColor;
 	protected int width;
 	protected int height;
 
@@ -189,7 +202,7 @@ public abstract class Drawer {
 	{
 		widget = wid;
 		info = inf;
-		pixmapIds = new StringCollection();
+		surfaceIds = new StringCollection();
 		// make sure highlight colors are set
 		info.SetupHighlight(wid);
 
@@ -207,16 +220,16 @@ public abstract class Drawer {
 		pangoLayout.GetPixelSize(out width, out height);
 		pangoLayout.SetText("");
 
-		// create the font pixmaps
-		InitializePixmaps();
+		// create the font surfaces
+		InitializeSurfaces();
 
-		InitializeBackgroundGCs();
+		InitializeBackgroundColors();
 	}
 
-	void InitializePixmaps()
+	void InitializeSurfaces()
 	{
-		pixmapsNormal = new Gdk.Pixmap[2,2];
-		pixmapsHighlight = new Gdk.Pixmap[2,(int)HighlightType.Sentinel];
+		surfacesNormal    = new Cairo.ImageSurface[2, 2];
+		surfacesHighlight = new Cairo.ImageSurface[2, (int)HighlightType.Sentinel];
 
 		Drawer.Color colorFg;
 		Drawer.Color colorBg;
@@ -224,126 +237,122 @@ public abstract class Drawer {
 		//even rows
 		colorFg = info.fgNormal[(int)RowType.Even, (int)ColumnType.Even];
 		colorBg = info.bgNormal[(int)RowType.Even, (int)ColumnType.Even];
-		pixmapsNormal[(int)RowType.Even, (int)ColumnType.Even] = CreateWrapper(colorFg, colorBg);
+		surfacesNormal[(int)RowType.Even, (int)ColumnType.Even] = CreateWrapper(colorFg, colorBg);
 
 		colorFg = info.fgNormal[(int)RowType.Even, (int)ColumnType.Odd];
 		colorBg = info.bgNormal[(int)RowType.Even, (int)ColumnType.Odd];
-		pixmapsNormal[(int)RowType.Even, (int)ColumnType.Odd] = CreateWrapper(colorFg, colorBg);
+		surfacesNormal[(int)RowType.Even, (int)ColumnType.Odd] = CreateWrapper(colorFg, colorBg);
 
 		colorFg = info.fgHighlight[(int)RowType.Even, (int)HighlightType.Selection];
 		colorBg = info.bgHighlight[(int)RowType.Even, (int)HighlightType.Selection];
-		pixmapsHighlight[(int)RowType.Even, (int)HighlightType.Selection] = CreateWrapper(colorFg, colorBg);
+		surfacesHighlight[(int)RowType.Even, (int)HighlightType.Selection] = CreateWrapper(colorFg, colorBg);
 
 		colorFg = info.fgHighlight[(int)RowType.Even, (int)HighlightType.PatternMatch];
 		colorBg = info.bgHighlight[(int)RowType.Even, (int)HighlightType.PatternMatch];
-		pixmapsHighlight[(int)RowType.Even, (int)HighlightType.PatternMatch] = CreateWrapper(colorFg, colorBg);
-
+		surfacesHighlight[(int)RowType.Even, (int)HighlightType.PatternMatch] = CreateWrapper(colorFg, colorBg);
 
 		//odd rows
 		colorFg = info.fgNormal[(int)RowType.Odd, (int)ColumnType.Even];
 		colorBg = info.bgNormal[(int)RowType.Odd, (int)ColumnType.Even];
-		pixmapsNormal[(int)RowType.Odd, (int)ColumnType.Even] = CreateWrapper(colorFg, colorBg);
+		surfacesNormal[(int)RowType.Odd, (int)ColumnType.Even] = CreateWrapper(colorFg, colorBg);
 
 		colorFg = info.fgNormal[(int)RowType.Odd, (int)ColumnType.Odd];
 		colorBg = info.bgNormal[(int)RowType.Odd, (int)ColumnType.Odd];
-		pixmapsNormal[(int)RowType.Odd, (int)ColumnType.Odd] = CreateWrapper(colorFg, colorBg);
+		surfacesNormal[(int)RowType.Odd, (int)ColumnType.Odd] = CreateWrapper(colorFg, colorBg);
 
 		colorFg = info.fgHighlight[(int)RowType.Odd, (int)HighlightType.Selection];
 		colorBg = info.bgHighlight[(int)RowType.Odd, (int)HighlightType.Selection];
-		pixmapsHighlight[(int)RowType.Odd, (int)HighlightType.Selection] = CreateWrapper(colorFg, colorBg);
+		surfacesHighlight[(int)RowType.Odd, (int)HighlightType.Selection] = CreateWrapper(colorFg, colorBg);
 
 		colorFg = info.fgHighlight[(int)RowType.Odd, (int)HighlightType.PatternMatch];
 		colorBg = info.bgHighlight[(int)RowType.Odd, (int)HighlightType.PatternMatch];
-		pixmapsHighlight[(int)RowType.Odd, (int)HighlightType.PatternMatch] = CreateWrapper(colorFg, colorBg);
+		surfacesHighlight[(int)RowType.Odd, (int)HighlightType.PatternMatch] = CreateWrapper(colorFg, colorBg);
 	}
 
-	void InitializeBackgroundGCs()
+	void InitializeBackgroundColors()
 	{
-		// initialize background GCs
-		backGC = new Gdk.GC[2, (int)Drawer.HighlightType.Sentinel];
-
-		for (int i = 0; i < 2; i++)
-			for (int j = 0; j < (int)Drawer.HighlightType.Sentinel; j++)
-				backGC[i,j] = new Gdk.GC(widget.GdkWindow);
+		backColor = new Cairo.Color[2, (int)Drawer.HighlightType.Sentinel];
 
 		Drawer.Color col;
 
 		// normal
 		col = info.bgNormal[(int)RowType.Even, (int)ColumnType.Even];
-		backGC[(int)RowType.Even, (int)HighlightType.Normal].RgbFgColor = col.GdkColor;
+		backColor[(int)RowType.Even, (int)HighlightType.Normal] = col.ToCairo();
 
 		col = info.bgNormal[(int)RowType.Odd, (int)ColumnType.Even];
-		backGC[(int)RowType.Odd, (int)HighlightType.Normal].RgbFgColor = col.GdkColor;
+		backColor[(int)RowType.Odd, (int)HighlightType.Normal] = col.ToCairo();
 
 		// selection
 		col = info.bgHighlight[(int)RowType.Even, (int)HighlightType.Selection];
-		backGC[(int)RowType.Even, (int)HighlightType.Selection].RgbFgColor = col.GdkColor;
+		backColor[(int)RowType.Even, (int)HighlightType.Selection] = col.ToCairo();
 
 		col = info.bgHighlight[(int)RowType.Odd, (int)HighlightType.Selection];
-		backGC[(int)RowType.Odd, (int)HighlightType.Selection].RgbFgColor = col.GdkColor;
+		backColor[(int)RowType.Odd, (int)HighlightType.Selection] = col.ToCairo();
 
 		// secondary selection
 		col = info.bgHighlight[(int)RowType.Even, (int)HighlightType.PatternMatch];
-		backGC[(int)RowType.Even, (int)HighlightType.PatternMatch].RgbFgColor = col.GdkColor;
+		backColor[(int)RowType.Even, (int)HighlightType.PatternMatch] = col.ToCairo();
 
 		col = info.bgHighlight[(int)RowType.Odd, (int)HighlightType.PatternMatch];
-		backGC[(int)RowType.Odd, (int)HighlightType.PatternMatch].RgbFgColor = col.GdkColor;
+		backColor[(int)RowType.Odd, (int)HighlightType.PatternMatch] = col.ToCairo();
 	}
 
 	///<summary>
-	/// Wrapper around create to avoid creating pixmaps we already have
+	/// Wrapper around Create to avoid creating surfaces we already have
 	///</summary>
-	private Gdk.Pixmap CreateWrapper(Drawer.Color fg, Drawer.Color bg)
+	private Cairo.ImageSurface CreateWrapper(Drawer.Color fg, Drawer.Color bg)
 	{
-		string id = PixmapManager.Instance.GetPixmapId(this.GetType(), info, fg.GdkColor, bg.GdkColor);
-
-		Gdk.Pixmap pix = PixmapManager.Instance.GetPixmap(id);
-		if (pix == null) {
-			pix = Create(fg.GdkColor, bg.GdkColor); // can be null for DummyDrawer
-			if (pix != null) {
-				PixmapManager.Instance.AddPixmap(id, pix);
-				PixmapManager.Instance.ReferencePixmap(id);
-				pixmapIds.Add(id);
+		if (fg == null || bg == null) return null;
+		string id = SurfaceManager.Instance.GetSurfaceId(this.GetType(), info, fg, bg);
+
+		Cairo.ImageSurface surf = SurfaceManager.Instance.GetSurface(id);
+		if (surf == null) {
+			surf = Create(fg, bg); // can be null for DummyDrawer
+			if (surf != null) {
+				SurfaceManager.Instance.AddSurface(id, surf);
+				SurfaceManager.Instance.ReferenceSurface(id);
+				surfaceIds.Add(id);
 			}
 		}
 		else {
-			PixmapManager.Instance.ReferencePixmap(id);
-			pixmapIds.Add(id);
+			SurfaceManager.Instance.ReferenceSurface(id);
+			surfaceIds.Add(id);
 		}
 
-		return pix;
+		return surf;
 	}
 
-	///<summary>Creates a pixmap with the drawn data</summary>
-	abstract protected Gdk.Pixmap Create(Gdk.Color fg, Gdk.Color bg);
+	///<summary>Creates a Cairo surface with the drawn data</summary>
+	abstract protected Cairo.ImageSurface Create(Drawer.Color fg, Drawer.Color bg);
 
-	///<summary>Draws the a byte</summary>
+	///<summary>Draws a byte into the Cairo context at position (x,y)</summary>
+	abstract protected void Draw(Cairo.Context cr, int x, int y, byte b, Cairo.ImageSurface surf);
 
-	abstract protected void Draw(Gdk.GC gc, Gdk.Drawable dest, int x, int y, byte b, Gdk.Pixmap pix);
-
-	public void DrawNormal(Gdk.GC gc, Gdk.Drawable dest, int x, int y, byte b, RowType rowType, ColumnType colType)
+	public void DrawNormal(Cairo.Context cr, int x, int y, byte b, RowType rowType, ColumnType colType)
 	{
-		Draw(gc, dest, x, y, b, pixmapsNormal[(int)rowType, (int)colType]);
+		Draw(cr, x, y, b, surfacesNormal[(int)rowType, (int)colType]);
 	}
 
-	public void DrawHighlight(Gdk.GC gc, Gdk.Drawable dest, int x, int y, byte b, RowType rowType, HighlightType ht)
+	public void DrawHighlight(Cairo.Context cr, int x, int y, byte b, RowType rowType, HighlightType ht)
 	{
-		Draw(gc, dest, x, y, b, pixmapsHighlight[(int)rowType, (int)ht]);
+		Draw(cr, x, y, b, surfacesHighlight[(int)rowType, (int)ht]);
 	}
 
-	public Gdk.GC GetBackgroundGC(RowType rowType, HighlightType ht)
+	public Cairo.Color GetBackgroundColor(RowType rowType, HighlightType ht)
 	{
-		return backGC[(int)rowType, (int)ht];
+		return backColor[(int)rowType, (int)ht];
 	}
 
-	public void DisposePixmaps()
+	public void DisposeSurfaces()
 	{
-		foreach(string id in pixmapIds)
-		PixmapManager.Instance.DereferencePixmap(id);
-
-		pixmapIds.Clear();
+		foreach(string id in surfaceIds)
+			SurfaceManager.Instance.DereferenceSurface(id);
+		surfaceIds.Clear();
 	}
 
+	// Keep old name as alias so call sites compile unchanged
+	public void DisposePixmaps() { DisposeSurfaces(); }
+
 	public int Width{
 		get { return width; }
 	}
@@ -366,18 +375,14 @@ public class DummyDrawer : Drawer {
 	{
 	}
 
-	protected override void Draw(Gdk.GC gc, Gdk.Drawable dest, int x, int y, byte b, Gdk.Pixmap pix)
+	protected override void Draw(Cairo.Context cr, int x, int y, byte b, Cairo.ImageSurface surf)
 	{
-
 	}
 
-	protected override Gdk.Pixmap Create(Gdk.Color fg, Gdk.Color bg)
+	protected override Cairo.ImageSurface Create(Drawer.Color fg, Drawer.Color bg)
 	{
 		return null;
 	}
-
-
-
 }
 
 } // end namespace
diff --git a/src/gui/drawers/HexDrawer.cs b/src/gui/drawers/HexDrawer.cs
index 7923384..0b5a4b7 100644
--- a/src/gui/drawers/HexDrawer.cs
+++ b/src/gui/drawers/HexDrawer.cs
@@ -18,6 +18,9 @@
  *   along with Bless; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
+
+using Cairo;
+
 namespace Bless.Gui.Drawers {
 
 ///<summary>Draws the hex representation of a byte</summary>
@@ -32,51 +35,39 @@ public class HexDrawer : Drawer {
 	{
 	}
 
-	protected override void Draw(Gdk.GC gc, Gdk.Drawable dest, int x, int y, byte b, Gdk.Pixmap pix)
+	protected override void Draw(Cairo.Context cr, int x, int y, byte b, Cairo.ImageSurface surf)
 	{
-		dest.DrawDrawable(gc, pix, b*2*width, 0, x, y, 2*width, height);
+		cr.Save();
+		cr.SetSourceSurface(surf, x - b * 2 * width, y);
+		cr.Rectangle(x, y, 2 * width, height);
+		cr.Clip();
+		cr.Paint();
+		cr.Restore();
 	}
 
-	protected override Gdk.Pixmap Create(Gdk.Color fg, Gdk.Color bg)
+	protected override Cairo.ImageSurface Create(Drawer.Color fg, Drawer.Color bg)
 	{
-		Gdk.Window win = widget.GdkWindow;
-
-		Gdk.GC gc = new Gdk.GC(win);
-		Gdk.Pixmap pix = new Gdk.Pixmap(win, 256*2*width, height, -1);
-
-		// draw the background
-		gc.RgbFgColor = bg;
-		pix.DrawRectangle(gc, true, 0, 0, 256*2*width, height);
-
-		// render the bytes
-		string s;
-
-		if (info.Uppercase == false)
-			s = HexDrawer.HexTableLower;
-		else
-			s = HexDrawer.HexTableUpper;
-
-		//System.Console.WriteLine(s);
-
-		gc.RgbFgColor = fg;
-
-		// Render the text in two parts (256 printable characters each).  We do
-		// this to work around a bug in some drivers that fail to render text
-		// that ends up wider than 4096 pixels.
-		pangoLayout.SetText(s.Substring(0,256));
-		pix.DrawLayout(gc, 0, 0, pangoLayout);
-		
-		// The second part also contains the two Zero Width Non-Joiner
-		// characters, so it's actually 258 string characters, although still
-		// 256 printable characters.
-		pangoLayout.SetText(s.Substring(256));
-		pix.DrawLayout(gc, 128*2*width, 0, pangoLayout);
-
-		return pix;
+		Cairo.ImageSurface surf = new Cairo.ImageSurface(Cairo.Format.RGB24, 256 * 2 * width, height);
+		using (Cairo.Context cr = new Cairo.Context(surf)) {
+			cr.SetSourceRGB(bg.RgbaColor.Red, bg.RgbaColor.Green, bg.RgbaColor.Blue);
+			cr.Paint();
+
+			cr.SetSourceRGB(fg.RgbaColor.Red, fg.RgbaColor.Green, fg.RgbaColor.Blue);
+
+			string s = info.Uppercase ? HexTableUpper : HexTableLower;
+
+			// Render in two halves to work around driver bugs with very wide text
+			pangoLayout.SetText(s.Substring(0, 256));
+			cr.MoveTo(0, 0);
+			Pango.CairoHelper.ShowLayout(cr, pangoLayout);
+
+			// Second half (258 chars including ZWNJ markers = 256 printable)
+			pangoLayout.SetText(s.Substring(256));
+			cr.MoveTo(128 * 2 * width, 0);
+			Pango.CairoHelper.ShowLayout(cr, pangoLayout);
+		}
+		return surf;
 	}
-
-
-
 }
 
 } //namespace
diff --git a/src/gui/drawers/OctalDrawer.cs b/src/gui/drawers/OctalDrawer.cs
index f50bfed..1a35f24 100644
--- a/src/gui/drawers/OctalDrawer.cs
+++ b/src/gui/drawers/OctalDrawer.cs
@@ -18,6 +18,9 @@
  *   along with Bless; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
+
+using Cairo;
+
 namespace Bless.Gui.Drawers {
 
 ///<summary>Draws the octal representation of a byte</summary>
@@ -30,35 +33,29 @@ public class OctalDrawer : Drawer {
 	{
 	}
 
-	protected override void Draw(Gdk.GC gc, Gdk.Drawable dest, int x, int y, byte b, Gdk.Pixmap pix)
+	protected override void Draw(Cairo.Context cr, int x, int y, byte b, Cairo.ImageSurface surf)
 	{
-		dest.DrawDrawable(gc, pix, b*3*width, 0, x, y, 3*width, height);
+		cr.Save();
+		cr.SetSourceSurface(surf, x - b * 3 * width, y);
+		cr.Rectangle(x, y, 3 * width, height);
+		cr.Clip();
+		cr.Paint();
+		cr.Restore();
 	}
 
-	protected override Gdk.Pixmap Create(Gdk.Color fg, Gdk.Color bg)
+	protected override Cairo.ImageSurface Create(Drawer.Color fg, Drawer.Color bg)
 	{
-		Gdk.Window win = widget.GdkWindow;
-
-		Gdk.GC gc = new Gdk.GC(win);
-		Gdk.Pixmap pix = new Gdk.Pixmap(win, 256*3*width, height, -1);
-
-		// draw the background
-		gc.RgbFgColor = bg;
-		pix.DrawRectangle(gc, true, 0, 0, 256*3*width, height);
-
-		// render the bytes
-		string s = OctalDrawer.OctalTable;
-
-		//System.Console.WriteLine(s);
-
-		pangoLayout.SetText(s);
-
-
-		gc.RgbFgColor = fg;
-		pix.DrawLayout(gc, 0, 0, pangoLayout);
-
-		return pix;
+		Cairo.ImageSurface surf = new Cairo.ImageSurface(Cairo.Format.RGB24, 256 * 3 * width, height);
+		using (Cairo.Context cr = new Cairo.Context(surf)) {
+			cr.SetSourceRGB(bg.RgbaColor.Red, bg.RgbaColor.Green, bg.RgbaColor.Blue);
+			cr.Paint();
+			cr.SetSourceRGB(fg.RgbaColor.Red, fg.RgbaColor.Green, fg.RgbaColor.Blue);
+			pangoLayout.SetText(OctalTable);
+			cr.MoveTo(0, 0);
+			Pango.CairoHelper.ShowLayout(cr, pangoLayout);
+		}
+		return surf;
 	}
 }
 
-} //namespace
\ No newline at end of file
+} //namespace
diff --git a/src/gui/drawers/PixmapManager.cs b/src/gui/drawers/PixmapManager.cs
index 405e2fd..e5f57d0 100644
--- a/src/gui/drawers/PixmapManager.cs
+++ b/src/gui/drawers/PixmapManager.cs
@@ -20,89 +20,86 @@
  */
 
 using System.Collections.Generic;
-using Gdk;
+using Cairo;
 
 namespace Bless.Gui.Drawers {
 
 ///<summary>
-/// Handles drawer pixmaps in an memory efficient manner
+/// Handles drawer Cairo surfaces in a memory-efficient manner.
+/// Replaces the GTK2 PixmapManager (which used server-side Gdk.Pixmap).
 ///</summary>
-class PixmapManager
+class SurfaceManager
 {
-	static private PixmapManager manager;
+	static private SurfaceManager manager;
 
-	static public PixmapManager Instance {
+	static public SurfaceManager Instance {
 		get {
 			if (manager == null)
-				manager = new PixmapManager();
-
+				manager = new SurfaceManager();
 			return manager;
 		}
 	}
 
-	Dictionary<string, Gdk.Pixmap> pixmaps;
+	Dictionary<string, Cairo.ImageSurface> surfaces;
 	Dictionary<string, int> references;
 
-	private PixmapManager()
+	private SurfaceManager()
 	{
-		pixmaps = new Dictionary<string, Gdk.Pixmap>();
+		surfaces = new Dictionary<string, Cairo.ImageSurface>();
 		references = new Dictionary<string, int>();
 	}
 
-	///<summary>
-	/// Get the id of the pixmap with the specified properties
-	///</summary>
-	public string GetPixmapId(System.Type type, Drawer.Information info, Gdk.Color fg, Gdk.Color bg)
+	///<summary>Get the id for a surface with the specified properties</summary>
+	public string GetSurfaceId(System.Type type, Drawer.Information info, Drawer.Color fg, Drawer.Color bg)
 	{
-		return string.Format("{0}{1}{2}{3}{4}{5}", type, info.FontName, info.FontLanguage, info.Uppercase, fg.ToString(), bg.ToString());
+		return string.Format("{0}{1}{2}{3}{4}{5}",
+			type, info.FontName, info.FontLanguage, info.Uppercase,
+			fg.RgbaColor.ToString(), bg.RgbaColor.ToString());
 	}
 
-	///<summary>
-	/// Get the pixmap with the specified id.
-	/// Returns null if the pixmap doesn't exist
-	///</summary>
-	public Gdk.Pixmap GetPixmap(string id)
+	///<summary>Get the surface with the specified id; returns null if not present</summary>
+	public Cairo.ImageSurface GetSurface(string id)
 	{
-		Gdk.Pixmap pix = null;
-		if (pixmaps.ContainsKey(id))
-			pix = pixmaps[id];
-
-		return pix;
+		Cairo.ImageSurface surf = null;
+		if (surfaces.ContainsKey(id))
+			surf = surfaces[id];
+		return surf;
 	}
 
-	///<summary>
-	/// Add the pixmap to the collection
-	///</summary>
-	public void AddPixmap(string id, Gdk.Pixmap pix)
+	///<summary>Add a surface to the collection</summary>
+	public void AddSurface(string id, Cairo.ImageSurface surf)
 	{
-		pixmaps[id] = pix;
+		surfaces[id] = surf;
 		references[id] = 0;
 	}
 
-	///<summary>
-	/// Mark that we are using the pixmap
-	///</summary>
-	public void ReferencePixmap(string id)
+	///<summary>Mark that we are using the surface</summary>
+	public void ReferenceSurface(string id)
 	{
 		++references[id];
 	}
 
 	///<summary>
-	/// Mark that we aren't using the pixmap anymore.
-	/// If nobody uses it, dispose of it
+	/// Mark that we are no longer using the surface.
+	/// Disposes it if nobody references it.
 	///</summary>
-	public void DereferencePixmap(string id)
+	public void DereferenceSurface(string id)
 	{
 		--references[id];
 		if (references[id] <= 0) {
-			pixmaps[id].Dispose();
-			pixmaps.Remove(id);
+			surfaces[id].Dispose();
+			surfaces.Remove(id);
 			references.Remove(id);
 		}
 	}
-
 }
 
+// Backwards-compatibility alias so any code still referencing PixmapManager compiles.
+class PixmapManager
+{
+	static public SurfaceManager Instance {
+		get { return SurfaceManager.Instance; }
+	}
+}
 
-
-}
\ No newline at end of file
+} // namespace
diff --git a/src/gui/plugins/BitwiseOperationsPlugin.cs b/src/gui/plugins/BitwiseOperationsPlugin.cs
index f18eabc..2f716ae 100644
--- a/src/gui/plugins/BitwiseOperationsPlugin.cs
+++ b/src/gui/plugins/BitwiseOperationsPlugin.cs
@@ -78,6 +78,9 @@ public class BitwiseOperationsPlugin : GuiPlugin
 		WidgetGroup wgroup = (WidgetGroup)GetWidgetGroup(mainWindow, 0);
 		wgroup.Add(widget);
 
+		group.GetAction("BitwiseOperationsAction").IconName = "media-playback-start";
+		group.GetAction("PerformBitwiseOperationAction").IconName = "media-playback-start";
+
 
 		dataBook.PageAdded += new DataView.DataViewEventHandler(OnDataViewAdded);
 		dataBook.Removed += new RemovedHandler(OnDataViewRemoved);
@@ -90,9 +93,9 @@ public class BitwiseOperationsPlugin : GuiPlugin
 	private void AddMenuItems(UIManager uim)
 	{
 		ActionEntry[] actionEntries = new ActionEntry[] {
-										  new ActionEntry ("BitwiseOperationsAction", Stock.Execute, Catalog.GetString("_Bitwise Operations"), "<control>B", null,
+										  new ActionEntry ("BitwiseOperationsAction", null, Catalog.GetString("_Bitwise Operations"), "<control>B", null,
 														   new EventHandler(OnBitwiseOperationsActivated)),
-										  new ActionEntry ("PerformBitwiseOperationAction", Stock.Execute, Catalog.GetString("Perform Operation"), "<control><shift>B", null,
+										  new ActionEntry ("PerformBitwiseOperationAction", null, Catalog.GetString("Perform Operation"), "<control><shift>B", null,
 														   new EventHandler(OnPerformBitwiseOperation)),
 									  };
 
@@ -191,9 +194,9 @@ public class BitwiseOperationsPlugin : GuiPlugin
 ///<summary>
 /// A widget for bitwise operations
 ///</summary>
-public class BitwiseOperationsWidget : Gtk.HBox
+public class BitwiseOperationsWidget : Gtk.Box
 {
-	[Gtk.Builder.Object] Gtk.HBox BitwiseOperationsHBox;
+	[Gtk.Builder.Object] Gtk.Box BitwiseOperationsHBox;
 	[Gtk.Builder.Object] Gtk.Label SourceLabel;
 	[Gtk.Builder.Object] Gtk.EventBox SourceLabelEB;
 	[Gtk.Builder.Object] Gtk.Button DoOperationButton;
@@ -230,6 +233,7 @@ public class BitwiseOperationsWidget : Gtk.HBox
 	}
 
 	public BitwiseOperationsWidget(DataBook db, Gtk.Action action)
+		: base(Gtk.Orientation.Horizontal, 0)
 	{
 		dataBook = db;
 		performAction = action;
diff --git a/src/gui/plugins/ConversionTablePlugin.cs b/src/gui/plugins/ConversionTablePlugin.cs
index a37c04f..3e6de72 100644
--- a/src/gui/plugins/ConversionTablePlugin.cs
+++ b/src/gui/plugins/ConversionTablePlugin.cs
@@ -111,10 +111,10 @@ public class ConversionTablePlugin : GuiPlugin
 
 
 ///<summary> A widget to convert the data at the current offset to various types</summary>
-public class ConversionTable: Gtk.HBox
+public class ConversionTable: Gtk.Box
 {
 
-	[Gtk.Builder.Object] Gtk.Table ConversionTableWidget;
+	[Gtk.Builder.Object] Gtk.Grid ConversionTableWidget;
 
 	[Gtk.Builder.Object] Gtk.Entry Signed8bitEntry;
 	[Gtk.Builder.Object] Gtk.Entry Unsigned8bitEntry;
@@ -141,6 +141,7 @@ public class ConversionTable: Gtk.HBox
 	bool unsignedAsHex;
 
 	public ConversionTable(DataBook db)
+		: base(Gtk.Orientation.Horizontal, 0)
 	{
 		Gtk.Builder builder = new Gtk.Builder();
 		builder.AddFromFile(FileResourcePath.GetDataPath("ui", "ConversionTablePlugin.ui"));
diff --git a/src/gui/plugins/CopyOffsetPlugin.cs b/src/gui/plugins/CopyOffsetPlugin.cs
index 4e2da5e..a5616ea 100644
--- a/src/gui/plugins/CopyOffsetPlugin.cs
+++ b/src/gui/plugins/CopyOffsetPlugin.cs
@@ -90,13 +90,15 @@ public class CopyOffsetPlugin : GuiPlugin
 	private void AddActions(UIManager uim)
 	{
 		ActionEntry[] actionEntries = new ActionEntry[] {
-			new ActionEntry("CopyOffsetAction", Stock.Copy, Catalog.GetString("Copy Offset(s)"),
+			new ActionEntry("CopyOffsetAction", null, Catalog.GetString("Copy Offset(s)"),
 							 "<Shift><Ctrl>C", null, new EventHandler(OnCopyOffsetActivated))
 			};
 
 		ActionGroup group = new ActionGroup("CopyOffsetActions");
 		group.Add (actionEntries);
 
+		group.GetAction("CopyOffsetAction").IconName = "edit-copy";
+
 		uim.InsertActionGroup(group, 0);
 		uim.AddUiFromString(uiXml);
 
@@ -190,9 +192,9 @@ class CopyOffsetPreferences : IPluginPreferences
 	}
 }
 
-class CopyOffsetPreferencesWidget : Gtk.VBox
+class CopyOffsetPreferencesWidget : Gtk.Box
 {
-	Gtk.ComboBox numberBaseCombo;
+	Gtk.ComboBoxText numberBaseCombo;
 
 	int BaseToActiveIndex(int number_base) {
 		switch (number_base) {
@@ -204,7 +206,7 @@ class CopyOffsetPreferencesWidget : Gtk.VBox
 		}
 	}
 
-	public Gtk.ComboBox NumberBaseCombo {
+	public Gtk.ComboBoxText NumberBaseCombo {
 		get { return numberBaseCombo; }
 	}
 
@@ -216,11 +218,12 @@ class CopyOffsetPreferencesWidget : Gtk.VBox
 	}
 
 	public CopyOffsetPreferencesWidget()
+		: base(Gtk.Orientation.Horizontal, 0)
 	{
 		// Use a hbox inside an vbox to avoid expanding vertically.
-		Gtk.HBox hbox = new Gtk.HBox();
+		Gtk.Box hbox = new Gtk.Box(Gtk.Orientation.Horizontal, 0);
 		Gtk.Label label = new Gtk.Label(Catalog.GetString("Number base:"));
-		numberBaseCombo = Gtk.ComboBox.NewText();
+		numberBaseCombo = new Gtk.ComboBoxText();
 		numberBaseCombo.AppendText("2");
 		numberBaseCombo.AppendText("8");
 		numberBaseCombo.AppendText("10");
diff --git a/src/gui/plugins/EditOperationsPlugin.cs b/src/gui/plugins/EditOperationsPlugin.cs
index b4a6fcd..f06210a 100644
--- a/src/gui/plugins/EditOperationsPlugin.cs
+++ b/src/gui/plugins/EditOperationsPlugin.cs
@@ -182,21 +182,21 @@ public class EditOperationsPlugin : GuiPlugin
 	private void AddActions(UIManager uim)
 	{
 		ActionEntry[] actionEntries = new ActionEntry[] {
-										  new ActionEntry ("CutAction", Stock.Cut, null, "<control>X", null,
+										  new ActionEntry ("CutAction", null, Catalog.GetString("Cu_t"), "<control>X", null,
 														   new EventHandler(OnCutActivated)),
-										  new ActionEntry ("CopyAction", Stock.Copy, null, "<control>C", "Copy",
+										  new ActionEntry ("CopyAction", null, Catalog.GetString("_Copy"), "<control>C", "Copy",
 														   new EventHandler(OnCopyActivated)),
-										  new ActionEntry ("PasteAction", Stock.Paste, null, "<control>V", "Paste",
+										  new ActionEntry ("PasteAction", null, Catalog.GetString("_Paste"), "<control>V", "Paste",
 														   new EventHandler(OnPasteActivated)),
-										  new ActionEntry ("DeleteAction", Stock.Delete, null, "Delete", "Delete",
+										  new ActionEntry ("DeleteAction", null, Catalog.GetString("_Delete"), "Delete", "Delete",
 														   new EventHandler(OnDeleteActivated))
 									  };
 		ActionEntry[] miscActionEntries = new ActionEntry[] {
-											  new ActionEntry ("UndoAction", Stock.Undo, null, "<control>Z", "Undo",
+											  new ActionEntry ("UndoAction", null, Catalog.GetString("_Undo"), "<control>Z", "Undo",
 															   new EventHandler(OnUndoActivated)),
-											  new ActionEntry ("RedoAction", Stock.Redo, null, "<shift><control>Z", "Redo",
+											  new ActionEntry ("RedoAction", null, Catalog.GetString("_Redo"), "<shift><control>Z", "Redo",
 															   new EventHandler(OnRedoActivated)),
-											  new ActionEntry ("PreferencesAction", Stock.Preferences, null, null, "Preferences",
+											  new ActionEntry ("PreferencesAction", null, Catalog.GetString("_Preferences..."), null, "Preferences",
 															   new EventHandler(OnPreferencesActivated))
 										  };
 
diff --git a/src/gui/plugins/FileOperationsPlugin.cs b/src/gui/plugins/FileOperationsPlugin.cs
index 45319d7..067e052 100644
--- a/src/gui/plugins/FileOperationsPlugin.cs
+++ b/src/gui/plugins/FileOperationsPlugin.cs
@@ -140,25 +140,33 @@ public class FileOperationsPlugin : GuiPlugin
 	private void AddActions(UIManager uim)
 	{
 		ActionEntry[] actionEntries = new ActionEntry[] {
-										  new ActionEntry ("NewAction", Stock.New, null, "<control>N", "New File",
+										  new ActionEntry ("NewAction", null, Catalog.GetString("_New"), "<control>N", "New File",
 														   new EventHandler(OnNewActivated)),
-										  new ActionEntry ("OpenAction", Stock.Open, null, "<control>O", "Open File",
+										  new ActionEntry ("OpenAction", null, Catalog.GetString("_Open..."), "<control>O", "Open File",
 														   new EventHandler(OnOpenActivated)),
-										  new ActionEntry ("SaveAction", Stock.Save, null, "<control>S", "Save File",
+										  new ActionEntry ("SaveAction", null, Catalog.GetString("_Save"), "<control>S", "Save File",
 														   new EventHandler(OnSaveActivated)),
-										  new ActionEntry ("SaveAsAction", Stock.SaveAs, null, "<shift><control>S", "Save File As",
+										  new ActionEntry ("SaveAsAction", null, Catalog.GetString("Save _As..."), "<shift><control>S", "Save File As",
 														   new EventHandler(OnSaveAsActivated)),
-										  new ActionEntry ("RevertAction", Stock.RevertToSaved, null, null, "Revert File",
+										  new ActionEntry ("RevertAction", null, Catalog.GetString("_Revert"), null, "Revert File",
 														   new EventHandler(OnRevertActivated)),
-										  new ActionEntry ("CloseAction", Stock.Close, null, "<control>W", "Close File",
+										  new ActionEntry ("CloseAction", null, Catalog.GetString("_Close"), "<control>W", "Close File",
 														   new EventHandler(OnCloseActivated)),
-										  new ActionEntry ("QuitAction", Stock.Quit, null, "<control>Q", "Quit Application",
+										  new ActionEntry ("QuitAction", null, Catalog.GetString("_Quit"), "<control>Q", "Quit Application",
 														   new EventHandler(OnQuitActivated))
 									  };
 
 		ActionGroup group = new ActionGroup ("FileActions");
 		group.Add (actionEntries);
 
+		group.GetAction("NewAction").IconName = "document-new";
+		group.GetAction("OpenAction").IconName = "document-open";
+		group.GetAction("SaveAction").IconName = "document-save";
+		group.GetAction("SaveAsAction").IconName = "document-save-as";
+		group.GetAction("RevertAction").IconName = "document-revert";
+		group.GetAction("CloseAction").IconName = "window-close";
+		group.GetAction("QuitAction").IconName = "application-exit";
+
 		uim.InsertActionGroup(group, 0);
 		uim.AddUiFromString(uiXml);
 		SaveAction = (Gtk.Action)uim.GetAction("/menubar/File/Save");
@@ -187,8 +195,8 @@ public class FileOperationsPlugin : GuiPlugin
 	{
 		// Get path of file(s) to open
 		Gtk.FileChooserDialog fs = new Gtk.FileChooserDialog(Catalog.GetString("Open File(s)"), mainWindow, FileChooserAction.Open,
-								   Gtk.Stock.Cancel, ResponseType.Cancel,
-								   Gtk.Stock.Open, ResponseType.Accept);
+								   "Cancel", ResponseType.Cancel,
+								   "Open", ResponseType.Accept);
 
 		fs.SelectMultiple = true;
 		ResponseType result = (ResponseType)fs.Run();
diff --git a/src/gui/plugins/FindReplacePlugin.cs b/src/gui/plugins/FindReplacePlugin.cs
index 77e3a29..1db45c9 100644
--- a/src/gui/plugins/FindReplacePlugin.cs
+++ b/src/gui/plugins/FindReplacePlugin.cs
@@ -91,6 +91,9 @@ public class FindReplacePlugin : GuiPlugin
 		WidgetGroup wgroup = (WidgetGroup)GetWidgetGroup(mainWindow, 0);
 		wgroup.Add(widget);
 
+		group.GetAction("FindAction").IconName = "edit-find";
+		group.GetAction("ReplaceAction").IconName = "edit-find-replace";
+
 		// add the menu items
 		AddActions(uiManager);
 
@@ -148,13 +151,13 @@ public class FindReplacePlugin : GuiPlugin
 	private void AddActions(UIManager uim)
 	{
 		ActionEntry[] actionEntries = new ActionEntry[] {
-										  new ActionEntry ("FindAction", Stock.Find, null, "<control>F", "Find",
+										  new ActionEntry ("FindAction", null, Catalog.GetString("_Find..."), "<control>F", "Find",
 														   new EventHandler(OnFindActivated)),
 										  new ActionEntry ("FindNextAction", null, Catalog.GetString("Find _Next"), "F3", null,
 														   new EventHandler(OnFindNextActivated)),
 										  new ActionEntry ("FindPreviousAction", null, Catalog.GetString("Find _Previous"), "<shift>F3", null,
 														   new EventHandler(OnFindPreviousActivated)),
-										  new ActionEntry ("ReplaceAction", Stock.FindAndReplace, null, "<control>R", "Replace",
+										  new ActionEntry ("ReplaceAction", null, Catalog.GetString("_Replace..."), "<control>R", "Replace",
 														   new EventHandler(OnReplaceActivated))
 									  };
 
@@ -266,7 +269,7 @@ public class FindReplacePlugin : GuiPlugin
 ///<summary>
 /// A widget for find and replace operations
 ///</summary>
-public class FindReplaceWidget : Gtk.HBox
+public class FindReplaceWidget : Gtk.Box
 {
 	DataBook dataBook;
 	IFinder finder;
@@ -276,7 +279,7 @@ public class FindReplaceWidget : Gtk.HBox
 
 	byte[] replacePattern;
 
-	[Gtk.Builder.Object] Gtk.Table FindReplaceTable;
+	[Gtk.Builder.Object] Gtk.Grid FindReplaceTable;
 	[Gtk.Builder.Object] Gtk.Button FindNextButton;
 	[Gtk.Builder.Object] Gtk.Button FindPreviousButton;
 	[Gtk.Builder.Object] Gtk.Button ReplaceButton;
@@ -331,6 +334,7 @@ public class FindReplaceWidget : Gtk.HBox
 	}
 
 	public FindReplaceWidget(DataBook db, IFinder iFinder)
+		: base(Gtk.Orientation.Horizontal, 0)
 	{
 		finder = iFinder;
 		dataBook = db;
diff --git a/src/gui/plugins/GotoOffsetPlugin.cs b/src/gui/plugins/GotoOffsetPlugin.cs
index 6fc1b18..d0053d0 100644
--- a/src/gui/plugins/GotoOffsetPlugin.cs
+++ b/src/gui/plugins/GotoOffsetPlugin.cs
@@ -64,6 +64,8 @@ public class GotoOffsetPlugin : GuiPlugin
 		WidgetGroup wgroup = (WidgetGroup)GetWidgetGroup(mainWindow, 0);
 		wgroup.Add(widget);
 
+		group.GetAction("GotoOffsetAction").IconName = "go-jump";
+
 		// add the menu items
 		AddMenuItems(uiManager);
 
@@ -74,7 +76,7 @@ public class GotoOffsetPlugin : GuiPlugin
 	private void AddMenuItems(UIManager uim)
 	{
 		ActionEntry[] actionEntries = new ActionEntry[] {
-										  new ActionEntry ("GotoOffsetAction", Stock.JumpTo, Catalog.GetString("_Goto Offset"), "<control>G", null,
+										  new ActionEntry ("GotoOffsetAction", null, Catalog.GetString("_Goto Offset"), "<control>G", null,
 														   new EventHandler(OnGotoOffsetActivated)),
 									  };
 
@@ -98,9 +100,9 @@ public class GotoOffsetPlugin : GuiPlugin
 ///<summary>
 /// A widget for go to offset operation
 ///</summary>
-public class GotoOffsetWidget : Gtk.HBox
+public class GotoOffsetWidget : Gtk.Box
 {
-	[Gtk.Builder.Object] Gtk.HBox GotoOffsetHBox;
+	[Gtk.Builder.Object] Gtk.Box GotoOffsetHBox;
 	[Gtk.Builder.Object] Gtk.Button GotoOffsetButton;
 	[Gtk.Builder.Object] Gtk.Entry OffsetEntry;
 	[Gtk.Builder.Object] Gtk.Button CloseButton;
@@ -109,6 +111,7 @@ public class GotoOffsetWidget : Gtk.HBox
 
 
 	public GotoOffsetWidget(DataBook db)
+		: base(Gtk.Orientation.Horizontal, 0)
 	{
 		dataBook = db;
 
diff --git a/src/gui/plugins/HelpOperationsPlugin.cs b/src/gui/plugins/HelpOperationsPlugin.cs
index 81aac8d..b883c93 100644
--- a/src/gui/plugins/HelpOperationsPlugin.cs
+++ b/src/gui/plugins/HelpOperationsPlugin.cs
@@ -65,7 +65,7 @@ public class HelpOperationsPlugin : GuiPlugin
 	private void AddMenuItems(UIManager uim)
 	{
 		ActionEntry[] actionEntries = new ActionEntry[] {
-										  new ActionEntry ("ContentsAction", Stock.Help, Catalog.GetString("_Contents"), "F1", null,
+										  new ActionEntry ("ContentsAction", null, Catalog.GetString("_Contents"), "F1", null,
 														   new EventHandler(OnContentsActivated)),
 										  new ActionEntry ("AboutAction", null, Catalog.GetString("_About"), null, null,
 														   new EventHandler(OnAboutActivated)),
@@ -74,6 +74,8 @@ public class HelpOperationsPlugin : GuiPlugin
 		ActionGroup group = new ActionGroup ("HelpActions");
 		group.Add (actionEntries);
 
+		group.GetAction("ContentsAction").IconName = "help-contents";
+
 		uim.InsertActionGroup(group, 0);
 		uim.AddUiFromString(uiXml);
 
diff --git a/src/gui/plugins/InfobarPlugin.cs b/src/gui/plugins/InfobarPlugin.cs
index f5545ff..9563e54 100644
--- a/src/gui/plugins/InfobarPlugin.cs
+++ b/src/gui/plugins/InfobarPlugin.cs
@@ -73,7 +73,7 @@ public class InfobarPlugin : GuiPlugin
 
 		Services.UI.Info = widget;
 
-		((VBox)mainWindow.Child).PackEnd(widget, false, false, 0);
+		((Gtk.Box)mainWindow.Child).PackEnd(widget, false, false, 0);
 
 		AddMenuItems(uiManager);
 
@@ -250,7 +250,7 @@ public class InfobarPlugin : GuiPlugin
 ///<summary>
 /// An advanced statusbar for Bless
 ///</summary>
-public class Infobar : Gtk.HBox, IInfoDisplay
+public class Infobar : Gtk.Box, IInfoDisplay
 {
 	Label MessageLabel;
 	Label OffsetLabel;
@@ -303,6 +303,7 @@ public class Infobar : Gtk.HBox, IInfoDisplay
 	}
 
 	public Infobar(DataBook db)
+		: base(Gtk.Orientation.Horizontal, 0)
 	{
 		dataBook = db;
 
diff --git a/src/gui/plugins/PatternMatchHighlightPlugin.cs b/src/gui/plugins/PatternMatchHighlightPlugin.cs
index 98b34d3..cc647d5 100644
--- a/src/gui/plugins/PatternMatchHighlightPlugin.cs
+++ b/src/gui/plugins/PatternMatchHighlightPlugin.cs
@@ -194,7 +194,7 @@ class PatternMatchPreferences : IPluginPreferences
 	}
 }
 
-class PreferencesWidget : Gtk.HBox
+class PreferencesWidget : Gtk.Box
 {
 	Gtk.CheckButton enableHighlightCheckButton;
 	
@@ -203,6 +203,7 @@ class PreferencesWidget : Gtk.HBox
 	}
 
 	public PreferencesWidget()
+		: base(Gtk.Orientation.Horizontal, 0)
 	{
 		enableHighlightCheckButton = new Gtk.CheckButton("Highlight matches of selection pattern");
 		this.PackStart(enableHighlightCheckButton, false, false, 6);
diff --git a/src/gui/plugins/ProgressDisplayPlugin.cs b/src/gui/plugins/ProgressDisplayPlugin.cs
index f3936d2..760d972 100644
--- a/src/gui/plugins/ProgressDisplayPlugin.cs
+++ b/src/gui/plugins/ProgressDisplayPlugin.cs
@@ -55,7 +55,7 @@ public class ProgressDisplayPlugin : GuiPlugin
 		// register the service
 		Services.UI.Progress = widget;
 
-		((VBox)mainWindow.Child).PackEnd(widget, false, false, 0);
+		((Gtk.Box)mainWindow.Child).PackEnd(widget, false, false, 0);
 
 		loaded = true;
 		return true;
@@ -66,10 +66,11 @@ public class ProgressDisplayPlugin : GuiPlugin
 ///<summary>
 /// Widget that displays a series of progress bars
 ///</summary>
-public class ProgressDisplayWidget : Gtk.VBox, IProgressDisplay
+public class ProgressDisplayWidget : Gtk.Box, IProgressDisplay
 {
 
 	public ProgressDisplayWidget()
+		: base(Gtk.Orientation.Vertical, 0)
 	{
 
 	}
@@ -81,7 +82,7 @@ public class ProgressDisplayWidget : Gtk.VBox, IProgressDisplay
 	{
 		ProgressDisplayBar pdb = new ProgressDisplayBar();
 
-		this.PackStart(pdb);
+		this.PackStart(pdb, true, true, 0);
 		pdb.DestroyEvent += OnProgressDisplayBarDestroyed;
 
 		return pdb.Update;
@@ -98,15 +99,16 @@ public class ProgressDisplayWidget : Gtk.VBox, IProgressDisplay
 
 }
 
-public class ProgressDisplayBar : Gtk.HBox {
+public class ProgressDisplayBar : Gtk.Box {
 
-	[Gtk.Builder.Object] Gtk.HBox ProgressBarHBox;
+	[Gtk.Builder.Object] Gtk.Box ProgressBarHBox;
 	[Gtk.Builder.Object] Gtk.Button CancelButton;
 	[Gtk.Builder.Object] Gtk.ProgressBar ProgressBar;
 
 	bool cancelClicked;
 
 	public ProgressDisplayBar()
+		: base(Gtk.Orientation.Horizontal, 0)
 	{
 		Gtk.Builder builder = new Gtk.Builder();
 		builder.AddFromFile(FileResourcePath.GetDataPath("ui", "ProgressDisplayPlugin.ui"));
diff --git a/src/gui/plugins/SelectRangePlugin.cs b/src/gui/plugins/SelectRangePlugin.cs
index a791bfe..3031ad7 100644
--- a/src/gui/plugins/SelectRangePlugin.cs
+++ b/src/gui/plugins/SelectRangePlugin.cs
@@ -68,6 +68,8 @@ public class SelectRangePlugin : GuiPlugin
 		WidgetGroup wgroup = (WidgetGroup)GetWidgetGroup(mainWindow, 0);
 		wgroup.Add(widget);
 
+		group.GetAction("SelectRangeAction").IconName = "go-jump";
+
 		AddMenuItems(uiManager);
 
 		loaded = true;
@@ -79,7 +81,7 @@ public class SelectRangePlugin : GuiPlugin
 		ActionEntry[] actionEntries = new ActionEntry[] {
 										  new ActionEntry ("SelectAllAction", null, Catalog.GetString("Select _All"), "<control>A", null,
 														   new EventHandler(OnSelectAllActivated)),
-										  new ActionEntry ("SelectRangeAction", Stock.JumpTo, Catalog.GetString("_Select Range"), "<shift><control>R", null,
+										  new ActionEntry ("SelectRangeAction", null, Catalog.GetString("_Select Range"), "<shift><control>R", null,
 														   new EventHandler(OnSelectRangeActivated)),
 									  };
 
@@ -118,9 +120,9 @@ public class SelectRangePlugin : GuiPlugin
 ///<summary>
 /// A widget for the select range operation
 ///</summary>
-public class SelectRangeWidget : Gtk.HBox
+public class SelectRangeWidget : Gtk.Box
 {
-	[Gtk.Builder.Object] Gtk.HBox SelectRangeHBox;
+	[Gtk.Builder.Object] Gtk.Box SelectRangeHBox;
 	[Gtk.Builder.Object] Gtk.Button SelectButton;
 	[Gtk.Builder.Object] Gtk.Entry FromEntry;
 	[Gtk.Builder.Object] Gtk.Entry ToEntry;
@@ -130,6 +132,7 @@ public class SelectRangeWidget : Gtk.HBox
 
 
 	public SelectRangeWidget(DataBook db)
+		: base(Gtk.Orientation.Horizontal, 0)
 	{
 		dataBook = db;
 
diff --git a/src/gui/plugins/StatisticsPlugin.cs b/src/gui/plugins/StatisticsPlugin.cs
index 65428c6..9d78e10 100644
--- a/src/gui/plugins/StatisticsPlugin.cs
+++ b/src/gui/plugins/StatisticsPlugin.cs
@@ -119,13 +119,14 @@ public class StatisticsInfo
 	}
 }
 
-public class StatisticsWidget : Gtk.HBox
+public class StatisticsWidget : Gtk.Box
 {
 	StatisticsDrawWidget  sdw;
 	DataBook dataBook;
 	Hashtable info;
 
 	public StatisticsWidget(DataBook db)
+		: base(Gtk.Orientation.Horizontal, 0)
 	{
 		info = new Hashtable();
 		dataBook = db;
@@ -285,13 +286,12 @@ public class StatisticsDrawWidget: Gtk.DrawingArea
 
 	void UpdateHighlight()
 	{
-		Gdk.Window win = this.GdkWindow;
-
-		Cairo.Context g = Gdk.CairoHelper.Create(win);
-
-		int x, y, w, h, d;
-		win.GetGeometry(out x, out y, out w, out h, out d);
-
+		// GTK3: draw via QueueDraw rather than directly
+		this.QueueDraw();
+		return;
+		// dead code below kept for reference
+		Cairo.Context g = null;
+		int w = 1, h = 1;
 		g.Scale (w, h);
 		g.LineWidth = (1.0 / freqs.Length) * 0.6;
 
@@ -300,13 +300,13 @@ public class StatisticsDrawWidget: Gtk.DrawingArea
 			int end=previousHighlight+1;
 			if (start<0) start=0;
 			if (end>=barStart.Length) end=barStart.Length-1;*/
-			g.Color = new Color(0.0, 0.0, 0.0);
+			g.SetSourceRGB(0.0, 0.0, 0.0);
 			//for(int i=start; i<=end; i++)
 			DrawBar(g, previousHighlight);
 		}
 
 		if (currentHighlight != -1) {
-			g.Color = new Color(1.0, 0.0, 0.0);
+			g.SetSourceRGB(1.0, 0.0, 0.0);
 			DrawBar(g, currentHighlight);
 		}
 
@@ -315,19 +315,19 @@ public class StatisticsDrawWidget: Gtk.DrawingArea
 	void Draw (Cairo.Context gr, int width, int height)
 	{
 		gr.Scale (width, height);
-		gr.Color = new Color(1.0, 1.0, 1.0);
+		gr.SetSourceRGB(1.0, 1.0, 1.0);
 		gr.Rectangle(0.0, 0.0, 1.0, 1.0);
 		gr.Stroke();
-		gr.Color = new Color(0.0, 0.0, 0.0);
+		gr.SetSourceRGB(0.0, 0.0, 0.0);
 
 		gr.LineWidth = (1.0 / freqs.Length) * 0.6;
 
 		for (int i = 0; i < freqs.Length; i++) {
 			if (previousHighlight == i)
-				gr.Color = new Color(1.0, 0.0, 0.0);
+				gr.SetSourceRGB(1.0, 0.0, 0.0);
 			DrawBar(gr, i);
 			if (previousHighlight == i)
-				gr.Color = new Color(0.0, 0.0, 0.0);
+				gr.SetSourceRGB(0.0, 0.0, 0.0);
 		}
 
 	}
@@ -347,17 +347,13 @@ public class StatisticsDrawWidget: Gtk.DrawingArea
 		currentHighlight = -1;
 	}
 
-	protected override bool OnExposeEvent (Gdk.EventExpose args)
+	protected override bool OnDrawn (Cairo.Context g)
 	{
-		Gdk.Window win = args.Window;
-
-		Cairo.Context g = Gdk.CairoHelper.Create(win);
-
-		int x, y, w, h, d;
-		win.GetGeometry(out x, out y, out w, out h, out d);
+		int w = this.AllocatedWidth;
+		int h = this.AllocatedHeight;
 		this.HeightRequest = w / 5;
 
-		Draw (g, w, h);
+		Draw(g, w, h);
 
 		return true;
 	}
@@ -407,8 +403,12 @@ public class StatisticsDrawWidget: Gtk.DrawingArea
 		int x, y;
 		Gdk.ModifierType state;
 
-		if (e.IsHint)
-			this.GdkWindow.GetPointer(out x, out y, out state);
+		if (e.IsHint) {
+			int ex, ey;
+			Gdk.ModifierType pstate;
+			e.Window.GetDevicePosition(e.Device, out ex, out ey, out pstate);
+			x = ex; y = ey; state = pstate;
+		}
 		else {
 			x = (int)e.X;
 			y = (int)e.Y;
diff --git a/src/meson.build b/src/meson.build
index 5e51b67..e6ccfed 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -38,7 +38,7 @@ util_lib = library(
         'util/TempFile.cs',
         'util/ThreadedAsyncOperation.cs'
     ) + [configure_defines_cs],
-    dependencies: glib_sharp_2_dep,
+    dependencies: glib_sharp_dep,
     cs_args: '-r:Mono.Posix',
     install: true,
     install_dir: assembly_install_dir,
@@ -70,7 +70,7 @@ buffers_lib = library(
         'buffers/SegmentCollection.cs',
         'buffers/SimpleBuffer.cs'
     ),
-    dependencies: gtk_sharp_2_dep,
+    dependencies: gtk_sharp_dep,
     cs_args: '-r:Mono.Posix',
     link_with: [
         tools_lib,
@@ -126,7 +126,7 @@ gui_drawers_lib = library(
         'gui/drawers/OctalDrawer.cs',
         'gui/drawers/PixmapManager.cs',
     ),
-    dependencies: gtk_sharp_2_dep,
+    dependencies: gtk_sharp_dep,
     install: true,
     install_dir: assembly_install_dir,
 )
@@ -138,7 +138,7 @@ gui_areas_lib = library(
         'gui/areas/AreaGroup.cs',
         'gui/areas/Highlight.cs',
     ),
-    dependencies: gtk_sharp_2_dep,
+    dependencies: gtk_sharp_dep,
     link_with: [
         buffers_lib,
         gui_drawers_lib,
@@ -159,7 +159,7 @@ plugins_lib = library(
         'plugins/Plugin.cs',
         'plugins/PluginManager.cs',
     ),
-    dependencies: gtk_sharp_2_dep,
+    dependencies: gtk_sharp_dep,
     link_with: [
         gui_areas_lib,
         tools_export_lib,
@@ -198,7 +198,7 @@ gui_lib = library(
         'gui/UIService.cs',
         'gui/WidgetGroup.cs',
     ),
-    dependencies: gtk_sharp_2_dep,
+    dependencies: gtk_sharp_dep,
     cs_args: ['-r:Mono.Posix', '-nowarn:0169'],
     link_with: [
         buffers_lib,
@@ -233,7 +233,7 @@ gui_plugins_lib = library(
         'gui/plugins/SelectLayoutPlugin.cs',
         'gui/plugins/SelectRangePlugin.cs',
     ),
-    dependencies: gtk_sharp_2_dep,
+    dependencies: gtk_sharp_dep,
     cs_args: ['-r:Mono.Posix', '-nowarn:0169'],
     link_with: [
         buffers_lib,
@@ -261,7 +261,7 @@ gui_areas_plugins_lib = library(
         'gui/areas/OffsetArea.cs',
         'gui/areas/SeparatorArea.cs',
     ),
-    dependencies: gtk_sharp_2_dep,
+    dependencies: gtk_sharp_dep,
     link_with: [
         buffers_lib,
         gui_areas_lib,
@@ -295,7 +295,7 @@ tools_export_plugins_lib = library(
 bless = executable(
     'bless',
     files('gui/MainWindow.cs'),
-    dependencies: gtk_sharp_2_dep,
+    dependencies: gtk_sharp_dep,
     cs_args: ['-r:Mono.Posix', '-nowarn:0169'],
     link_with: [
         buffers_lib,
diff --git a/src/plugins/GuiPlugin.cs b/src/plugins/GuiPlugin.cs
index 418ae4c..50f8ef7 100644
--- a/src/plugins/GuiPlugin.cs
+++ b/src/plugins/GuiPlugin.cs
@@ -33,39 +33,35 @@ public class GuiPlugin : Plugin
 
 	protected Widget GetDataBook(Window win)
 	{
-		VBox vbox = (VBox)win.Child;
-		foreach (Widget child in vbox.Children) {
-			//System.Console.WriteLine("Child: {0}", child.GetType().ToString());
-			if (child.GetType() == typeof(HBox)) {
-				foreach (Widget child1 in ((HBox)child).Children) {
-					if (child1.GetType().ToString() == "Bless.Gui.DataBook")
-						return child1;
-				}
-			}
+		// In GTK3, Gtk.VBox/HBox are both Gtk.Box. Walk the window child tree
+		// recursively looking for the DataBook widget.
+		return FindWidgetByTypeName(win.Child, "Bless.Gui.DataBook");
+	}
 
+	static Widget FindWidgetByTypeName(Widget root, string typeName)
+	{
+		if (root == null) return null;
+		if (root.GetType().ToString() == typeName) return root;
+		if (root is Gtk.Container) {
+			foreach (Widget child in ((Gtk.Container)root).Children) {
+				Widget found = FindWidgetByTypeName(child, typeName);
+				if (found != null) return found;
+			}
 		}
 		return null;
 	}
 
 	protected Widget GetMenuBar(Window win)
 	{
-		VBox vbox = (VBox)win.Child;
-		foreach (Widget child in vbox.Children) {
-			//System.Console.WriteLine("Child: {0}", child.GetType().ToString());
-			if (child.GetType() == typeof(MenuBar)) {
-				return child;
-			}
-		}
-
-		return null;
+		return FindWidgetByTypeName(win.Child, "Gtk.MenuBar");
 	}
 
 	protected Widget GetWidgetGroup(Window win, int n)
 	{
-		VBox vbox = (VBox)win.Child;
+		// WidgetGroups are direct children of MainVBox (a Gtk.Box)
+		if (!(win.Child is Gtk.Container)) return null;
 		int i = 0;
-		foreach (Widget child in vbox.Children) {
-			//System.Console.WriteLine("Child: {0}", child.GetType().ToString());
+		foreach (Widget child in ((Gtk.Container)win.Child).Children) {
 			if (child.GetType().ToString() == "Bless.Gui.WidgetGroup") {
 				if (i == n)
 					return child;
@@ -73,36 +69,28 @@ public class GuiPlugin : Plugin
 					i++;
 			}
 		}
-
 		return null;
 	}
 
 	protected Widget GetSideWidgetGroup(Window win, int n)
 	{
-		VBox vbox = (VBox)win.Child;
+		// Side WidgetGroups live inside the DataViewBox (the inner horizontal Gtk.Box).
+		// Walk all Gtk.Box children of the main VBox looking for one that
+		// contains WidgetGroup children.
+		if (!(win.Child is Gtk.Container)) return null;
 		int i = 0;
-		HBox hbox = null;
-
-		foreach (Widget child in vbox.Children) {
-			System.Console.WriteLine("Child: {0}", child.GetType().ToString());
-			if (child.GetType().ToString() == "Gtk.HBox") {
-				hbox = (HBox)child;
-				break;
-			}
-		}
-		if (hbox == null)
-			return null;
-
-		foreach (Widget child in hbox.Children) {
-			System.Console.WriteLine("Child: {0}", child.GetType().ToString());
-			if (child.GetType().ToString() == "Bless.Gui.WidgetGroup") {
-				if (i == n)
-					return child;
-				else
-					i++;
+		foreach (Widget child in ((Gtk.Container)win.Child).Children) {
+			if (child is Gtk.Box) {
+				foreach (Widget child1 in ((Gtk.Box)child).Children) {
+					if (child1.GetType().ToString() == "Bless.Gui.WidgetGroup") {
+						if (i == n)
+							return child1;
+						else
+							i++;
+					}
+				}
 			}
 		}
-
 		return null;
 	}
 
-- 
2.43.0

