[Xfce4-commits] [xfce/xfce4-settings] 01/01: Merge in GTK3 port. Special thanks to Simon for appearance fixes, widget cleanup, and suggestion of the WindowScalingFactor setting. Summary of changes: - All components and glade files have been ported to GTK 3.20, all deprecated widgets and functions replaced - Build requirements have been bumped to gtk+-3.0 3.20, glib-2.0 2.45, gio-2.0 2.45, gio-unix-2.0 2.45, exo-2 0.11.0, libxfce4ui-2 4.13.0, libxfce4kbd-private-3 4.12.0 - Added support for /Gdk/WindowScalingFactor

noreply at xfce.org noreply at xfce.org
Fri Sep 16 02:13:05 CEST 2016


This is an automated email from the git hooks/post-receive script.

bluesabre pushed a commit to branch master
in repository xfce/xfce4-settings.

commit 838aa6f1c5344d45dde51acb31f165ccd26f666d
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Thu Sep 15 18:35:35 2016 -0400

    Merge in GTK3 port. Special thanks to Simon for appearance fixes, widget cleanup, and suggestion of the WindowScalingFactor setting. Summary of changes:
    - All components and glade files have been ported to GTK 3.20, all deprecated widgets and functions replaced
    - Build requirements have been bumped to gtk+-3.0 3.20, glib-2.0 2.45, gio-2.0 2.45, gio-unix-2.0 2.45, exo-2 0.11.0, libxfce4ui-2 4.13.0, libxfce4kbd-private-3 4.12.0
    - Added support for /Gdk/WindowScalingFactor
    
    Squashed commit of the following:
    
    commit 9d52b25530c7f88d86573c7e6cf0c8e938702107
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Wed Sep 14 22:34:10 2016 -0400
    
        Upgrade all glade files to gtk 3.20, replace deprecated widgets
    
    commit 9ccbace18fc19f03c9cfd5959f8f48d6cb865ad0
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Wed Sep 14 20:46:27 2016 -0400
    
        Bump required versions to support GTK 3.20 and Xfce 4.13+
    
    commit ca182a87113bf0e2720420ce99fc58cfe2dbe223
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Wed Sep 14 20:18:11 2016 -0400
    
        Fix drawing issues (again)
    
    commit eb5b63cb505b5fd311a075410607c13a2b72645c
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Wed Sep 14 18:11:25 2016 -0400
    
        Current progress, runs, no display
    
    commit 3d76c9fe59e70a207bf9ee76a35e9d48276494d6
    Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
    Date:   Wed Sep 14 23:31:35 2016 +0200
    
        Drop unused vars
    
    commit fdf7cc3da5d889e590f76b6e3cb9b31f49e29056
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Wed Sep 14 06:27:11 2016 -0400
    
        Fix deprecations
    
    commit 59b3ea798178240f13168cf4e10d56ff894a965b
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Wed Sep 14 06:11:53 2016 -0400
    
        Fix paint callback
    
    commit 07753d65d89193149a0bf609ef50c0b6e405fca4
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Wed Sep 14 06:02:41 2016 -0400
    
        Replace expose event with draw
    
    commit 559abb683b2dd6ad5df7b6bc398941aba12f7dd2
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Wed Sep 14 05:56:00 2016 -0400
    
        Discard IFDEFs
    
    commit 8d1d5af66c9df099c952015fa050f90c8488b169
    Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
    Date:   Wed Sep 14 11:20:27 2016 +0200
    
        Fix background color of scrollarea
    
    commit c1048c7a0eea7d58b511d3ca4ad37970fd04a416
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Tue Sep 13 22:52:21 2016 -0400
    
        Replace string
    
    commit 6fd34046d40315839b65bbb82e6a79b90cb49630
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Tue Sep 13 22:48:17 2016 -0400
    
        Support Gdk WindowScalingFactor
    
    commit 9df1063fee837128fe78070900d19544a20b6f17
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Tue Sep 13 22:03:10 2016 -0400
    
        Import latest foo-marshall and scrollarea from mate, builds with --disable-debug
    
    commit 2bb20c12fcd36e3e567a28f338423556f730316a
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Sat Sep 3 06:13:55 2016 -0400
    
        Drop definition of xfce_widget_reparent, bump required libxfce4ui version to 4.13.0 which now provides it
    
    commit 03b2bf87e7702f9c89760417d27c8c86a199b1c7
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Sun Aug 21 21:35:14 2016 -0400
    
        Partially port display settings
    
    commit 1316fb377b3fa2c5b42060981385c1909c634a16
    Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
    Date:   Mon Aug 8 00:22:33 2016 +0200
    
        Drop all deprecated widgets from the a11y settings dialog
    
    commit 8b36f4ce5c834eed09b7e18ed7235e58e4311e64
    Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
    Date:   Mon Aug 8 00:02:22 2016 +0200
    
        Drop all deprecated widgets from the mouse settings dialog
    
    commit c5d40bf125b0a05ec4c2fad2c03bfdbf78ac3443
    Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
    Date:   Sun Aug 7 23:48:27 2016 +0200
    
        Drop all deprecated widgets from the keyboard settings dialog
    
    commit f017811a1e25722e8e7233a2f323c0e342973710
    Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
    Date:   Sun Aug 7 23:40:50 2016 +0200
    
        Drop all deprecated widgets from the appearance settings dialog
    
    commit a90e9c10848dc81da234b424b121b6b4af30ef8d
    Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
    Date:   Sun Aug 7 23:15:09 2016 +0200
    
        Fix background styles of header and viewport in manager
    
    commit 02097c9c1052f4639e79488113b73eeb496bd7c7
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Sat Jun 18 14:17:29 2016 -0400
    
        Use text renderer to fix display issue
    
    commit 9fff5000548ed99a4bf65f9862e50bd201552c0f
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Sat Jun 18 12:54:36 2016 -0400
    
        Initial broken port of the settings manager
    
    commit 7f98f7d11624dac51dcc2e67e2d744ba36b40b3f
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Sun Jun 5 18:42:10 2016 -0400
    
        Mostly fix colors, selected color is still broken for some themes
    
    commit 298974550d7ee2164fe0d1b5db3fec8b4b05de5b
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Sun Jun 5 14:01:42 2016 -0400
    
        Port appearance settings. FIXME: showcase colors are always black
    
    commit 3487e364d7a2340924ffe25dcda212cdcf0ae1e5
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Sun Jun 5 08:25:35 2016 -0400
    
        Port xfce4-settings-editor
    
    commit 95f86ffe126b8110d0fcf6c4a349a3b6e4bd2d61
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Tue May 31 21:50:47 2016 -0400
    
        Port xfsettingsd to gtk3
    
    commit 8beea08b96fbfad32c9e6aa8fbc0068e656c6164
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Tue May 31 21:09:39 2016 -0400
    
        Port xfce4-mouse-settings to gtk3
    
    commit c2db3c3a1c448339424077ab1a2168643c77c385
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Tue May 31 20:48:38 2016 -0400
    
        Port xfce4-keyboard-settings to gtk3
    
    commit 3648eece22e403daf4710f24f4b3f00437a4adc9
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Sat May 21 09:44:56 2016 -0400
    
        Drop unused libxfce4util references in the keyboard settings
    
    commit 11d60fde191cfd0b8704dd7baa181b8ea8273747
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Sat May 21 09:18:26 2016 -0400
    
        Port xfce4-accessibility-settings (plug functionality untested)
    
    commit 4e9fac5214f30584e770e02b04fa22c5f59bbc3a
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Sat May 21 08:17:13 2016 -0400
    
        Complete port of xfce4-mime-settings
    
    commit 859d8a62fa330bc9f3c95c2d0964352bfa346541
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Thu May 19 22:19:50 2016 -0400
    
        Partially ported xfce4-mime-settings, does not build
    
    commit 4ac0151520eed29b2d3bf5f8bffe4602b1bc0d66
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Thu May 19 21:18:39 2016 -0400
    
        Further seal and replace deprecations, should now be ready to port
    
    commit ba64a334c90a1caf5562233d22df67bdc1bfca24
    Author: Sean Davis <smd.seandavis at gmail.com>
    Date:   Thu May 19 20:39:13 2016 -0400
    
        Build with GTK_DISABLE_SINGLE_INCLUDES, GDK_DISABLE_DEPRECATED, GTK_DISABLE_DEPRECATED, GSEAL_ENABLE where possible
---
 configure.ac.in                                    |   16 +-
 dialogs/accessibility-settings/Makefile.am         |    8 +-
 .../accessibility-dialog.glade                     |  550 +++++-----
 dialogs/accessibility-settings/main.c              |   14 +-
 dialogs/appearance-settings/Makefile.am            |    8 +-
 .../appearance-settings/appearance-dialog.glade    |  410 ++++----
 dialogs/appearance-settings/main.c                 |  389 ++------
 dialogs/display-settings/Makefile.am               |    2 +-
 dialogs/display-settings/confirmation-dialog.glade |   37 +-
 dialogs/display-settings/display-dialog.glade      |  166 ++--
 dialogs/display-settings/foo-marshal.c             |    5 +-
 dialogs/display-settings/foo-marshal.h             |    4 +-
 dialogs/display-settings/identity-popup.glade      |   17 +-
 dialogs/display-settings/main.c                    |  113 +--
 .../display-settings/minimal-display-dialog.glade  |   81 +-
 dialogs/display-settings/scrollarea.c              | 1046 ++++++++++----------
 dialogs/display-settings/scrollarea.h              |  138 +--
 dialogs/keyboard-settings/Makefile.am              |   10 +-
 dialogs/keyboard-settings/command-dialog.c         |   57 +-
 dialogs/keyboard-settings/keyboard-dialog.glade    |  156 ++-
 dialogs/keyboard-settings/main.c                   |    9 +-
 dialogs/keyboard-settings/xfce-keyboard-settings.c |   23 +-
 dialogs/keyboard-settings/xfce-keyboard-settings.h |    2 +-
 dialogs/mime-settings/Makefile.am                  |    8 +-
 dialogs/mime-settings/xfce-mime-chooser.c          |   17 +-
 dialogs/mime-settings/xfce-mime-window.c           |   60 +-
 dialogs/mouse-settings/Makefile.am                 |    8 +-
 dialogs/mouse-settings/main.c                      |   34 +-
 dialogs/mouse-settings/mouse-dialog.glade          |  445 ++++-----
 xfce4-settings-editor/Makefile.am                  |    8 +-
 xfce4-settings-editor/main.c                       |   29 +-
 .../xfce-settings-cell-renderer.c                  |   63 +-
 xfce4-settings-editor/xfce-settings-editor-box.c   |   57 +-
 xfce4-settings-editor/xfce-settings-prop-dialog.c  |   69 +-
 xfce4-settings-manager/Makefile.am                 |    4 +-
 xfce4-settings-manager/main.c                      |    5 +-
 .../xfce-settings-manager-dialog.c                 |  114 ++-
 xfce4-settings-manager/xfce-text-renderer.c        |  151 +--
 xfsettingsd/Makefile.am                            |    8 +-
 xfsettingsd/accessibility.c                        |    8 +-
 xfsettingsd/clipboard-manager.c                    |    8 -
 xfsettingsd/keyboard-layout.c                      |    2 +-
 xfsettingsd/keyboards.c                            |    8 +-
 xfsettingsd/pointers.c                             |    6 +-
 xfsettingsd/workspaces.c                           |    2 -
 xfsettingsd/xsettings.c                            |    6 +-
 xfsettingsd/xsettings.xml                          |    3 +
 47 files changed, 2044 insertions(+), 2340 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index ea2e06c..5c8fe62 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -88,14 +88,14 @@ AC_DEFINE([XFCE4_SETTINGS_VERSION_SHORT], [xfce4_settings_version_short], [Short
 dnl ***********************************
 dnl *** Check for required packages ***
 dnl ***********************************
-XDT_CHECK_PACKAGE([EXO], [exo-1], [0.7.1])
-XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0])
-XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.24.0])
-XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.24.0])
+XDT_CHECK_PACKAGE([EXO], [exo-2], [0.11.0])
+XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.20.0])
+XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.45.8])
+XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.45.8])
 XDT_CHECK_PACKAGE([GARCON], [garcon-1], [0.1.10])
 XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.9.0])
-XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.11.0])
-XDT_CHECK_PACKAGE([LIBXFCE4KBD_PRIVATE], [libxfce4kbd-private-2], [4.9.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.13.0])
+XDT_CHECK_PACKAGE([LIBXFCE4KBD_PRIVATE], [libxfce4kbd-private-3], [4.12.0])
 XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.9.0])
 XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.84])
 XDT_CHECK_PACKAGE([FONTCONFIG], [fontconfig], [2.6.0])
@@ -162,7 +162,7 @@ XDT_CHECK_OPTIONAL_PACKAGE([LIBNOTIFY], [libnotify], [0.1.3],
 dnl *********************
 dnl *** Mime settings ***
 dnl *********************
-XDT_CHECK_OPTIONAL_PACKAGE([GIO_UNIX], [gio-unix-2.0], [2.24],
+XDT_CHECK_OPTIONAL_PACKAGE([GIO_UNIX], [gio-unix-2.0], [2.45],
                            [gio-unix], [Mime settings])
 
 dnl ************************************
@@ -317,5 +317,3 @@ else
 echo "* Mime settings (gio-unix):  no"
 fi
 echo
-
-
diff --git a/dialogs/accessibility-settings/Makefile.am b/dialogs/accessibility-settings/Makefile.am
index c45445e..a523573 100644
--- a/dialogs/accessibility-settings/Makefile.am
+++ b/dialogs/accessibility-settings/Makefile.am
@@ -17,7 +17,13 @@ xfce4_accessibility_settings_CFLAGS = \
 	$(GTK_CFLAGS) \
 	$(LIBXFCE4UI_CFLAGS) \
 	$(XFCONF_CFLAGS) \
-	$(PLATFORM_CFLAGS)
+	$(PLATFORM_CFLAGS) \
+    -DGTK_DISABLE_SINGLE_INCLUDES \
+    -DGDK_DISABLE_DEPRECATED \
+    -DGTK_DISABLE_DEPRECATED \
+    -DGSEAL_ENABLE \
+    -DGDK_PIXBUF_DISABLE_DEPRECATED \
+    -DG_DISABLE_DEPRECATED
 
 xfce4_accessibility_settings_LDFLAGS = \
 	-no-undefined \
diff --git a/dialogs/accessibility-settings/accessibility-dialog.glade b/dialogs/accessibility-settings/accessibility-dialog.glade
index bf097d1..20831ca 100644
--- a/dialogs/accessibility-settings/accessibility-dialog.glade
+++ b/dialogs/accessibility-settings/accessibility-dialog.glade
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.20.0 -->
 <interface>
-  <requires lib="gtk+" version="2.20"/>
-  <!-- interface-requires libxfce4ui 4.5 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <requires lib="gtk+" version="3.20"/>
+  <requires lib="libxfce4ui-2" version="4.13"/>
   <object class="GtkAdjustment" id="bounce-keys-delay">
     <property name="lower">50</property>
     <property name="upper">1000</property>
@@ -59,19 +59,19 @@
     <property name="type_hint">dialog</property>
     <property name="subtitle" translatable="yes">Configure keyboard and mouse accessibility</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">2</property>
         <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
+          <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
-              <object class="GtkButton" id="button2">
-                <property name="label">gtk-close</property>
-                <property name="use_action_appearance">False</property>
+              <object class="GtkButton" id="button1">
+                <property name="label">gtk-help</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
@@ -81,12 +81,12 @@
                 <property name="expand">False</property>
                 <property name="fill">False</property>
                 <property name="position">0</property>
+                <property name="secondary">True</property>
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="button1">
-                <property name="label">gtk-help</property>
-                <property name="use_action_appearance">False</property>
+              <object class="GtkButton" id="button2">
+                <property name="label">gtk-close</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
@@ -96,7 +96,6 @@
                 <property name="expand">False</property>
                 <property name="fill">False</property>
                 <property name="position">0</property>
-                <property name="secondary">True</property>
               </packing>
             </child>
           </object>
@@ -108,28 +107,30 @@
           </packing>
         </child>
         <child>
-          <object class="GtkVBox" id="plug-child">
+          <object class="GtkBox" id="plug-child">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
             <child>
               <object class="GtkNotebook" id="notebook1">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="border_width">6</property>
                 <child>
-                  <object class="GtkVBox" id="vbox1">
+                  <object class="GtkBox" id="vbox1">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="border_width">6</property>
+                    <property name="orientation">vertical</property>
                     <property name="spacing">6</property>
                     <child>
                       <object class="GtkCheckButton" id="start-at">
                         <property name="label" translatable="yes">_Enable assistive technologies</property>
-                        <property name="use_action_appearance">False</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">If enabled, the session manager will start the required applications for screen readers and magnifiers</property>
+                        <property name="halign">start</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
@@ -154,7 +155,7 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHBox" id="info-logout">
+                      <object class="GtkBox" id="info-logout">
                         <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
@@ -162,7 +163,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="stock">gtk-info</property>
-                            <property name="icon-size">5</property>
+                            <property name="icon_size">5</property>
                           </object>
                           <packing>
                             <property name="expand">False</property>
@@ -174,7 +175,7 @@
                           <object class="GtkLabel" id="label18">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
+                            <property name="halign">start</property>
                             <property name="label" translatable="yes">Assistive technologies will be available the
 next time you login</property>
                             <property name="wrap">True</property>
@@ -193,7 +194,7 @@ next time you login</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHBox" id="info-no-at">
+                      <object class="GtkBox" id="info-no-at">
                         <property name="can_focus">False</property>
                         <property name="spacing">12</property>
                         <child>
@@ -201,7 +202,7 @@ next time you login</property>
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="stock">gtk-dialog-warning</property>
-                            <property name="icon-size">5</property>
+                            <property name="icon_size">5</property>
                           </object>
                           <packing>
                             <property name="expand">False</property>
@@ -213,7 +214,7 @@ next time you login</property>
                           <object class="GtkLabel" id="label20">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
+                            <property name="halign">start</property>
                             <property name="label" translatable="yes">No AT-SPI provider was found on your system</property>
                           </object>
                           <packing>
@@ -244,10 +245,11 @@ next time you login</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkVBox" id="vbox2">
+                  <object class="GtkBox" id="vbox2">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="border_width">12</property>
+                    <property name="orientation">vertical</property>
                     <property name="spacing">6</property>
                     <child>
                       <object class="GtkFrame" id="frame1">
@@ -262,19 +264,20 @@ next time you login</property>
                             <property name="bottom_padding">6</property>
                             <property name="left_padding">12</property>
                             <child>
-                              <object class="GtkVBox" id="vbox3">
+                              <object class="GtkBox" id="vbox3">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="border_width">6</property>
+                                <property name="orientation">vertical</property>
                                 <property name="spacing">6</property>
                                 <child>
                                   <object class="GtkCheckButton" id="sticky-keys-enabled">
                                     <property name="label" translatable="yes">_Use sticky keys</property>
-                                    <property name="use_action_appearance">False</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">False</property>
                                     <property name="tooltip_text" translatable="yes">When selected, modifier keys (such as Control, Alt, and Shift) do not need to be held down (they can be pressed and then released) when multiple keys would normally need to be pressed at the same time</property>
+                                    <property name="halign">start</property>
                                     <property name="use_underline">True</property>
                                     <property name="draw_indicator">True</property>
                                   </object>
@@ -291,18 +294,19 @@ next time you login</property>
                                     <property name="can_focus">False</property>
                                     <property name="left_padding">18</property>
                                     <child>
-                                      <object class="GtkVBox" id="vbox7">
+                                      <object class="GtkBox" id="vbox7">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
+                                        <property name="orientation">vertical</property>
                                         <property name="spacing">6</property>
                                         <child>
                                           <object class="GtkCheckButton" id="sticky-keys-latch-to-lock">
                                             <property name="label" translatable="yes">_Lock sticky keys</property>
-                                            <property name="use_action_appearance">False</property>
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
                                             <property name="receives_default">False</property>
                                             <property name="tooltip_text" translatable="yes">When selected, modifier keys (such as Control, Alt, and Shift) will remain locked in the pressed state until pressed again</property>
+                                            <property name="halign">start</property>
                                             <property name="use_underline">True</property>
                                             <property name="draw_indicator">True</property>
                                           </object>
@@ -315,14 +319,12 @@ next time you login</property>
                                         <child>
                                           <object class="GtkCheckButton" id="sticky-keys-two-keys-disable">
                                             <property name="label" translatable="yes">Disable sticky keys if two keys are _pressed</property>
-                                            <property name="use_action_appearance">False</property>
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
                                             <property name="receives_default">False</property>
                                             <property name="tooltip_text" translatable="yes">When selected, the "sticky keys" feature will be disabled if two keys are pressed simultaneously</property>
+                                            <property name="halign">start</property>
                                             <property name="use_underline">True</property>
-                                            <property name="xalign">0</property>
-                                            <property name="yalign">0</property>
                                             <property name="draw_indicator">True</property>
                                           </object>
                                           <packing>
@@ -374,19 +376,20 @@ next time you login</property>
                             <property name="bottom_padding">6</property>
                             <property name="left_padding">12</property>
                             <child>
-                              <object class="GtkVBox" id="vbox4">
+                              <object class="GtkBox" id="vbox4">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="border_width">6</property>
+                                <property name="orientation">vertical</property>
                                 <property name="spacing">6</property>
                                 <child>
                                   <object class="GtkCheckButton" id="slow-keys-enabled">
                                     <property name="label" translatable="yes">Use slow _keys</property>
-                                    <property name="use_action_appearance">False</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">False</property>
                                     <property name="tooltip_text" translatable="yes">To help prevent accidental keystrokes, slow keys requires that a key is held for a certain minimum amount of time before the keystroke will be accepted</property>
+                                    <property name="halign">start</property>
                                     <property name="use_underline">True</property>
                                     <property name="draw_indicator">True</property>
                                   </object>
@@ -403,7 +406,7 @@ next time you login</property>
                                     <property name="can_focus">False</property>
                                     <property name="left_padding">18</property>
                                     <child>
-                                      <object class="GtkHBox" id="hbox1">
+                                      <object class="GtkBox" id="hbox1">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                         <property name="spacing">12</property>
@@ -411,7 +414,6 @@ next time you login</property>
                                           <object class="GtkLabel" id="label6">
                                             <property name="visible">True</property>
                                             <property name="can_focus">False</property>
-                                            <property name="xalign">0</property>
                                             <property name="label" translatable="yes">Acceptance _delay:</property>
                                             <property name="use_underline">True</property>
                                             <property name="mnemonic_widget">slow-keys-scale</property>
@@ -423,7 +425,7 @@ next time you login</property>
                                           </packing>
                                         </child>
                                         <child>
-                                          <object class="GtkHScale" id="slow-keys-scale">
+                                          <object class="GtkScale" id="slow-keys-scale">
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
                                             <property name="tooltip_text" translatable="yes">The amount of time, in milliseconds, that must elapse before a keystroke will be accepted</property>
@@ -479,19 +481,20 @@ next time you login</property>
                             <property name="can_focus">False</property>
                             <property name="left_padding">12</property>
                             <child>
-                              <object class="GtkVBox" id="vbox6">
+                              <object class="GtkBox" id="vbox6">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="border_width">6</property>
+                                <property name="orientation">vertical</property>
                                 <property name="spacing">6</property>
                                 <child>
                                   <object class="GtkCheckButton" id="bounce-keys-enabled">
                                     <property name="label" translatable="yes">Use _bounce keys</property>
-                                    <property name="use_action_appearance">False</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">False</property>
                                     <property name="tooltip_text" translatable="yes">To help prevent accidental multiple keystrokes, bounce keys imposes a minimum delay between keystrokes</property>
+                                    <property name="halign">start</property>
                                     <property name="use_underline">True</property>
                                     <property name="draw_indicator">True</property>
                                   </object>
@@ -508,7 +511,7 @@ next time you login</property>
                                     <property name="can_focus">False</property>
                                     <property name="left_padding">18</property>
                                     <child>
-                                      <object class="GtkHBox" id="hbox2">
+                                      <object class="GtkBox" id="hbox2">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                         <property name="spacing">12</property>
@@ -516,7 +519,6 @@ next time you login</property>
                                           <object class="GtkLabel" id="label9">
                                             <property name="visible">True</property>
                                             <property name="can_focus">False</property>
-                                            <property name="xalign">0</property>
                                             <property name="label" translatable="yes">K_eystroke delay:</property>
                                             <property name="use_underline">True</property>
                                             <property name="mnemonic_widget">bounce-keys-scale</property>
@@ -528,7 +530,7 @@ next time you login</property>
                                           </packing>
                                         </child>
                                         <child>
-                                          <object class="GtkHScale" id="bounce-keys-scale">
+                                          <object class="GtkScale" id="bounce-keys-scale">
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
                                             <property name="tooltip_text" translatable="yes">The amount of time, in milliseconds, required between keystrokes</property>
@@ -590,10 +592,11 @@ next time you login</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkVBox" id="vbox5">
+                  <object class="GtkBox" id="vbox5">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="border_width">12</property>
+                    <property name="orientation">vertical</property>
                     <child>
                       <object class="GtkFrame" id="frame4">
                         <property name="visible">True</property>
@@ -607,18 +610,19 @@ next time you login</property>
                             <property name="border_width">6</property>
                             <property name="left_padding">12</property>
                             <child>
-                              <object class="GtkVBox" id="vbox8">
+                              <object class="GtkBox" id="vbox8">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
+                                <property name="orientation">vertical</property>
                                 <property name="spacing">6</property>
                                 <child>
                                   <object class="GtkCheckButton" id="mouse-emulation-enabled">
                                     <property name="label" translatable="yes">_Use mouse emulation</property>
-                                    <property name="use_action_appearance">False</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">False</property>
                                     <property name="tooltip_text" translatable="yes">When selected, the mouse pointer can be controlled using the keyboard number pad</property>
+                                    <property name="halign">start</property>
                                     <property name="use_underline">True</property>
                                     <property name="draw_indicator">True</property>
                                   </object>
@@ -629,267 +633,223 @@ next time you login</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkAlignment" id="mouse-emulation-box">
+                                  <object class="GtkGrid" id="mouse-emulation-grid">
                                     <property name="visible">True</property>
-                                    <property name="sensitive">False</property>
                                     <property name="can_focus">False</property>
-                                    <property name="left_padding">18</property>
+                                    <property name="margin_left">18</property>
+                                    <property name="margin_right">6</property>
+                                    <property name="margin_top">6</property>
+                                    <property name="margin_bottom">12</property>
+                                    <property name="row_spacing">6</property>
+                                    <property name="column_spacing">12</property>
                                     <child>
-                                      <object class="GtkTable" id="table1">
+                                      <object class="GtkLabel" id="label10">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
-                                        <property name="n_rows">5</property>
-                                        <property name="n_columns">3</property>
-                                        <property name="column_spacing">12</property>
-                                        <property name="row_spacing">6</property>
-                                        <child>
-                                          <object class="GtkLabel" id="label16">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">False</property>
-                                            <property name="xalign">0</property>
-                                            <property name="label" translatable="yes">R_epeat interval:</property>
-                                            <property name="use_underline">True</property>
-                                            <property name="mnemonic_widget">interval-widget</property>
-                                          </object>
-                                          <packing>
-                                            <property name="top_attach">1</property>
-                                            <property name="bottom_attach">2</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <object class="GtkLabel" id="label7">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">False</property>
-                                            <property name="xalign">0</property>
-                                            <property name="label" translatable="yes">_Acceleration delay:</property>
-                                            <property name="use_underline">True</property>
-                                            <property name="mnemonic_widget">delay-widget</property>
-                                          </object>
-                                          <packing>
-                                            <property name="x_options">GTK_FILL</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <object class="GtkLabel" id="label19">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">False</property>
-                                            <property name="xalign">0</property>
-                                            <property name="label" translatable="yes">Acceleration t_ime:</property>
-                                            <property name="use_underline">True</property>
-                                            <property name="mnemonic_widget">ttm-widget</property>
-                                          </object>
-                                          <packing>
-                                            <property name="top_attach">2</property>
-                                            <property name="bottom_attach">3</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <object class="GtkLabel" id="label22">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">False</property>
-                                            <property name="xalign">0</property>
-                                            <property name="label" translatable="yes">Ma_ximum speed:</property>
-                                            <property name="use_underline">True</property>
-                                            <property name="mnemonic_widget">max-speed-widget</property>
-                                          </object>
-                                          <packing>
-                                            <property name="top_attach">3</property>
-                                            <property name="bottom_attach">4</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <object class="GtkLabel" id="label8">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">False</property>
-                                            <property name="xalign">0</property>
-                                            <property name="label" translatable="yes">Acceleration _profile:</property>
-                                            <property name="use_underline">True</property>
-                                            <property name="mnemonic_widget">curve-widget</property>
-                                          </object>
-                                          <packing>
-                                            <property name="top_attach">4</property>
-                                            <property name="bottom_attach">5</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <object class="GtkLabel" id="label10">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">False</property>
-                                            <property name="xalign">0</property>
-                                            <property name="label" translatable="yes">msec</property>
-                                          </object>
-                                          <packing>
-                                            <property name="left_attach">2</property>
-                                            <property name="right_attach">3</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <object class="GtkLabel" id="label11">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">False</property>
-                                            <property name="xalign">0</property>
-                                            <property name="label" translatable="yes">msec</property>
-                                          </object>
-                                          <packing>
-                                            <property name="left_attach">2</property>
-                                            <property name="right_attach">3</property>
-                                            <property name="top_attach">1</property>
-                                            <property name="bottom_attach">2</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <object class="GtkLabel" id="label13">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">False</property>
-                                            <property name="xalign">0</property>
-                                            <property name="label" translatable="yes">msec</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>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <object class="GtkLabel" id="label14">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">False</property>
-                                            <property name="xalign">0</property>
-                                          </object>
-                                          <packing>
-                                            <property name="left_attach">2</property>
-                                            <property name="right_attach">3</property>
-                                            <property name="top_attach">4</property>
-                                            <property name="bottom_attach">5</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <object class="GtkLabel" id="label15">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">False</property>
-                                            <property name="xalign">0</property>
-                                            <property name="label" translatable="yes">pixels/sec</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>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <object class="GtkSpinButton" id="delay-widget">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="tooltip_text" translatable="yes">The time, in milliseconds, between the initial key press and first repeated motion event</property>
-                                            <property name="primary_icon_activatable">False</property>
-                                            <property name="secondary_icon_activatable">False</property>
-                                            <property name="primary_icon_sensitive">True</property>
-                                            <property name="secondary_icon_sensitive">True</property>
-                                            <property name="adjustment">mouse-emulation-delay</property>
-                                            <property name="numeric">True</property>
-                                            <property name="update_policy">if-valid</property>
-                                          </object>
-                                          <packing>
-                                            <property name="left_attach">1</property>
-                                            <property name="right_attach">2</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <object class="GtkSpinButton" id="interval-widget">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="tooltip_text" translatable="yes">The time, in milliseconds, between repeated motion events</property>
-                                            <property name="primary_icon_activatable">False</property>
-                                            <property name="secondary_icon_activatable">False</property>
-                                            <property name="primary_icon_sensitive">True</property>
-                                            <property name="secondary_icon_sensitive">True</property>
-                                            <property name="adjustment">mouse-emulation-interval</property>
-                                            <property name="numeric">True</property>
-                                            <property name="update_policy">if-valid</property>
-                                          </object>
-                                          <packing>
-                                            <property name="left_attach">1</property>
-                                            <property name="right_attach">2</property>
-                                            <property name="top_attach">1</property>
-                                            <property name="bottom_attach">2</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <object class="GtkSpinButton" id="curve-widget">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="tooltip_text" translatable="yes">The ramp used to reach maximum pointer speed</property>
-                                            <property name="primary_icon_activatable">False</property>
-                                            <property name="secondary_icon_activatable">False</property>
-                                            <property name="primary_icon_sensitive">True</property>
-                                            <property name="secondary_icon_sensitive">True</property>
-                                            <property name="adjustment">mouse-emulation-curve</property>
-                                            <property name="numeric">True</property>
-                                            <property name="update_policy">if-valid</property>
-                                          </object>
-                                          <packing>
-                                            <property name="left_attach">1</property>
-                                            <property name="right_attach">2</property>
-                                            <property name="top_attach">4</property>
-                                            <property name="bottom_attach">5</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <object class="GtkSpinButton" id="max-speed-widget">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="tooltip_text" translatable="yes">The maximum pointer speed after acceleration</property>
-                                            <property name="primary_icon_activatable">False</property>
-                                            <property name="secondary_icon_activatable">False</property>
-                                            <property name="primary_icon_sensitive">True</property>
-                                            <property name="secondary_icon_sensitive">True</property>
-                                            <property name="adjustment">mouse-emulation-max-speed</property>
-                                            <property name="numeric">True</property>
-                                            <property name="update_policy">if-valid</property>
-                                          </object>
-                                          <packing>
-                                            <property name="left_attach">1</property>
-                                            <property name="right_attach">2</property>
-                                            <property name="top_attach">3</property>
-                                            <property name="bottom_attach">4</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <object class="GtkSpinButton" id="ttm-widget">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="tooltip_text" translatable="yes">The time, in milliseconds, to get to maximum speed</property>
-                                            <property name="primary_icon_activatable">False</property>
-                                            <property name="secondary_icon_activatable">False</property>
-                                            <property name="primary_icon_sensitive">True</property>
-                                            <property name="secondary_icon_sensitive">True</property>
-                                            <property name="adjustment">mouse-emulation-time-to-max</property>
-                                            <property name="numeric">True</property>
-                                            <property name="update_policy">if-valid</property>
-                                          </object>
-                                          <packing>
-                                            <property name="left_attach">1</property>
-                                            <property name="right_attach">2</property>
-                                            <property name="top_attach">2</property>
-                                            <property name="bottom_attach">3</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                          </packing>
-                                        </child>
+                                        <property name="halign">start</property>
+                                        <property name="label" translatable="yes">msec</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">2</property>
+                                        <property name="top_attach">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkSpinButton" id="delay-widget">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="tooltip_text" translatable="yes">The time, in milliseconds, between the initial key press and first repeated motion event</property>
+                                        <property name="primary_icon_activatable">False</property>
+                                        <property name="secondary_icon_activatable">False</property>
+                                        <property name="adjustment">mouse-emulation-delay</property>
+                                        <property name="numeric">True</property>
+                                        <property name="update_policy">if-valid</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">1</property>
+                                        <property name="top_attach">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" id="label7">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="halign">start</property>
+                                        <property name="label" translatable="yes">_Acceleration delay:</property>
+                                        <property name="use_underline">True</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">0</property>
+                                        <property name="top_attach">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" id="label16">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="halign">start</property>
+                                        <property name="label" translatable="yes">R_epeat interval:</property>
+                                        <property name="use_underline">True</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">0</property>
+                                        <property name="top_attach">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkSpinButton" id="interval-widget">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="tooltip_text" translatable="yes">The time, in milliseconds, between repeated motion events</property>
+                                        <property name="primary_icon_activatable">False</property>
+                                        <property name="secondary_icon_activatable">False</property>
+                                        <property name="adjustment">mouse-emulation-interval</property>
+                                        <property name="numeric">True</property>
+                                        <property name="update_policy">if-valid</property>
                                       </object>
+                                      <packing>
+                                        <property name="left_attach">1</property>
+                                        <property name="top_attach">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" id="label11">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="halign">start</property>
+                                        <property name="label" translatable="yes">msec</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">2</property>
+                                        <property name="top_attach">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" id="label19">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="halign">start</property>
+                                        <property name="label" translatable="yes">Acceleration t_ime:</property>
+                                        <property name="use_underline">True</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">0</property>
+                                        <property name="top_attach">2</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkSpinButton" id="ttm-widget">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="tooltip_text" translatable="yes">The time, in milliseconds, to get to maximum speed</property>
+                                        <property name="hexpand">True</property>
+                                        <property name="primary_icon_activatable">False</property>
+                                        <property name="secondary_icon_activatable">False</property>
+                                        <property name="adjustment">mouse-emulation-time-to-max</property>
+                                        <property name="numeric">True</property>
+                                        <property name="update_policy">if-valid</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">1</property>
+                                        <property name="top_attach">2</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" id="label13">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="halign">start</property>
+                                        <property name="label" translatable="yes">msec</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">2</property>
+                                        <property name="top_attach">2</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" id="label22">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="halign">start</property>
+                                        <property name="label" translatable="yes">Ma_ximum speed:</property>
+                                        <property name="use_underline">True</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">0</property>
+                                        <property name="top_attach">3</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkSpinButton" id="max-speed-widget">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="tooltip_text" translatable="yes">The maximum pointer speed after acceleration</property>
+                                        <property name="hexpand">True</property>
+                                        <property name="primary_icon_activatable">False</property>
+                                        <property name="secondary_icon_activatable">False</property>
+                                        <property name="adjustment">mouse-emulation-max-speed</property>
+                                        <property name="numeric">True</property>
+                                        <property name="update_policy">if-valid</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">1</property>
+                                        <property name="top_attach">3</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" id="label15">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="halign">start</property>
+                                        <property name="label" translatable="yes">pixels/sec</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">2</property>
+                                        <property name="top_attach">3</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" id="label8">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="halign">start</property>
+                                        <property name="label" translatable="yes">Acceleration _profile:</property>
+                                        <property name="use_underline">True</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">0</property>
+                                        <property name="top_attach">4</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkSpinButton" id="curve-widget">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="tooltip_text" translatable="yes">The ramp used to reach maximum pointer speed</property>
+                                        <property name="primary_icon_activatable">False</property>
+                                        <property name="secondary_icon_activatable">False</property>
+                                        <property name="adjustment">mouse-emulation-curve</property>
+                                        <property name="numeric">True</property>
+                                        <property name="update_policy">if-valid</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">1</property>
+                                        <property name="top_attach">4</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" id="label14">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">2</property>
+                                        <property name="top_attach">4</property>
+                                      </packing>
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="expand">True</property>
+                                    <property name="expand">False</property>
                                     <property name="fill">True</property>
                                     <property name="position">1</property>
                                   </packing>
@@ -949,8 +909,8 @@ next time you login</property>
       </object>
     </child>
     <action-widgets>
-      <action-widget response="0">button2</action-widget>
       <action-widget response="-11">button1</action-widget>
+      <action-widget response="0">button2</action-widget>
     </action-widgets>
   </object>
 </interface>
diff --git a/dialogs/accessibility-settings/main.c b/dialogs/accessibility-settings/main.c
index 554975f..9011d68 100644
--- a/dialogs/accessibility-settings/main.c
+++ b/dialogs/accessibility-settings/main.c
@@ -27,6 +27,9 @@
 
 #include <glib.h>
 #include <gtk/gtk.h>
+#include <gtk/gtkx.h>
+
+#include <gdk/gdkx.h>
 
 #include <libxfce4ui/libxfce4ui.h>
 #include <libxfce4util/libxfce4util.h>
@@ -36,7 +39,7 @@
 
 
 
-static GdkNativeWindow opt_socket_id = 0;
+static gint opt_socket_id = 0;
 static gboolean opt_version = FALSE;
 static GOptionEntry entries[] =
 {
@@ -137,9 +140,10 @@ accessibility_settings_dialog_configure_widgets (GtkBuilder *builder)
 
     /* Mouse keys */
     object = gtk_builder_get_object (builder, "mouse-emulation-enabled");
-    box = gtk_builder_get_object (builder, "mouse-emulation-box");
+    box = gtk_builder_get_object (builder, "mouse-emulation-grid");
     g_signal_connect (object, "toggled", G_CALLBACK (accessibility_settings_sensitivity), box);
     xfconf_g_property_bind (accessibility_channel, "/MouseKeys", G_TYPE_BOOLEAN, object, "active");
+    gtk_widget_set_sensitive (GTK_WIDGET(box), xfconf_channel_get_bool(accessibility_channel, "/MouseKeys", TRUE));
 
     object = gtk_builder_get_object (builder, "mouse-emulation-delay");
     xfconf_g_property_bind (accessibility_channel, "/MouseKeys/Delay", G_TYPE_INT, object, "value");
@@ -252,7 +256,7 @@ main (gint argc, gchar **argv)
             gtk_window_present (GTK_WINDOW (dialog));
 
             /* To prevent the settings dialog to be saved in the session */
-            gdk_set_sm_client_id ("FAKE ID");
+            gdk_x11_set_sm_client_id ("FAKE ID");
 
             gtk_main ();
         }
@@ -268,11 +272,11 @@ main (gint argc, gchar **argv)
 
             /* Get plug child widget */
             plug_child = gtk_builder_get_object (builder, "plug-child");
-            gtk_widget_reparent (GTK_WIDGET (plug_child), plug);
+            xfce_widget_reparent (GTK_WIDGET (plug_child), plug);
             gtk_widget_show (GTK_WIDGET (plug_child));
 
             /* To prevent the settings dialog to be saved in the session */
-            gdk_set_sm_client_id ("FAKE ID");
+            gdk_x11_set_sm_client_id ("FAKE ID");
 
             /* Enter main loop */
             gtk_main ();
diff --git a/dialogs/appearance-settings/Makefile.am b/dialogs/appearance-settings/Makefile.am
index b5678e6..10591ed 100644
--- a/dialogs/appearance-settings/Makefile.am
+++ b/dialogs/appearance-settings/Makefile.am
@@ -19,7 +19,13 @@ xfce4_appearance_settings_CFLAGS = \
 	$(GTK_CFLAGS) \
 	$(LIBXFCE4UI_CFLAGS) \
 	$(XFCONF_CFLAGS) \
-	$(PLATFORM_CFLAGS)
+	$(PLATFORM_CFLAGS) \
+    -DGTK_DISABLE_SINGLE_INCLUDES \
+    -DGDK_DISABLE_DEPRECATED \
+    -DGTK_DISABLE_DEPRECATED \
+    -DGSEAL_ENABLE \
+    -DGDK_PIXBUF_DISABLE_DEPRECATED \
+    -DG_DISABLE_DEPRECATED
 
 xfce4_appearance_settings_LDFLAGS = \
 	-no-undefined \
diff --git a/dialogs/appearance-settings/appearance-dialog.glade b/dialogs/appearance-settings/appearance-dialog.glade
index 749161b..fcca2d1 100644
--- a/dialogs/appearance-settings/appearance-dialog.glade
+++ b/dialogs/appearance-settings/appearance-dialog.glade
@@ -1,8 +1,81 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.20.0 -->
 <interface>
-  <requires lib="gtk+" version="2.20"/>
-  <!-- interface-requires libxfce4ui 4.5 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <requires lib="gtk+" version="3.20"/>
+  <requires lib="libxfce4ui-2" version="4.13"/>
+  <object class="GtkListStore" id="liststore1">
+    <columns>
+      <!-- column-name title -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">None</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Slight</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Medium</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Full</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="liststore2">
+    <columns>
+      <!-- column-name title -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Icons</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Text</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Text under icons</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Text next to icons</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="liststore3">
+    <columns>
+      <!-- column-name factor -->
+      <column type="gint"/>
+      <!-- column-name text -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0">1</col>
+        <col id="1" translatable="yes">1x (no scaling)</col>
+      </row>
+      <row>
+        <col id="0">2</col>
+        <col id="1" translatable="yes">2x</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkAdjustment" id="xft_custom_dpi">
+    <property name="lower">48</property>
+    <property name="upper">1000</property>
+    <property name="value">96</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkListStore" id="xft_rgba_store">
+    <columns>
+      <!-- column-name pixbuf -->
+      <column type="GdkPixbuf"/>
+      <!-- column-name title -->
+      <column type="gchararray"/>
+    </columns>
+  </object>
   <object class="XfceTitledDialog" id="dialog">
     <property name="can_focus">False</property>
     <property name="title" translatable="yes">Appearance</property>
@@ -11,19 +84,19 @@
     <property name="type_hint">dialog</property>
     <property name="subtitle" translatable="yes">Customize the look of your desktop</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">2</property>
         <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
+          <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="button1">
                 <property name="label">gtk-close</property>
-                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
@@ -38,7 +111,6 @@
             <child>
               <object class="GtkButton" id="button2">
                 <property name="label">gtk-help</property>
-                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
@@ -69,8 +141,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="border_width">12</property>
-                <property name="hscrollbar_policy">automatic</property>
-                <property name="vscrollbar_policy">automatic</property>
                 <property name="shadow_type">etched-in</property>
                 <child>
                   <object class="GtkTreeView" id="gtk_theme_treeview">
@@ -78,6 +148,9 @@
                     <property name="can_focus">True</property>
                     <property name="headers_visible">False</property>
                     <property name="show_expanders">False</property>
+                    <child internal-child="selection">
+                      <object class="GtkTreeSelection" id="treeview-selection1"/>
+                    </child>
                   </object>
                 </child>
               </object>
@@ -98,8 +171,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="border_width">12</property>
-                <property name="hscrollbar_policy">automatic</property>
-                <property name="vscrollbar_policy">automatic</property>
                 <property name="shadow_type">etched-in</property>
                 <child>
                   <object class="GtkTreeView" id="icon_theme_treeview">
@@ -107,6 +178,9 @@
                     <property name="can_focus">True</property>
                     <property name="headers_visible">False</property>
                     <property name="show_expanders">False</property>
+                    <child internal-child="selection">
+                      <object class="GtkTreeSelection" id="treeview-selection2"/>
+                    </child>
                   </object>
                 </child>
               </object>
@@ -127,11 +201,12 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox3">
+              <object class="GtkBox" id="vbox3">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="border_width">12</property>
-                <property name="spacing">12</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">6</property>
                 <child>
                   <object class="GtkFrame" id="frame3">
                     <property name="visible">True</property>
@@ -147,11 +222,11 @@
                         <property name="left_padding">12</property>
                         <child>
                           <object class="GtkFontButton" id="gtk_fontname_button">
-                            <property name="use_action_appearance">False</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">True</property>
                             <property name="tooltip_text" translatable="yes">This font will be used as the default font used when drawing user interface text</property>
+                            <property name="font">Sans 12</property>
                             <property name="title" translatable="yes">Select a default font</property>
                           </object>
                         </child>
@@ -183,113 +258,101 @@
                     <property name="label_xalign">0</property>
                     <property name="shadow_type">none</property>
                     <child>
-                      <object class="GtkAlignment" id="alignment4">
+                      <object class="GtkGrid" id="grid1">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="bottom_padding">6</property>
-                        <property name="left_padding">12</property>
+                        <property name="margin_left">18</property>
+                        <property name="margin_right">6</property>
+                        <property name="margin_top">6</property>
+                        <property name="margin_bottom">12</property>
+                        <property name="row_spacing">6</property>
+                        <property name="column_spacing">12</property>
                         <child>
-                          <object class="GtkTable" id="table1">
+                          <object class="GtkCheckButton" id="xft_antialias_check_button">
+                            <property name="label" translatable="yes">_Enable anti-aliasing</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="tooltip_text" translatable="yes">Anti-aliasing, or font smoothing, can improve the look of text on the screen</property>
+                            <property name="halign">start</property>
+                            <property name="use_underline">True</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label10">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="border_width">6</property>
-                            <property name="n_rows">3</property>
-                            <property name="n_columns">2</property>
-                            <property name="column_spacing">12</property>
-                            <property name="row_spacing">6</property>
-                            <child>
-                              <object class="GtkComboBox" id="xft_hinting_style_combo_box">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="tooltip_text" translatable="yes">Many fonts contain information that provides extra hints as to how best draw the font; pick whichever looks best according to personal preference</property>
-                                <property name="model">liststore1</property>
-                                <child>
-                                  <object class="GtkCellRendererText" id="cellrenderertext1"/>
-                                  <attributes>
-                                    <attribute name="text">0</attribute>
-                                  </attributes>
-                                </child>
-                              </object>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkComboBox" id="xft_rgba_combo_box">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="tooltip_text" translatable="yes">Font quality on a TFT or LCD screen can be greatly improved by choosing the correct sub-pixel order of the screen</property>
-                                <property name="model">xft_rgba_store</property>
-                                <child>
-                                  <object class="GtkCellRendererText" id="cellrenderertext3"/>
-                                  <attributes>
-                                    <attribute name="text">1</attribute>
-                                  </attributes>
-                                </child>
-                                <child>
-                                  <object class="GtkCellRendererPixbuf" id="cellrendererpixbuf1"/>
-                                  <attributes>
-                                    <attribute name="pixbuf">0</attribute>
-                                  </attributes>
-                                </child>
-                              </object>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
-                              </packing>
-                            </child>
+                            <property name="halign">start</property>
+                            <property name="label" translatable="yes">Hintin_g:</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkComboBox" id="xft_hinting_style_combo_box">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="tooltip_text" translatable="yes">Many fonts contain information that provides extra hints as to how best draw the font; pick whichever looks best according to personal preference</property>
+                            <property name="hexpand">True</property>
+                            <property name="model">liststore1</property>
                             <child>
-                              <object class="GtkLabel" id="label11">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="xalign">1</property>
-                                <property name="label" translatable="yes">Sub-_pixel order:</property>
-                                <property name="use_underline">True</property>
-                                <property name="mnemonic_widget">xft_rgba_combo_box</property>
-                              </object>
-                              <packing>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
-                                <property name="x_options">GTK_FILL</property>
-                              </packing>
+                              <object class="GtkCellRendererText" id="cellrenderertext1"/>
+                              <attributes>
+                                <attribute name="text">0</attribute>
+                              </attributes>
                             </child>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="top_attach">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label11">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Sub-_pixel order:</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkComboBox" id="xft_rgba_combo_box">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="tooltip_text" translatable="yes">Font quality on a TFT or LCD screen can be greatly improved by choosing the correct sub-pixel order of the screen</property>
+                            <property name="hexpand">True</property>
+                            <property name="model">xft_rgba_store</property>
                             <child>
-                              <object class="GtkLabel" id="label10">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="xalign">0</property>
-                                <property name="label" translatable="yes">Hintin_g:</property>
-                                <property name="use_underline">True</property>
-                                <property name="mnemonic_widget">xft_hinting_style_combo_box</property>
-                              </object>
-                              <packing>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                                <property name="x_options">GTK_FILL</property>
-                              </packing>
+                              <object class="GtkCellRendererText" id="cellrenderertext3"/>
+                              <attributes>
+                                <attribute name="text">1</attribute>
+                              </attributes>
                             </child>
                             <child>
-                              <object class="GtkCheckButton" id="xft_antialias_check_button">
-                                <property name="label" translatable="yes">_Enable anti-aliasing</property>
-                                <property name="use_action_appearance">False</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="tooltip_text" translatable="yes">Anti-aliasing, or font smoothing, can improve the look of text on the screen</property>
-                                <property name="use_underline">True</property>
-                                <property name="active">True</property>
-                                <property name="draw_indicator">True</property>
-                              </object>
-                              <packing>
-                                <property name="right_attach">2</property>
-                              </packing>
+                              <object class="GtkCellRendererPixbuf" id="cellrendererpixbuf1"/>
+                              <attributes>
+                                <attribute name="pixbuf">0</attribute>
+                              </attributes>
                             </child>
                           </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="top_attach">2</property>
+                          </packing>
                         </child>
                       </object>
                     </child>
@@ -323,7 +386,7 @@
                         <property name="bottom_padding">6</property>
                         <property name="left_padding">12</property>
                         <child>
-                          <object class="GtkHBox" id="hbox1">
+                          <object class="GtkBox" id="hbox1">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="border_width">6</property>
@@ -331,7 +394,6 @@
                             <child>
                               <object class="GtkCheckButton" id="xft_custom_dpi_check_button">
                                 <property name="label" translatable="yes">Custom _DPI setting:</property>
-                                <property name="use_action_appearance">False</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
@@ -352,8 +414,6 @@
                                 <property name="can_focus">True</property>
                                 <property name="primary_icon_activatable">False</property>
                                 <property name="secondary_icon_activatable">False</property>
-                                <property name="primary_icon_sensitive">True</property>
-                                <property name="secondary_icon_sensitive">True</property>
                                 <property name="adjustment">xft_custom_dpi</property>
                                 <property name="snap_to_ticks">True</property>
                                 <property name="numeric">True</property>
@@ -404,10 +464,11 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox1">
+              <object class="GtkBox" id="vbox1">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="border_width">12</property>
+                <property name="orientation">vertical</property>
                 <property name="spacing">6</property>
                 <child>
                   <object class="GtkFrame" id="frame2">
@@ -470,19 +531,20 @@
                         <property name="bottom_padding">6</property>
                         <property name="left_padding">12</property>
                         <child>
-                          <object class="GtkVBox" id="vbox2">
+                          <object class="GtkBox" id="vbox2">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="border_width">6</property>
+                            <property name="orientation">vertical</property>
                             <property name="spacing">6</property>
                             <child>
                               <object class="GtkCheckButton" id="gtk_button_images_check_button">
                                 <property name="label" translatable="yes">Show images on _buttons</property>
-                                <property name="use_action_appearance">False</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">Specify whether icons should be displayed next to text in buttons</property>
+                                <property name="halign">start</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -495,11 +557,11 @@
                             <child>
                               <object class="GtkCheckButton" id="gtk_menu_images_check_button">
                                 <property name="label" translatable="yes">Show images in _menus</property>
-                                <property name="use_action_appearance">False</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">Specify whether icons should be displayed next to items in menus</property>
+                                <property name="halign">start</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -512,11 +574,11 @@
                             <child>
                               <object class="GtkCheckButton" id="gtk_caneditaccels_check_button">
                                 <property name="label" translatable="yes">Enable e_ditable accelerators</property>
-                                <property name="use_action_appearance">False</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">If selected, keyboard shortcuts for menu items can be changed by hovering the mouse over the menu item and pressing the new key combination for the shortcut</property>
+                                <property name="halign">start</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -559,19 +621,20 @@
                         <property name="bottom_padding">6</property>
                         <property name="left_padding">12</property>
                         <child>
-                          <object class="GtkVBox" id="vbox4">
+                          <object class="GtkBox" id="vbox4">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="border_width">6</property>
+                            <property name="orientation">vertical</property>
                             <property name="spacing">6</property>
                             <child>
                               <object class="GtkCheckButton" id="enable_event_sounds_check_button">
                                 <property name="label" translatable="yes">Enable _event sounds</property>
-                                <property name="use_action_appearance">False</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">Enable or disable event sounds globally (requires "Canberra" support)</property>
+                                <property name="halign">start</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -584,11 +647,11 @@
                             <child>
                               <object class="GtkCheckButton" id="enable_input_feedback_sounds_button">
                                 <property name="label" translatable="yes">Enable input feedbac_k sounds</property>
-                                <property name="use_action_appearance">False</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="tooltip_text" translatable="yes">Specify whether mouse clicks and other user input will cause event sounds to play</property>
+                                <property name="halign">start</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -619,6 +682,56 @@
                     <property name="position">2</property>
                   </packing>
                 </child>
+                <child>
+                  <object class="GtkFrame" id="frame6">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment4">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="border_width">6</property>
+                        <property name="bottom_padding">6</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkComboBox" id="gdk_window_scaling_factor_combo_box">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="tooltip_text" translatable="yes">Adjust the system-wide display scaling</property>
+                            <property name="model">liststore3</property>
+                            <property name="active">0</property>
+                            <property name="id_column">0</property>
+                            <child>
+                              <object class="GtkCellRendererText" id="cellrenderertext4"/>
+                              <attributes>
+                                <attribute name="text">1</attribute>
+                              </attributes>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label13">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">_Window Scaling</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">gtk_toolbar_style_combo_box</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
               </object>
               <packing>
                 <property name="position">3</property>
@@ -650,59 +763,4 @@
       <action-widget response="-11">button2</action-widget>
     </action-widgets>
   </object>
-  <object class="GtkListStore" id="liststore1">
-    <columns>
-      <!-- column-name title -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes">None</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Slight</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Medium</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Full</col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkListStore" id="liststore2">
-    <columns>
-      <!-- column-name title -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes">Icons</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Text</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Text under icons</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Text next to icons</col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkAdjustment" id="xft_custom_dpi">
-    <property name="lower">48</property>
-    <property name="upper">1000</property>
-    <property name="value">96</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkListStore" id="xft_rgba_store">
-    <columns>
-      <!-- column-name pixbuf -->
-      <column type="GdkPixbuf"/>
-      <!-- column-name title -->
-      <column type="gchararray"/>
-    </columns>
-  </object>
 </interface>
diff --git a/dialogs/appearance-settings/main.c b/dialogs/appearance-settings/main.c
index e3f472b..a683a5a 100644
--- a/dialogs/appearance-settings/main.c
+++ b/dialogs/appearance-settings/main.c
@@ -36,6 +36,9 @@
 #include <glib/gstdio.h>
 #include <fcntl.h>
 #include <gtk/gtk.h>
+#include <gtk/gtkx.h>
+
+#include <gdk/gdkx.h>
 
 #include <libxfce4ui/libxfce4ui.h>
 #include <libxfce4util/libxfce4util.h>
@@ -59,9 +62,8 @@
 #define GTK_RC_TOKEN_NORMAL ((gpointer) 4)
 #define GTK_RC_TOKEN_SELECTED ((gpointer) 5)
 
-gchar *gtkrc_get_color_scheme_for_theme (const gchar *gtkrc_filename);
-gboolean color_scheme_parse_colors (const gchar *scheme, GdkColor *colors);
-static GdkPixbuf *theme_create_preview (GdkColor *colors);
+gboolean gtkcss_get_color_scheme_for_theme (const gchar *gtkcss_filename, GdkRGBA **colors);
+static GdkPixbuf *theme_create_preview (GdkRGBA **colors);
 
 enum
 {
@@ -109,7 +111,7 @@ static const GtkTargetEntry theme_drop_targets[] =
 };
 
 /* Option entries */
-static GdkNativeWindow opt_socket_id = 0;
+static gint opt_socket_id = 0;
 static gboolean opt_version = FALSE;
 static GOptionEntry option_entries[] =
 {
@@ -185,304 +187,91 @@ compute_xsettings_dpi (GtkWidget *widget)
     return dpi;
 }
 
-/* Try to retrieve the color scheme and alternatively parse the colors from the gtkrc */
-gchar *
-gtkrc_get_color_scheme_for_theme (const gchar *gtkrc_filename)
-{
-    gint file = -1;
-    GString *result_string = g_string_new("");
-    GString *fallback_string = g_string_new("");
-    GString *tmp_string = g_string_new("");
-    gchar *result = NULL;
-    gboolean bg_normal = FALSE;
-    gboolean bg_selected = FALSE;
-    gboolean fg_normal = FALSE;
-    GSList *files = NULL;
-    GSList *read_files = NULL;
-    GTokenType token;
-    GScanner *scanner = gtk_rc_scanner_new ();
-
-    g_return_val_if_fail (gtkrc_filename != NULL, "");
-
-    g_scanner_scope_add_symbol (scanner, 0, "gtk_color_scheme", COLOR_SCHEME_SYMBOL);
-    g_scanner_scope_add_symbol (scanner, 0, "gtk-color-scheme", COLOR_SCHEME_SYMBOL);
-    g_scanner_scope_add_symbol (scanner, 0, "fg", GTK_RC_TOKEN_FG);
-    g_scanner_scope_add_symbol (scanner, 0, "bg", GTK_RC_TOKEN_BG);
-    g_scanner_scope_add_symbol (scanner, 0, "NORMAL", GTK_RC_TOKEN_NORMAL);
-    g_scanner_scope_add_symbol (scanner, 0, "SELECTED", GTK_RC_TOKEN_SELECTED);
-
-    files = g_slist_prepend (files, g_strdup (gtkrc_filename));
-    while (files != NULL)
-    {
-        gchar *filename = files->data;
-        files = g_slist_delete_link (files, files);
-
-        if (filename == NULL)
-            continue;
-
-        if (g_slist_find_custom (read_files, filename, (GCompareFunc) strcmp))
-        {
-            g_warning ("Recursion in the gtkrc detected!");
-            g_free (filename);
-            continue; /* skip this file since we've done it before... */
-        }
-
-        read_files = g_slist_prepend (read_files, filename);
-
-        file = g_open (filename, O_RDONLY);
-        if (file == -1)
-            g_warning ("Could not open file \"%s\"", filename);
-        else
-        {
-            g_scanner_input_file (scanner, file);
-            while ((token = g_scanner_get_next_token (scanner)) != G_TOKEN_EOF)
-            {
-                /* Scan the gtkrc file for the gtk-color-scheme */
-                if (GINT_TO_POINTER (token) == COLOR_SCHEME_SYMBOL)
-                {
-                    if (g_scanner_get_next_token (scanner) == '=')
-                    {
-                        token = g_scanner_get_next_token (scanner);
-                        if (token == G_TOKEN_STRING)
-                        {
-                            g_string_append_printf(result_string, "\n%s", scanner->value.v_string);
-                        }
-                        bg_normal = g_strstr_len(result_string->str, -1, "bg_color") != NULL;
-                        bg_selected = g_strstr_len(result_string->str, -1, "selected_bg_color") != NULL;
-                        fg_normal = g_strstr_len(result_string->str, -1, "fg_color") != NULL;
-                    }
-                }
-                /* Scan the gtkrc file for first occurences of bg[NORMAL], bg[SELECTED] and fg[NORMAL] in case
-                 * it doesn't provide a gtk-color-scheme */
-                if (result_string->len == 0)
-                {
-                    if (GINT_TO_POINTER (token) == GTK_RC_TOKEN_BG)
-                    {
-                        if (g_scanner_get_next_token (scanner) == G_TOKEN_LEFT_BRACE)
-                        {
-                            /* bg[SELECTED] */
-                            if (GINT_TO_POINTER (token = g_scanner_get_next_token (scanner)) == GTK_RC_TOKEN_SELECTED
-                                && g_scanner_get_next_token (scanner) == G_TOKEN_RIGHT_BRACE
-                                && g_scanner_get_next_token (scanner) == '=')
-                            {
-                                token = g_scanner_get_next_token (scanner);
-                                /* Parse colors in hex #rrggbb format */
-                                if (token == G_TOKEN_STRING)
-                                {
-                                    if (!g_strrstr (fallback_string->str, "selected_bg_color"))
-                                    {
-                                        g_string_append_printf(fallback_string, "\nselected_bg_color:%s", scanner->value.v_string);
-                                        bg_selected = TRUE;
-                                    }
-                                }
-                                /* Parse colors in { r, g, b } format */
-                                else if (token == G_TOKEN_LEFT_CURLY)
-                                {
-                                    if (!g_strrstr (fallback_string->str, "selected_bg_color"))
-                                    {
-                                        g_string_erase(tmp_string, 0, -1);
-                                        while (token != G_TOKEN_RIGHT_CURLY)
-                                        {
-                                            token = g_scanner_get_next_token (scanner);
-                                            if (token == G_TOKEN_FLOAT)
-                                                g_string_append_printf(tmp_string, "%02x", (uint) (scanner->value.v_float*255));
-                                        }
-                                        g_string_append_printf(fallback_string, "\nselected_bg_color:#%s", tmp_string->str);
-                                        bg_selected = TRUE;
-                                    }
-                                }
-                            }
-                            /* bg[NORMAL] */
-                            else if (GINT_TO_POINTER (token) == GTK_RC_TOKEN_NORMAL
-                                     && g_scanner_get_next_token (scanner) == G_TOKEN_RIGHT_BRACE
-                                     && g_scanner_get_next_token (scanner) == '=')
-                            {
-                                token = g_scanner_get_next_token (scanner);
-                                /* Parse colors in hex #rrggbb format */
-                                if (token == G_TOKEN_STRING)
-                                {
-                                    if (!g_strrstr (fallback_string->str, "bg_color"))
-                                    {
-                                        g_string_append_printf(fallback_string, "\nbg_color:%s", scanner->value.v_string);
-                                        bg_normal = TRUE;
-                                    }
-                                }
-                                /* Parse colors in { r, g, b } format */
-                                else if (token == G_TOKEN_LEFT_CURLY)
-                                {
-                                    if (!g_strrstr (fallback_string->str, "bg_color"))
-                                    {
-                                        g_string_erase(tmp_string, 0, -1);
-                                        while (token != G_TOKEN_RIGHT_CURLY)
-                                        {
-                                            token = g_scanner_get_next_token (scanner);
-                                            if (token == G_TOKEN_FLOAT)
-                                                g_string_append_printf(tmp_string, "%02x", (uint) (scanner->value.v_float*255));
-                                        }
-                                        g_string_append_printf(fallback_string, "\nbg_color:#%s", tmp_string->str);
-                                        bg_normal = TRUE;
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    else if (GINT_TO_POINTER (token) == GTK_RC_TOKEN_FG)
-                    {
-                        /* fg[NORMAL] */
-                        if (g_scanner_get_next_token (scanner) == G_TOKEN_LEFT_BRACE
-                            && GINT_TO_POINTER (token = g_scanner_get_next_token (scanner)) == GTK_RC_TOKEN_NORMAL
-                                && g_scanner_get_next_token (scanner) == G_TOKEN_RIGHT_BRACE
-                                && g_scanner_get_next_token (scanner) == '=')
-                        {
-                            token = g_scanner_get_next_token (scanner);
-                            /* Parse colors in hex #rrggbb format */
-                            if (token == G_TOKEN_STRING)
-                            {
-                                if (!g_strrstr (fallback_string->str, "fg_color"))
-                                {
-                                    g_string_append_printf(fallback_string, "\nfg_color:%s", scanner->value.v_string);
-                                    fg_normal = TRUE;
-                                }
-                            }
-                            /* Parse colors in { r, g, b } format */
-                            else if (token == G_TOKEN_LEFT_CURLY)
-                            {
-                                if (!g_strrstr (fallback_string->str, "fg_color"))
-                                {
-                                    g_string_erase(tmp_string, 0, -1);
-                                    while (token != G_TOKEN_RIGHT_CURLY)
-                                    {
-                                        token = g_scanner_get_next_token (scanner);
-                                        if (token == G_TOKEN_FLOAT)
-                                            g_string_append_printf(tmp_string, "%02x", (uint) (scanner->value.v_float*255));
-                                    }
-                                    g_string_append_printf(fallback_string, "\nfg_color:#%s", tmp_string->str);
-                                    fg_normal = TRUE;
-                                }
-                            }
-                        }
-                    }
-                }
-                /* Check whether we can stop parsing because all colors have been retrieved somehow */
-                if (bg_normal && bg_selected && fg_normal)
-                    break;
-            }
-        close (file);
-        }
-    }
-
-    g_slist_foreach (read_files, (GFunc) g_free, NULL);
-    g_slist_free (read_files);
-
-    g_scanner_destroy (scanner);
-
-    /* Use the fallback colors parsed from the theme if gtk-color-scheme is not defined */
-    /*
-    if (!result)
-        result = fallback;
-    */
-    if (result_string->len == 0)
-        result = g_strdup(fallback_string->str);
-    else
-        result = g_strdup(result_string->str);
-
-    g_string_free(result_string, TRUE);
-    g_string_free(fallback_string, TRUE);
-    g_string_free(tmp_string, TRUE);
-
-    return result;
-}
-
 gboolean
-color_scheme_parse_colors (const gchar *scheme, GdkColor *colors)
+gtkcss_get_color_scheme_for_theme (const gchar *gtkcss_filename,
+                                   GdkRGBA **colors)
 {
-    gchar **color_scheme_strings, **color_scheme_pair, *current_string;
-    gboolean found = FALSE;
-    gint i;
-
-    if (!scheme || !strcmp (scheme, ""))
-        return FALSE;
-
-    /* Initialise the array, fallback color is white */
-    for (i = 0; i < NUM_SYMBOLIC_COLORS; i++)
-        colors[i].red = colors[i].green = colors[i].blue = 65535.0;
-
-    /* The color scheme string consists of name:color pairs, separated by
-     * either semicolons or newlines, so first we split the string up by delimiter */
-    if (g_strrstr (scheme, ";"))
-        color_scheme_strings = g_strsplit (scheme, ";", 0);
-    else
-        color_scheme_strings = g_strsplit (scheme, "\n", 0);
-
-    /* Loop through the name:color pairs, and save the color if we recognise the name */
-    i = 0;
-    while ((current_string = color_scheme_strings[i++]))
-    {
-        color_scheme_pair = g_strsplit (current_string, ":", 0);
-
-        if (color_scheme_pair[0] != NULL && color_scheme_pair[1] != NULL)
-        {
-            g_strstrip (color_scheme_pair[0]);
-            g_strstrip (color_scheme_pair[1]);
-
-            if (!strcmp ("fg_color", color_scheme_pair[0]))
-            {
-              gdk_color_parse (color_scheme_pair[1], &colors[COLOR_FG]);
-              found = TRUE;
-            }
-            else if (!strcmp ("bg_color", color_scheme_pair[0]))
-            {
-              gdk_color_parse (color_scheme_pair[1], &colors[COLOR_BG]);
-              found = TRUE;
-            }
-            else if (!strcmp ("selected_bg_color", color_scheme_pair[0]))
-            {
-              gdk_color_parse (color_scheme_pair[1], &colors[COLOR_SELECTED_BG]);
-              found = TRUE;
-            }
-        }
-
-        g_strfreev (color_scheme_pair);
-    }
-
-    g_strfreev (color_scheme_strings);
-
-    return found;
+    GdkRGBA *bgn, *bgs, *fgn;
+    GtkCssProvider *provider;
+    GtkWidget *window, *icon_view;
+    GtkStyleContext *window_ctx, *icon_view_ctx;
+
+    g_return_val_if_fail (gtkcss_filename != NULL, FALSE);
+
+    provider = gtk_css_provider_new();
+    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+    icon_view = gtk_icon_view_new();
+    gtk_container_add (GTK_CONTAINER(window), icon_view);
+    window_ctx = gtk_widget_get_style_context(window);
+    icon_view_ctx = gtk_widget_get_style_context(icon_view);
+
+    gtk_css_provider_load_from_path (provider,
+                                     gtkcss_filename,
+                                     NULL);
+
+    gtk_style_context_add_provider(window_ctx,
+                                   GTK_STYLE_PROVIDER(provider),
+                                   GTK_STYLE_PROVIDER_PRIORITY_USER);
+    gtk_style_context_add_provider(icon_view_ctx,
+                                   GTK_STYLE_PROVIDER(provider),
+                                   GTK_STYLE_PROVIDER_PRIORITY_USER);
+
+    gtk_style_context_get (window_ctx,
+                           GTK_STATE_FLAG_NORMAL,
+                           "background-color", &bgn,
+                           NULL);
+
+    gtk_style_context_get (icon_view_ctx,
+                           GTK_STATE_FLAG_SELECTED,
+                           "background-color", &bgs,
+                           NULL);
+
+    gtk_style_context_get (window_ctx,
+                           GTK_STATE_FLAG_NORMAL,
+                           "color", &fgn,
+                           NULL);
+
+    colors[COLOR_BG] = bgn;
+    colors[COLOR_SELECTED_BG] = bgs;
+    colors[COLOR_FG] = fgn;
+
+    gtk_widget_destroy(window);
+
+    return TRUE;
 }
 
 static GdkPixbuf *
-theme_create_preview (GdkColor *colors)
+theme_create_preview (GdkRGBA **colors)
 {
     GdkPixbuf *theme_preview;
-    GdkPixmap *drawable;
-    GdkColormap *cmap = gdk_colormap_get_system ();
+    cairo_surface_t *s;
     cairo_t *cr;
     gint width = 44;
     gint height = 22;
 
-    drawable = gdk_pixmap_new (gdk_get_default_root_window(), width, height,
-                               gdk_drawable_get_depth (gdk_get_default_root_window ()));
-    cr = gdk_cairo_create (drawable);
+    s = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
+    cr = cairo_create (s);
+
     cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
 
     /* Draw three rectangles showcasing the background, foreground and selected background colors */
+    /* FIXME - Colors always appear solid black */
     cairo_rectangle (cr, 0, 0, 16, 22);
-    cairo_set_source_rgb (cr, colors[COLOR_BG].red / 65535.0, colors[COLOR_BG].green / 65535.0, colors[COLOR_BG].blue / 65535.0);
+    cairo_set_source_rgb (cr, colors[COLOR_BG]->red, colors[COLOR_BG]->green, colors[COLOR_BG]->blue);
     cairo_fill (cr);
 
     cairo_rectangle (cr, 15, 0, 30, 22);
-    cairo_set_source_rgb (cr, colors[COLOR_FG].red / 65535.0, colors[COLOR_FG].green / 65535.0, colors[COLOR_FG].blue / 65535.0);
+    cairo_set_source_rgb (cr, colors[COLOR_FG]->red, colors[COLOR_FG]->green, colors[COLOR_FG]->blue);
     cairo_fill (cr);
 
     cairo_rectangle (cr, 29, 0, 42, 22);
-    cairo_set_source_rgb (cr, colors[COLOR_SELECTED_BG].red / 65535.0, colors[COLOR_SELECTED_BG].green / 65535.0, colors[COLOR_SELECTED_BG].blue / 65535.0);
+    cairo_set_source_rgb (cr, colors[COLOR_SELECTED_BG]->red, colors[COLOR_SELECTED_BG]->green, colors[COLOR_SELECTED_BG]->blue);
     cairo_fill (cr);
 
-    theme_preview = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, width, height);
-    gdk_pixbuf_get_from_drawable (theme_preview, drawable, cmap, 0, 0, 0, 0, width, height);
+    theme_preview = gdk_pixbuf_get_from_surface (s, 0, 0, width, height);
 
-    g_object_unref (drawable);
     cairo_destroy (cr);
+    cairo_surface_destroy (s);
 
     return theme_preview;
 }
@@ -538,6 +327,18 @@ cb_toolbar_style_combo_changed (GtkComboBox *combo)
 }
 
 static void
+cb_window_scaling_factor_combo_changed (GtkComboBox *combo)
+{
+    gint active;
+
+    /* Get active item, prevent number outside the array (stay within zero-index) */
+    active = CLAMP (gtk_combo_box_get_active (combo) + 1, 1, 2);
+
+    /* Save setting */
+    xfconf_channel_set_int (xsettings_channel, "/Gdk/WindowScalingFactor", active);
+}
+
+static void
 cb_antialias_check_button_toggled (GtkToggleButton *toggle)
 {
     gint active;
@@ -619,7 +420,7 @@ cb_custom_dpi_spin_button_changed (GtkSpinButton   *custom_dpi_spin,
 {
     gint dpi = gtk_spin_button_get_value_as_int (custom_dpi_spin);
 
-    if (GTK_WIDGET_IS_SENSITIVE (custom_dpi_spin) && gtk_toggle_button_get_active (custom_dpi_toggle))
+    if (gtk_widget_is_sensitive (GTK_WIDGET(custom_dpi_spin)) && gtk_toggle_button_get_active (custom_dpi_toggle))
     {
         /* Custom DPI is turned on and the spin button has changed, so remember the value */
         xfconf_channel_set_int (xsettings_channel, "/Xfce/LastCustomDPI", dpi);
@@ -829,12 +630,13 @@ appearance_settings_load_ui_themes (preview_data *pd)
     const gchar  *theme_comment;
     gchar        *active_theme_name;
     gchar        *gtkrc_filename;
+    gchar        *gtkcss_filename;
     gchar        *comment_escaped;
     gint          i;
     GSList       *check_list = NULL;
     gchar        *color_scheme = NULL;
     GdkPixbuf    *preview;
-    GdkColor      colors[NUM_SYMBOLIC_COLORS];
+    GdkRGBA      *colors[NUM_SYMBOLIC_COLORS];
 
     g_return_val_if_fail (pd != NULL, FALSE);
 
@@ -864,6 +666,7 @@ appearance_settings_load_ui_themes (preview_data *pd)
         {
             /* Build the theme style filename */
             gtkrc_filename = g_build_filename (ui_theme_dirs[i], file, "gtk-2.0", "gtkrc", NULL);
+            gtkcss_filename = g_build_filename (ui_theme_dirs[i], file, "gtk-3.0", "gtk.css", NULL);
 
             /* Check if the gtkrc file exists and the theme is not already in the list */
             if (g_file_test (gtkrc_filename, G_FILE_TEST_EXISTS)
@@ -895,9 +698,10 @@ appearance_settings_load_ui_themes (preview_data *pd)
                 }
 
                 /* Retrieve the color values from the theme, parse them and create the palette preview pixbuf */
-                color_scheme = gtkrc_get_color_scheme_for_theme (gtkrc_filename);
-                if (color_scheme_parse_colors (color_scheme, colors))
+                if (g_file_test (gtkcss_filename, G_FILE_TEST_EXISTS) && gtkcss_get_color_scheme_for_theme (gtkcss_filename, colors))
+                {
                     preview = theme_create_preview (colors);
+                }
                 /* If the color scheme parsing doesn't return anything useful, show a blank pixbuf */
                 else
                 {
@@ -935,6 +739,7 @@ appearance_settings_load_ui_themes (preview_data *pd)
 
             /* Free gtkrc filename */
             g_free (gtkrc_filename);
+            g_free (gtkcss_filename);
         }
 
         /* Close directory handle */
@@ -1000,6 +805,12 @@ appearance_settings_dialog_channel_property_changed (XfconfChannel *channel,
         }
         g_free (str);
     }
+    else if (strcmp (property_name, "/Gdk/WindowScalingFactor") == 0)
+    {
+        i = xfconf_channel_get_int (xsettings_channel, property_name, 1);
+        object = gtk_builder_get_object (builder, "gdk_window_scaling_factor_combo_box");
+        gtk_combo_box_set_active (GTK_COMBO_BOX (object), i - 1);
+    }
     else if (strcmp (property_name, "/Xft/HintStyle") == 0)
     {
         str = xfconf_channel_get_string (xsettings_channel, property_name, xft_hint_styles_array[0]);
@@ -1236,7 +1047,7 @@ cb_theme_uri_dropped (GtkWidget        *widget,
 
     g_strfreev (uris);
     gdk_window_set_cursor (gdkwindow, NULL);
-    gdk_cursor_unref (cursor);
+    g_object_unref (cursor);
 
     if (something_installed)
     {
@@ -1281,7 +1092,6 @@ appearance_settings_dialog_configure_widgets (GtkBuilder *builder)
     gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (list_store), COLUMN_THEME_DISPLAY_NAME, GTK_SORT_ASCENDING);
     gtk_tree_view_set_model (GTK_TREE_VIEW (object), GTK_TREE_MODEL (list_store));
     gtk_tree_view_set_tooltip_column (GTK_TREE_VIEW (object), COLUMN_THEME_COMMENT);
-    gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (object), TRUE);
 
     /* Single-column layout */
     column = gtk_tree_view_column_new ();
@@ -1302,7 +1112,7 @@ appearance_settings_dialog_configure_widgets (GtkBuilder *builder)
     renderer = gtk_cell_renderer_pixbuf_new ();
     gtk_tree_view_column_pack_start (column, renderer, FALSE);
     gtk_tree_view_column_set_attributes (column, renderer, "visible", COLUMN_THEME_NO_CACHE, NULL);
-    g_object_set (G_OBJECT (renderer), "icon-name", GTK_STOCK_DIALOG_WARNING, NULL);
+    g_object_set (G_OBJECT (renderer), "icon-name", "dialog-warning", NULL);
 
     pd = preview_data_new (GTK_LIST_STORE (list_store), GTK_TREE_VIEW (object));
     g_idle_add_full (G_PRIORITY_DEFAULT_IDLE,
@@ -1430,6 +1240,11 @@ appearance_settings_dialog_configure_widgets (GtkBuilder *builder)
     gtk_widget_set_sensitive (GTK_WIDGET (object2), gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (object)));
     g_signal_connect (G_OBJECT (object), "toggled", G_CALLBACK (cb_custom_dpi_check_button_toggled), object2);
     g_signal_connect (G_OBJECT (object2), "value-changed", G_CALLBACK (cb_custom_dpi_spin_button_changed), object);
+    
+    /* Window scaling factor */
+    object = gtk_builder_get_object (builder, "gdk_window_scaling_factor_combo_box");
+    appearance_settings_dialog_channel_property_changed (xsettings_channel, "/Gdk/WindowScalingFactor", NULL, builder);
+    g_signal_connect (G_OBJECT (object), "changed", G_CALLBACK(cb_window_scaling_factor_combo_changed), NULL);
 
 #ifdef ENABLE_SOUND_SETTINGS
     /* Sounds */
@@ -1545,7 +1360,7 @@ main (gint argc, gchar **argv)
                 gtk_window_present (GTK_WINDOW (dialog));
 
                 /* To prevent the settings dialog to be saved in the session */
-                gdk_set_sm_client_id ("FAKE ID");
+                gdk_x11_set_sm_client_id ("FAKE ID");
 
                 gtk_main ();
             }
@@ -1561,11 +1376,11 @@ main (gint argc, gchar **argv)
 
                 /* Get plug child widget */
                 plug_child = gtk_builder_get_object (builder, "plug-child");
-                gtk_widget_reparent (GTK_WIDGET (plug_child), plug);
+                xfce_widget_reparent (GTK_WIDGET (plug_child), plug);
                 gtk_widget_show (GTK_WIDGET (plug_child));
 
                 /* To prevent the settings dialog to be saved in the session */
-                gdk_set_sm_client_id ("FAKE ID");
+                gdk_x11_set_sm_client_id ("FAKE ID");
 
                 /* Enter main loop */
                 gtk_main ();
diff --git a/dialogs/display-settings/Makefile.am b/dialogs/display-settings/Makefile.am
index 5a1fa2e..7da0bbe 100644
--- a/dialogs/display-settings/Makefile.am
+++ b/dialogs/display-settings/Makefile.am
@@ -64,7 +64,7 @@ display-dialog_ui.h: display-dialog.glade
 
 minimal-display-dialog_ui.h: minimal-display-dialog.glade
 	exo-csource --static --strip-comments --strip-content --name=minimal_display_dialog_ui $< >$@
-	
+
 identity-popup_ui.h: identity-popup.glade
 	exo-csource --static --strip-comments --strip-content --name=identity_popup_ui $< >$@
 
diff --git a/dialogs/display-settings/confirmation-dialog.glade b/dialogs/display-settings/confirmation-dialog.glade
index fe2bdca..89681b3 100644
--- a/dialogs/display-settings/confirmation-dialog.glade
+++ b/dialogs/display-settings/confirmation-dialog.glade
@@ -1,10 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.20.0 -->
 <interface>
-  <requires lib="gtk+" version="2.24"/>
-  <!-- interface-naming-policy project-wide -->
+  <requires lib="gtk+" version="3.20"/>
   <object class="GtkDialog" id="dialog1">
     <property name="can_focus">False</property>
-    <property name="border_width">5</property>
     <property name="title" translatable="yes">Confirmation</property>
     <property name="resizable">False</property>
     <property name="modal">True</property>
@@ -12,12 +11,12 @@
     <property name="icon_name">dialog-question</property>
     <property name="type_hint">normal</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="spacing">2</property>
         <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
+          <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
@@ -29,7 +28,6 @@
                 <property name="can_default">True</property>
                 <property name="has_default">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -43,7 +41,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -60,17 +57,21 @@
           </packing>
         </child>
         <child>
-          <object class="GtkHBox" id="hbox1">
+          <object class="GtkBox" id="hbox1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
+            <property name="margin_right">12</property>
+            <property name="margin_top">12</property>
             <child>
               <object class="GtkImage" id="image1">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0.20000000298023224</property>
-                <property name="xpad">10</property>
+                <property name="halign">start</property>
+                <property name="valign">start</property>
+                <property name="margin_right">12</property>
+                <property name="margin_start">10</property>
                 <property name="stock">gtk-dialog-question</property>
-                <property name="icon-size">6</property>
+                <property name="icon_size">6</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -79,16 +80,16 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox1">
+              <object class="GtkBox" id="vbox1">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">12</property>
                 <child>
                   <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
-                    <property name="yalign">0</property>
-                    <property name="ypad">10</property>
+                    <property name="halign">start</property>
                     <property name="label" translatable="yes"><big><b>Would you like to keep this configuration?</b></big></property>
                     <property name="use_markup">True</property>
                   </object>
@@ -102,10 +103,10 @@
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
-                    <property name="yalign">0</property>
-                    <property name="ypad">10</property>
+                    <property name="halign">start</property>
+                    <property name="margin_bottom">24</property>
                     <property name="label" translatable="yes">The previous configuration will be restored in 10 seconds if you do not reply to this question.</property>
+                    <property name="justify">fill</property>
                     <property name="wrap">True</property>
                   </object>
                   <packing>
diff --git a/dialogs/display-settings/display-dialog.glade b/dialogs/display-settings/display-dialog.glade
index 34c71a8..fb22b19 100644
--- a/dialogs/display-settings/display-dialog.glade
+++ b/dialogs/display-settings/display-dialog.glade
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.20.0 -->
 <interface>
-  <requires lib="gtk+" version="2.24"/>
-  <!-- interface-requires libxfce4ui 4.5 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <requires lib="gtk+" version="3.20"/>
+  <requires lib="libxfce4ui-2" version="4.13"/>
   <object class="XfceTitledDialog" id="display-dialog">
     <property name="can_focus">False</property>
     <property name="title" translatable="yes">Display</property>
@@ -13,18 +13,61 @@
     <property name="type_hint">dialog</property>
     <property name="subtitle" translatable="yes">Configure screen settings and layout</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="button-help">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+                <property name="secondary">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="button-close">
+                <property name="label">gtk-close</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
         <child>
-          <object class="GtkVBox" id="plug-child">
+          <object class="GtkBox" id="plug-child">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="border_width">12</property>
+            <property name="orientation">vertical</property>
             <property name="spacing">6</property>
             <child>
-              <object class="GtkHBox" id="display-settings">
+              <object class="GtkBox" id="display-settings">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="spacing">12</property>
@@ -44,23 +87,18 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkTable" id="table1">
+                  <object class="GtkGrid" id="table1">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="n_rows">8</property>
-                    <property name="n_columns">2</property>
-                    <property name="column_spacing">12</property>
                     <property name="row_spacing">6</property>
+                    <property name="column_spacing">12</property>
                     <child>
                       <object class="GtkComboBox" id="randr-reflection">
                         <property name="can_focus">False</property>
                       </object>
                       <packing>
                         <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
                         <property name="top_attach">7</property>
-                        <property name="bottom_attach">8</property>
-                        <property name="y_options">GTK_FILL</property>
                       </packing>
                     </child>
                     <child>
@@ -70,10 +108,7 @@
                       </object>
                       <packing>
                         <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
                         <property name="top_attach">6</property>
-                        <property name="bottom_attach">7</property>
-                        <property name="y_options">GTK_FILL</property>
                       </packing>
                     </child>
                     <child>
@@ -83,10 +118,7 @@
                       </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">GTK_FILL</property>
                       </packing>
                     </child>
                     <child>
@@ -96,69 +128,58 @@
                       </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">GTK_FILL</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkLabel" id="label-reflection">
                         <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
+                        <property name="halign">start</property>
                         <property name="label" translatable="yes">Ref_lection:</property>
                         <property name="use_underline">True</property>
                       </object>
                       <packing>
+                        <property name="left_attach">0</property>
                         <property name="top_attach">7</property>
-                        <property name="bottom_attach">8</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options">GTK_FILL</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkLabel" id="label5">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
+                        <property name="halign">start</property>
                         <property name="label" translatable="yes">Ro_tation:</property>
                         <property name="use_underline">True</property>
                       </object>
                       <packing>
+                        <property name="left_attach">0</property>
                         <property name="top_attach">6</property>
-                        <property name="bottom_attach">7</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options">GTK_FILL</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkLabel" id="label4">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
+                        <property name="halign">start</property>
                         <property name="label" translatable="yes">Refresh _rate:</property>
                         <property name="use_underline">True</property>
                       </object>
                       <packing>
+                        <property name="left_attach">0</property>
                         <property name="top_attach">5</property>
-                        <property name="bottom_attach">6</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options">GTK_FILL</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkLabel" id="label3">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
+                        <property name="halign">start</property>
                         <property name="label" translatable="yes">R_esolution:</property>
                         <property name="use_underline">True</property>
                       </object>
                       <packing>
+                        <property name="left_attach">0</property>
                         <property name="top_attach">4</property>
-                        <property name="bottom_attach">5</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options">GTK_FILL</property>
                       </packing>
                     </child>
                     <child>
@@ -171,11 +192,9 @@
                         <property name="draw_indicator">True</property>
                       </object>
                       <packing>
-                        <property name="right_attach">2</property>
+                        <property name="left_attach">0</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="width">2</property>
                       </packing>
                     </child>
                     <child>
@@ -188,11 +207,9 @@
                         <property name="draw_indicator">True</property>
                       </object>
                       <packing>
-                        <property name="right_attach">2</property>
+                        <property name="left_attach">0</property>
                         <property name="top_attach">3</property>
-                        <property name="bottom_attach">4</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options">GTK_FILL</property>
+                        <property name="width">2</property>
                       </packing>
                     </child>
                     <child>
@@ -201,8 +218,9 @@
                         <property name="can_focus">False</property>
                       </object>
                       <packing>
-                        <property name="right_attach">2</property>
-                        <property name="y_options">GTK_FILL</property>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">0</property>
+                        <property name="width">2</property>
                       </packing>
                     </child>
                     <child>
@@ -216,11 +234,9 @@
                         <property name="draw_indicator">True</property>
                       </object>
                       <packing>
-                        <property name="right_attach">2</property>
+                        <property name="left_attach">0</property>
                         <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options">GTK_FILL</property>
+                        <property name="width">2</property>
                       </packing>
                     </child>
                   </object>
@@ -242,7 +258,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <child>
-                  <object class="GtkHBox" id="hbox1">
+                  <object class="GtkBox" id="hbox1">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <child>
@@ -261,7 +277,7 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHButtonBox" id="hbuttonbox1">
+                      <object class="GtkButtonBox" id="hbuttonbox1">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="spacing">6</property>
@@ -318,48 +334,6 @@
             <property name="position">0</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="button-help">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-                <property name="secondary">True</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="button-close">
-                <property name="label">gtk-close</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="pack_type">end</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/dialogs/display-settings/foo-marshal.c b/dialogs/display-settings/foo-marshal.c
index 0f4ff8f..a69b65b 100644
--- a/dialogs/display-settings/foo-marshal.c
+++ b/dialogs/display-settings/foo-marshal.c
@@ -1,6 +1,6 @@
 
-#include <glib-object.h>
-#include "foo-marshal.h"
+#include	<glib-object.h>
+#include	"foo-marshal.h"
 
 
 #ifdef G_ENABLE_DEBUG
@@ -277,4 +277,3 @@ foo_marshal_VOID__POINTER_POINTER (GClosure     *closure,
             g_marshal_value_peek_pointer (param_values + 2),
             data2);
 }
-
diff --git a/dialogs/display-settings/foo-marshal.h b/dialogs/display-settings/foo-marshal.h
index cc91707..4bef795 100644
--- a/dialogs/display-settings/foo-marshal.h
+++ b/dialogs/display-settings/foo-marshal.h
@@ -2,7 +2,7 @@
 #ifndef __foo_marshal_MARSHAL_H__
 #define __foo_marshal_MARSHAL_H__
 
-#include <glib-object.h>
+#include	<glib-object.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -33,7 +33,7 @@ extern void foo_marshal_VOID__UINT_UINT (GClosure     *closure,
                                          gpointer      marshal_data);
 
 /* VOID:BOXED (marshal.list:4) */
-#define foo_marshal_VOID__BOXED g_cclosure_marshal_VOID__BOXED
+#define foo_marshal_VOID__BOXED	g_cclosure_marshal_VOID__BOXED
 
 /* VOID:BOXED,BOXED (marshal.list:5) */
 extern void foo_marshal_VOID__BOXED_BOXED (GClosure     *closure,
diff --git a/dialogs/display-settings/identity-popup.glade b/dialogs/display-settings/identity-popup.glade
index f6386d5..1d4be84 100644
--- a/dialogs/display-settings/identity-popup.glade
+++ b/dialogs/display-settings/identity-popup.glade
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.20.0 -->
 <interface>
-  <requires lib="gtk+" version="2.24"/>
-  <!-- interface-naming-policy project-wide -->
+  <requires lib="gtk+" version="3.20"/>
   <object class="GtkWindow" id="popup">
     <property name="can_focus">False</property>
     <property name="type">popup</property>
@@ -9,7 +9,7 @@
     <property name="type_hint">notification</property>
     <property name="gravity">south</property>
     <child>
-      <object class="GtkHBox" id="hbox1">
+      <object class="GtkBox" id="hbox1">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="border_width">6</property>
@@ -20,7 +20,7 @@
             <property name="can_focus">False</property>
             <property name="pixel_size">48</property>
             <property name="icon_name">video-display</property>
-            <property name="icon-size">6</property>
+            <property name="icon_size">6</property>
           </object>
           <packing>
             <property name="expand">True</property>
@@ -29,15 +29,15 @@
           </packing>
         </child>
         <child>
-          <object class="GtkVBox" id="vbox1">
+          <object class="GtkBox" id="vbox1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
             <child>
               <object class="GtkLabel" id="display_name">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="no"><big><b>Display: Name</b></big></property>
+                <property name="label"><big><b>Display: Name</b></big></property>
                 <property name="use_markup">True</property>
               </object>
               <packing>
@@ -50,8 +50,7 @@
               <object class="GtkLabel" id="display_details">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="no">Resolution: 1280 x 800</property>
+                <property name="label">Resolution: 1280 x 800</property>
               </object>
               <packing>
                 <property name="expand">True</property>
diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 199e291..bf93a42 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -32,6 +32,7 @@
 
 #include <glib.h>
 #include <gtk/gtk.h>
+#include <gtk/gtkx.h>
 #include <gdk/gdkx.h>
 #include <gdk/gdkkeysyms.h>
 
@@ -112,7 +113,7 @@ typedef struct
 
 
 /* Option entries */
-static GdkNativeWindow opt_socket_id = 0;
+static gint opt_socket_id = 0;
 static gboolean opt_version = FALSE;
 static gboolean minimal = FALSE;
 static GOptionEntry option_entries[] =
@@ -166,6 +167,8 @@ static void display_settings_minimal_only_display2_toggled   (GtkToggleButton *b
 static void display_setting_primary_toggled                  (GtkToggleButton *button,
                                                               GtkBuilder *builder);
 
+
+
 static void
 display_settings_changed (void)
 {
@@ -643,52 +646,55 @@ display_setting_screen_changed (GtkWidget *widget,
                                 GdkScreen *old_screen,
                                 gpointer   userdata)
 {
-    GdkScreen   *screen = gtk_widget_get_screen (widget);
-    GdkColormap *colormap = gdk_screen_get_rgba_colormap (screen);
+    GdkScreen *screen = gtk_widget_get_screen (widget);
+    GdkVisual *visual = gdk_screen_get_rgba_visual (screen);
 
     if (gdk_screen_is_composited (screen))
         supports_alpha = TRUE;
     else
     {
-        colormap = gdk_screen_get_rgb_colormap (screen);
+        visual = gdk_screen_get_system_visual (screen);
         supports_alpha = FALSE;
     }
 
-    gtk_widget_set_colormap (widget, colormap);
+    gtk_widget_set_visual (widget, visual);
 }
 
 static gboolean
-display_setting_identity_popup_expose (GtkWidget      *popup,
-                                       GdkEventExpose *event,
+display_setting_identity_popup_draw (GtkWidget      *popup,
+                                       cairo_t *c,
                                        GtkBuilder     *builder)
 {
-    cairo_t         *cr = gdk_cairo_create (popup->window);
+    cairo_t         *cr = gdk_cairo_create (gtk_widget_get_window(popup));
     cairo_pattern_t *vertical_gradient, *innerstroke_gradient, *selected_gradient, *selected_innerstroke_gradient;
     gint             radius;
     gboolean         selected = (g_hash_table_lookup (display_popups, GINT_TO_POINTER (active_output)) == popup);
 
+    GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
+    gtk_widget_get_allocation(GTK_WIDGET(popup), allocation);
+
     radius = 10;
     cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
 
     /* Create the various gradients */
-    vertical_gradient = cairo_pattern_create_linear (0, 0, 0, popup->allocation.height);
+    vertical_gradient = cairo_pattern_create_linear (0, 0, 0, allocation->height);
     cairo_pattern_add_color_stop_rgb (vertical_gradient, 0, 0.25, 0.25, 0.25);
     cairo_pattern_add_color_stop_rgb (vertical_gradient, 0.24, 0.15, 0.15, 0.15);
     cairo_pattern_add_color_stop_rgb (vertical_gradient, 0.6, 0.0, 0.0, 0.0);
 
-    innerstroke_gradient = cairo_pattern_create_linear (0, 0, 0, popup->allocation.height);
+    innerstroke_gradient = cairo_pattern_create_linear (0, 0, 0, allocation->height);
     cairo_pattern_add_color_stop_rgb (innerstroke_gradient, 0, 0.35, 0.35, 0.35);
     cairo_pattern_add_color_stop_rgb (innerstroke_gradient, 0.4, 0.25, 0.25, 0.25);
     cairo_pattern_add_color_stop_rgb (innerstroke_gradient, 0.7, 0.15, 0.15, 0.15);
     cairo_pattern_add_color_stop_rgb (innerstroke_gradient, 0.85, 0.0, 0.0, 0.0);
 
-    selected_gradient = cairo_pattern_create_linear (0, 0, 0, popup->allocation.height);
+    selected_gradient = cairo_pattern_create_linear (0, 0, 0, allocation->height);
     cairo_pattern_add_color_stop_rgb (selected_gradient, 0, 0.05, 0.20, 0.46);
     cairo_pattern_add_color_stop_rgb (selected_gradient, 0.4, 0.05, 0.12, 0.25);
     cairo_pattern_add_color_stop_rgb (selected_gradient, 0.6, 0.05, 0.10, 0.20);
     cairo_pattern_add_color_stop_rgb (selected_gradient, 0.8, 0.0, 0.02, 0.05);
 
-    selected_innerstroke_gradient = cairo_pattern_create_linear (0, 0, 0, popup->allocation.height);
+    selected_innerstroke_gradient = cairo_pattern_create_linear (0, 0, 0, allocation->height);
     cairo_pattern_add_color_stop_rgb (selected_innerstroke_gradient, 0, 0.15, 0.45, 0.75);
     cairo_pattern_add_color_stop_rgb (selected_innerstroke_gradient, 0.7, 0.0, 0.15, 0.25);
     cairo_pattern_add_color_stop_rgb (selected_innerstroke_gradient, 0.85, 0.0, 0.0, 0.0);
@@ -703,7 +709,7 @@ display_setting_identity_popup_expose (GtkWidget      *popup,
             cairo_set_source (cr, selected_gradient);
         cairo_paint (cr);
         cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
-        cairo_rectangle (cr, 0.5, 0.5, popup->allocation.width-0.5, popup->allocation.height-0.5);
+        cairo_rectangle (cr, 0.5, 0.5, allocation->width-0.5, allocation->height-0.5);
         cairo_stroke (cr);
 
         /* Draw the inner stroke */
@@ -711,15 +717,15 @@ display_setting_identity_popup_expose (GtkWidget      *popup,
         if (selected)
             cairo_set_source_rgb (cr, 0.15, 0.45, 0.75);
         cairo_move_to (cr, 1.5, 1.5);
-        cairo_line_to (cr, popup->allocation.width-1, 1.5);
+        cairo_line_to (cr, allocation->width-1, 1.5);
         cairo_stroke (cr);
         cairo_set_source (cr, innerstroke_gradient);
         if (selected)
             cairo_set_source (cr, selected_innerstroke_gradient);
         cairo_move_to (cr, 1.5, 1.5);
-        cairo_line_to (cr, 1.5, popup->allocation.height-1.0);
-        cairo_move_to (cr, popup->allocation.width-1.5, 1.5);
-        cairo_line_to (cr, popup->allocation.width-1.5, popup->allocation.height-1.0);
+        cairo_line_to (cr, 1.5, allocation->height-1.0);
+        cairo_move_to (cr, allocation->width-1.5, 1.5);
+        cairo_line_to (cr, allocation->width-1.5, allocation->height-1.0);
         cairo_stroke (cr);
     }
     /* Draw rounded corners. */
@@ -730,12 +736,12 @@ display_setting_identity_popup_expose (GtkWidget      *popup,
 
         /* Draw a filled rounded rectangle with outline */
         cairo_set_line_width (cr, 1.0);
-        cairo_move_to (cr, 0.5, popup->allocation.height+0.5);
+        cairo_move_to (cr, 0.5, allocation->height+0.5);
         cairo_line_to (cr, 0.5, radius+0.5);
         cairo_arc (cr, radius+0.5, radius+0.5, radius, 3.14, 3.0*3.14/2.0);
-        cairo_line_to (cr, popup->allocation.width-0.5 - radius, 0.5);
-        cairo_arc (cr, popup->allocation.width-0.5 - radius, radius+0.5, radius, 3.0*3.14/2.0, 0.0);
-        cairo_line_to (cr, popup->allocation.width-0.5, popup->allocation.height+0.5);
+        cairo_line_to (cr, allocation->width-0.5 - radius, 0.5);
+        cairo_arc (cr, allocation->width-0.5 - radius, radius+0.5, radius, 3.0*3.14/2.0, 0.0);
+        cairo_line_to (cr, allocation->width-0.5, allocation->height+0.5);
         cairo_set_source (cr, vertical_gradient);
         if (selected)
             cairo_set_source (cr, selected_gradient);
@@ -748,16 +754,16 @@ display_setting_identity_popup_expose (GtkWidget      *popup,
         if (selected)
             cairo_set_source_rgb (cr, 0.15, 0.45, 0.75);
         cairo_arc (cr, radius+1.5, radius+1.5, radius, 3.14, 3.0*3.14/2.0);
-        cairo_line_to (cr, popup->allocation.width-1.5 - radius, 1.5);
-        cairo_arc (cr, popup->allocation.width-1.5 - radius, radius+1.5, radius, 3.0*3.14/2.0, 0.0);
+        cairo_line_to (cr, allocation->width-1.5 - radius, 1.5);
+        cairo_arc (cr, allocation->width-1.5 - radius, radius+1.5, radius, 3.0*3.14/2.0, 0.0);
         cairo_stroke (cr);
         cairo_set_source (cr, innerstroke_gradient);
         if (selected)
             cairo_set_source (cr, selected_innerstroke_gradient);
         cairo_move_to (cr, 1.5, radius+1.0);
-        cairo_line_to (cr, 1.5, popup->allocation.height-1.0);
-        cairo_move_to (cr, popup->allocation.width-1.5, radius+1.0);
-        cairo_line_to (cr, popup->allocation.width-1.5, popup->allocation.height-1.0);
+        cairo_line_to (cr, 1.5, allocation->height-1.0);
+        cairo_move_to (cr, allocation->width-1.5, radius+1.0);
+        cairo_line_to (cr, allocation->width-1.5, allocation->height-1.0);
         cairo_stroke (cr);
 
         cairo_close_path (cr);
@@ -769,6 +775,8 @@ display_setting_identity_popup_expose (GtkWidget      *popup,
     cairo_pattern_destroy (selected_gradient);
     cairo_pattern_destroy (selected_innerstroke_gradient);
 
+    g_free (allocation);
+
     return FALSE;
 }
 
@@ -791,7 +799,7 @@ display_setting_identity_display (gint display_id)
         gtk_widget_set_name (popup, "XfceDisplayDialogPopup");
 
         gtk_widget_set_app_paintable (popup, TRUE);
-        g_signal_connect (G_OBJECT (popup), "expose-event", G_CALLBACK (display_setting_identity_popup_expose), builder);
+        g_signal_connect (G_OBJECT (popup), "draw", G_CALLBACK (display_setting_identity_popup_draw), builder);
         g_signal_connect (G_OBJECT (popup), "screen-changed", G_CALLBACK (display_setting_screen_changed), NULL);
 
         display_name = gtk_builder_get_object (builder, "display_name");
@@ -2201,7 +2209,7 @@ set_cursor (GtkWidget *widget, GdkCursorType type)
         gdk_window_set_cursor (window, cursor);
 
     if (cursor)
-        gdk_cursor_unref (cursor);
+        g_object_unref (cursor);
 }
 
 static void
@@ -2373,32 +2381,15 @@ paint_background (FooScrollArea *area,
 {
     GdkRectangle viewport;
     GtkWidget *widget;
-    GtkStyle *widget_style;
+    GtkStyleContext *ctx;
 
     widget = GTK_WIDGET (area);
 
     foo_scroll_area_get_viewport (area, &viewport);
-    widget_style = gtk_widget_get_style (widget);
-
-    cairo_set_source_rgb (cr,
-                          widget_style->base[GTK_STATE_NORMAL].red / 65535.0,
-                          widget_style->base[GTK_STATE_NORMAL].green / 65535.0,
-                          widget_style->base[GTK_STATE_NORMAL].blue / 65535.0);
-
-    cairo_rectangle (cr,
-                     viewport.x, viewport.y,
-                     viewport.width, viewport.height);
-
-    cairo_fill_preserve (cr);
+    ctx = gtk_widget_get_style_context (widget);
+    gtk_style_context_add_class (ctx, "view");
 
     foo_scroll_area_add_input_from_fill (area, cr, on_canvas_event, NULL);
-
-    cairo_set_source_rgb (cr,
-                          widget_style->dark[GTK_STATE_NORMAL].red / 65535.0,
-                          widget_style->dark[GTK_STATE_NORMAL].green / 65535.0,
-                          widget_style->dark[GTK_STATE_NORMAL].blue / 65535.0);
-
-    cairo_stroke (cr);
 }
 
 static void
@@ -2582,11 +2573,9 @@ paint_output (cairo_t *cr, int i, double *snap_x, double *snap_y)
 }
 
 static void
-on_area_paint (FooScrollArea *area,
-               cairo_t       *cr,
-               GdkRectangle  *extent,
-               GdkRegion     *region,
-               gpointer       data)
+on_area_paint (FooScrollArea  *area,
+               cairo_t        *cr,
+               gpointer        data)
 {
     GList *connected_outputs = NULL;
     GList *list;
@@ -2664,7 +2653,7 @@ get_output_for_window (GdkWindow *window)
     int largest_index;
     guint m;
 
-    gdk_window_get_geometry (window, &win_rect.x, &win_rect.y, &win_rect.width, &win_rect.height, NULL);
+    gdk_window_get_geometry (window, &win_rect.x, &win_rect.y, &win_rect.width, &win_rect.height);
     gdk_window_get_origin (window, &win_rect.x, &win_rect.y);
 
     largest_area = 0;
@@ -2813,12 +2802,12 @@ display_settings_show_main_dialog (GdkDisplay *display)
 
             /* Get plug child widget */
             plug_child = gtk_builder_get_object (builder, "plug-child");
-            gtk_widget_reparent (GTK_WIDGET (plug_child), plug);
+            xfce_widget_reparent (GTK_WIDGET (plug_child), plug);
             gtk_widget_show (GTK_WIDGET (plug_child));
         }
 
         /* To prevent the settings dialog to be saved in the session */
-        gdk_set_sm_client_id ("FAKE ID");
+        gdk_x11_set_sm_client_id ("FAKE ID");
 
         /* Enter the main loop */
         gtk_main ();
@@ -2842,7 +2831,7 @@ display_settings_minimal_dialog_key_press_event(GtkWidget *widget,
                                                 GdkEventKey *event,
                                                 gpointer user_data)
 {
-    if (event->keyval == GDK_Escape)
+    if (event->keyval == GDK_KEY_Escape)
     {
         gtk_main_quit();
         return TRUE;
@@ -3080,9 +3069,9 @@ main (gint argc, gchar **argv)
     if (G_LIKELY (display_channel))
     {
         /* Create a new xfce randr (>= 1.2) for this display
-         * this will only work if there is 1 screen on this display */
-        if (gdk_display_get_n_screens (display) == 1)
-            xfce_randr = xfce_randr_new (display, &error);
+         * this will only work if there is 1 screen on this display
+         * As GTK 3.10, the number of screens is always 1 */
+        xfce_randr = xfce_randr_new (display, &error);
 
         if (!xfce_randr)
         {
@@ -3095,10 +3084,10 @@ main (gint argc, gchar **argv)
                 alternative_icon = "ccc_small";
             }
 
-            response = xfce_message_dialog (NULL, NULL, GTK_STOCK_DIALOG_ERROR,
+            response = xfce_message_dialog (NULL, NULL, "dialog-error",
                                             _("Unable to start the Xfce Display Settings"),
                                             error ? error->message : NULL,
-                                            GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
+                                            _("_Close"), GTK_RESPONSE_CLOSE,
                                             alternative != NULL ?XFCE_BUTTON_TYPE_MIXED : NULL,
                                             alternative_icon, alternative, GTK_RESPONSE_OK, NULL);
             g_clear_error (&error);
diff --git a/dialogs/display-settings/minimal-display-dialog.glade b/dialogs/display-settings/minimal-display-dialog.glade
index 80c3e05..8534c74 100644
--- a/dialogs/display-settings/minimal-display-dialog.glade
+++ b/dialogs/display-settings/minimal-display-dialog.glade
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.20.0 -->
 <interface>
-  <requires lib="gtk+" version="2.24"/>
-  <!-- interface-naming-policy project-wide -->
+  <requires lib="gtk+" version="3.20"/>
   <object class="GtkWindow" id="dialog">
     <property name="can_focus">False</property>
     <property name="title" translatable="yes">Displays</property>
@@ -10,19 +10,19 @@
     <property name="icon_name">video-display</property>
     <property name="type_hint">dialog</property>
     <child>
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="border_width">6</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">6</property>
         <child>
-          <object class="GtkTable" id="buttons">
+          <object class="GtkGrid" id="buttons">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="n_rows">2</property>
-            <property name="n_columns">4</property>
-            <property name="column_spacing">24</property>
             <property name="row_spacing">3</property>
+            <property name="column_spacing">24</property>
+            <property name="column_homogeneous">True</property>
             <child>
               <object class="GtkLabel" id="label1">
                 <property name="width_request">128</property>
@@ -32,10 +32,8 @@
                 <property name="ellipsize">middle</property>
               </object>
               <packing>
+                <property name="left_attach">0</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>
               </packing>
             </child>
             <child>
@@ -49,11 +47,7 @@
               </object>
               <packing>
                 <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
                 <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options">GTK_FILL</property>
               </packing>
             </child>
             <child>
@@ -67,11 +61,7 @@
               </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">GTK_FILL</property>
               </packing>
             </child>
             <child>
@@ -84,107 +74,94 @@
               </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>
               </packing>
             </child>
             <child>
-              <object class="GtkRadioButton" id="display1">
+              <object class="GtkRadioButton" id="mirror">
                 <property name="width_request">128</property>
                 <property name="height_request">128</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
+                <property name="active">True</property>
                 <property name="draw_indicator">False</property>
+                <property name="group">display1</property>
                 <child>
-                  <object class="GtkImage" id="image1">
+                  <object class="GtkImage" id="image2">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                   </object>
                 </child>
               </object>
               <packing>
-                <property name="x_options"/>
-                <property name="y_options"/>
+                <property name="left_attach">1</property>
+                <property name="top_attach">0</property>
               </packing>
             </child>
             <child>
-              <object class="GtkRadioButton" id="mirror">
+              <object class="GtkRadioButton" id="extend_right">
                 <property name="width_request">128</property>
                 <property name="height_request">128</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="active">True</property>
                 <property name="draw_indicator">False</property>
                 <property name="group">display1</property>
                 <child>
-                  <object class="GtkImage" id="image2">
+                  <object class="GtkImage" id="image3">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                   </object>
                 </child>
               </object>
               <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="x_options"/>
-                <property name="y_options"/>
+                <property name="left_attach">2</property>
+                <property name="top_attach">0</property>
               </packing>
             </child>
             <child>
-              <object class="GtkRadioButton" id="extend_right">
+              <object class="GtkRadioButton" id="display2">
                 <property name="width_request">128</property>
                 <property name="height_request">128</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="active">True</property>
                 <property name="draw_indicator">False</property>
                 <property name="group">display1</property>
                 <child>
-                  <object class="GtkImage" id="image3">
+                  <object class="GtkImage" id="image4">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                   </object>
                 </child>
               </object>
               <packing>
-                <property name="left_attach">2</property>
-                <property name="right_attach">3</property>
-                <property name="x_options"/>
-                <property name="y_options"/>
+                <property name="left_attach">3</property>
+                <property name="top_attach">0</property>
               </packing>
             </child>
             <child>
-              <object class="GtkRadioButton" id="display2">
+              <object class="GtkRadioButton" id="display1">
                 <property name="width_request">128</property>
                 <property name="height_request">128</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="active">True</property>
                 <property name="draw_indicator">False</property>
-                <property name="group">display1</property>
                 <child>
-                  <object class="GtkImage" id="image4">
+                  <object class="GtkImage" id="image1">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                   </object>
                 </child>
               </object>
               <packing>
-                <property name="left_attach">3</property>
-                <property name="right_attach">4</property>
-                <property name="x_options"/>
-                <property name="y_options"/>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
               </packing>
             </child>
           </object>
@@ -195,7 +172,7 @@
           </packing>
         </child>
         <child>
-          <object class="GtkHButtonBox" id="hbuttonbox1">
+          <object class="GtkButtonBox" id="hbuttonbox1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <child>
@@ -204,7 +181,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -217,10 +193,8 @@
                 <property name="label" translatable="yes">radiobutton</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="active">True</property>
                 <property name="draw_indicator">True</property>
-                <property name="group">display1</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -234,7 +208,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
diff --git a/dialogs/display-settings/scrollarea.c b/dialogs/display-settings/scrollarea.c
index 4e61aa5..8cf2c6c 100644
--- a/dialogs/display-settings/scrollarea.c
+++ b/dialogs/display-settings/scrollarea.c
@@ -7,7 +7,7 @@
  *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
@@ -20,7 +20,7 @@
 #include "scrollarea.h"
 #include "foo-marshal.h"
 
-G_DEFINE_TYPE (FooScrollArea, foo_scroll_area, GTK_TYPE_CONTAINER);
+G_DEFINE_TYPE_WITH_CODE (FooScrollArea, foo_scroll_area, GTK_TYPE_CONTAINER, G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE, NULL));
 
 static GtkWidgetClass *parent_class;
 
@@ -34,69 +34,70 @@ typedef struct AutoScrollInfo AutoScrollInfo;
 
 struct InputPath
 {
-    gboolean                is_stroke;
-    cairo_fill_rule_t       fill_rule;
-    double                  line_width;
-    cairo_path_t           *path;       /* In canvas coordinates */
+    gboolean			is_stroke;
+    cairo_fill_rule_t		fill_rule;
+    double			line_width;
+    cairo_path_t	       *path;		/* In canvas coordinates */
 
-    FooScrollAreaEventFunc  func;
-    gpointer                data;
+    FooScrollAreaEventFunc	func;
+    gpointer			data;
 
-    InputPath              *next;
+    InputPath		       *next;
 };
 
 /* InputRegions are mutually disjoint */
 struct InputRegion
 {
-    GdkRegion *region;      /* the boundary of this area in canvas coordinates */
+    GdkRegion *region;		/* the boundary of this area in canvas coordinates */
     InputPath *paths;
 };
 
 struct AutoScrollInfo
 {
-    int             dx;
-    int             dy;
-    int             timeout_id;
-    int             begin_x;
-    int             begin_y;
-    double          res_x;
-    double          res_y;
-    GTimer         *timer;
+    int				dx;
+    int				dy;
+    int				timeout_id;
+    int				begin_x;
+    int				begin_y;
+    double			res_x;
+    double			res_y;
+    GTimer		       *timer;
 };
 
 struct FooScrollAreaPrivate
 {
-    GdkWindow              *input_window;
+    GdkWindow		       *input_window;
 
-    int                     width;
-    int                     height;
+    int				width;
+    int				height;
 
-    GtkAdjustment          *hadj;
-    GtkAdjustment          *vadj;
-    int                     x_offset;
-    int                     y_offset;
+    GtkAdjustment	       *hadj;
+    GtkAdjustment	       *vadj;
+    GtkScrollablePolicy hscroll_policy;
+    GtkScrollablePolicy vscroll_policy;
+    int			        x_offset;
+    int				y_offset;
 
-    int                     min_width;
-    int                     min_height;
+    int				min_width;
+    int				min_height;
 
-    GPtrArray              *input_regions;
+    GPtrArray		       *input_regions;
 
-    AutoScrollInfo         *auto_scroll_info;
+    AutoScrollInfo	       *auto_scroll_info;
 
     /* During expose, this region is set to the region
      * being exposed. At other times, it is NULL
      *
      * It is used for clipping of input areas
      */
-    GdkRegion              *expose_region;
-    InputRegion            *current_input;
+    InputRegion		       *current_input;
 
-    gboolean                grabbed;
-    FooScrollAreaEventFunc  grab_func;
-    gpointer                grab_data;
+    gboolean			grabbed;
+    FooScrollAreaEventFunc	grab_func;
+    gpointer			grab_data;
 
-    GdkPixmap              *pixmap;
-    GdkRegion              *update_region;      /* In canvas coordinates */
+    cairo_surface_t	       *surface;
+    GdkRegion		       *update_region;		/* In canvas coordinates */
 };
 
 enum
@@ -107,31 +108,40 @@ enum
     LAST_SIGNAL,
 };
 
-static guint signals [LAST_SIGNAL] = { 0 };
-
-static void foo_scroll_area_size_request (GtkWidget      *widget,
-                                          GtkRequisition *requisition);
-
-static gboolean foo_scroll_area_expose (GtkWidget      *widget,
-                                        GdkEventExpose *expose);
-
-static void foo_scroll_area_size_allocate (GtkWidget     *widget,
-                                           GtkAllocation *allocation);
+enum {
+    PROP_0,
+    PROP_VADJUSTMENT,
+    PROP_HADJUSTMENT,
+    PROP_HSCROLL_POLICY,
+    PROP_VSCROLL_POLICY
+};
 
-static void foo_scroll_area_set_scroll_adjustments (FooScrollArea *scroll_area,
-                                                    GtkAdjustment *hadjustment,
-                                                    GtkAdjustment *vadjustment);
+static guint signals [LAST_SIGNAL] = { 0 };
 
+static void foo_scroll_area_get_preferred_width (GtkWidget *widget,
+						 gint *minimum,
+						 gint *natural);
+static void foo_scroll_area_get_preferred_height (GtkWidget *widget,
+						 gint *minimum,
+						 gint *natural);
+static gboolean foo_scroll_area_draw (GtkWidget *widget,
+				      cairo_t *cr);
+static void foo_scroll_area_size_allocate (GtkWidget *widget,
+					   GtkAllocation *allocation);
+static void foo_scroll_area_set_hadjustment (FooScrollArea *scroll_area,
+					     GtkAdjustment *hadjustment);
+static void foo_scroll_area_set_vadjustment (FooScrollArea *scroll_area,
+					     GtkAdjustment *vadjustment);
 static void foo_scroll_area_realize (GtkWidget *widget);
 static void foo_scroll_area_unrealize (GtkWidget *widget);
 static void foo_scroll_area_map (GtkWidget *widget);
 static void foo_scroll_area_unmap (GtkWidget *widget);
-static gboolean foo_scroll_area_button_press (GtkWidget      *widget,
-                                              GdkEventButton *event);
-static gboolean foo_scroll_area_button_release (GtkWidget      *widget,
-                                                GdkEventButton *event);
-static gboolean foo_scroll_area_motion (GtkWidget      *widget,
-                                        GdkEventMotion *event);
+static gboolean foo_scroll_area_button_press (GtkWidget *widget,
+					      GdkEventButton *event);
+static gboolean foo_scroll_area_button_release (GtkWidget *widget,
+						GdkEventButton *event);
+static gboolean foo_scroll_area_motion (GtkWidget *widget,
+					GdkEventMotion *event);
 
 static void
 foo_scroll_area_map (GtkWidget *widget)
@@ -141,7 +151,7 @@ foo_scroll_area_map (GtkWidget *widget)
     GTK_WIDGET_CLASS (parent_class)->map (widget);
 
     if (area->priv->input_window)
-        gdk_window_show (area->priv->input_window);
+	gdk_window_show (area->priv->input_window);
 }
 
 static void
@@ -150,7 +160,7 @@ foo_scroll_area_unmap (GtkWidget *widget)
     FooScrollArea *area = FOO_SCROLL_AREA (widget);
 
     if (area->priv->input_window)
-        gdk_window_hide (area->priv->input_window);
+	gdk_window_hide (area->priv->input_window);
 
     GTK_WIDGET_CLASS (parent_class)->unmap (widget);
 }
@@ -171,16 +181,69 @@ foo_scroll_area_finalize (GObject *object)
 }
 
 static void
+foo_scroll_area_get_property (GObject    *object,
+                              guint       property_id,
+                              GValue     *value,
+                              GParamSpec *pspec)
+{
+  FooScrollArea *scroll_area = FOO_SCROLL_AREA (object);
+
+  switch (property_id)
+    {
+    case PROP_VADJUSTMENT:
+      g_value_set_object (value, &scroll_area->priv->vadj);
+      break;
+    case PROP_HADJUSTMENT:
+      g_value_set_object (value, &scroll_area->priv->hadj);
+      break;
+    case PROP_HSCROLL_POLICY:
+      g_value_set_enum (value, scroll_area->priv->hscroll_policy);
+      break;
+    case PROP_VSCROLL_POLICY:
+      g_value_set_enum (value, scroll_area->priv->vscroll_policy);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+    }
+}
+
+static void
+foo_scroll_area_set_property (GObject      *object,
+			      guint         property_id,
+			      const GValue *value,
+			      GParamSpec   *pspec)
+{
+    FooScrollArea *scroll_area = FOO_SCROLL_AREA (object);
+    switch (property_id) {
+    case PROP_VADJUSTMENT:
+      foo_scroll_area_set_vadjustment (FOO_SCROLL_AREA (object), g_value_get_object (value));
+      break;
+    case PROP_HADJUSTMENT:
+      foo_scroll_area_set_hadjustment (FOO_SCROLL_AREA (object), g_value_get_object (value));
+      break;
+    case PROP_HSCROLL_POLICY:
+      scroll_area->priv->hscroll_policy = g_value_get_enum (value);
+      break;
+    case PROP_VSCROLL_POLICY:
+      scroll_area->priv->vscroll_policy = g_value_get_enum (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+    }
+}
+
+static void
 foo_scroll_area_class_init (FooScrollAreaClass *class)
 {
     GObjectClass *object_class = G_OBJECT_CLASS (class);
     GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
 
     object_class->finalize = foo_scroll_area_finalize;
-
-    widget_class->size_request = foo_scroll_area_size_request;
-    widget_class->expose_event = foo_scroll_area_expose;
-
+    object_class->set_property = foo_scroll_area_set_property;
+    object_class->get_property = foo_scroll_area_get_property;
+    widget_class->draw = foo_scroll_area_draw;
+    widget_class->get_preferred_width = foo_scroll_area_get_preferred_width;
+    widget_class->get_preferred_height = foo_scroll_area_get_preferred_height;
     widget_class->size_allocate = foo_scroll_area_size_allocate;
     widget_class->realize = foo_scroll_area_realize;
     widget_class->unrealize = foo_scroll_area_unrealize;
@@ -190,46 +253,37 @@ foo_scroll_area_class_init (FooScrollAreaClass *class)
     widget_class->map = foo_scroll_area_map;
     widget_class->unmap = foo_scroll_area_unmap;
 
-    class->set_scroll_adjustments = foo_scroll_area_set_scroll_adjustments;
-
     parent_class = g_type_class_peek_parent (class);
 
+    /* Scrollable interface properties */
+    g_object_class_override_property (object_class, PROP_HADJUSTMENT, "hadjustment");
+    g_object_class_override_property (object_class, PROP_VADJUSTMENT, "vadjustment");
+    g_object_class_override_property (object_class, PROP_HSCROLL_POLICY, "hscroll-policy");
+    g_object_class_override_property (object_class, PROP_VSCROLL_POLICY, "vscroll-policy");
+
     signals[VIEWPORT_CHANGED] =
-    g_signal_new ("viewport_changed",
-                  G_OBJECT_CLASS_TYPE (object_class),
-                  G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
-                  G_STRUCT_OFFSET (FooScrollAreaClass,
-                                   viewport_changed),
-                  NULL, NULL,
-                  foo_marshal_VOID__BOXED_BOXED,
-                  G_TYPE_NONE, 2,
-                  GDK_TYPE_RECTANGLE,
-                  GDK_TYPE_RECTANGLE);
+	g_signal_new ("viewport_changed",
+		      G_OBJECT_CLASS_TYPE (object_class),
+		      G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+		      G_STRUCT_OFFSET (FooScrollAreaClass,
+				       viewport_changed),
+		      NULL, NULL,
+		      foo_marshal_VOID__BOXED_BOXED,
+		      G_TYPE_NONE, 2,
+		      GDK_TYPE_RECTANGLE,
+		      GDK_TYPE_RECTANGLE);
 
     signals[PAINT] =
-    g_signal_new ("paint",
-                  G_OBJECT_CLASS_TYPE (object_class),
-                  G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
-                  G_STRUCT_OFFSET (FooScrollAreaClass,
-                                   paint),
-                  NULL, NULL,
-                  foo_marshal_VOID__POINTER_BOXED_POINTER,
-                  G_TYPE_NONE, 3,
-                  G_TYPE_POINTER,
-                  GDK_TYPE_RECTANGLE,
-                  G_TYPE_POINTER);
-
-    widget_class->set_scroll_adjustments_signal =
-    g_signal_new ("set_scroll_adjustments",
-                  G_OBJECT_CLASS_TYPE (object_class),
-                  G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
-                  G_STRUCT_OFFSET (FooScrollAreaClass,
-                                   set_scroll_adjustments),
-                  NULL, NULL,
-                  foo_marshal_VOID__OBJECT_OBJECT,
-                  G_TYPE_NONE, 2,
-                  GTK_TYPE_ADJUSTMENT,
-                  GTK_TYPE_ADJUSTMENT);
+	g_signal_new ("paint",
+		      G_OBJECT_CLASS_TYPE (object_class),
+		      G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+		      G_STRUCT_OFFSET (FooScrollAreaClass,
+				       paint),
+		      NULL, NULL,
+		      g_cclosure_marshal_VOID__POINTER,
+		      G_TYPE_NONE,
+                      1,
+		      G_TYPE_POINTER);
 }
 
 static GtkAdjustment *
@@ -255,62 +309,45 @@ foo_scroll_area_init (FooScrollArea *scroll_area)
     scroll_area->priv->vadj = g_object_ref_sink (new_adjustment());
     scroll_area->priv->x_offset = 0.0;
     scroll_area->priv->y_offset = 0.0;
-    scroll_area->priv->min_width = -1;
-    scroll_area->priv->min_height = -1;
+    scroll_area->priv->min_width = 0;
+    scroll_area->priv->min_height = 0;
     scroll_area->priv->auto_scroll_info = NULL;
     scroll_area->priv->input_regions = g_ptr_array_new ();
-    scroll_area->priv->pixmap = NULL;
+    scroll_area->priv->surface = NULL;
     scroll_area->priv->update_region = gdk_region_new ();
-
-    gtk_widget_set_double_buffered (widget, FALSE);
-}
-
-static void
-translate_cairo_device (cairo_t       *cr,
-                        int            x_offset,
-                        int            y_offset)
-{
-    cairo_surface_t *surface = cairo_get_target (cr);
-    double dev_x;
-    double dev_y;
-
-    cairo_surface_get_device_offset (surface, &dev_x, &dev_y);
-    dev_x += x_offset;
-    dev_y += y_offset;
-    cairo_surface_set_device_offset (surface, dev_x, dev_y);
 }
 
 typedef void (* PathForeachFunc) (double  *x,
-                                  double  *y,
-                                  gpointer data);
+				  double  *y,
+				  gpointer data);
 
 static void
 path_foreach_point (cairo_path_t     *path,
-                    PathForeachFunc   func,
-                    gpointer          user_data)
+		    PathForeachFunc   func,
+		    gpointer	      user_data)
 {
     int i;
 
     for (i = 0; i < path->num_data; i += path->data[i].header.length)
     {
-        cairo_path_data_t *data = &(path->data[i]);
-
-        switch (data->header.type)
-        {
-            case CAIRO_PATH_MOVE_TO:
-            case CAIRO_PATH_LINE_TO:
-                func (&(data[1].point.x), &(data[1].point.y), user_data);
-                break;
-
-            case CAIRO_PATH_CURVE_TO:
-                func (&(data[1].point.x), &(data[1].point.y), user_data);
-                func (&(data[2].point.x), &(data[2].point.y), user_data);
-                func (&(data[3].point.x), &(data[3].point.y), user_data);
-                break;
-
-            case CAIRO_PATH_CLOSE_PATH:
-                break;
-        }
+	cairo_path_data_t *data = &(path->data[i]);
+
+	switch (data->header.type)
+	{
+	case CAIRO_PATH_MOVE_TO:
+	case CAIRO_PATH_LINE_TO:
+	    func (&(data[1].point.x), &(data[1].point.y), user_data);
+	    break;
+
+	case CAIRO_PATH_CURVE_TO:
+	    func (&(data[1].point.x), &(data[1].point.y), user_data);
+	    func (&(data[2].point.x), &(data[2].point.y), user_data);
+	    func (&(data[3].point.x), &(data[3].point.y), user_data);
+	    break;
+
+	case CAIRO_PATH_CLOSE_PATH:
+	    break;
+	}
     }
 }
 
@@ -323,7 +360,7 @@ static void
 input_path_free_list (InputPath *paths)
 {
     if (!paths)
-        return;
+	return;
 
     input_path_free_list (paths->next);
     cairo_path_destroy (paths->path);
@@ -341,7 +378,7 @@ input_region_free (InputRegion *region)
 
 static void
 get_viewport (FooScrollArea *scroll_area,
-              GdkRectangle  *viewport)
+	      GdkRectangle  *viewport)
 {
     GtkAllocation allocation;
     GtkWidget *widget = GTK_WIDGET (scroll_area);
@@ -356,8 +393,8 @@ get_viewport (FooScrollArea *scroll_area,
 
 static void
 allocation_to_canvas (FooScrollArea *area,
-                      int           *x,
-                      int           *y)
+		      int           *x,
+		      int           *y)
 {
     *x += area->priv->x_offset;
     *y += area->priv->y_offset;
@@ -365,7 +402,7 @@ allocation_to_canvas (FooScrollArea *area,
 
 static void
 clear_exposed_input_region (FooScrollArea *area,
-                            GdkRegion *exposed) /* in canvas coordinates */
+			    GdkRegion *exposed)	/* in canvas coordinates */
 {
     guint i;
     GdkRegion *viewport;
@@ -380,15 +417,15 @@ clear_exposed_input_region (FooScrollArea *area,
 
     for (i = 0; i < area->priv->input_regions->len; ++i)
     {
-        InputRegion *region = area->priv->input_regions->pdata[i];
+	InputRegion *region = area->priv->input_regions->pdata[i];
 
-        gdk_region_intersect (region->region, viewport);
+	gdk_region_intersect (region->region, viewport);
 
-        if (gdk_region_empty (region->region))
-        {
-            input_region_free (region);
-            g_ptr_array_remove_index_fast (area->priv->input_regions, i--);
-        }
+	if (gdk_region_empty (region->region))
+	{
+	    input_region_free (region);
+	    g_ptr_array_remove_index_fast (area->priv->input_regions, i--);
+	}
     }
 
     gdk_region_destroy (viewport);
@@ -396,108 +433,33 @@ clear_exposed_input_region (FooScrollArea *area,
 
 static void
 setup_background_cr (GdkWindow *window,
-                     cairo_t   *cr,
-                     int        x_offset,
-                     int        y_offset)
+		     cairo_t   *cr,
+		     int        x_offset,
+		     int        y_offset)
 {
-    GdkWindowObject *private = (GdkWindowObject *)window;
-
-    if (private->bg_pixmap == GDK_PARENT_RELATIVE_BG && private->parent)
-    {
-        x_offset += private->x;
-        y_offset += private->y;
-
-        setup_background_cr (GDK_WINDOW (private->parent), cr, x_offset, y_offset);
-    }
-    else if (private->bg_pixmap &&
-         private->bg_pixmap != GDK_PARENT_RELATIVE_BG &&
-         private->bg_pixmap != GDK_NO_BG)
-    {
-        gdk_cairo_set_source_pixmap (cr, private->bg_pixmap, -x_offset, -y_offset);
-    }
-    else
-    {
-        gdk_cairo_set_source_color (cr, &private->bg_color);
-    }
+    cairo_translate (cr, - x_offset, - y_offset);
+    cairo_set_source_rgb (cr, 0.98, 0.98, 0.98);
+    cairo_translate (cr, x_offset, y_offset);
 }
 
 static void
 initialize_background (GtkWidget *widget,
-                       cairo_t   *cr)
+		       cairo_t   *cr)
 {
     setup_background_cr (gtk_widget_get_window (widget), cr, 0, 0);
 
     cairo_paint (cr);
 }
 
-static void
-clip_to_region (cairo_t *cr, GdkRegion *region)
-{
-    int n_rects;
-    GdkRectangle *rects;
-
-    gdk_region_get_rectangles (region, &rects, &n_rects);
-
-    cairo_new_path (cr);
-    while (n_rects--)
-    {
-        GdkRectangle *rect = &(rects[n_rects]);
-
-        cairo_rectangle (cr, rect->x, rect->y, rect->width, rect->height);
-    }
-    cairo_clip (cr);
-
-    g_free (rects);
-}
-
-static void
-simple_draw_drawable (GdkDrawable *dst,
-                      GdkDrawable *src,
-                      int          src_x,
-                      int          src_y,
-                      int          dst_x,
-                      int          dst_y,
-                      int          width,
-                      int          height)
-{
-    GdkGC *gc = gdk_gc_new (dst);
-
-    gdk_draw_drawable (dst, gc, src, src_x, src_y, dst_x, dst_y, width, height);
-
-    g_object_unref (gc);
-}
-
 static gboolean
-foo_scroll_area_expose (GtkWidget *widget,
-                        GdkEventExpose *expose)
+foo_scroll_area_draw (GtkWidget *widget,
+                      cairo_t *widget_cr)
 {
     FooScrollArea *scroll_area = FOO_SCROLL_AREA (widget);
     cairo_t *cr;
-    GdkGC *gc;
-    GdkRectangle extents;
-    GdkWindow *window = gtk_widget_get_window (widget);
     GdkRegion *region;
-    int x_offset, y_offset;
     GtkAllocation widget_allocation;
 
-    /* I don't think expose can ever recurse for the same area */
-    g_assert (!scroll_area->priv->expose_region);
-
-    /* Note that this function can be called at a time
-     * where the adj->value is different from x_offset.
-     * Ie., the GtkScrolledWindow changed the adj->value
-     * without emitting the value_changed signal.
-     *
-     * Hence we must always use the value we got
-     * the last time the signal was emitted, ie.,
-     * priv->{x,y}_offset.
-     */
-
-    x_offset = scroll_area->priv->x_offset;
-    y_offset = scroll_area->priv->y_offset;
-
-    scroll_area->priv->expose_region = expose->region;
-
     /* Setup input areas */
     clear_exposed_input_region (scroll_area, scroll_area->priv->update_region);
 
@@ -505,39 +467,26 @@ foo_scroll_area_expose (GtkWidget *widget,
     scroll_area->priv->current_input->region = gdk_region_copy (scroll_area->priv->update_region);
     scroll_area->priv->current_input->paths = NULL;
     g_ptr_array_add (scroll_area->priv->input_regions,
-                     scroll_area->priv->current_input);
+		     scroll_area->priv->current_input);
 
     region = scroll_area->priv->update_region;
     scroll_area->priv->update_region = gdk_region_new ();
 
     /* Create cairo context */
-    cr = gdk_cairo_create (scroll_area->priv->pixmap);
-    translate_cairo_device (cr, -x_offset, -y_offset);
-    clip_to_region (cr, region);
+    cr = cairo_create (scroll_area->priv->surface);
     initialize_background (widget, cr);
 
-    /* Create regions */
-    gdk_region_get_clipbox (region, &extents);
-
-    g_signal_emit (widget, signals[PAINT], 0, cr, &extents, region);
+    g_signal_emit (widget, signals[PAINT], 0, cr);
 
     /* Destroy stuff */
     cairo_destroy (cr);
 
-    scroll_area->priv->expose_region = NULL;
     scroll_area->priv->current_input = NULL;
 
     /* Finally draw the backing pixmap */
-    gc = gdk_gc_new (window);
-
-    gdk_gc_set_clip_region (gc, expose->region);
+    cairo_set_source_surface (widget_cr, scroll_area->priv->surface, widget_allocation.x, widget_allocation.y);
+    cairo_paint (widget_cr);
 
-    gtk_widget_get_allocation (widget, &widget_allocation);
-    gdk_draw_drawable (window, gc, scroll_area->priv->pixmap,
-                       0, 0, widget_allocation.x, widget_allocation.y,
-                       widget_allocation.width, widget_allocation.height);
-
-    g_object_unref (gc);
     gdk_region_destroy (region);
 
     return TRUE;
@@ -545,32 +494,40 @@ foo_scroll_area_expose (GtkWidget *widget,
 
 void
 foo_scroll_area_get_viewport (FooScrollArea *scroll_area,
-                              GdkRectangle  *viewport)
+			      GdkRectangle  *viewport)
 {
     g_return_if_fail (FOO_IS_SCROLL_AREA (scroll_area));
 
     if (!viewport)
-        return;
+	return;
 
     get_viewport (scroll_area, viewport);
 }
 
 static void
-process_event (FooScrollArea           *scroll_area,
-               FooScrollAreaEventType   input_type,
-               int                      x,
-               int                      y);
+process_event (FooScrollArea	       *scroll_area,
+	       FooScrollAreaEventType	input_type,
+	       int			x,
+	       int			y);
 
 static void
 emit_viewport_changed (FooScrollArea *scroll_area,
-                       GdkRectangle  *new_viewport,
-                       GdkRectangle  *old_viewport)
+		       GdkRectangle  *new_viewport,
+		       GdkRectangle  *old_viewport)
 {
     int px, py;
+    GdkSeat *seat;
+    GdkDevice *device;
+
     g_signal_emit (scroll_area, signals[VIEWPORT_CHANGED], 0,
-                   new_viewport, old_viewport);
+		   new_viewport, old_viewport);
 
-    gdk_window_get_pointer (scroll_area->priv->input_window, &px, &py, NULL);
+    if (scroll_area->priv->input_window == NULL)
+	return;
+
+    seat = gdk_display_get_default_seat(gdk_window_get_display(scroll_area->priv->input_window));
+    device = gdk_seat_get_pointer(seat);
+    gdk_window_get_device_position(scroll_area->priv->input_window, device, &px, &py, NULL);
 
     process_event (scroll_area, FOO_MOTION, px, py);
 }
@@ -579,13 +536,11 @@ static void
 clamp_adjustment (GtkAdjustment *adj)
 {
     if (gtk_adjustment_get_upper (adj) >= gtk_adjustment_get_page_size (adj))
-        gtk_adjustment_set_value (adj, CLAMP (gtk_adjustment_get_value (adj), 0.0,
-                                              gtk_adjustment_get_upper (adj)
-                                               - gtk_adjustment_get_page_size (adj)));
+	gtk_adjustment_set_value (adj, CLAMP (gtk_adjustment_get_value (adj), 0.0,
+					      gtk_adjustment_get_upper (adj)
+					       - gtk_adjustment_get_page_size (adj)));
     else
-        gtk_adjustment_set_value (adj, 0.0);
-
-    gtk_adjustment_changed (adj);
+	gtk_adjustment_set_value (adj, 0.0);
 }
 
 static gboolean
@@ -629,6 +584,7 @@ foo_scroll_area_realize (GtkWidget *widget)
     GtkAllocation widget_allocation;
     GdkWindow *window;
     gint attributes_mask;
+    cairo_t *cr;
 
     gtk_widget_get_allocation (widget, &widget_allocation);
     gtk_widget_set_realized (widget, TRUE);
@@ -641,13 +597,13 @@ foo_scroll_area_realize (GtkWidget *widget)
     attributes.wclass = GDK_INPUT_ONLY;
     attributes.event_mask = gtk_widget_get_events (widget);
     attributes.event_mask |= (GDK_BUTTON_PRESS_MASK |
-                              GDK_BUTTON_RELEASE_MASK |
-                              GDK_BUTTON1_MOTION_MASK |
-                              GDK_BUTTON2_MOTION_MASK |
-                              GDK_BUTTON3_MOTION_MASK |
-                              GDK_POINTER_MOTION_MASK |
-                              GDK_ENTER_NOTIFY_MASK |
-                              GDK_LEAVE_NOTIFY_MASK);
+			      GDK_BUTTON_RELEASE_MASK |
+			      GDK_BUTTON1_MOTION_MASK |
+			      GDK_BUTTON2_MOTION_MASK |
+			      GDK_BUTTON3_MOTION_MASK |
+			      GDK_POINTER_MOTION_MASK |
+			      GDK_ENTER_NOTIFY_MASK |
+			      GDK_LEAVE_NOTIFY_MASK);
 
     attributes_mask = GDK_WA_X | GDK_WA_Y;
 
@@ -656,16 +612,12 @@ foo_scroll_area_realize (GtkWidget *widget)
     g_object_ref (window);
 
     area->priv->input_window = gdk_window_new (window,
-                                               &attributes, attributes_mask);
-
-    area->priv->pixmap = gdk_pixmap_new (window,
-                                         widget_allocation.width,
-                                         widget_allocation.height,
-                                         -1);
-
+					       &attributes, attributes_mask);
+    cr = gdk_cairo_create (gtk_widget_get_window (widget));
+    area->priv->surface = cairo_surface_create_similar (cairo_get_target (cr), CAIRO_CONTENT_COLOR,
+							widget_allocation.width, widget_allocation.height);
+    cairo_destroy (cr);
     gdk_window_set_user_data (area->priv->input_window, area);
-
-    gtk_widget_style_attach (widget);
 }
 
 static void
@@ -675,27 +627,30 @@ foo_scroll_area_unrealize (GtkWidget *widget)
 
     if (area->priv->input_window)
     {
-        gdk_window_set_user_data (area->priv->input_window, NULL);
-        gdk_window_destroy (area->priv->input_window);
-        area->priv->input_window = NULL;
+	gdk_window_set_user_data (area->priv->input_window, NULL);
+	gdk_window_destroy (area->priv->input_window);
+	area->priv->input_window = NULL;
     }
 
     GTK_WIDGET_CLASS (parent_class)->unrealize (widget);
 }
 
-static GdkPixmap *
-create_new_pixmap (GtkWidget *widget,
-                   GdkPixmap *old)
+static cairo_surface_t *
+create_new_surface (GtkWidget *widget,
+                    cairo_surface_t *old)
 {
     GtkAllocation widget_allocation;
-    GdkPixmap *new;
+    cairo_t *cr;
+    cairo_surface_t *new;
 
     gtk_widget_get_allocation (widget, &widget_allocation);
 
-    new = gdk_pixmap_new (gtk_widget_get_window (widget),
-                          widget_allocation.width,
-                          widget_allocation.height,
-                          -1);
+    cr = gdk_cairo_create (gtk_widget_get_window (widget));
+    new = cairo_surface_create_similar (cairo_get_target (cr),
+					CAIRO_CONTENT_COLOR,
+					widget_allocation.width,
+					widget_allocation.height);
+    cairo_destroy (cr);
 
     /* Unfortunately we don't know in which direction we were resized,
      * so we just assume we were dragged from the south-east corner.
@@ -704,21 +659,40 @@ create_new_pixmap (GtkWidget *widget,
      * That might just work, actually. We need to make sure marco uses
      * static gravity for the window before this will be useful.
      */
-    simple_draw_drawable (new, old, 0, 0, 0, 0, -1, -1);
+
+    cr = cairo_create (new);
+    cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
+    cairo_set_source_surface (cr, old, 0, 0);
+
+    cairo_paint (cr);
+    cairo_destroy (cr);
 
     return new;
 }
 
 static void
 allocation_to_canvas_region (FooScrollArea *area,
-                 GdkRegion *region)
+			     GdkRegion *region)
 {
     gdk_region_offset (region, area->priv->x_offset, area->priv->y_offset);
 }
 
 static void
+_cairo_region_xor (cairo_region_t *dst, const cairo_region_t *src)
+{
+    cairo_region_t *trb;
+
+    trb = cairo_region_copy (src);
+
+    cairo_region_subtract (trb, dst);
+    cairo_region_subtract (dst, src);
+    cairo_region_union (dst, trb);
+    cairo_region_destroy (trb);
+}
+
+static void
 foo_scroll_area_size_allocate (GtkWidget     *widget,
-                               GtkAllocation *allocation)
+			       GtkAllocation *allocation)
 {
     FooScrollArea *scroll_area = FOO_SCROLL_AREA (widget);
     GdkRectangle new_viewport;
@@ -732,10 +706,10 @@ foo_scroll_area_size_allocate (GtkWidget     *widget,
     gtk_widget_get_allocation (widget, &widget_allocation);
     old_allocation = gdk_region_rectangle (&widget_allocation);
     gdk_region_offset (old_allocation,
-                       -widget_allocation.x, -widget_allocation.y);
+		       -widget_allocation.x, -widget_allocation.y);
     invalid = gdk_region_rectangle (allocation);
     gdk_region_offset (invalid, -allocation->x, -allocation->y);
-    gdk_region_xor (invalid, old_allocation);
+    _cairo_region_xor (invalid, old_allocation);
     allocation_to_canvas_region (scroll_area, invalid);
     foo_scroll_area_invalidate_region (scroll_area, invalid);
     gdk_region_destroy (old_allocation);
@@ -745,15 +719,15 @@ foo_scroll_area_size_allocate (GtkWidget     *widget,
 
     if (scroll_area->priv->input_window)
     {
-        GdkPixmap *new_pixmap;
+	cairo_surface_t *new_surface;
 
-        gdk_window_move_resize (scroll_area->priv->input_window,
-                                allocation->x, allocation->y,
-                                allocation->width, allocation->height);
+	gdk_window_move_resize (scroll_area->priv->input_window,
+				allocation->x, allocation->y,
+				allocation->width, allocation->height);
 
-        new_pixmap = create_new_pixmap (widget, scroll_area->priv->pixmap);
-        g_object_unref (scroll_area->priv->pixmap);
-        scroll_area->priv->pixmap = new_pixmap;
+	new_surface = create_new_surface (widget, scroll_area->priv->surface);
+	cairo_surface_destroy (scroll_area->priv->surface);
+	scroll_area->priv->surface = new_surface;
     }
 
     get_viewport (scroll_area, &new_viewport);
@@ -762,20 +736,20 @@ foo_scroll_area_size_allocate (GtkWidget     *widget,
 }
 
 static void
-emit_input (FooScrollArea          *scroll_area,
-            FooScrollAreaEventType type,
-            int                    x,
-            int                    y,
-            FooScrollAreaEventFunc func,
-            gpointer               data)
+emit_input (FooScrollArea *scroll_area,
+	    FooScrollAreaEventType type,
+	    int			   x,
+	    int			   y,
+	    FooScrollAreaEventFunc func,
+	    gpointer		data)
 {
     FooScrollAreaEvent event;
 
     if (!func)
-        return;
+	return;
 
     if (type != FOO_MOTION)
-        emit_input (scroll_area, FOO_MOTION, x, y, func, data);
+	emit_input (scroll_area, FOO_MOTION, x, y, func, data);
 
     event.type = type;
     event.x = x;
@@ -785,10 +759,10 @@ emit_input (FooScrollArea          *scroll_area,
 }
 
 static void
-process_event (FooScrollArea           *scroll_area,
-               FooScrollAreaEventType   input_type,
-               int                      x,
-               int                      y)
+process_event (FooScrollArea	       *scroll_area,
+	       FooScrollAreaEventType	input_type,
+	       int			x,
+	       int			y)
 {
     GtkWidget *widget = GTK_WIDGET (scroll_area);
     guint i;
@@ -797,83 +771,83 @@ process_event (FooScrollArea           *scroll_area,
 
     if (scroll_area->priv->grabbed)
     {
-        emit_input (scroll_area, input_type, x, y,
-                scroll_area->priv->grab_func,
-                scroll_area->priv->grab_data);
-        return;
+	emit_input (scroll_area, input_type, x, y,
+		    scroll_area->priv->grab_func,
+		    scroll_area->priv->grab_data);
+	return;
     }
 
     for (i = 0; i < scroll_area->priv->input_regions->len; ++i)
     {
-        InputRegion *region = scroll_area->priv->input_regions->pdata[i];
-
-        if (gdk_region_point_in (region->region, x, y))
-        {
-            InputPath *path;
-
-            path = region->paths;
-            while (path)
-            {
-                cairo_t *cr;
-                gboolean inside;
-
-                cr = gdk_cairo_create (gtk_widget_get_window (widget));
-                cairo_set_fill_rule (cr, path->fill_rule);
-                cairo_set_line_width (cr, path->line_width);
-                cairo_append_path (cr, path->path);
-
-                if (path->is_stroke)
-                    inside = cairo_in_stroke (cr, x, y);
-                else
-                    inside = cairo_in_fill (cr, x, y);
-
-                cairo_destroy (cr);
-
-                if (inside)
-                {
-                    emit_input (scroll_area, input_type,
-                                x, y,
-                                path->func,
-                                path->data);
-                    return;
-                }
-
-                path = path->next;
-            }
-
-            /* Since the regions are all disjoint, no other region
-             * can match. Of course we could be clever and try and
-             * sort the regions, but so far I have been unable to
-             * make this loop show up on a profile.
-             */
-            return;
-        }
+	InputRegion *region = scroll_area->priv->input_regions->pdata[i];
+
+	if (gdk_region_point_in (region->region, x, y))
+	{
+	    InputPath *path;
+
+	    path = region->paths;
+	    while (path)
+	    {
+		cairo_t *cr;
+		gboolean inside;
+
+		cr = gdk_cairo_create (gtk_widget_get_window (widget));
+		cairo_set_fill_rule (cr, path->fill_rule);
+		cairo_set_line_width (cr, path->line_width);
+		cairo_append_path (cr, path->path);
+
+		if (path->is_stroke)
+		    inside = cairo_in_stroke (cr, x, y);
+		else
+		    inside = cairo_in_fill (cr, x, y);
+
+		cairo_destroy (cr);
+
+		if (inside)
+		{
+		    emit_input (scroll_area, input_type,
+				x, y,
+				path->func,
+				path->data);
+		    return;
+		}
+
+		path = path->next;
+	    }
+
+	    /* Since the regions are all disjoint, no other region
+	     * can match. Of course we could be clever and try and
+	     * sort the regions, but so far I have been unable to
+	     * make this loop show up on a profile.
+	     */
+	    return;
+	}
     }
 }
 
 static void
 process_gdk_event (FooScrollArea *scroll_area,
-                   int            x,
-                   int            y,
-                   GdkEvent      *event)
+		   int		  x,
+		   int	          y,
+		   GdkEvent      *event)
 {
     FooScrollAreaEventType input_type;
 
     if (event->type == GDK_BUTTON_PRESS)
-        input_type = FOO_BUTTON_PRESS;
+	input_type = FOO_BUTTON_PRESS;
     else if (event->type == GDK_BUTTON_RELEASE)
-        input_type = FOO_BUTTON_RELEASE;
+	input_type = FOO_BUTTON_RELEASE;
     else if (event->type == GDK_MOTION_NOTIFY)
-        input_type = FOO_MOTION;
+	input_type = FOO_MOTION;
     else
-        return;
+	return;
 
     process_event (scroll_area, input_type, x, y);
 }
 
 static gboolean
 foo_scroll_area_button_press (GtkWidget *widget,
-                              GdkEventButton *event)
+			      GdkEventButton *event)
 {
     FooScrollArea *area = FOO_SCROLL_AREA (widget);
 
@@ -883,8 +857,8 @@ foo_scroll_area_button_press (GtkWidget *widget,
 }
 
 static gboolean
-foo_scroll_area_button_release (GtkWidget      *widget,
-                                GdkEventButton *event)
+foo_scroll_area_button_release (GtkWidget *widget,
+				GdkEventButton *event)
 {
     FooScrollArea *area = FOO_SCROLL_AREA (widget);
 
@@ -894,8 +868,8 @@ foo_scroll_area_button_release (GtkWidget      *widget,
 }
 
 static gboolean
-foo_scroll_area_motion (GtkWidget      *widget,
-                        GdkEventMotion *event)
+foo_scroll_area_motion (GtkWidget *widget,
+			GdkEventMotion *event)
 {
     FooScrollArea *area = FOO_SCROLL_AREA (widget);
 
@@ -904,11 +878,11 @@ foo_scroll_area_motion (GtkWidget      *widget,
 }
 
 void
-foo_scroll_area_set_size_fixed_y (FooScrollArea    *scroll_area,
-                                  int               width,
-                                  int               height,
-                                  int               old_y,
-                                  int               new_y)
+foo_scroll_area_set_size_fixed_y (FooScrollArea	       *scroll_area,
+				  int			width,
+				  int			height,
+				  int			old_y,
+				  int			new_y)
 {
     scroll_area->priv->width = width;
     scroll_area->priv->height = height;
@@ -921,9 +895,9 @@ foo_scroll_area_set_size_fixed_y (FooScrollArea    *scroll_area,
 }
 
 void
-foo_scroll_area_set_size (FooScrollArea    *scroll_area,
-                          int               width,
-                          int               height)
+foo_scroll_area_set_size (FooScrollArea	       *scroll_area,
+			  int			width,
+			  int			height)
 {
     g_return_if_fail (FOO_IS_SCROLL_AREA (scroll_area));
 
@@ -949,19 +923,39 @@ foo_scroll_area_set_size (FooScrollArea    *scroll_area,
 }
 
 static void
-foo_scroll_area_size_request (GtkWidget      *widget,
-                              GtkRequisition *requisition)
+foo_scroll_area_get_preferred_width (GtkWidget *widget,
+                                     gint      *minimum,
+                                     gint      *natural)
+{
+    FooScrollArea *scroll_area = FOO_SCROLL_AREA (widget);
+
+    if (minimum != NULL) {
+        *minimum = scroll_area->priv->min_width;
+    }
+    if (natural != NULL) {
+        *natural = scroll_area->priv->min_width;
+    }
+}
+
+static void
+foo_scroll_area_get_preferred_height (GtkWidget *widget,
+                                      gint      *minimum,
+                                      gint      *natural)
 {
     FooScrollArea *scroll_area = FOO_SCROLL_AREA (widget);
 
-    requisition->width = scroll_area->priv->min_width;
-    requisition->height = scroll_area->priv->min_height;
+    if (minimum != NULL) {
+        *minimum = scroll_area->priv->min_height;
+    }
+    if (natural != NULL) {
+        *natural = scroll_area->priv->min_height;
+    }
 }
 
 static void
 foo_scroll_area_scroll (FooScrollArea *area,
-                        gint dx,
-                        gint dy)
+			gint dx,
+			gint dy)
 {
     GdkRectangle allocation;
     GdkRectangle src_area;
@@ -980,19 +974,34 @@ foo_scroll_area_scroll (FooScrollArea *area,
 
     if (gdk_rectangle_intersect (&allocation, &src_area, &move_area))
     {
-        GdkRegion *move_region;
+	GdkRegion *move_region;
+	cairo_t *cr;
+
+	cr = cairo_create (area->priv->surface);
+
+	/* Cairo doesn't allow self-copies, so we do this little trick instead:
+	* 1) Clip so the group size is small.
+	* 2) Call push_group() which creates a temporary pixmap as a workaround
+	*/
+	gdk_cairo_rectangle (cr, &move_area);
+	cairo_clip (cr);
+	cairo_push_group (cr);
+
+	cairo_set_source_surface (cr, area->priv->surface, dx, dy);
+	gdk_cairo_rectangle (cr, &move_area);
+	cairo_fill (cr);
+
+	cairo_pop_group_to_source (cr);
+	cairo_paint (cr);
 
-        simple_draw_drawable (area->priv->pixmap, area->priv->pixmap,
-                              move_area.x, move_area.y,
-                              move_area.x + dx, move_area.y + dy,
-                              move_area.width, move_area.height);
+	cairo_destroy (cr);
 
-        gtk_widget_queue_draw (GTK_WIDGET (area));
+	gtk_widget_queue_draw (GTK_WIDGET (area));
 
-        move_region = gdk_region_rectangle (&move_area);
-        gdk_region_offset (move_region, dx, dy);
-        gdk_region_subtract (invalid_region, move_region);
-        gdk_region_destroy (move_region);
+	move_region = gdk_region_rectangle (&move_area);
+	gdk_region_offset (move_region, dx, dy);
+	gdk_region_subtract (invalid_region, move_region);
+	gdk_region_destroy (move_region);
     }
 
     allocation_to_canvas_region (area, invalid_region);
@@ -1004,7 +1013,7 @@ foo_scroll_area_scroll (FooScrollArea *area,
 
 static void
 foo_scrollbar_adjustment_changed (GtkAdjustment *adj,
-                                  FooScrollArea *scroll_area)
+				  FooScrollArea *scroll_area)
 {
     GtkWidget *widget = GTK_WIDGET (scroll_area);
     gint dx = 0;
@@ -1015,25 +1024,25 @@ foo_scrollbar_adjustment_changed (GtkAdjustment *adj,
 
     if (adj == scroll_area->priv->hadj)
     {
-        /* FIXME: do we treat the offset as int or double, and,
-         * if int, how do we round?
-         */
-        dx = (int)gtk_adjustment_get_value (adj) - scroll_area->priv->x_offset;
-        scroll_area->priv->x_offset = gtk_adjustment_get_value (adj);
+	/* FIXME: do we treat the offset as int or double, and,
+	 * if int, how do we round?
+	 */
+	dx = (int)gtk_adjustment_get_value (adj) - scroll_area->priv->x_offset;
+	scroll_area->priv->x_offset = gtk_adjustment_get_value (adj);
     }
     else if (adj == scroll_area->priv->vadj)
     {
-        dy = (int)gtk_adjustment_get_value (adj) - scroll_area->priv->y_offset;
-        scroll_area->priv->y_offset = gtk_adjustment_get_value (adj);
+	dy = (int)gtk_adjustment_get_value (adj) - scroll_area->priv->y_offset;
+	scroll_area->priv->y_offset = gtk_adjustment_get_value (adj);
     }
     else
     {
-        g_assert_not_reached ();
+	g_assert_not_reached ();
     }
 
     if (gtk_widget_get_realized (widget))
     {
-        foo_scroll_area_scroll (scroll_area, -dx, -dy);
+	foo_scroll_area_scroll (scroll_area, -dx, -dy);
     }
 
     get_viewport (scroll_area, &new_viewport);
@@ -1043,25 +1052,25 @@ foo_scrollbar_adjustment_changed (GtkAdjustment *adj,
 
 static void
 set_one_adjustment (FooScrollArea *scroll_area,
-                    GtkAdjustment *adjustment,
-                    GtkAdjustment **location)
+		    GtkAdjustment *adjustment,
+		    GtkAdjustment **location)
 {
     g_return_if_fail (location != NULL);
 
     if (adjustment == *location)
-        return;
+	return;
 
     if (!adjustment)
-        adjustment = new_adjustment ();
+	adjustment = new_adjustment ();
 
     g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
 
     if (*location)
     {
-        g_signal_handlers_disconnect_by_func (
-            *location, foo_scrollbar_adjustment_changed, scroll_area);
+	g_signal_handlers_disconnect_by_func (
+	    *location, foo_scrollbar_adjustment_changed, scroll_area);
 
-        g_object_unref (*location);
+	g_object_unref (*location);
     }
 
     *location = adjustment;
@@ -1069,16 +1078,23 @@ set_one_adjustment (FooScrollArea *scroll_area,
     g_object_ref_sink (*location);
 
     g_signal_connect (*location, "value_changed",
-                      G_CALLBACK (foo_scrollbar_adjustment_changed),
-                      scroll_area);
+		      G_CALLBACK (foo_scrollbar_adjustment_changed),
+		      scroll_area);
 }
 
 static void
-foo_scroll_area_set_scroll_adjustments (FooScrollArea *scroll_area,
-                                        GtkAdjustment *hadjustment,
-                                        GtkAdjustment *vadjustment)
+foo_scroll_area_set_hadjustment (FooScrollArea *scroll_area,
+				 GtkAdjustment *hadjustment)
 {
     set_one_adjustment (scroll_area, hadjustment, &scroll_area->priv->hadj);
+
+    set_adjustment_values (scroll_area);
+}
+
+static void
+foo_scroll_area_set_vadjustment (FooScrollArea *scroll_area,
+				 GtkAdjustment *vadjustment)
+{
     set_one_adjustment (scroll_area, vadjustment, &scroll_area->priv->vadj);
 
     set_adjustment_values (scroll_area);
@@ -1092,8 +1108,8 @@ foo_scroll_area_new (void)
 
 void
 foo_scroll_area_set_min_size (FooScrollArea *scroll_area,
-                              int            min_width,
-                              int            min_height)
+			      int		   min_width,
+			      int            min_height)
 {
     scroll_area->priv->min_width = min_width;
     scroll_area->priv->min_height = min_height;
@@ -1109,7 +1125,7 @@ foo_scroll_area_set_min_size (FooScrollArea *scroll_area,
 
 static void
 user_to_device (double *x, double *y,
-                gpointer data)
+		gpointer data)
 {
     cairo_t *cr = data;
 
@@ -1117,11 +1133,11 @@ user_to_device (double *x, double *y,
 }
 
 static InputPath *
-make_path (FooScrollArea         *area,
-           cairo_t               *cr,
-           gboolean               is_stroke,
-           FooScrollAreaEventFunc func,
-           gpointer               data)
+make_path (FooScrollArea *area,
+	   cairo_t *cr,
+	   gboolean is_stroke,
+	   FooScrollAreaEventFunc func,
+	   gpointer data)
 {
     InputPath *path = g_new0 (InputPath, 1);
 
@@ -1139,16 +1155,16 @@ make_path (FooScrollArea         *area,
 
 /* FIXME: we probably really want a
  *
- *  foo_scroll_area_add_input_from_fill (area, cr, ...);
+ *	foo_scroll_area_add_input_from_fill (area, cr, ...);
  * and
  *      foo_scroll_area_add_input_from_stroke (area, cr, ...);
  * as well.
  */
 void
 foo_scroll_area_add_input_from_fill (FooScrollArea           *scroll_area,
-                                     cairo_t                 *cr,
-                                     FooScrollAreaEventFunc   func,
-                                     gpointer                 data)
+				     cairo_t	             *cr,
+				     FooScrollAreaEventFunc   func,
+				     gpointer                 data)
 {
     g_return_if_fail (FOO_IS_SCROLL_AREA (scroll_area));
     g_return_if_fail (cr != NULL);
@@ -1159,9 +1175,9 @@ foo_scroll_area_add_input_from_fill (FooScrollArea           *scroll_area,
 
 void
 foo_scroll_area_add_input_from_stroke (FooScrollArea           *scroll_area,
-                                       cairo_t                  *cr,
-                                       FooScrollAreaEventFunc   func,
-                                       gpointer                 data)
+				       cairo_t	                *cr,
+				       FooScrollAreaEventFunc   func,
+				       gpointer                 data)
 {
     g_return_if_fail (FOO_IS_SCROLL_AREA (scroll_area));
     g_return_if_fail (cr != NULL);
@@ -1178,40 +1194,40 @@ foo_scroll_area_invalidate (FooScrollArea *scroll_area)
 
     gtk_widget_get_allocation (widget, &allocation);
     foo_scroll_area_invalidate_rect (scroll_area,
-                     scroll_area->priv->x_offset, scroll_area->priv->y_offset,
-                     allocation.width,
-                     allocation.height);
+				     scroll_area->priv->x_offset, scroll_area->priv->y_offset,
+				     allocation.width,
+				     allocation.height);
 }
 
 static void
 canvas_to_window (FooScrollArea *area,
-                  GdkRegion     *region)
+		  GdkRegion *region)
 {
     GtkAllocation allocation;
     GtkWidget *widget = GTK_WIDGET (area);
 
     gtk_widget_get_allocation (widget, &allocation);
     gdk_region_offset (region,
-               -area->priv->x_offset + allocation.x,
-               -area->priv->y_offset + allocation.y);
+		       -area->priv->x_offset + allocation.x,
+		       -area->priv->y_offset + allocation.y);
 }
 
 static void
 window_to_canvas (FooScrollArea *area,
-                  GdkRegion *region)
+		  GdkRegion *region)
 {
     GtkAllocation allocation;
     GtkWidget *widget = GTK_WIDGET (area);
 
     gtk_widget_get_allocation (widget, &allocation);
     gdk_region_offset (region,
-               area->priv->x_offset - allocation.x,
-               area->priv->y_offset - allocation.y);
+		       area->priv->x_offset - allocation.x,
+		       area->priv->y_offset - allocation.y);
 }
 
 void
 foo_scroll_area_invalidate_region (FooScrollArea *area,
-                                   GdkRegion     *region)
+				   GdkRegion     *region)
 {
     GtkWidget *widget;
 
@@ -1223,21 +1239,21 @@ foo_scroll_area_invalidate_region (FooScrollArea *area,
 
     if (gtk_widget_get_realized (widget))
     {
-        canvas_to_window (area, region);
+	canvas_to_window (area, region);
 
-        gdk_window_invalidate_region (gtk_widget_get_window (widget),
-                                      region, TRUE);
+	gdk_window_invalidate_region (gtk_widget_get_window (widget),
+	                              region, TRUE);
 
-        window_to_canvas (area, region);
+	window_to_canvas (area, region);
     }
 }
 
 void
 foo_scroll_area_invalidate_rect (FooScrollArea *scroll_area,
-                                 int            x,
-                                 int            y,
-                                 int            width,
-                                 int            height)
+				 int	        x,
+				 int	        y,
+				 int	        width,
+				 int	        height)
 {
     GdkRectangle rect = { x, y, width, height };
     GdkRegion *region;
@@ -1253,8 +1269,8 @@ foo_scroll_area_invalidate_rect (FooScrollArea *scroll_area,
 
 void
 foo_scroll_area_begin_grab (FooScrollArea *scroll_area,
-                            FooScrollAreaEventFunc func,
-                            gpointer       input_data)
+			    FooScrollAreaEventFunc func,
+			    gpointer       input_data)
 {
     g_return_if_fail (FOO_IS_SCROLL_AREA (scroll_area));
     g_return_if_fail (!scroll_area->priv->grabbed);
@@ -1285,8 +1301,8 @@ foo_scroll_area_is_grabbed (FooScrollArea *scroll_area)
 
 void
 foo_scroll_area_set_viewport_pos (FooScrollArea  *scroll_area,
-                                  int             x,
-                                  int             y)
+				  int		  x,
+				  int		  y)
 {
     g_object_freeze_notify (G_OBJECT (scroll_area->priv->hadj));
     g_object_freeze_notify (G_OBJECT (scroll_area->priv->vadj));
@@ -1301,10 +1317,10 @@ foo_scroll_area_set_viewport_pos (FooScrollArea  *scroll_area,
 static gboolean
 rect_contains (const GdkRectangle *rect, int x, int y)
 {
-    return (x >= rect->x        &&
-            y >= rect->y        &&
-            x  < rect->x + rect->width  &&
-            y  < rect->y + rect->height);
+    return (x >= rect->x		&&
+	    y >= rect->y		&&
+	    x  < rect->x + rect->width	&&
+	    y  < rect->y + rect->height);
 }
 
 static void
@@ -1312,11 +1328,11 @@ stop_scrolling (FooScrollArea *area)
 {
     if (area->priv->auto_scroll_info)
     {
-        g_source_remove (area->priv->auto_scroll_info->timeout_id);
-        g_timer_destroy (area->priv->auto_scroll_info->timer);
-        g_free (area->priv->auto_scroll_info);
+	g_source_remove (area->priv->auto_scroll_info->timeout_id);
+	g_timer_destroy (area->priv->auto_scroll_info->timer);
+	g_free (area->priv->auto_scroll_info);
 
-        area->priv->auto_scroll_info = NULL;
+	area->priv->auto_scroll_info = NULL;
     }
 }
 
@@ -1343,17 +1359,17 @@ scroll_idle (gpointer data)
 
     get_viewport (area, &new_viewport);
 
-    if (viewport.x == new_viewport.x        &&
-    viewport.y == new_viewport.y        &&
-    (info->res_x > 1.0          ||
-     info->res_y > 1.0          ||
-     info->res_x < -1.0         ||
-     info->res_y < -1.0))
+    if (viewport.x == new_viewport.x		&&
+	viewport.y == new_viewport.y		&&
+	(info->res_x > 1.0			||
+	 info->res_y > 1.0			||
+	 info->res_x < -1.0			||
+	 info->res_y < -1.0))
     {
-        stop_scrolling (area);
+	stop_scrolling (area);
 
-        /* stop scrolling if it didn't have an effect */
-        return FALSE;
+	/* stop scrolling if it didn't have an effect */
+	return FALSE;
     }
 
     return TRUE;
@@ -1361,15 +1377,15 @@ scroll_idle (gpointer data)
 
 static void
 ensure_scrolling (FooScrollArea *area,
-                  int            dx,
-                  int            dy)
+		  int		 dx,
+		  int		 dy)
 {
     if (!area->priv->auto_scroll_info)
     {
-        area->priv->auto_scroll_info = g_new0 (AutoScrollInfo, 1);
-        area->priv->auto_scroll_info->timeout_id =
-            g_idle_add (scroll_idle, area);
-        area->priv->auto_scroll_info->timer = g_timer_new ();
+	area->priv->auto_scroll_info = g_new0 (AutoScrollInfo, 1);
+	area->priv->auto_scroll_info->timeout_id =
+	    g_idle_add (scroll_idle, area);
+	area->priv->auto_scroll_info->timer = g_timer_new ();
     }
 
     area->priv->auto_scroll_info->dx = dx;
@@ -1377,8 +1393,8 @@ ensure_scrolling (FooScrollArea *area,
 }
 
 void
-foo_scroll_area_auto_scroll (FooScrollArea      *scroll_area,
-                             FooScrollAreaEvent *event)
+foo_scroll_area_auto_scroll (FooScrollArea *scroll_area,
+			     FooScrollAreaEvent *event)
 {
     GdkRectangle viewport;
 
@@ -1386,44 +1402,44 @@ foo_scroll_area_auto_scroll (FooScrollArea      *scroll_area,
 
     if (rect_contains (&viewport, event->x, event->y))
     {
-        stop_scrolling (scroll_area);
+	stop_scrolling (scroll_area);
     }
     else
     {
-        int dx, dy;
-
-        dx = dy = 0;
-
-        if (event->y < viewport.y)
-        {
-            dy = event->y - viewport.y;
-            dy = MIN (dy + 2, 0);
-        }
-        else if (event->y >= viewport.y + viewport.height)
-        {
-            dy = event->y - (viewport.y + viewport.height - 1);
-            dy = MAX (dy - 2, 0);
-        }
-
-        if (event->x < viewport.x)
-        {
-            dx = event->x - viewport.x;
-            dx = MIN (dx + 2, 0);
-        }
-        else if (event->x >= viewport.x + viewport.width)
-        {
-            dx = event->x - (viewport.x + viewport.width - 1);
-            dx = MAX (dx - 2, 0);
-        }
-
-        ensure_scrolling (scroll_area, dx, dy);
+	int dx, dy;
+
+	dx = dy = 0;
+
+	if (event->y < viewport.y)
+	{
+	    dy = event->y - viewport.y;
+	    dy = MIN (dy + 2, 0);
+	}
+	else if (event->y >= viewport.y + viewport.height)
+	{
+	    dy = event->y - (viewport.y + viewport.height - 1);
+	    dy = MAX (dy - 2, 0);
+	}
+
+	if (event->x < viewport.x)
+	{
+	    dx = event->x - viewport.x;
+	    dx = MIN (dx + 2, 0);
+	}
+	else if (event->x >= viewport.x + viewport.width)
+	{
+	    dx = event->x - (viewport.x + viewport.width - 1);
+	    dx = MAX (dx - 2, 0);
+	}
+
+	ensure_scrolling (scroll_area, dx, dy);
     }
 }
 
 void
 foo_scroll_area_begin_auto_scroll (FooScrollArea *scroll_area)
 {
-    /* noop for now */
+    /* noop  for now */
 }
 
 void
diff --git a/dialogs/display-settings/scrollarea.h b/dialogs/display-settings/scrollarea.h
index dc8bb0d..c77dc46 100644
--- a/dialogs/display-settings/scrollarea.h
+++ b/dialogs/display-settings/scrollarea.h
@@ -7,7 +7,7 @@
  *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
@@ -18,6 +18,19 @@
 #include <cairo.h>
 #include <gtk/gtk.h>
 
+#define GdkRegion cairo_region_t
+#define gdk_region_new cairo_region_create
+#define gdk_region_destroy cairo_region_destroy
+#define gdk_region_rectangle cairo_region_create_rectangle
+#define gdk_region_subtract cairo_region_subtract
+#define gdk_region_intersect cairo_region_intersect
+#define gdk_region_empty cairo_region_is_empty
+#define gdk_region_copy cairo_region_copy
+#define gdk_region_get_clipbox cairo_region_get_extents
+#define gdk_region_offset cairo_region_translate
+#define gdk_region_point_in cairo_region_contains_point
+#define gdk_region_union cairo_region_union
+
 #define FOO_TYPE_SCROLL_AREA            (foo_scroll_area_get_type ())
 #define FOO_SCROLL_AREA(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOO_TYPE_SCROLL_AREA, FooScrollArea))
 #define FOO_SCROLL_AREA_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  FOO_TYPE_SCROLL_AREA, FooScrollAreaClass))
@@ -25,10 +38,10 @@
 #define FOO_IS_SCROLL_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  FOO_TYPE_SCROLL_AREA))
 #define FOO_SCROLL_AREA_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  FOO_TYPE_SCROLL_AREA, FooScrollAreaClass))
 
-typedef struct FooScrollArea        FooScrollArea;
-typedef struct FooScrollAreaClass   FooScrollAreaClass;
+typedef struct FooScrollArea FooScrollArea;
+typedef struct FooScrollAreaClass FooScrollAreaClass;
 typedef struct FooScrollAreaPrivate FooScrollAreaPrivate;
-typedef struct FooScrollAreaEvent   FooScrollAreaEvent;
+typedef struct FooScrollAreaEvent FooScrollAreaEvent;
 
 typedef enum
 {
@@ -39,14 +52,14 @@ typedef enum
 
 struct FooScrollAreaEvent
 {
-    FooScrollAreaEventType  type;
-    int                     x;
-    int                     y;
+    FooScrollAreaEventType	type;
+    int				x;
+    int				y;
 };
 
 typedef void (* FooScrollAreaEventFunc) (FooScrollArea      *area,
-                                         FooScrollAreaEvent *event,
-                                         gpointer            data);
+					 FooScrollAreaEvent *event,
+					 gpointer            data);
 
 struct FooScrollArea
 {
@@ -60,17 +73,17 @@ struct FooScrollAreaClass
     GtkContainerClass parent_class;
 
     void (*set_scroll_adjustments) (FooScrollArea *scroll_area,
-                                    GtkAdjustment *hadjustment,
-                                    GtkAdjustment *vadjustment);
+				    GtkAdjustment *hadjustment,
+				    GtkAdjustment *vadjustment);
 
     void (*viewport_changed) (FooScrollArea *scroll_area,
-                              GdkRectangle  *old_viewport,
-                              GdkRectangle  *new_viewport);
+			      GdkRectangle  *old_viewport,
+			      GdkRectangle  *new_viewport);
 
     void (*paint) (FooScrollArea *scroll_area,
-                   cairo_t       *cr,
-                   GdkRectangle  *extents,
-                   GdkRegion     *region);
+		   cairo_t       *cr,
+		   GdkRectangle  *extents,
+		   GdkRegion     *region);
 };
 
 GType foo_scroll_area_get_type (void);
@@ -78,60 +91,47 @@ GType foo_scroll_area_get_type (void);
 FooScrollArea *foo_scroll_area_new (void);
 
 /* Set the requisition for the widget. */
-void          foo_scroll_area_set_min_size (FooScrollArea *scroll_area,
-                                            int            min_width,
-                                            int            min_height);
+void	      foo_scroll_area_set_min_size (FooScrollArea *scroll_area,
+					    int		   min_width,
+					    int            min_height);
 
 /* Set how much of the canvas can be scrolled into view */
-void          foo_scroll_area_set_size (FooScrollArea          *scroll_area,
-                                        int                     width,
-                                        int                     height);
-
-void          foo_scroll_area_set_size_fixed_y (FooScrollArea  *scroll_area,
-                                                int             width,
-                                                int             height,
-                                                int             old_y,
-                                                int             new_y);
-
-void          foo_scroll_area_set_viewport_pos (FooScrollArea  *scroll_area,
-                                                int             x,
-                                                int             y);
-
-void          foo_scroll_area_get_viewport (FooScrollArea *scroll_area,
-                                            GdkRectangle  *viewport);
-
+void	      foo_scroll_area_set_size (FooScrollArea	       *scroll_area,
+					int			width,
+					int			height);
+void	      foo_scroll_area_set_size_fixed_y (FooScrollArea  *scroll_area,
+						int		width,
+						int		height,
+						int		old_y,
+						int		new_y);
+void	      foo_scroll_area_set_viewport_pos (FooScrollArea  *scroll_area,
+						int		x,
+						int		y);
+void	      foo_scroll_area_get_viewport (FooScrollArea *scroll_area,
+					    GdkRectangle  *viewport);
 void          foo_scroll_area_add_input_from_stroke (FooScrollArea           *scroll_area,
-                                                     cairo_t                 *cr,
-                                                     FooScrollAreaEventFunc   func,
-                                                     gpointer                 data);
-
-void          foo_scroll_area_add_input_from_fill (FooScrollArea         *scroll_area,
-                                                   cairo_t                *cr,
-                                                   FooScrollAreaEventFunc  func,
-                                                   gpointer                data);
-
+						     cairo_t	                *cr,
+						     FooScrollAreaEventFunc   func,
+						     gpointer                 data);
+void          foo_scroll_area_add_input_from_fill (FooScrollArea *scroll_area,
+						      cairo_t	      *cr,
+						      FooScrollAreaEventFunc func,
+						      gpointer       data);
 void          foo_scroll_area_invalidate_region (FooScrollArea *area,
-                                                 GdkRegion     *region);
-
-void          foo_scroll_area_invalidate (FooScrollArea *scroll_area);
-
-void          foo_scroll_area_invalidate_rect (FooScrollArea   *scroll_area,
-                                               int              x,
-                                               int              y,
-                                               int              width,
-                                               int              height);
-
-void          foo_scroll_area_begin_grab (FooScrollArea          *scroll_area,
-                                          FooScrollAreaEventFunc  func,
-                                          gpointer                input_data);
-
-void          foo_scroll_area_end_grab (FooScrollArea *scroll_area);
-
-gboolean      foo_scroll_area_is_grabbed (FooScrollArea *scroll_area);
-
-void          foo_scroll_area_begin_auto_scroll (FooScrollArea *scroll_area);
-
-void          foo_scroll_area_auto_scroll (FooScrollArea      *scroll_area,
-                                           FooScrollAreaEvent *event);
-
-void          foo_scroll_area_end_auto_scroll (FooScrollArea *scroll_area);
+						 GdkRegion     *region);
+void	      foo_scroll_area_invalidate (FooScrollArea *scroll_area);
+void	      foo_scroll_area_invalidate_rect (FooScrollArea *scroll_area,
+					       int	      x,
+					       int	      y,
+					       int	      width,
+					       int	      height);
+void foo_scroll_area_begin_grab (FooScrollArea *scroll_area,
+				 FooScrollAreaEventFunc func,
+				 gpointer       input_data);
+void foo_scroll_area_end_grab (FooScrollArea *scroll_area);
+gboolean foo_scroll_area_is_grabbed (FooScrollArea *scroll_area);
+
+void foo_scroll_area_begin_auto_scroll (FooScrollArea *scroll_area);
+void foo_scroll_area_auto_scroll (FooScrollArea *scroll_area,
+				  FooScrollAreaEvent *event);
+void foo_scroll_area_end_auto_scroll (FooScrollArea *scroll_area);
diff --git a/dialogs/keyboard-settings/Makefile.am b/dialogs/keyboard-settings/Makefile.am
index d5f1150..323638f 100644
--- a/dialogs/keyboard-settings/Makefile.am
+++ b/dialogs/keyboard-settings/Makefile.am
@@ -22,12 +22,17 @@ xfce4_keyboard_settings_CFLAGS = \
 	$(GTK_CFLAGS) \
 	$(LIBXKLAVIER_CFLAGS) \
 	$(LIBXKLAVIER_0_4_CFLAGS) \
-	$(LIBXFCE4UTIL_CFLAGS) \
 	$(LIBXFCE4UI_CFLAGS) \
 	$(LIBXFCE4KBD_PRIVATE_CFLAGS) \
 	$(EXO_CFLAGS) \
 	$(XFCONF_CFLAGS) \
-	$(PLATFORM_CFLAGS)
+	$(PLATFORM_CFLAGS) \
+    -DGTK_DISABLE_SINGLE_INCLUDES \
+    -DGDK_DISABLE_DEPRECATED \
+    -DGTK_DISABLE_DEPRECATED \
+    -DGSEAL_ENABLE \
+    -DGDK_PIXBUF_DISABLE_DEPRECATED \
+    -DG_DISABLE_DEPRECATED
 
 xfce4_keyboard_settings_LDFLAGS = \
 	-no-undefined \
@@ -37,7 +42,6 @@ xfce4_keyboard_settings_LDADD = \
 	$(GTK_LIBS) \
 	$(LIBXKLAVIER_LIBS) \
 	$(LIBXKLAVIER_0_4_LIBS) \
-	$(LIBXFCE4UTIL_LIBS) \
 	$(LIBXFCE4UI_LIBS) \
 	$(LIBXFCE4KBD_PRIVATE_LIBS) \
 	$(EXO_LIBS) \
diff --git a/dialogs/keyboard-settings/command-dialog.c b/dialogs/keyboard-settings/command-dialog.c
index 3d24f18..9663076 100644
--- a/dialogs/keyboard-settings/command-dialog.c
+++ b/dialogs/keyboard-settings/command-dialog.c
@@ -23,7 +23,6 @@
 
 #include <gtk/gtk.h>
 
-#include <libxfce4util/libxfce4util.h>
 #include <libxfce4ui/libxfce4ui.h>
 
 #include "command-dialog.h"
@@ -97,7 +96,6 @@ command_dialog_create_contents (CommandDialog *dialog,
                                 const gchar   *action,
                                 gboolean       snotify)
 {
-  GtkWidget *alignment;
   GtkWidget *button;
   GtkWidget *content_box;
   GtkWidget *hbox;
@@ -108,31 +106,23 @@ command_dialog_create_contents (CommandDialog *dialog,
   gtk_window_set_title (GTK_WINDOW (dialog), _("Shortcut Command"));
   gtk_window_set_icon_name (GTK_WINDOW (dialog), "application-x-executable");
 
-  /* Configure dialog */
-  gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
-
   /* Create cancel button */
-  button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
+  button = gtk_button_new_with_label (_("Cancel"));
   gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_CANCEL);
   gtk_widget_show (button);
 
-  button = gtk_button_new_from_stock (GTK_STOCK_OK);
+  button = gtk_button_new_with_label (_("OK"));
   gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK);
-  GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+  gtk_widget_set_can_default (GTK_WIDGET(button), TRUE);
   gtk_widget_grab_default (button);
   gtk_widget_show (button);
 
   /* Set the main box layout */
-  alignment = gtk_alignment_new (0, 0, 1, 1);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 6, 12, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (alignment), 0);
-  gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
-                                    alignment);
-  gtk_widget_show (alignment);
-
-  content_box = gtk_vbox_new (FALSE, 6);
+  content_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+  gtk_widget_set_margin_bottom (GTK_WIDGET(content_box), 6);
+  gtk_widget_set_margin_start (GTK_WIDGET(content_box), 12);
   gtk_container_set_border_width (GTK_CONTAINER (content_box), 6);
-  gtk_container_add (GTK_CONTAINER (alignment), content_box);
+  gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), content_box);
   gtk_widget_show (content_box);
 
   if (!shortcut)
@@ -151,9 +141,9 @@ command_dialog_create_contents (CommandDialog *dialog,
       gtk_widget_show (label);
     }
 
-  table = gtk_table_new (3, 2, FALSE);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+  table = gtk_grid_new ();
+  gtk_grid_set_row_spacing (GTK_GRID (table), 6);
+  gtk_grid_set_column_spacing (GTK_GRID (table), 12);
   gtk_container_set_border_width (GTK_CONTAINER (table), 6);
   gtk_container_add (GTK_CONTAINER (content_box), table);
   gtk_widget_show (table);
@@ -163,23 +153,26 @@ command_dialog_create_contents (CommandDialog *dialog,
       /* We are editing an existing shortcut */
 
       label = gtk_label_new (_("Shortcut:"));
-      gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-      gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
+      gtk_widget_set_halign (GTK_WIDGET (label), GTK_ALIGN_START);
+      gtk_widget_set_valign (GTK_WIDGET (label), GTK_ALIGN_CENTER);
+      gtk_grid_attach (GTK_GRID (table), label, 0, 0, 1, 1);
       gtk_widget_show (label);
 
       label = gtk_label_new (shortcut);
-      gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-      gtk_table_attach (GTK_TABLE (table), label, 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
+      gtk_widget_set_halign (GTK_WIDGET (label), GTK_ALIGN_START);
+      gtk_widget_set_valign (GTK_WIDGET (label), GTK_ALIGN_CENTER);
+      gtk_grid_attach (GTK_GRID (table), label, 1, 0, 1, 1);
       gtk_widget_show (label);
     }
 
   label = gtk_label_new (_("Command:"));
-  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_set_halign (GTK_WIDGET (label), GTK_ALIGN_START);
+  gtk_widget_set_valign (GTK_WIDGET (label), GTK_ALIGN_CENTER);
+  gtk_grid_attach (GTK_GRID (table), label, 0, 1, 1, 1);
   gtk_widget_show (label);
 
-  hbox = gtk_hbox_new (FALSE, 6);
-  gtk_table_attach (GTK_TABLE (table), hbox, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
+  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+  gtk_grid_attach (GTK_GRID (table), hbox, 1, 1, 1, 1);
   gtk_widget_show (hbox);
 
   dialog->entry = gtk_entry_new ();
@@ -188,13 +181,13 @@ command_dialog_create_contents (CommandDialog *dialog,
   gtk_container_add (GTK_CONTAINER (hbox), dialog->entry);
   gtk_widget_show (dialog->entry);
 
-  dialog->button = gtk_button_new_from_stock (GTK_STOCK_OPEN);
+  dialog->button = gtk_button_new_with_label (_("Open"));
   g_signal_connect_swapped (dialog->button, "clicked", G_CALLBACK (command_dialog_button_clicked), dialog);
   gtk_box_pack_start (GTK_BOX (hbox), dialog->button, FALSE, TRUE, 0);
   gtk_widget_show (dialog->button);
 
   dialog->sn_option = gtk_check_button_new_with_mnemonic (_("Use _startup notification"));
-  gtk_table_attach (GTK_TABLE (table), dialog->sn_option, 1, 2, 2, 3, GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
+  gtk_grid_attach (GTK_GRID (table), dialog->sn_option, 0, 2, 1, 1);
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->sn_option), snotify);
   gtk_widget_show (dialog->sn_option);
 
@@ -263,8 +256,8 @@ command_dialog_button_clicked (CommandDialog *dialog)
   chooser = gtk_file_chooser_dialog_new (_("Select command"),
                                          GTK_WINDOW (dialog),
                                          GTK_FILE_CHOOSER_ACTION_OPEN,
-                                         GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-                                         GTK_STOCK_OPEN, GTK_RESPONSE_OK, NULL);
+                                         _("Cancel"), GTK_RESPONSE_CANCEL,
+                                         _("Open"), GTK_RESPONSE_OK, NULL);
 
   /* Add file chooser filters */
   filter = gtk_file_filter_new ();
diff --git a/dialogs/keyboard-settings/keyboard-dialog.glade b/dialogs/keyboard-settings/keyboard-dialog.glade
index 72aec7f..7f8d0b9 100644
--- a/dialogs/keyboard-settings/keyboard-dialog.glade
+++ b/dialogs/keyboard-settings/keyboard-dialog.glade
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.20.0 -->
 <interface>
-  <requires lib="gtk+" version="2.20"/>
-  <!-- interface-requires libxfce4ui 4.5 -->
-  <!-- interface-naming-policy toplevel-contextual -->
+  <requires lib="gtk+" version="3.20"/>
+  <requires lib="libxfce4ui-2" version="4.13"/>
   <object class="GtkImage" id="image1">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
@@ -22,19 +22,19 @@
     <property name="type_hint">dialog</property>
     <property name="subtitle" translatable="yes">Select keyboard layout and variant</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox2">
+      <object class="GtkBox" id="dialog-vbox2">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">2</property>
         <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area2">
+          <object class="GtkButtonBox" id="dialog-action_area2">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="layout_selection_ok_button">
                 <property name="label">gtk-ok</property>
-                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
@@ -49,7 +49,6 @@
             <child>
               <object class="GtkButton" id="layout_selection_cancel_button">
                 <property name="label">gtk-cancel</property>
-                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
@@ -74,8 +73,6 @@
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="border_width">6</property>
-            <property name="hscrollbar_policy">automatic</property>
-            <property name="vscrollbar_policy">automatic</property>
             <property name="shadow_type">in</property>
             <child>
               <object class="GtkTreeView" id="layout_selection_view">
@@ -83,6 +80,9 @@
                 <property name="can_focus">True</property>
                 <property name="headers_visible">False</property>
                 <property name="search_column">0</property>
+                <child internal-child="selection">
+                  <object class="GtkTreeSelection" id="treeview-selection1"/>
+                </child>
               </object>
             </child>
           </object>
@@ -99,6 +99,28 @@
       <action-widget response="-6">layout_selection_cancel_button</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkAdjustment" id="net_cursor_blink_time">
+    <property name="lower">100</property>
+    <property name="upper">2000</property>
+    <property name="value">1000</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkSizeGroup" id="sizegroup1"/>
+  <object class="GtkAdjustment" id="xkb_key_repeat_delay">
+    <property name="lower">10</property>
+    <property name="upper">1000</property>
+    <property name="value">500</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="xkb_key_repeat_rate">
+    <property name="lower">1</property>
+    <property name="upper">250</property>
+    <property name="value">20</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
   <object class="XfceTitledDialog" id="keyboard-settings-dialog">
     <property name="can_focus">False</property>
     <property name="title" translatable="yes">Keyboard</property>
@@ -108,19 +130,19 @@
     <property name="type_hint">dialog</property>
     <property name="subtitle" translatable="yes">Edit keyboard settings and application shortcuts</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">2</property>
         <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
+          <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="button1">
                 <property name="label">gtk-help</property>
-                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
@@ -136,7 +158,6 @@
             <child>
               <object class="GtkButton" id="button2">
                 <property name="label">gtk-close</property>
-                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
@@ -157,20 +178,22 @@
           </packing>
         </child>
         <child>
-          <object class="GtkVBox" id="plug-child">
+          <object class="GtkBox" id="plug-child">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="border_width">6</property>
+            <property name="orientation">vertical</property>
             <property name="spacing">6</property>
             <child>
               <object class="GtkNotebook" id="notebook1">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <child>
-                  <object class="GtkVBox" id="vbox3">
+                  <object class="GtkBox" id="vbox3">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="border_width">12</property>
+                    <property name="orientation">vertical</property>
                     <property name="spacing">6</property>
                     <child>
                       <object class="GtkFrame" id="frame1">
@@ -189,10 +212,10 @@
                             <child>
                               <object class="GtkCheckButton" id="restore_numlock">
                                 <property name="label" translatable="yes">Restore num l_ock state on startup</property>
-                                <property name="use_action_appearance">False</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="halign">start</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -229,19 +252,20 @@
                             <property name="can_focus">False</property>
                             <property name="left_padding">12</property>
                             <child>
-                              <object class="GtkVBox" id="vbox1">
+                              <object class="GtkBox" id="vbox1">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="border_width">6</property>
+                                <property name="orientation">vertical</property>
                                 <property name="spacing">6</property>
                                 <child>
                                   <object class="GtkCheckButton" id="xkb_key_repeat_check">
                                     <property name="label" translatable="yes">_Enable key repeat</property>
-                                    <property name="use_action_appearance">False</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">False</property>
                                     <property name="tooltip_text" translatable="yes">When selected, pressing and holding down a key emits the same character over and over again</property>
+                                    <property name="halign">start</property>
                                     <property name="use_underline">True</property>
                                     <property name="active">True</property>
                                     <property name="draw_indicator">True</property>
@@ -258,15 +282,16 @@
                                     <property name="can_focus">False</property>
                                     <property name="left_padding">18</property>
                                     <child>
-                                      <object class="GtkVBox" id="vbox6">
+                                      <object class="GtkBox" id="vbox6">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
+                                        <property name="orientation">vertical</property>
                                         <property name="spacing">6</property>
                                         <child>
                                           <object class="GtkLabel" id="label7">
                                             <property name="visible">True</property>
                                             <property name="can_focus">False</property>
-                                            <property name="xalign">0</property>
+                                            <property name="halign">start</property>
                                             <property name="label" translatable="yes">_Repeat delay:</property>
                                             <property name="use_underline">True</property>
                                             <property name="mnemonic_widget">xkb_key_repeat_delay_scale</property>
@@ -278,11 +303,10 @@
                                           </packing>
                                         </child>
                                         <child>
-                                          <object class="GtkHScale" id="xkb_key_repeat_delay_scale">
+                                          <object class="GtkScale" id="xkb_key_repeat_delay_scale">
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
                                             <property name="tooltip_text" translatable="yes">The time, in milliseconds, before a pressed key begins repeating</property>
-                                            <property name="update_policy">delayed</property>
                                             <property name="adjustment">xkb_key_repeat_delay</property>
                                             <property name="digits">0</property>
                                             <property name="value_pos">right</property>
@@ -297,7 +321,7 @@
                                           <object class="GtkLabel" id="label10">
                                             <property name="visible">True</property>
                                             <property name="can_focus">False</property>
-                                            <property name="xalign">0</property>
+                                            <property name="halign">start</property>
                                             <property name="label" translatable="yes">Repe_at speed:</property>
                                             <property name="use_underline">True</property>
                                             <property name="mnemonic_widget">xkb_key_repeat_rate_scale</property>
@@ -309,11 +333,10 @@
                                           </packing>
                                         </child>
                                         <child>
-                                          <object class="GtkHScale" id="xkb_key_repeat_rate_scale">
+                                          <object class="GtkScale" id="xkb_key_repeat_rate_scale">
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
                                             <property name="tooltip_text" translatable="yes">The rate at which keystrokes are generated while a key is pressed</property>
-                                            <property name="update_policy">delayed</property>
                                             <property name="adjustment">xkb_key_repeat_rate</property>
                                             <property name="digits">0</property>
                                             <property name="value_pos">right</property>
@@ -366,19 +389,20 @@
                             <property name="can_focus">False</property>
                             <property name="left_padding">12</property>
                             <child>
-                              <object class="GtkVBox" id="vbox4">
+                              <object class="GtkBox" id="vbox4">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="border_width">6</property>
+                                <property name="orientation">vertical</property>
                                 <property name="spacing">6</property>
                                 <child>
                                   <object class="GtkCheckButton" id="net_cursor_blink_check">
                                     <property name="label" translatable="yes">Show _blinking</property>
-                                    <property name="use_action_appearance">False</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">False</property>
                                     <property name="tooltip_text" translatable="yes">Specify whether or not the text cursor blinks</property>
+                                    <property name="halign">start</property>
                                     <property name="use_underline">True</property>
                                     <property name="draw_indicator">True</property>
                                   </object>
@@ -395,15 +419,16 @@
                                     <property name="can_focus">False</property>
                                     <property name="left_padding">18</property>
                                     <child>
-                                      <object class="GtkVBox" id="vbox7">
+                                      <object class="GtkBox" id="vbox7">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
+                                        <property name="orientation">vertical</property>
                                         <property name="spacing">6</property>
                                         <child>
                                           <object class="GtkLabel" id="label13">
                                             <property name="visible">True</property>
                                             <property name="can_focus">False</property>
-                                            <property name="xalign">0</property>
+                                            <property name="halign">start</property>
                                             <property name="label" translatable="yes">Blink _delay:</property>
                                             <property name="use_underline">True</property>
                                             <property name="mnemonic_widget">net_cursor_blink_time_scale</property>
@@ -415,11 +440,10 @@
                                           </packing>
                                         </child>
                                         <child>
-                                          <object class="GtkHScale" id="net_cursor_blink_time_scale">
+                                          <object class="GtkScale" id="net_cursor_blink_time_scale">
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
                                             <property name="tooltip_text" translatable="yes">The delay, in milliseconds, between successive blinks of the cursor</property>
-                                            <property name="update_policy">delayed</property>
                                             <property name="adjustment">net_cursor_blink_time</property>
                                             <property name="digits">0</property>
                                             <property name="value_pos">right</property>
@@ -461,7 +485,7 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHBox" id="hbox1">
+                      <object class="GtkBox" id="hbox1">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="spacing">12</property>
@@ -484,11 +508,8 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="invisible_char">•</property>
-                            <property name="invisible_char_set">True</property>
                             <property name="primary_icon_activatable">False</property>
                             <property name="secondary_icon_activatable">False</property>
-                            <property name="primary_icon_sensitive">True</property>
-                            <property name="secondary_icon_sensitive">True</property>
                           </object>
                           <packing>
                             <property name="expand">True</property>
@@ -517,16 +538,16 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkVBox" id="vbox5">
+                  <object class="GtkBox" id="vbox5">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="border_width">12</property>
+                    <property name="orientation">vertical</property>
                     <property name="spacing">6</property>
                     <child>
                       <object class="GtkLabel" id="label14">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
                         <property name="label" translatable="yes">Define shortcuts for la_unching applications:</property>
                         <property name="use_underline">True</property>
                         <property name="mnemonic_widget">kbd_shortcuts_view</property>
@@ -541,14 +562,15 @@
                       <object class="GtkScrolledWindow" id="scrolledwindow2">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="hscrollbar_policy">automatic</property>
-                        <property name="vscrollbar_policy">automatic</property>
                         <property name="shadow_type">etched-in</property>
                         <child>
                           <object class="GtkTreeView" id="kbd_shortcuts_view">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="search_column">0</property>
+                            <child internal-child="selection">
+                              <object class="GtkTreeSelection" id="treeview-selection2"/>
+                            </child>
                           </object>
                         </child>
                       </object>
@@ -562,18 +584,16 @@
                       <object class="GtkAlignment" id="alignment8">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="yalign">0</property>
                         <property name="xscale">0</property>
                         <property name="yscale">0</property>
                         <child>
-                          <object class="GtkHBox" id="hbox2">
+                          <object class="GtkBox" id="hbox2">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="spacing">12</property>
                             <child>
                               <object class="GtkButton" id="add_shortcut_button">
                                 <property name="label">gtk-add</property>
-                                <property name="use_action_appearance">False</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">True</property>
@@ -588,7 +608,6 @@
                             <child>
                               <object class="GtkButton" id="edit_shortcut_button">
                                 <property name="label">gtk-edit</property>
-                                <property name="use_action_appearance">False</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">True</property>
@@ -603,7 +622,6 @@
                             <child>
                               <object class="GtkButton" id="delete_shortcut_button">
                                 <property name="label">gtk-remove</property>
-                                <property name="use_action_appearance">False</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">True</property>
@@ -618,7 +636,6 @@
                             <child>
                               <object class="GtkButton" id="reset_shortcuts_button">
                                 <property name="label" translatable="yes">Reset to _Defaults</property>
-                                <property name="use_action_appearance">False</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">True</property>
@@ -659,18 +676,19 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkVBox" id="xkb_tab_layout_vbox">
+                  <object class="GtkBox" id="xkb_tab_layout_vbox">
                     <property name="can_focus">False</property>
                     <property name="border_width">12</property>
+                    <property name="orientation">vertical</property>
                     <property name="spacing">6</property>
                     <child>
                       <object class="GtkCheckButton" id="xkb_use_system_default_checkbutton">
                         <property name="label" translatable="yes">_Use system defaults</property>
-                        <property name="use_action_appearance">False</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">Specifies whether the keyboard layout is controlled with this settings dialog, or by the X server</property>
+                        <property name="halign">start</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
@@ -720,7 +738,7 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkHBox" id="hbox4">
+                      <object class="GtkBox" id="hbox4">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="spacing">6</property>
@@ -821,12 +839,13 @@
                             <property name="border_width">6</property>
                             <property name="left_padding">12</property>
                             <child>
-                              <object class="GtkVBox" id="vbox8">
+                              <object class="GtkBox" id="vbox8">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
+                                <property name="orientation">vertical</property>
                                 <property name="spacing">6</property>
                                 <child>
-                                  <object class="GtkHBox" id="hbox3">
+                                  <object class="GtkBox" id="hbox3">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="spacing">6</property>
@@ -834,14 +853,15 @@
                                       <object class="GtkScrolledWindow" id="scrolledwindow1">
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
-                                        <property name="hscrollbar_policy">automatic</property>
-                                        <property name="vscrollbar_policy">automatic</property>
                                         <property name="shadow_type">etched-in</property>
                                         <child>
                                           <object class="GtkTreeView" id="xkb_layout_view">
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
                                             <property name="search_column">0</property>
+                                            <child internal-child="selection">
+                                              <object class="GtkTreeSelection" id="treeview-selection3"/>
+                                            </child>
                                           </object>
                                         </child>
                                       </object>
@@ -852,13 +872,13 @@
                                       </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkVBox" id="vbuttonbox1">
+                                      <object class="GtkBox" id="vbuttonbox1">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
+                                        <property name="orientation">vertical</property>
                                         <property name="spacing">6</property>
                                         <child>
                                           <object class="GtkButton" id="xkb_layout_up_button">
-                                            <property name="use_action_appearance">False</property>
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
                                             <property name="receives_default">True</property>
@@ -879,7 +899,6 @@
                                         </child>
                                         <child>
                                           <object class="GtkButton" id="xkb_layout_down_button">
-                                            <property name="use_action_appearance">False</property>
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
                                             <property name="receives_default">True</property>
@@ -913,7 +932,7 @@
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkHButtonBox" id="hbuttonbox2">
+                                  <object class="GtkButtonBox" id="hbuttonbox2">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="spacing">12</property>
@@ -921,7 +940,6 @@
                                     <child>
                                       <object class="GtkButton" id="xkb_layout_add_button">
                                         <property name="label">gtk-add</property>
-                                        <property name="use_action_appearance">False</property>
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
                                         <property name="receives_default">True</property>
@@ -936,7 +954,6 @@
                                     <child>
                                       <object class="GtkButton" id="xkb_layout_edit_button">
                                         <property name="label">gtk-edit</property>
-                                        <property name="use_action_appearance">False</property>
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
                                         <property name="receives_default">True</property>
@@ -951,7 +968,6 @@
                                     <child>
                                       <object class="GtkButton" id="xkb_layout_delete_button">
                                         <property name="label">gtk-delete</property>
-                                        <property name="use_action_appearance">False</property>
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
                                         <property name="receives_default">True</property>
@@ -1030,26 +1046,4 @@
       <action-widget response="0">button2</action-widget>
     </action-widgets>
   </object>
-  <object class="GtkAdjustment" id="net_cursor_blink_time">
-    <property name="lower">100</property>
-    <property name="upper">2000</property>
-    <property name="value">1000</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="xkb_key_repeat_delay">
-    <property name="lower">10</property>
-    <property name="upper">1000</property>
-    <property name="value">500</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="xkb_key_repeat_rate">
-    <property name="lower">1</property>
-    <property name="upper">250</property>
-    <property name="value">20</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkSizeGroup" id="sizegroup1"/>
 </interface>
diff --git a/dialogs/keyboard-settings/main.c b/dialogs/keyboard-settings/main.c
index 0dbb64d..d51b474 100644
--- a/dialogs/keyboard-settings/main.c
+++ b/dialogs/keyboard-settings/main.c
@@ -25,7 +25,8 @@
 
 #include <gtk/gtk.h>
 
-#include <libxfce4util/libxfce4util.h>
+#include <gdk/gdkx.h>
+
 #include <libxfce4ui/libxfce4ui.h>
 #include <xfconf/xfconf.h>
 
@@ -33,7 +34,7 @@
 
 
 
-static GdkNativeWindow opt_socket_id = 0;
+static gint            opt_socket_id = 0;
 static gboolean        opt_version = FALSE;
 static GOptionEntry    entries[] = {
   { "socket-id", 's', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_INT, &opt_socket_id, N_("Settings manager socket"), N_("SOCKET ID") },
@@ -129,7 +130,7 @@ main (int    argc,
       gtk_window_present (GTK_WINDOW (dialog));
 
       /* To prevent the settings dialog to be saved in the session */
-      gdk_set_sm_client_id ("FAKE ID");
+      gdk_x11_set_sm_client_id ("FAKE ID");
 
       gtk_main ();
     }
@@ -143,7 +144,7 @@ main (int    argc,
       gdk_notify_startup_complete ();
 
       /* To prevent the settings dialog to be saved in the session */
-      gdk_set_sm_client_id ("FAKE ID");
+      gdk_x11_set_sm_client_id ("FAKE ID");
 
       /* Enter the main loop */
       gtk_main ();
diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c b/dialogs/keyboard-settings/xfce-keyboard-settings.c
index e2a93a0..2964c4c 100644
--- a/dialogs/keyboard-settings/xfce-keyboard-settings.c
+++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c
@@ -30,6 +30,7 @@
 #include <glib-object.h>
 #include <gdk/gdkx.h>
 #include <gtk/gtk.h>
+#include <gtk/gtkx.h>
 
 #include <exo/exo.h>
 #include <xfconf/xfconf.h>
@@ -360,7 +361,11 @@ xfce_keyboard_settings_constructed (GObject *object)
   /* XKB settings */
   xkb_key_repeat_check = gtk_builder_get_object (GTK_BUILDER (settings), "xkb_key_repeat_check");
   xkb_key_repeat_box = gtk_builder_get_object (GTK_BUILDER (settings), "xkb_key_repeat_box");
-  exo_binding_new (G_OBJECT (xkb_key_repeat_check), "active", G_OBJECT (xkb_key_repeat_box), "sensitive");
+
+  g_object_bind_property(G_OBJECT (xkb_key_repeat_check), "active",
+                         G_OBJECT (xkb_key_repeat_box), "sensitive",
+                         G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
+
   xfconf_g_property_bind (settings->priv->keyboards_channel, "/Default/KeyRepeat", G_TYPE_BOOLEAN, G_OBJECT (xkb_key_repeat_check), "active");
 
   xkb_key_repeat_rate = gtk_builder_get_object (GTK_BUILDER (settings), "xkb_key_repeat_rate");
@@ -376,7 +381,9 @@ xfce_keyboard_settings_constructed (GObject *object)
   /* XSETTINGS */
   net_cursor_blink_check = gtk_builder_get_object (GTK_BUILDER (settings), "net_cursor_blink_check");
   net_cursor_blink_box = gtk_builder_get_object (GTK_BUILDER (settings), "net_cursor_blink_box");
-  exo_binding_new (G_OBJECT (net_cursor_blink_check), "active", G_OBJECT (net_cursor_blink_box), "sensitive");
+  g_object_bind_property(G_OBJECT (net_cursor_blink_check), "active",
+                         G_OBJECT (net_cursor_blink_box), "sensitive",
+                         G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
   xfconf_g_property_bind (settings->priv->xsettings_channel, "/Net/CursorBlink", G_TYPE_BOOLEAN, G_OBJECT (net_cursor_blink_check), "active");
 
   net_cursor_blink_time = gtk_builder_get_object (GTK_BUILDER (settings), "net_cursor_blink_time");
@@ -423,7 +430,7 @@ xfce_keyboard_settings_constructed (GObject *object)
 
 #ifdef HAVE_LIBXKLAVIER
   /* Init xklavier engine */
-  settings->priv->xkl_engine = xkl_engine_get_instance (GDK_DISPLAY());
+  settings->priv->xkl_engine = xkl_engine_get_instance (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()));
   xkl_engine_start_listen (settings->priv->xkl_engine, XKLL_TRACK_KEYBOARD_STATE);
 
   settings->priv->xkl_rec_config = xkl_config_rec_new ();
@@ -546,7 +553,7 @@ xfce_keyboard_settings_create_dialog (XfceKeyboardSettings *settings)
 
 GtkWidget *
 xfce_keyboard_settings_create_plug (XfceKeyboardSettings *settings,
-                                    GdkNativeWindow       socket_id)
+                                    gint                  socket_id)
 {
   GtkWidget *plug;
   GObject   *child;
@@ -557,7 +564,7 @@ xfce_keyboard_settings_create_plug (XfceKeyboardSettings *settings,
   gtk_widget_show (plug);
 
   child = gtk_builder_get_object (GTK_BUILDER (settings), "plug-child");
-  gtk_widget_reparent (GTK_WIDGET (child), plug);
+  xfce_widget_reparent (GTK_WIDGET (child), plug);
   gtk_widget_show (GTK_WIDGET (child));
 
   return plug;
@@ -1267,12 +1274,12 @@ xfce_keyboard_settings_reset_button_clicked (XfceKeyboardSettings *settings)
 
   g_return_if_fail (XFCE_IS_KEYBOARD_SETTINGS (settings));
 
-  response = xfce_message_dialog (NULL, _("Reset to Defaults"), GTK_STOCK_DIALOG_QUESTION,
+  response = xfce_message_dialog (NULL, _("Reset to Defaults"), "dialog-question",
                                   _("Reset to Defaults"),
                                   _("This will reset all shortcuts to their default "
                                     "values. Do you really want to do this?"),
-                                  GTK_STOCK_NO, GTK_RESPONSE_NO,
-                                  GTK_STOCK_YES, GTK_RESPONSE_YES,
+                                  _("No"), GTK_RESPONSE_NO,
+                                  _("Yes"), GTK_RESPONSE_YES,
                                   NULL);
 
   if (G_LIKELY (response == GTK_RESPONSE_YES))
diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.h b/dialogs/keyboard-settings/xfce-keyboard-settings.h
index 30b1dcf..0bfec3d 100644
--- a/dialogs/keyboard-settings/xfce-keyboard-settings.h
+++ b/dialogs/keyboard-settings/xfce-keyboard-settings.h
@@ -40,7 +40,7 @@ GType xfce_keyboard_settings_get_type                      (void) G_GNUC_CONST;
 XfceKeyboardSettings *xfce_keyboard_settings_new           (void) G_GNUC_MALLOC;
 GtkWidget            *xfce_keyboard_settings_create_dialog (XfceKeyboardSettings *settings);
 GtkWidget            *xfce_keyboard_settings_create_plug   (XfceKeyboardSettings *settings,
-                                                            GdkNativeWindow       socket_id);
+                                                            gint                  socket_id);
 
 
 
diff --git a/dialogs/mime-settings/Makefile.am b/dialogs/mime-settings/Makefile.am
index 792d947..c3f5105 100644
--- a/dialogs/mime-settings/Makefile.am
+++ b/dialogs/mime-settings/Makefile.am
@@ -21,7 +21,13 @@ xfce4_mime_settings_CFLAGS = \
 	$(GIO_UNIX_CFLAGS) \
 	$(LIBXFCE4UI_CFLAGS) \
 	$(XFCONF_CFLAGS) \
-	$(PLATFORM_CFLAGS)
+	$(PLATFORM_CFLAGS) \
+    -DGTK_DISABLE_SINGLE_INCLUDES \
+    -DGDK_DISABLE_DEPRECATED \
+    -DGTK_DISABLE_DEPRECATED \
+    -DGSEAL_ENABLE \
+    -DGDK_PIXBUF_DISABLE_DEPRECATED \
+    -DG_DISABLE_DEPRECATED
 
 xfce4_mime_settings_LDFLAGS = \
 	-no-undefined \
diff --git a/dialogs/mime-settings/xfce-mime-chooser.c b/dialogs/mime-settings/xfce-mime-chooser.c
index 323a275..f3b661d 100644
--- a/dialogs/mime-settings/xfce-mime-chooser.c
+++ b/dialogs/mime-settings/xfce-mime-chooser.c
@@ -131,19 +131,19 @@ xfce_mime_chooser_init (XfceMimeChooser *chooser)
     gtk_window_set_modal (GTK_WINDOW (chooser), TRUE);
 
     gtk_dialog_add_button (GTK_DIALOG (chooser),
-                           GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
+                           _("Cancel"), GTK_RESPONSE_CANCEL);
     chooser->button = gtk_dialog_add_button (GTK_DIALOG (chooser),
-                                             GTK_STOCK_OPEN, GTK_RESPONSE_YES);
+                                             _("Open"), GTK_RESPONSE_YES);
     gtk_dialog_set_default_response (GTK_DIALOG (chooser), GTK_RESPONSE_YES);
     gtk_widget_set_sensitive (chooser->button, FALSE);
 
-    vbox = gtk_vbox_new (FALSE, 6);
+    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
     area = gtk_dialog_get_content_area (GTK_DIALOG (chooser));
     gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
     gtk_box_pack_start (GTK_BOX (area), vbox, TRUE, TRUE, 0);
     gtk_widget_show (vbox);
 
-    hbox = gtk_hbox_new (FALSE, 6);
+    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
     gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
     gtk_widget_show (hbox);
 
@@ -153,7 +153,8 @@ xfce_mime_chooser_init (XfceMimeChooser *chooser)
 
     chooser->label = label = gtk_label_new ("");
     gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
-    gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+    gtk_widget_set_halign (GTK_WIDGET (label), GTK_ALIGN_START);
+    gtk_widget_set_valign (GTK_WIDGET (label), GTK_ALIGN_CENTER);
     gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
     gtk_widget_set_size_request (label, 350, -1);
     gtk_widget_show (label);
@@ -210,7 +211,7 @@ xfce_mime_chooser_init (XfceMimeChooser *chooser)
     gtk_expander_set_expanded (GTK_EXPANDER (expander), FALSE);
     gtk_widget_show (expander);
 
-    hbox = gtk_hbox_new (FALSE, 6);
+    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
     gtk_container_add (GTK_CONTAINER (expander), hbox);
     gtk_widget_show (hbox);
 
@@ -378,8 +379,8 @@ xfce_mime_chooser_browse_command (GtkWidget       *button,
     chooser = gtk_file_chooser_dialog_new (_("Select an Application"),
                                            GTK_WINDOW (dialog),
                                            GTK_FILE_CHOOSER_ACTION_OPEN,
-                                           GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-                                           GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
+                                           _("Cancel"), GTK_RESPONSE_CANCEL,
+                                           _("Open"), GTK_RESPONSE_ACCEPT,
                                            NULL);
     gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (chooser), TRUE);
 
diff --git a/dialogs/mime-settings/xfce-mime-window.c b/dialogs/mime-settings/xfce-mime-window.c
index a4e6fc2..fd27c4a 100644
--- a/dialogs/mime-settings/xfce-mime-window.c
+++ b/dialogs/mime-settings/xfce-mime-window.c
@@ -137,12 +137,6 @@ xfce_mime_window_class_init (XfceMimeWindowClass *klass)
 
     gtkwidget_class = GTK_WIDGET_CLASS (klass);
     gtkwidget_class->delete_event = xfce_mime_window_delete_event;
-
-    gtk_rc_parse_string ("style \"mime-statusbar-internal\" {\n"
-                         "  GtkStatusbar::shadow-type = GTK_SHADOW_NONE\n"
-                         "}\n"
-                         "widget \"*.mime-statusbar\" "
-                         "style \"mime-statusbar-internal\"\n");
 }
 
 
@@ -155,7 +149,6 @@ xfce_mime_window_init (XfceMimeWindow *window)
     GtkWidget         *hbox;
     GtkWidget         *label;
     GtkWidget         *entry;
-    GtkWidget         *align;
     GtkWidget         *scroll;
     GtkWidget         *statusbar;
     GtkWidget         *treeview;
@@ -183,21 +176,23 @@ xfce_mime_window_init (XfceMimeWindow *window)
         xfconf_channel_get_int (window->channel, "/last/window-height", 400));
 
     /* don't act like a dialog, hide the button box */
+    /* FIXME - Deprecated, should hide some other way... */
+    /*
     area = gtk_dialog_get_action_area (GTK_DIALOG (window));
     gtk_widget_hide (area);
+    */
 
-    vbox = gtk_vbox_new (FALSE, 0);
+    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
     area = gtk_dialog_get_content_area (GTK_DIALOG (window));
     gtk_box_pack_start (GTK_BOX (area), vbox, TRUE, TRUE, 0);
     gtk_widget_show (vbox);
 
-    align = gtk_alignment_new (0.00, 0.00, 1.00, 1.00);
-    gtk_alignment_set_padding (GTK_ALIGNMENT (align), 4, 0, 6, 6);
-    gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, TRUE, 0);
-    gtk_widget_show (align);
-
-    hbox = gtk_hbox_new (FALSE, 12);
-    gtk_container_add (GTK_CONTAINER (align), hbox);
+    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
+    gtk_widget_set_margin_top (GTK_WIDGET(hbox), 4);
+    gtk_widget_set_margin_bottom (GTK_WIDGET(hbox), 0);
+    gtk_widget_set_margin_start (GTK_WIDGET(hbox), 6);
+    gtk_widget_set_margin_end (GTK_WIDGET(hbox), 6);
+    gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
     gtk_widget_show (hbox);
 
     label = gtk_label_new_with_mnemonic (_("_Filter:"));
@@ -207,7 +202,7 @@ xfce_mime_window_init (XfceMimeWindow *window)
     entry = gtk_entry_new ();
     gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
     gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
-    gtk_entry_set_icon_from_stock (GTK_ENTRY (entry), GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_CLEAR);
+    gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry), GTK_ENTRY_ICON_SECONDARY, "edit-clear");
     gtk_entry_set_icon_tooltip_text (GTK_ENTRY (entry), GTK_ENTRY_ICON_SECONDARY, _("Clear filter"));
     g_signal_connect (G_OBJECT (entry), "icon-release",
         G_CALLBACK (xfce_mime_window_filter_clear), NULL);
@@ -227,7 +222,6 @@ xfce_mime_window_init (XfceMimeWindow *window)
     window->statusbar = statusbar = gtk_statusbar_new ();
     gtk_widget_set_name (statusbar, "mime-statusbar");
     gtk_box_pack_start (GTK_BOX (vbox), statusbar, FALSE, TRUE, 0);
-    gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (statusbar), TRUE);
     window->desc_id = gtk_statusbar_get_context_id (GTK_STATUSBAR (statusbar), "desc");
     window->count_id = gtk_statusbar_get_context_id (GTK_STATUSBAR (statusbar), "count");
     xfce_mime_window_statusbar_count (window, n_mime_types);
@@ -263,12 +257,18 @@ xfce_mime_window_init (XfceMimeWindow *window)
         G_CALLBACK (xfce_mime_window_column_clicked), window);
     gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column);
 
-    /* HACK */
+    /* HACK - Disabled as we move to GTK3 */
     /* https://bugzilla.gnome.org/show_bug.cgi?id=668428 */
+    /*
     column->use_resized_width = TRUE;
     column->resized_width = xfconf_channel_get_int (window->channel,
                                                     "/last/mime-width",
                                                     300);
+    */
+    gtk_tree_view_column_set_min_width (column, 300);
+    gtk_tree_view_column_set_fixed_width (column, xfconf_channel_get_int (window->channel,
+                                                                          "/last/mime-width",
+                                                                          300));
 
     renderer = gtk_cell_renderer_pixbuf_new ();
     gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (column), renderer, FALSE);
@@ -292,11 +292,17 @@ xfce_mime_window_init (XfceMimeWindow *window)
         G_CALLBACK (xfce_mime_window_column_clicked), window);
     gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column);
 
-    /* HACK */
+    /* HACK - Disabled as we move to GTK3 */
+    /*
     column->use_resized_width = TRUE;
     column->resized_width = xfconf_channel_get_int (window->channel,
                                                     "/last/status-width",
                                                     75);
+    */
+    gtk_tree_view_column_set_min_width (column, 75);
+    gtk_tree_view_column_set_fixed_width (column, xfconf_channel_get_int (window->channel,
+                                                                          "/last/status-width",
+                                                                          75));
 
     renderer = gtk_cell_renderer_text_new ();
     gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (column), renderer, FALSE);
@@ -313,11 +319,17 @@ xfce_mime_window_init (XfceMimeWindow *window)
         G_CALLBACK (xfce_mime_window_column_clicked), window);
     gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column);
 
-    /* HACK */
+    /* HACK - Disabled as we move to GTK3 */
+    /*
     column->use_resized_width = TRUE;
     column->resized_width = xfconf_channel_get_int (window->channel,
                                                     "/last/default-width",
                                                     100);
+    */
+    gtk_tree_view_column_set_min_width (column, 100);
+    gtk_tree_view_column_set_fixed_width (column, xfconf_channel_get_int (window->channel,
+                                                                          "/last/default-width",
+                                                                          100));
 
     renderer = gtk_cell_renderer_combo_new ();
     g_signal_connect (G_OBJECT (renderer), "editing-started",
@@ -368,7 +380,7 @@ xfce_mime_window_delete_event (GtkWidget   *widget,
     g_return_val_if_fail (XFCONF_IS_CHANNEL (window->channel), FALSE);
 
     /* don't save the state for full-screen windows */
-    state = gdk_window_get_state (GTK_WIDGET (window)->window);
+    state = gdk_window_get_state (gtk_widget_get_window(GTK_WIDGET(window)));
     if ((state & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN)) == 0)
     {
         /* save window size */
@@ -913,12 +925,12 @@ xfce_mime_window_combo_changed (GtkWidget       *combo,
 
         dialog = xfce_message_dialog_new (GTK_WINDOW (window),
                                           _("Question"),
-                                          GTK_STOCK_DIALOG_QUESTION,
+                                          "dialog-question",
                                           primary,
                                           _("This will remove your custom mime-association "
                                             "and restore the system-wide default."),
-                                          GTK_STOCK_CANCEL, GTK_RESPONSE_NO,
-                                          XFCE_BUTTON_TYPE_MIXED, GTK_STOCK_REVERT_TO_SAVED,
+                                          _("Cancel"), GTK_RESPONSE_NO,
+                                          XFCE_BUTTON_TYPE_MIXED, "document-revert",
                                           _("Reset to Default"), GTK_RESPONSE_YES, NULL);
         g_free (primary);
 
diff --git a/dialogs/mouse-settings/Makefile.am b/dialogs/mouse-settings/Makefile.am
index 73830f8..3498718 100644
--- a/dialogs/mouse-settings/Makefile.am
+++ b/dialogs/mouse-settings/Makefile.am
@@ -22,7 +22,13 @@ xfce4_mouse_settings_CFLAGS = \
 	$(XFCONF_CFLAGS) \
 	$(LIBX11_CFLAGS) \
 	$(LIBINPUT_CFLAGS) \
-	$(PLATFORM_CFLAGS)
+	$(PLATFORM_CFLAGS) \
+    -DGTK_DISABLE_SINGLE_INCLUDES \
+    -DGDK_DISABLE_DEPRECATED \
+    -DGTK_DISABLE_DEPRECATED \
+    -DGSEAL_ENABLE \
+    -DGDK_PIXBUF_DISABLE_DEPRECATED \
+    -DG_DISABLE_DEPRECATED
 
 xfce4_mouse_settings_LDFLAGS = \
 	-no-undefined \
diff --git a/dialogs/mouse-settings/main.c b/dialogs/mouse-settings/main.c
index fddcc98..3d91fa4 100644
--- a/dialogs/mouse-settings/main.c
+++ b/dialogs/mouse-settings/main.c
@@ -41,6 +41,7 @@
 #endif /* HAVE_LIBINPUT */
 
 #include <gtk/gtk.h>
+#include <gtk/gtkx.h>
 #include <gdk/gdkx.h>
 
 #include <xfconf/xfconf.h>
@@ -74,7 +75,7 @@ static gint device_presence_event_type = 0;
 #endif
 
 /* option entries */
-static GdkNativeWindow opt_socket_id = 0;
+static gint opt_socket_id = 0;
 static gchar *opt_device_name = NULL;
 static gboolean opt_version = FALSE;
 static GOptionEntry option_entries[] =
@@ -130,6 +131,8 @@ typedef union
     Atom    a;
 } propdata_t;
 
+
+
 static gchar *
 mouse_settings_format_value_px (GtkScale *scale,
                                 gdouble   value)
@@ -748,7 +751,8 @@ mouse_settings_device_get_int_property (XDevice *device,
     gint     res;
 
     gdk_error_trap_push ();
-    res = XGetDeviceProperty (GDK_DISPLAY (), device, prop, 0, 1000, False,
+    res = XGetDeviceProperty (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()),
+                              device, prop, 0, 1000, False,
                               AnyPropertyType, &type, &format,
                               &n_items, &bytes_after, &data);
     if (gdk_error_trap_pop () == 0 && res == Success)
@@ -798,7 +802,7 @@ mouse_settings_device_get_selected (GtkBuilder  *builder,
         {
             /* open the device */
             gdk_error_trap_push ();
-            *device = XOpenDevice (GDK_DISPLAY (), xid);
+            *device = XOpenDevice (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), xid);
             if (gdk_error_trap_pop () != 0 || *device == NULL)
             {
                 g_critical ("Unable to open device %ld", xid);
@@ -840,7 +844,7 @@ mouse_settings_wacom_set_rotation (GtkComboBox *combobox,
             g_free (prop);
         }
 
-        XCloseDevice (GDK_DISPLAY (), device);
+        XCloseDevice (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), device);
     }
 
     g_free (name);
@@ -855,7 +859,7 @@ mouse_settings_wacom_set_mode (GtkComboBox *combobox,
                                GtkBuilder  *builder)
 {
     XDevice      *device;
-    Display      *xdisplay = GDK_DISPLAY ();
+    Display      *xdisplay = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
     GtkTreeIter   iter;
     GtkTreeModel *model;
     gchar        *mode = NULL;
@@ -892,7 +896,7 @@ mouse_settings_wacom_set_mode (GtkComboBox *combobox,
 static void
 mouse_settings_synaptics_set_tap_to_click (GtkBuilder *builder)
 {
-    Display   *xdisplay = GDK_DISPLAY ();
+    Display   *xdisplay = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
     XDevice   *device;
     gchar     *name = NULL;
     Atom       tap_ation_prop;
@@ -1153,7 +1157,7 @@ static void
 mouse_settings_device_selection_changed (GtkBuilder *builder)
 {
     gint               nbuttons = 0;
-    Display           *xdisplay = GDK_DISPLAY ();
+    Display           *xdisplay = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
     XDevice           *device;
     XDeviceInfo       *device_info;
     XFeedbackState    *states, *pt;
@@ -1649,7 +1653,7 @@ mouse_settings_device_populate_store (GtkBuilder *builder,
 
     /* get all the registered devices */
     gdk_error_trap_push ();
-    device_list = XListInputDevices (GDK_DISPLAY (), &ndevices);
+    device_list = XListInputDevices (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), &ndevices);
     if (gdk_error_trap_pop () != 0 || device_list == NULL)
     {
         g_message ("No devices found");
@@ -1713,8 +1717,6 @@ mouse_settings_device_update_sliders (gpointer user_data)
     GtkBuilder *builder = GTK_BUILDER (user_data);
     GObject    *button;
 
-    GDK_THREADS_ENTER ();
-
     /* update */
     mouse_settings_device_selection_changed (builder);
 
@@ -1722,8 +1724,6 @@ mouse_settings_device_update_sliders (gpointer user_data)
     button = gtk_builder_get_object (builder, "device-reset-feedback");
     gtk_widget_set_sensitive (GTK_WIDGET (button), TRUE);
 
-    GDK_THREADS_LEAVE ();
-
     return FALSE;
 }
 
@@ -1809,7 +1809,7 @@ mouse_settings_event_filter (GdkXEvent *xevent,
 static void
 mouse_settings_create_event_filter (GtkBuilder *builder)
 {
-    Display     *xdisplay = GDK_DISPLAY ();
+    Display     *xdisplay = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
     XEventClass  event_class;
 
     /* monitor device change events */
@@ -1905,7 +1905,7 @@ main (gint argc, gchar **argv)
     }
 
     /* check for Xi */
-    version = XGetExtensionVersion (GDK_DISPLAY (), INAME);
+    version = XGetExtensionVersion (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), INAME);
     if (version == NULL || ((long) version) == NoSuchExtension
         || !version->present)
     {
@@ -2076,7 +2076,7 @@ main (gint argc, gchar **argv)
                 gtk_window_present (GTK_WINDOW (dialog));
 
                 /* To prevent the settings dialog to be saved in the session */
-                gdk_set_sm_client_id ("FAKE ID");
+                gdk_x11_set_sm_client_id ("FAKE ID");
 
                 gtk_main ();
 
@@ -2094,14 +2094,14 @@ main (gint argc, gchar **argv)
 
                 /* Get plug child widget */
                 plug_child = gtk_builder_get_object (builder, "plug-child");
-                gtk_widget_reparent (GTK_WIDGET (plug_child), plug);
+                xfce_widget_reparent (GTK_WIDGET (plug_child), plug);
                 gtk_widget_show (GTK_WIDGET (plug_child));
 
                 /* Unlock */
                 locked--;
 
                 /* To prevent the settings dialog to be saved in the session */
-                gdk_set_sm_client_id ("FAKE ID");
+                gdk_x11_set_sm_client_id ("FAKE ID");
 
                 /* Enter main loop */
                 gtk_main ();
diff --git a/dialogs/mouse-settings/mouse-dialog.glade b/dialogs/mouse-settings/mouse-dialog.glade
index 1783d42..81c6f8f 100644
--- a/dialogs/mouse-settings/mouse-dialog.glade
+++ b/dialogs/mouse-settings/mouse-dialog.glade
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.20.0 -->
 <interface>
-  <requires lib="gtk+" version="2.20"/>
-  <!-- interface-requires libxfce4ui 4.5 -->
-  <!-- interface-naming-policy project-wide -->
+  <requires lib="gtk+" version="3.20"/>
+  <requires lib="libxfce4ui-2" version="4.13"/>
   <object class="GtkAdjustment" id="dclick-distance">
     <property name="upper">20</property>
     <property name="value">4</property>
@@ -17,10 +17,9 @@
     <property name="page_increment">100</property>
   </object>
   <object class="GtkAdjustment" id="device-acceleration">
-    <property name="lower">0</property>
     <property name="upper">10</property>
     <property name="value">2</property>
-    <property name="step_increment">0.1</property>
+    <property name="step_increment">0.10000000000000001</property>
     <property name="page_increment">1</property>
   </object>
   <object class="GtkAdjustment" id="device-threshold">
@@ -43,10 +42,10 @@
     <property name="stock">gtk-revert-to-saved</property>
   </object>
   <object class="GtkAdjustment" id="synaptics-disable-duration">
-    <property name="lower">0.1</property>
+    <property name="lower">0.10000000000000001</property>
     <property name="upper">4</property>
     <property name="value">2</property>
-    <property name="step_increment">0.1</property>
+    <property name="step_increment">0.10000000000000001</property>
     <property name="page_increment">1</property>
   </object>
   <object class="GtkListStore" id="synaptics-scroll-store">
@@ -82,6 +81,24 @@
     <property name="step_increment">1</property>
     <property name="page_increment">11</property>
   </object>
+  <object class="GtkListStore" id="wacom-mode-store">
+    <columns>
+      <!-- column-name mode -->
+      <column type="gchararray"/>
+      <!-- column-name title -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0">ABSOLUTE</col>
+        <col id="1" translatable="yes">Pen (absolute)</col>
+      </row>
+      <row>
+        <col id="0">RELATIVE</col>
+        <col id="1" translatable="yes">Mouse (relative)</col>
+      </row>
+    </data>
+  </object>
   <object class="GtkListStore" id="wacom-rotation-store">
     <columns>
       <!-- column-name rotation -->
@@ -116,19 +133,19 @@
     <property name="type_hint">dialog</property>
     <property name="subtitle" translatable="yes">Configure pointer device behavior and appearance</property>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">2</property>
         <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
+          <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="button1">
                 <property name="label">gtk-close</property>
-                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
@@ -143,7 +160,6 @@
             <child>
               <object class="GtkButton" id="button2">
                 <property name="label">gtk-help</property>
-                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
@@ -170,13 +186,14 @@
             <property name="can_focus">True</property>
             <property name="border_width">6</property>
             <child>
-              <object class="GtkVBox" id="vbox1">
+              <object class="GtkBox" id="vbox1">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="border_width">12</property>
+                <property name="orientation">vertical</property>
                 <property name="spacing">6</property>
                 <child>
-                  <object class="GtkHBox" id="hbox1">
+                  <object class="GtkBox" id="hbox1">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="spacing">12</property>
@@ -216,10 +233,10 @@
                 <child>
                   <object class="GtkCheckButton" id="device-enabled">
                     <property name="label" translatable="yes">_Enable this device</property>
-                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="halign">start</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
@@ -234,10 +251,11 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <child>
-                      <object class="GtkVBox" id="device-box">
+                      <object class="GtkBox" id="device-box">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="border_width">6</property>
+                        <property name="orientation">vertical</property>
                         <property name="spacing">6</property>
                         <child>
                           <object class="GtkFrame" id="frame1">
@@ -251,23 +269,24 @@
                                 <property name="can_focus">False</property>
                                 <property name="left_padding">12</property>
                                 <child>
-                                  <object class="GtkVBox" id="vbox12">
+                                  <object class="GtkBox" id="vbox12">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="border_width">6</property>
+                                    <property name="orientation">vertical</property>
                                     <property name="spacing">6</property>
                                     <child>
-                                      <object class="GtkHBox" id="hbox3">
+                                      <object class="GtkBox" id="hbox3">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                         <property name="spacing">12</property>
                                         <child>
                                           <object class="GtkRadioButton" id="device-right-handed">
                                             <property name="label" translatable="yes">Ri_ght-handed</property>
-                                            <property name="use_action_appearance">False</property>
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
                                             <property name="receives_default">False</property>
+                                            <property name="halign">start</property>
                                             <property name="use_underline">True</property>
                                             <property name="active">True</property>
                                             <property name="draw_indicator">True</property>
@@ -281,10 +300,10 @@
                                         <child>
                                           <object class="GtkRadioButton" id="device-left-handed">
                                             <property name="label" translatable="yes">Le_ft-handed</property>
-                                            <property name="use_action_appearance">False</property>
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
                                             <property name="receives_default">False</property>
+                                            <property name="halign">start</property>
                                             <property name="use_underline">True</property>
                                             <property name="draw_indicator">True</property>
                                             <property name="group">device-right-handed</property>
@@ -305,11 +324,11 @@
                                     <child>
                                       <object class="GtkCheckButton" id="device-reverse-scrolling">
                                         <property name="label" translatable="yes">Reverse scroll d_irection</property>
-                                        <property name="use_action_appearance">False</property>
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
                                         <property name="receives_default">False</property>
                                         <property name="tooltip_text" translatable="yes">When selected, the scroll wheel will work in the opposite direction</property>
+                                        <property name="halign">start</property>
                                         <property name="use_underline">True</property>
                                         <property name="draw_indicator">True</property>
                                       </object>
@@ -347,108 +366,89 @@
                             <property name="label_xalign">0</property>
                             <property name="shadow_type">none</property>
                             <child>
-                              <object class="GtkAlignment" id="alignment2">
+                              <object class="GtkGrid" id="grid1">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="left_padding">12</property>
+                                <property name="margin_left">18</property>
+                                <property name="margin_right">6</property>
+                                <property name="margin_top">6</property>
+                                <property name="margin_bottom">12</property>
+                                <property name="row_spacing">6</property>
+                                <property name="column_spacing">12</property>
+                                <child>
+                                  <object class="GtkButton" id="device-reset-feedback">
+                                    <property name="label" translatable="yes">_Reset to Defaults</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="tooltip_text" translatable="yes">Set the acceleration and sensitivity for the selected device to the default values</property>
+                                    <property name="image">image5</property>
+                                    <property name="use_underline">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">0</property>
+                                    <property name="top_attach">2</property>
+                                  </packing>
+                                </child>
                                 <child>
-                                  <object class="GtkTable" id="table1">
+                                  <object class="GtkLabel" id="device-threshold-label">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="border_width">6</property>
-                                    <property name="n_rows">3</property>
-                                    <property name="n_columns">2</property>
-                                    <property name="column_spacing">12</property>
-                                    <property name="row_spacing">6</property>
-                                    <child>
-                                      <object class="GtkLabel" id="device-acceleration-label">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Acceleratio_n:</property>
-                                        <property name="use_underline">True</property>
-                                        <property name="mnemonic_widget">device-acceleration-scale</property>
-                                      </object>
-                                      <packing>
-                                        <property name="x_options">GTK_FILL</property>
-                                        <property name="y_options">GTK_FILL</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkHScale" id="device-acceleration-scale">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="tooltip_text" translatable="yes">The factor at which the pointer's speed will increase as the mouse is moved</property>
-                                        <property name="update_policy">delayed</property>
-                                        <property name="adjustment">device-acceleration</property>
-                                        <property name="round_digits">1</property>
-                                        <property name="value_pos">right</property>
-                                      </object>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkHScale" id="device-threshold-scale">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="tooltip_text" translatable="yes">The number of pixels the pointer must move in a short time before it starts accelerating</property>
-                                        <property name="update_policy">delayed</property>
-                                        <property name="adjustment">device-threshold</property>
-                                        <property name="round_digits">0</property>
-                                        <property name="digits">0</property>
-                                        <property name="value_pos">right</property>
-                                      </object>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
-                                        <property name="top_attach">1</property>
-                                        <property name="bottom_attach">2</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkLabel" id="device-threshold-label">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Sensitivit_y:</property>
-                                        <property name="use_underline">True</property>
-                                        <property name="mnemonic_widget">device-threshold-scale</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">1</property>
-                                        <property name="bottom_attach">2</property>
-                                        <property name="x_options">GTK_FILL</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkAlignment" id="alignment7">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="xalign">0</property>
-                                        <property name="xscale">0</property>
-                                        <property name="yscale">0</property>
-                                        <child>
-                                          <object class="GtkButton" id="device-reset-feedback">
-                                            <property name="label" translatable="yes">_Reset to Defaults</property>
-                                            <property name="use_action_appearance">False</property>
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="tooltip_text" translatable="yes">Set the acceleration and sensitivity for the selected device to the default values</property>
-                                            <property name="image">image5</property>
-                                            <property name="use_underline">True</property>
-                                          </object>
-                                        </child>
-                                      </object>
-                                      <packing>
-                                        <property name="right_attach">2</property>
-                                        <property name="top_attach">2</property>
-                                        <property name="bottom_attach">3</property>
-                                      </packing>
-                                    </child>
+                                    <property name="halign">start</property>
+                                    <property name="label" translatable="yes">Sensitivit_y:</property>
+                                    <property name="use_underline">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">0</property>
+                                    <property name="top_attach">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="device-acceleration-label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="halign">start</property>
+                                    <property name="label" translatable="yes">Acceleratio_n:</property>
+                                    <property name="use_underline">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">0</property>
+                                    <property name="top_attach">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkScale" id="device-acceleration-scale">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip_text" translatable="yes">The factor at which the pointer's speed will increase as the mouse is moved</property>
+                                    <property name="hexpand">True</property>
+                                    <property name="adjustment">device-acceleration</property>
+                                    <property name="round_digits">1</property>
+                                    <property name="value_pos">right</property>
                                   </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="top_attach">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkScale" id="device-threshold-scale">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip_text" translatable="yes">The number of pixels the pointer must move in a short time before it starts accelerating</property>
+                                    <property name="hexpand">True</property>
+                                    <property name="adjustment">device-threshold</property>
+                                    <property name="round_digits">0</property>
+                                    <property name="digits">0</property>
+                                    <property name="value_pos">right</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="top_attach">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <placeholder/>
                                 </child>
                               </object>
                             </child>
@@ -483,10 +483,11 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkVBox" id="synaptics-tab">
+                      <object class="GtkBox" id="synaptics-tab">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="border_width">6</property>
+                        <property name="orientation">vertical</property>
                         <property name="spacing">6</property>
                         <child>
                           <object class="GtkFrame" id="frame11">
@@ -500,19 +501,20 @@
                                 <property name="can_focus">False</property>
                                 <property name="left_padding">12</property>
                                 <child>
-                                  <object class="GtkVBox" id="vbox11">
+                                  <object class="GtkBox" id="vbox11">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="border_width">6</property>
+                                    <property name="orientation">vertical</property>
                                     <property name="spacing">6</property>
                                     <child>
                                       <object class="GtkCheckButton" id="synaptics-disable-while-type">
                                         <property name="label" translatable="yes">Disable touchpad _while typing</property>
-                                        <property name="use_action_appearance">False</property>
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
                                         <property name="receives_default">False</property>
                                         <property name="tooltip_text" translatable="yes">When selected, the touchpad will be disabled when the keyboard is being used</property>
+                                        <property name="halign">start</property>
                                         <property name="use_underline">True</property>
                                         <property name="draw_indicator">True</property>
                                       </object>
@@ -528,7 +530,7 @@
                                         <property name="can_focus">False</property>
                                         <property name="left_padding">18</property>
                                         <child>
-                                          <object class="GtkHBox" id="synaptics-disable-duration-box">
+                                          <object class="GtkBox" id="synaptics-disable-duration-box">
                                             <property name="visible">True</property>
                                             <property name="can_focus">False</property>
                                             <property name="spacing">12</property>
@@ -547,10 +549,9 @@
                                               </packing>
                                             </child>
                                             <child>
-                                              <object class="GtkHScale" id="synaptics-disable-duration-scale">
+                                              <object class="GtkScale" id="synaptics-disable-duration-scale">
                                                 <property name="visible">True</property>
                                                 <property name="can_focus">True</property>
-                                                <property name="update_policy">delayed</property>
                                                 <property name="adjustment">synaptics-disable-duration</property>
                                                 <property name="round_digits">1</property>
                                                 <property name="value_pos">right</property>
@@ -573,10 +574,10 @@
                                     <child>
                                       <object class="GtkCheckButton" id="synaptics-tap-to-click">
                                         <property name="label" translatable="yes">Tap touchpad to clic_k</property>
-                                        <property name="use_action_appearance">False</property>
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
                                         <property name="receives_default">False</property>
+                                        <property name="halign">start</property>
                                         <property name="use_underline">True</property>
                                         <property name="draw_indicator">True</property>
                                       </object>
@@ -620,13 +621,14 @@
                                 <property name="can_focus">False</property>
                                 <property name="left_padding">12</property>
                                 <child>
-                                  <object class="GtkVBox" id="vbox10">
+                                  <object class="GtkBox" id="vbox10">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="border_width">6</property>
+                                    <property name="orientation">vertical</property>
                                     <property name="spacing">6</property>
                                     <child>
-                                      <object class="GtkHBox" id="hbox4">
+                                      <object class="GtkBox" id="hbox4">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                         <property name="spacing">12</property>
@@ -634,7 +636,6 @@
                                           <object class="GtkLabel" id="label23">
                                             <property name="visible">True</property>
                                             <property name="can_focus">False</property>
-                                            <property name="xalign">0</property>
                                             <property name="label" translatable="yes">Scrolling _mode:</property>
                                             <property name="use_underline">True</property>
                                             <property name="mnemonic_widget">synaptics-scroll</property>
@@ -674,10 +675,10 @@
                                     <child>
                                       <object class="GtkCheckButton" id="synaptics-scroll-horiz">
                                         <property name="label" translatable="yes">Enable hori_zontal scrolling</property>
-                                        <property name="use_action_appearance">False</property>
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
                                         <property name="receives_default">False</property>
+                                        <property name="halign">start</property>
                                         <property name="use_underline">True</property>
                                         <property name="draw_indicator">True</property>
                                       </object>
@@ -727,10 +728,11 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkVBox" id="wacom-tab">
+                      <object class="GtkBox" id="wacom-tab">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="border_width">6</property>
+                        <property name="orientation">vertical</property>
                         <property name="spacing">6</property>
                         <child>
                           <object class="GtkFrame" id="frame12">
@@ -739,84 +741,76 @@
                             <property name="label_xalign">0</property>
                             <property name="shadow_type">none</property>
                             <child>
-                              <object class="GtkAlignment" id="alignment14">
+                              <object class="GtkGrid" id="grid2">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="left_padding">12</property>
+                                <property name="margin_left">18</property>
+                                <property name="margin_right">6</property>
+                                <property name="margin_top">6</property>
+                                <property name="margin_bottom">12</property>
+                                <property name="row_spacing">6</property>
+                                <property name="column_spacing">12</property>
                                 <child>
-                                  <object class="GtkTable" id="table2">
+                                  <object class="GtkLabel" id="label9">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="border_width">6</property>
-                                    <property name="n_rows">2</property>
-                                    <property name="n_columns">2</property>
-                                    <property name="column_spacing">12</property>
-                                    <property name="row_spacing">6</property>
-                                    <child>
-                                      <object class="GtkLabel" id="label9">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Trac_king mode:</property>
-                                        <property name="use_underline">True</property>
-                                        <property name="mnemonic_widget">wacom-mode</property>
-                                      </object>
-                                      <packing>
-                                        <property name="x_options">GTK_FILL</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkLabel" id="label10">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">_Rotation:</property>
-                                        <property name="use_underline">True</property>
-                                        <property name="mnemonic_widget">wacom-rotation</property>
-                                      </object>
-                                      <packing>
-                                        <property name="top_attach">1</property>
-                                        <property name="bottom_attach">2</property>
-                                        <property name="x_options">GTK_FILL</property>
-                                      </packing>
-                                    </child>
+                                    <property name="halign">start</property>
+                                    <property name="label" translatable="yes">Trac_king mode:</property>
+                                    <property name="use_underline">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">0</property>
+                                    <property name="top_attach">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label10">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="halign">start</property>
+                                    <property name="label" translatable="yes">_Rotation:</property>
+                                    <property name="use_underline">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">0</property>
+                                    <property name="top_attach">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkComboBox" id="wacom-mode">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="hexpand">True</property>
+                                    <property name="model">wacom-mode-store</property>
                                     <child>
-                                      <object class="GtkComboBox" id="wacom-mode">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="model">wacom-mode-store</property>
-                                        <child>
-                                          <object class="GtkCellRendererText" id="cellrenderertext1"/>
-                                          <attributes>
-                                            <attribute name="text">1</attribute>
-                                          </attributes>
-                                        </child>
-                                      </object>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
-                                      </packing>
+                                      <object class="GtkCellRendererText" id="cellrenderertext1"/>
+                                      <attributes>
+                                        <attribute name="text">1</attribute>
+                                      </attributes>
                                     </child>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="top_attach">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkComboBox" id="wacom-rotation">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="hexpand">True</property>
+                                    <property name="model">wacom-rotation-store</property>
                                     <child>
-                                      <object class="GtkComboBox" id="wacom-rotation">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="model">wacom-rotation-store</property>
-                                        <child>
-                                          <object class="GtkCellRendererText" id="cellrenderertext2"/>
-                                          <attributes>
-                                            <attribute name="text">1</attribute>
-                                          </attributes>
-                                        </child>
-                                      </object>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
-                                        <property name="top_attach">1</property>
-                                        <property name="bottom_attach">2</property>
-                                      </packing>
+                                      <object class="GtkCellRendererText" id="cellrenderertext2"/>
+                                      <attributes>
+                                        <attribute name="text">1</attribute>
+                                      </attributes>
                                     </child>
                                   </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="top_attach">1</property>
+                                  </packing>
                                 </child>
                               </object>
                             </child>
@@ -876,10 +870,11 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox3">
+              <object class="GtkBox" id="vbox3">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="border_width">12</property>
+                <property name="orientation">vertical</property>
                 <property name="spacing">6</property>
                 <child>
                   <object class="GtkFrame" id="frame3">
@@ -893,16 +888,17 @@
                         <property name="can_focus">False</property>
                         <property name="left_padding">12</property>
                         <child>
-                          <object class="GtkVBox" id="vbox4">
+                          <object class="GtkBox" id="vbox4">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="border_width">6</property>
+                            <property name="orientation">vertical</property>
                             <property name="spacing">6</property>
                             <child>
                               <object class="GtkLabel" id="mouse-dnd-label">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="xalign">0</property>
+                                <property name="halign">start</property>
                                 <property name="label" translatable="yes">Th_reshold:</property>
                                 <property name="use_underline">True</property>
                                 <property name="mnemonic_widget">dnd-threshold-scale</property>
@@ -914,11 +910,10 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkHScale" id="dnd-threshold-scale">
+                              <object class="GtkScale" id="dnd-threshold-scale">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="tooltip_text" translatable="yes">The number of pixels the pointer must move before a drag operation will start</property>
-                                <property name="update_policy">delayed</property>
                                 <property name="adjustment">dnd-threshold</property>
                                 <property name="digits">0</property>
                                 <property name="value_pos">right</property>
@@ -962,16 +957,17 @@
                         <property name="can_focus">False</property>
                         <property name="left_padding">12</property>
                         <child>
-                          <object class="GtkVBox" id="vbox5">
+                          <object class="GtkBox" id="vbox5">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="border_width">6</property>
+                            <property name="orientation">vertical</property>
                             <property name="spacing">6</property>
                             <child>
                               <object class="GtkLabel" id="dclick-time-label">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="xalign">0</property>
+                                <property name="halign">start</property>
                                 <property name="label" translatable="yes">Ti_me:</property>
                                 <property name="use_underline">True</property>
                                 <property name="mnemonic_widget">dclick-time-scale</property>
@@ -983,11 +979,10 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkHScale" id="dclick-time-scale">
+                              <object class="GtkScale" id="dclick-time-scale">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="tooltip_text" translatable="yes">Two mouse clicks in less than this length of time (in milliseconds) will be considered a double click</property>
-                                <property name="update_policy">delayed</property>
                                 <property name="adjustment">dclick-time</property>
                                 <property name="digits">0</property>
                                 <property name="value_pos">right</property>
@@ -1002,7 +997,7 @@
                               <object class="GtkLabel" id="dclick-distance-label">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="xalign">0</property>
+                                <property name="halign">start</property>
                                 <property name="label" translatable="yes">D_istance:</property>
                                 <property name="use_underline">True</property>
                                 <property name="mnemonic_widget">dclick-distance-scale</property>
@@ -1014,11 +1009,10 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkHScale" id="dclick-distance-scale">
+                              <object class="GtkScale" id="dclick-distance-scale">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="tooltip_text" translatable="yes">The mouse pointer cannot move farther than this distance between two clicks for them to be considered a double click</property>
-                                <property name="update_policy">delayed</property>
                                 <property name="adjustment">dclick-distance</property>
                                 <property name="digits">0</property>
                                 <property name="value_pos">right</property>
@@ -1068,7 +1062,7 @@
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="themes-hbox">
+              <object class="GtkBox" id="themes-hbox">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="border_width">12</property>
@@ -1077,8 +1071,6 @@
                   <object class="GtkScrolledWindow" id="scrolledwindow2">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="hscrollbar_policy">automatic</property>
-                    <property name="vscrollbar_policy">automatic</property>
                     <property name="shadow_type">etched-in</property>
                     <child>
                       <object class="GtkTreeView" id="theme-treeview">
@@ -1086,6 +1078,9 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="headers_visible">False</property>
+                        <child internal-child="selection">
+                          <object class="GtkTreeSelection" id="treeview-selection1"/>
+                        </child>
                       </object>
                     </child>
                   </object>
@@ -1096,9 +1091,10 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkVBox" id="vbox9">
+                  <object class="GtkBox" id="vbox9">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
                     <property name="spacing">6</property>
                     <child>
                       <object class="GtkFrame" id="frame5">
@@ -1112,7 +1108,7 @@
                             <property name="can_focus">False</property>
                             <property name="left_padding">12</property>
                             <child>
-                              <object class="GtkHBox" id="hbox7">
+                              <object class="GtkBox" id="hbox7">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="border_width">6</property>
@@ -1121,6 +1117,7 @@
                                   <object class="GtkLabel" id="label21">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
+                                    <property name="halign">start</property>
                                     <property name="label" translatable="yes">Cursor si_ze:</property>
                                     <property name="use_underline">True</property>
                                     <property name="mnemonic_widget">spin1</property>
@@ -1137,8 +1134,6 @@
                                     <property name="can_focus">True</property>
                                     <property name="primary_icon_activatable">False</property>
                                     <property name="secondary_icon_activatable">False</property>
-                                    <property name="primary_icon_sensitive">True</property>
-                                    <property name="secondary_icon_sensitive">True</property>
                                     <property name="adjustment">theme-cursor-size</property>
                                     <property name="snap_to_ticks">True</property>
                                     <property name="numeric">True</property>
@@ -1181,8 +1176,6 @@
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="border_width">6</property>
-                            <property name="xalign">0</property>
-                            <property name="yalign">0</property>
                             <property name="xscale">0</property>
                             <property name="yscale">0</property>
                             <property name="top_padding">6</property>
@@ -1253,22 +1246,4 @@
       <action-widget response="-11">button2</action-widget>
     </action-widgets>
   </object>
-  <object class="GtkListStore" id="wacom-mode-store">
-    <columns>
-      <!-- column-name mode -->
-      <column type="gchararray"/>
-      <!-- column-name title -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0">ABSOLUTE</col>
-        <col id="1" translatable="yes">Pen (absolute)</col>
-      </row>
-      <row>
-        <col id="0">RELATIVE</col>
-        <col id="1" translatable="yes">Mouse (relative)</col>
-      </row>
-    </data>
-  </object>
 </interface>
diff --git a/xfce4-settings-editor/Makefile.am b/xfce4-settings-editor/Makefile.am
index 5964366..9b0c9f6 100644
--- a/xfce4-settings-editor/Makefile.am
+++ b/xfce4-settings-editor/Makefile.am
@@ -27,7 +27,13 @@ xfce4_settings_editor_CFLAGS = \
 	$(LIBXFCE4UTIL_CFLAGS) \
 	$(LIBXFCE4UI_CFLAGS) \
 	$(XFCONF_CFLAGS) \
-	$(PLATFORM_CFLAGS)
+	$(PLATFORM_CFLAGS) \
+    -DGTK_DISABLE_SINGLE_INCLUDES \
+    -DGDK_DISABLE_DEPRECATED \
+    -DGTK_DISABLE_DEPRECATED \
+    -DGSEAL_ENABLE \
+    -DGDK_PIXBUF_DISABLE_DEPRECATED \
+    -DG_DISABLE_DEPRECATED
 
 xfce4_settings_editor_LDFLAGS = \
 	-no-undefined \
diff --git a/xfce4-settings-editor/main.c b/xfce4-settings-editor/main.c
index 7e7b366..3a4c212 100644
--- a/xfce4-settings-editor/main.c
+++ b/xfce4-settings-editor/main.c
@@ -29,6 +29,7 @@
 #endif
 
 #include <gtk/gtk.h>
+#include <gtk/gtkx.h>
 
 #include <xfconf/xfconf.h>
 #include <libxfce4util/libxfce4util.h>
@@ -56,11 +57,11 @@ save_window_size (GtkWidget *dialog, XfceSettingsEditorBox *settings_editor)
 	GdkWindowState            state;
 	gint                      width, height;
 	gint                      paned_pos;
-	
+
 	g_object_get (G_OBJECT(settings_editor), "paned-pos", &paned_pos, NULL);
 
-	state = gdk_window_get_state ((dialog)->window);
-		
+	state = gdk_window_get_state (gtk_widget_get_window(dialog));
+
 	if ((state & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN)) == 0)
 	{
 		/* save window size */
@@ -68,7 +69,7 @@ save_window_size (GtkWidget *dialog, XfceSettingsEditorBox *settings_editor)
 		xfconf_channel_set_int (channel, "/last/window-width", width),
 			xfconf_channel_set_int (channel, "/last/window-height", height);
 		xfconf_channel_set_int (channel, "/last/paned-position", paned_pos);
-		
+
 	}
 }
 
@@ -164,28 +165,28 @@ main(gint argc, gchar **argv)
 					"gtk-help", GTK_RESPONSE_HELP,
 					"gtk-close", GTK_RESPONSE_OK,
 					NULL);
-		
+
 		xfce_titled_dialog_set_subtitle (XFCE_TITLED_DIALOG (dialog),
 										 _("Customize settings stored by Xfconf"));
-		
+
 		gtk_window_set_icon_name (GTK_WINDOW (dialog), "preferences-system");
 		gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_NORMAL);
 		gtk_window_set_default_size (GTK_WINDOW (dialog),
           xfconf_channel_get_int (channel, "/last/window-width", 640),
           xfconf_channel_get_int (channel, "/last/window-height", 500));
-		
+
 		gtk_container_add_with_properties(
-			GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), 
+			GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),
 						  settings_editor,
 						  "expand", TRUE,
 						  "fill", TRUE,
 						  NULL);
-						  
+
 		g_signal_connect (dialog, "response",
                     G_CALLBACK (settings_dialog_response), settings_editor);
 
 		gtk_widget_show_all (dialog);
-		
+
 	}
 	else
 	{
@@ -196,21 +197,21 @@ main(gint argc, gchar **argv)
 		gtk_window_set_default_size (GTK_WINDOW (plug),
 		  xfconf_channel_get_int (channel, "/last/window-width", 640),
           xfconf_channel_get_int (channel, "/last/window-height", 500));
-		
+
 		gtk_widget_show (plug);
 
 		gtk_container_add (GTK_CONTAINER(plug), settings_editor);
-		
+
 		/* Stop startup notification */
 		gdk_notify_startup_complete ();
-		
+
 		gtk_widget_show (GTK_WIDGET (settings_editor));
 	}
 
     gtk_main ();
 
 	g_object_unref(channel);
-	
+
     /* shutdown xfconf */
     xfconf_shutdown ();
 
diff --git a/xfce4-settings-editor/xfce-settings-cell-renderer.c b/xfce4-settings-editor/xfce-settings-cell-renderer.c
index 31e964e..b2e7956 100644
--- a/xfce4-settings-editor/xfce-settings-cell-renderer.c
+++ b/xfce4-settings-editor/xfce-settings-cell-renderer.c
@@ -80,33 +80,25 @@ static void             xfce_settings_cell_renderer_get_property  (GObject
                                                                    GValue               *value,
                                                                    GParamSpec           *pspec);
 static void             xfce_settings_cell_renderer_finalize      (GObject              *object);
-static void             xfce_settings_cell_renderer_get_size      (GtkCellRenderer      *cell,
-                                                                   GtkWidget            *widget,
-                                                                   GdkRectangle         *cell_area,
-                                                                   gint                 *x_offset,
-                                                                   gint                 *y_offset,
-                                                                   gint                 *width,
-                                                                   gint                 *height);
 static void             xfce_settings_cell_renderer_render        (GtkCellRenderer      *cell,
-                                                                   GdkDrawable          *window,
+                                                                   cairo_t              *cr,
                                                                    GtkWidget            *widget,
-                                                                   GdkRectangle         *background_area,
-                                                                   GdkRectangle         *cell_area,
-                                                                   GdkRectangle         *expose_area,
+                                                                   const GdkRectangle   *background_area,
+                                                                   const GdkRectangle   *cell_area,
                                                                    GtkCellRendererState  flags);
 static gint             xfce_settings_cell_renderer_activate      (GtkCellRenderer      *cell,
                                                                    GdkEvent             *event,
                                                                    GtkWidget            *widget,
                                                                    const gchar          *path,
-                                                                   GdkRectangle         *background_area,
-                                                                   GdkRectangle         *cell_area,
+                                                                   const GdkRectangle   *background_area,
+                                                                   const GdkRectangle   *cell_area,
                                                                    GtkCellRendererState  flags);
 static GtkCellEditable *xfce_settings_cell_renderer_start_editing (GtkCellRenderer      *cell,
                                                                    GdkEvent             *event,
                                                                    GtkWidget            *widget,
                                                                    const gchar          *path,
-                                                                   GdkRectangle         *background_area,
-                                                                   GdkRectangle         *cell_area,
+                                                                   const GdkRectangle   *background_area,
+                                                                   const GdkRectangle   *cell_area,
                                                                    GtkCellRendererState  flags);
 static void             xfce_settings_strv_to_string              (const GValue         *src_value,
                                                                    GValue               *dest_value);
@@ -128,7 +120,6 @@ xfce_settings_cell_renderer_class_init (XfceSettingsCellRendererClass *klass)
     gobject_class->finalize = xfce_settings_cell_renderer_finalize;
 
     gtkcellrenderer_class = GTK_CELL_RENDERER_CLASS (klass);
-    gtkcellrenderer_class->get_size = xfce_settings_cell_renderer_get_size;
     gtkcellrenderer_class->render = xfce_settings_cell_renderer_render;
     gtkcellrenderer_class->activate = xfce_settings_cell_renderer_activate;
     gtkcellrenderer_class->start_editing = xfce_settings_cell_renderer_start_editing;
@@ -338,33 +329,11 @@ xfce_settings_cell_renderer_prepare (XfceSettingsCellRenderer *renderer)
 
 
 static void
-xfce_settings_cell_renderer_get_size (GtkCellRenderer      *cell,
-                                      GtkWidget            *widget,
-                                      GdkRectangle         *cell_area,
-                                      gint                 *x_offset,
-                                      gint                 *y_offset,
-                                      gint                 *width,
-                                      gint                 *height)
-{
-    XfceSettingsCellRenderer *renderer = XFCE_SETTINGS_CELL_RENDERER (cell);
-    GtkCellRenderer          *cell_renderer;
-
-    cell_renderer = xfce_settings_cell_renderer_prepare (renderer);
-    gtk_cell_renderer_get_size (cell_renderer,
-                                widget, cell_area,
-                                x_offset, y_offset,
-                                width, height);
-}
-
-
-
-static void
 xfce_settings_cell_renderer_render (GtkCellRenderer      *cell,
-                                    GdkDrawable          *window,
+                                    cairo_t              *cr,
                                     GtkWidget            *widget,
-                                    GdkRectangle         *background_area,
-                                    GdkRectangle         *cell_area,
-                                    GdkRectangle         *expose_area,
+                                    const GdkRectangle   *background_area,
+                                    const GdkRectangle   *cell_area,
                                     GtkCellRendererState  flags)
 {
     XfceSettingsCellRenderer *renderer = XFCE_SETTINGS_CELL_RENDERER (cell);
@@ -372,9 +341,9 @@ xfce_settings_cell_renderer_render (GtkCellRenderer      *cell,
 
     cell_renderer = xfce_settings_cell_renderer_prepare (renderer);
     gtk_cell_renderer_render (cell_renderer,
-                              window, widget,
+                              cr, widget,
                               background_area, cell_area,
-                              expose_area, flags);
+                              flags);
 }
 
 
@@ -384,8 +353,8 @@ xfce_settings_cell_renderer_activate (GtkCellRenderer      *cell,
                                       GdkEvent             *event,
                                       GtkWidget            *widget,
                                       const gchar          *path,
-                                      GdkRectangle         *background_area,
-                                      GdkRectangle         *cell_area,
+                                      const GdkRectangle   *background_area,
+                                      const GdkRectangle   *cell_area,
                                       GtkCellRendererState  flags)
 {
     XfceSettingsCellRenderer *renderer = XFCE_SETTINGS_CELL_RENDERER (cell);
@@ -503,8 +472,8 @@ xfce_settings_cell_renderer_start_editing (GtkCellRenderer      *cell,
                                            GdkEvent             *event,
                                            GtkWidget            *widget,
                                            const gchar          *path,
-                                           GdkRectangle         *background_area,
-                                           GdkRectangle         *cell_area,
+                                           const GdkRectangle   *background_area,
+                                           const GdkRectangle   *cell_area,
                                            GtkCellRendererState  flags)
 {
     XfceSettingsCellRenderer *renderer = XFCE_SETTINGS_CELL_RENDERER (cell);
diff --git a/xfce4-settings-editor/xfce-settings-editor-box.c b/xfce4-settings-editor/xfce-settings-editor-box.c
index da026a9..bf5f0f3 100644
--- a/xfce4-settings-editor/xfce-settings-editor-box.c
+++ b/xfce4-settings-editor/xfce-settings-editor-box.c
@@ -66,7 +66,7 @@ struct _XfceSettingsEditorBox
     GtkWidget         *button_new;
     GtkWidget         *button_edit;
     GtkWidget         *button_reset;
-    
+
     gint			   paned_pos;
 };
 
@@ -145,7 +145,7 @@ static void xfce_settings_editor_box_get_property (GObject *object,
 {
     XfceSettingsEditorBox *self;
     self = XFCE_SETTINGS_EDITOR_BOX (object);
-    
+
     switch (prop_id)
     {
 	case PROP_PANED_POSITION:
@@ -165,7 +165,7 @@ static void xfce_settings_editor_box_set_property (GObject *object,
 {
     XfceSettingsEditorBox *self;
     self = XFCE_SETTINGS_EDITOR_BOX (object);
-    
+
     switch (prop_id)
     {
 	case PROP_PANED_POSITION:
@@ -206,8 +206,8 @@ xfce_settings_editor_box_init (XfceSettingsEditorBox *self)
 											G_TYPE_VALUE);
     gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (self->props_store),
                                           PROP_COLUMN_NAME, GTK_SORT_ASCENDING);
-    self->paned = paned = gtk_hpaned_new ();
-    
+    self->paned = paned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
+
     gtk_box_pack_start (GTK_BOX (self), paned, TRUE, TRUE, 0);
     gtk_paned_set_position (GTK_PANED (paned), self->paned_pos);
     gtk_container_set_border_width (GTK_CONTAINER (paned), 6);
@@ -243,7 +243,7 @@ xfce_settings_editor_box_init (XfceSettingsEditorBox *self)
                                                  _("Channel"), render,
                                                  "text", CHANNEL_COLUMN_NAME, NULL);
 
-    vbox = gtk_vbox_new (FALSE, 6);
+    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
     gtk_paned_add2 (GTK_PANED (paned), vbox);
     gtk_widget_show (vbox);
 
@@ -304,12 +304,12 @@ xfce_settings_editor_box_init (XfceSettingsEditorBox *self)
     g_signal_connect (G_OBJECT (render), "value-changed",
         G_CALLBACK (xfce_settings_editor_box_value_changed), self);
 
-    bbox = gtk_hbutton_box_new ();
+    bbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
     gtk_box_pack_start (GTK_BOX (vbox), bbox, FALSE, TRUE, 0);
     gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_START);
     gtk_widget_show (bbox);
 
-    button = gtk_button_new_from_stock (GTK_STOCK_NEW);
+    button = gtk_button_new_with_label (_("New"));
     gtk_container_add (GTK_CONTAINER (bbox), button);
     gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
     gtk_widget_set_tooltip_text (button, _("New property"));
@@ -320,7 +320,7 @@ xfce_settings_editor_box_init (XfceSettingsEditorBox *self)
     g_signal_connect_swapped (G_OBJECT (button), "clicked",
         G_CALLBACK (xfce_settings_editor_box_property_new), self);
 
-    button = gtk_button_new_from_stock (GTK_STOCK_EDIT);
+    button = gtk_button_new_with_label (_("Edit"));
     gtk_container_add (GTK_CONTAINER (bbox), button);
     gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
     gtk_widget_set_tooltip_text (button, _("Edit selected property"));
@@ -331,7 +331,7 @@ xfce_settings_editor_box_init (XfceSettingsEditorBox *self)
     g_signal_connect_swapped (G_OBJECT (button), "clicked",
         G_CALLBACK (xfce_settings_editor_box_property_edit), self);
 
-    button = xfce_gtk_button_new_mixed (GTK_STOCK_REVERT_TO_SAVED, _("_Reset"));
+    button = xfce_gtk_button_new_mixed ("document-revert", _("_Reset"));
     gtk_container_add (GTK_CONTAINER (bbox), button);
     gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
     gtk_widget_set_tooltip_text (button, _("Reset selected property"));
@@ -347,9 +347,9 @@ static void
 xfce_settings_editor_box_class_init (XfceSettingsEditorBoxClass *klass)
 {
     GObjectClass   *gobject_class;
-	
+
 	gobject_class = G_OBJECT_CLASS (klass);
-	    
+
     gobject_class->set_property = xfce_settings_editor_box_set_property;
     gobject_class->get_property = xfce_settings_editor_box_get_property;
 
@@ -363,7 +363,7 @@ xfce_settings_editor_box_class_init (XfceSettingsEditorBoxClass *klass)
 													   10,
 													   G_PARAM_CONSTRUCT |
 													   G_PARAM_READWRITE));
-	
+
     gobject_class->finalize = xfce_settings_editor_box_finalize;
 }
 
@@ -389,7 +389,7 @@ xfce_settings_editor_box_finalize (GObject *object)
     g_object_unref (G_OBJECT (self->props_store));
     if (self->props_channel != NULL)
         g_object_unref (G_OBJECT (self->props_channel));
-    
+
     G_OBJECT_CLASS (xfce_settings_editor_box_parent_class)->finalize (object);
 }
 
@@ -796,7 +796,7 @@ xfce_settings_editor_box_channel_reset (XfceSettingsEditorBox *self)
     g_object_get (self->props_channel, "channel-name", &channel_name, NULL);
 
     if (xfce_dialog_confirm (GTK_WINDOW (gtk_widget_get_toplevel(GTK_WIDGET(self))),
-                             GTK_STOCK_REVERT_TO_SAVED,
+                             "document-revert",
                              _("_Reset Channel"),
                              _("Resetting a channel will permanently remove those custom settings."),
                              _("Are you sure you want to reset channel \"%s\" and all its properties?"),
@@ -941,8 +941,8 @@ xfce_settings_editor_box_channel_monitor (XfceSettingsEditorBox *self)
     xfce_titled_dialog_set_subtitle (XFCE_TITLED_DIALOG (window),
         _("Watch an Xfconf channel for property changes"));
     gtk_dialog_add_buttons (GTK_DIALOG (window),
-                            GTK_STOCK_CLEAR, GTK_RESPONSE_REJECT,
-                            GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL);
+                            _("Clear"), GTK_RESPONSE_REJECT,
+                            _("Close"), GTK_RESPONSE_CLOSE, NULL);
     g_signal_connect (G_OBJECT (window), "response",
         G_CALLBACK (xfce_settings_editor_box_channel_monitor_response),
         g_object_ref (G_OBJECT (self->props_channel)));
@@ -999,7 +999,6 @@ xfce_settings_editor_box_channel_menu (XfceSettingsEditorBox *self)
     GtkWidget *menu;
     GtkWidget *mi;
     gchar     *channel_name;
-    GtkWidget *image;
 
     if (self->props_channel == NULL)
         return FALSE;
@@ -1019,31 +1018,23 @@ xfce_settings_editor_box_channel_menu (XfceSettingsEditorBox *self)
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
     gtk_widget_show (mi);
 
-    mi = gtk_image_menu_item_new_with_mnemonic (_("_Reset"));
+    mi = gtk_menu_item_new_with_mnemonic (_("_Reset"));
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
     g_signal_connect_swapped (G_OBJECT (mi), "activate",
         G_CALLBACK (xfce_settings_editor_box_channel_reset), self);
     gtk_widget_show (mi);
 
-    image = gtk_image_new_from_stock (GTK_STOCK_REVERT_TO_SAVED, GTK_ICON_SIZE_MENU);
-    gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi), image);
-    gtk_widget_show (image);
-
-    mi = gtk_image_menu_item_new_with_mnemonic (_("_Monitor"));
+    mi = gtk_menu_item_new_with_mnemonic (_("_Monitor"));
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
-    gtk_widget_show (mi);
-
-    image = gtk_image_new_from_icon_name ("utilities-system-monitor", GTK_ICON_SIZE_MENU);
-    gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi), image);
     g_signal_connect_swapped (G_OBJECT (mi), "activate",
         G_CALLBACK (xfce_settings_editor_box_channel_monitor), self);
-    gtk_widget_show (image);
+    gtk_widget_show (mi);
 
     mi = gtk_separator_menu_item_new ();
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
     gtk_widget_show (mi);
 
-    mi = gtk_image_menu_item_new_from_stock (GTK_STOCK_REFRESH, NULL);
+    mi = gtk_menu_item_new_with_label (_("Refresh"));
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
     g_signal_connect_swapped (G_OBJECT (mi), "activate",
         G_CALLBACK (xfce_settings_editor_box_load_channels), self);
@@ -1293,13 +1284,13 @@ xfce_settings_editor_box_key_press_event (GtkTreeView              *treeview,
 										  GdkEventKey              *event,
 										  XfceSettingsEditorBox    *self)
 {
-    if (event->keyval == GDK_Delete
+    if (event->keyval == GDK_KEY_Delete
         && gtk_widget_get_sensitive (self->button_reset))
     {
         xfce_settings_editor_box_property_reset (self);
         return TRUE;
     }
-    else if (event->keyval == GDK_Insert
+    else if (event->keyval == GDK_KEY_Insert
              && gtk_widget_get_sensitive (self->button_new))
     {
         xfce_settings_editor_box_property_new (self);
@@ -1362,7 +1353,7 @@ xfce_settings_editor_box_property_reset (XfceSettingsEditorBox *self)
     property = xfce_settings_editor_box_selected (self, NULL, NULL);
     if (property != NULL
         && xfce_dialog_confirm (GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(self))),
-                                GTK_STOCK_REVERT_TO_SAVED, _("_Reset"),
+                                "document-revert", _("_Reset"),
                                 _("Resetting a property will permanently remove those custom settings."),
                                 _("Are you sure you want to reset property \"%s\"?"), property))
     {
diff --git a/xfce4-settings-editor/xfce-settings-prop-dialog.c b/xfce4-settings-editor/xfce-settings-prop-dialog.c
index 093e5f2..79ea426 100644
--- a/xfce4-settings-editor/xfce-settings-prop-dialog.c
+++ b/xfce4-settings-editor/xfce-settings-prop-dialog.c
@@ -141,39 +141,43 @@ xfce_settings_prop_dialog_init (XfceSettingsPropDialog *dialog)
     gtk_window_set_title (GTK_WINDOW (dialog), _("New Property"));
     gtk_window_set_default_size (GTK_WINDOW (dialog), 300, 200);
     gtk_dialog_add_buttons (GTK_DIALOG (dialog),
-                            GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-                            GTK_STOCK_SAVE, GTK_RESPONSE_OK, NULL);
+                            _("Cancel"), GTK_RESPONSE_CANCEL,
+                            _("Save"), GTK_RESPONSE_OK, NULL);
     gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
 
     save_button = gtk_dialog_get_widget_for_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
     gtk_widget_set_sensitive (save_button, FALSE);
 
-    table = gtk_table_new (5, 2, FALSE);
+    table = gtk_grid_new ();
     content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
     gtk_box_pack_start (GTK_BOX (content_area), table, TRUE, TRUE, 0);
-    gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+    gtk_grid_set_column_spacing (GTK_GRID (table), 12);
     gtk_container_set_border_width (GTK_CONTAINER (table), 6);
     gtk_widget_show (table);
 
     label = gtk_label_new_with_mnemonic (_("_Property:"));
-    gtk_misc_set_alignment (GTK_MISC (label), 0.00, 0.50);
-    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
-                      GTK_FILL, GTK_FILL, 0, 0);
-    gtk_table_set_row_spacing (GTK_TABLE (table), 0, 6);
+    gtk_widget_set_halign (label, GTK_ALIGN_START);
+    gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
+    gtk_grid_attach (GTK_GRID (table), label, 0, 0, 1, 1);
+    gtk_widget_set_margin_top (label, 6);
+    gtk_widget_set_margin_bottom (label, 6);
     gtk_widget_show (label);
 
     dialog->prop_name = entry = gtk_entry_new ();
-    gtk_table_attach (GTK_TABLE (table), entry, 1, 2, 0, 1,
-                      GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
+    gtk_grid_attach (GTK_GRID (table), entry, 1, 0, 1, 1);
+    gtk_widget_set_margin_top (entry, 6);
+    gtk_widget_set_margin_bottom (entry, 6);
     xfce_settings_prop_dialog_visible_bind (entry, label);
     g_signal_connect (G_OBJECT (entry), "changed",
         G_CALLBACK (xfce_settings_prop_dialog_entry_validate), dialog);
     gtk_widget_show (entry);
 
     label = gtk_label_new_with_mnemonic (_("_Type:"));
-    gtk_misc_set_alignment (GTK_MISC (label), 0.00, 0.50);
-    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
-                      GTK_FILL, GTK_FILL, 0, 0);
+    gtk_widget_set_halign (label, GTK_ALIGN_START);
+    gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
+    gtk_grid_attach (GTK_GRID (table), label, 0, 1, 1, 1);
+    gtk_widget_set_margin_top (label, 6);
+    gtk_widget_set_margin_bottom (label, 6);
     gtk_widget_show (label);
 
     store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_UINT);
@@ -185,9 +189,9 @@ xfce_settings_prop_dialog_init (XfceSettingsPropDialog *dialog)
     }
 
     dialog->prop_type = combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store));
-    gtk_table_attach (GTK_TABLE (table), combo, 1, 2, 1, 2,
-                      GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
-    gtk_table_set_row_spacing (GTK_TABLE (table), 1, 6);
+    gtk_grid_attach (GTK_GRID (table), combo, 1, 1, 1, 1);
+    gtk_widget_set_margin_top (combo, 6);
+    gtk_widget_set_margin_bottom (combo, 6);
     xfce_settings_prop_dialog_visible_bind (combo, label);
     gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
     g_signal_connect (G_OBJECT (combo), "changed",
@@ -202,38 +206,35 @@ xfce_settings_prop_dialog_init (XfceSettingsPropDialog *dialog)
 
     /* strings */
     label = gtk_label_new_with_mnemonic (_("_Value:"));
-    gtk_misc_set_alignment (GTK_MISC (label), 0.00, 0.50);
-    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3,
-                      GTK_FILL, GTK_FILL, 0, 0);
+    gtk_widget_set_halign (label, GTK_ALIGN_START);
+    gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
+    gtk_grid_attach (GTK_GRID (table), label, 0, 2, 1, 1);
 
     entry = dialog->prop_string = gtk_entry_new ();
-    gtk_table_attach (GTK_TABLE (table), entry, 1, 2, 2, 3,
-                      GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
+    gtk_grid_attach (GTK_GRID (table), entry, 1, 2, 1, 1);
     xfce_settings_prop_dialog_visible_bind (entry, label);
 
     /* integers */
     label = gtk_label_new_with_mnemonic (_("_Value:"));
-    gtk_misc_set_alignment (GTK_MISC (label), 0.00, 0.50);
-    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4,
-                      GTK_FILL, GTK_FILL, 0, 0);
+    gtk_widget_set_halign (label, GTK_ALIGN_START);
+    gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
+    gtk_grid_attach (GTK_GRID (table), label, 0, 3, 1, 1);
 
     spin = dialog->prop_integer = gtk_spin_button_new_with_range (0.00, 0.00, 1.00);
     gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin), TRUE);
-    gtk_table_attach (GTK_TABLE (table), spin, 1, 2, 3, 4,
-                      GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
+    gtk_grid_attach (GTK_GRID (table), spin, 1, 3, 1, 1);
     xfce_settings_prop_dialog_visible_bind (spin, label);
 
     /* bool */
     label = gtk_label_new_with_mnemonic (_("_Value:"));
-    gtk_misc_set_alignment (GTK_MISC (label), 0.00, 0.50);
-    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 4, 5,
-                      GTK_FILL, GTK_FILL, 0, 0);
+    gtk_widget_set_halign (label, GTK_ALIGN_START);
+    gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
+    gtk_grid_attach (GTK_GRID (table), label, 0, 4, 1, 1);
 
     toggle = dialog->prop_bool = gtk_toggle_button_new_with_label ("FALSE");
     g_signal_connect (G_OBJECT (toggle), "toggled",
         G_CALLBACK (xfce_settings_prop_dialog_button_toggled), NULL);
-    gtk_table_attach (GTK_TABLE (table), toggle, 1, 2, 4, 5,
-                      GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
+    gtk_grid_attach (GTK_GRID (table), toggle, 1, 4, 1, 1);
     xfce_settings_prop_dialog_visible_bind (toggle, label);
 }
 
@@ -464,8 +465,8 @@ xfce_settings_prop_dialog_entry_validate (GtkWidget              *entry,
     {
         is_valid = xfconf_property_is_valid (text, &error);
 
-        gtk_entry_set_icon_from_stock (GTK_ENTRY (entry), GTK_ENTRY_ICON_SECONDARY,
-                                       is_valid ? NULL : GTK_STOCK_DIALOG_ERROR);
+        gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry), GTK_ENTRY_ICON_SECONDARY,
+                                       is_valid ? NULL : "dialog-error");
         gtk_entry_set_icon_tooltip_text (GTK_ENTRY (entry), GTK_ENTRY_ICON_SECONDARY,
                                          is_valid ? NULL : error->message);
 
@@ -474,7 +475,7 @@ xfce_settings_prop_dialog_entry_validate (GtkWidget              *entry,
     }
     else
     {
-        gtk_entry_set_icon_from_stock (GTK_ENTRY (entry), GTK_ENTRY_ICON_SECONDARY, NULL);
+        gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry), GTK_ENTRY_ICON_SECONDARY, NULL);
     }
 
     save_button = gtk_dialog_get_widget_for_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
diff --git a/xfce4-settings-manager/Makefile.am b/xfce4-settings-manager/Makefile.am
index da63079..04619ce 100644
--- a/xfce4-settings-manager/Makefile.am
+++ b/xfce4-settings-manager/Makefile.am
@@ -22,7 +22,9 @@ xfce4_settings_manager_CFLAGS = \
 	$(GARCON_CFLAGS) \
 	$(XFCONF_CFLAGS) \
 	$(EXO_CFLAGS) \
-	$(PLATFORM_CFLAGS)
+	$(PLATFORM_CFLAGS) \
+    -DGTK_DISABLE_SINGLE_INCLUDES \
+    -DGSEAL_ENABLE
 
 xfce4_settings_manager_LDFLAGS = \
 	-no-undefined \
diff --git a/xfce4-settings-manager/main.c b/xfce4-settings-manager/main.c
index 42bec66..8c82cc2 100644
--- a/xfce4-settings-manager/main.c
+++ b/xfce4-settings-manager/main.c
@@ -26,6 +26,9 @@
 #endif
 
 #include <gtk/gtk.h>
+
+#include <gdk/gdkx.h>
+
 #include <libxfce4util/libxfce4util.h>
 #include <garcon/garcon.h>
 #include <xfconf/xfconf.h>
@@ -102,7 +105,7 @@ main(int argc,
     }
 
     /* To prevent the settings dialog to be saved in the session */
-    gdk_set_sm_client_id ("FAKE ID");
+    gdk_x11_set_sm_client_id ("FAKE ID");
 
     gtk_main();
 
diff --git a/xfce4-settings-manager/xfce-settings-manager-dialog.c b/xfce4-settings-manager/xfce-settings-manager-dialog.c
index 6863455..a613c55 100644
--- a/xfce4-settings-manager/xfce-settings-manager-dialog.c
+++ b/xfce4-settings-manager/xfce-settings-manager-dialog.c
@@ -31,6 +31,7 @@
 #endif
 
 #include <gtk/gtk.h>
+#include <gtk/gtkx.h>
 #include <gdk/gdkkeysyms.h>
 
 #include <libxfce4util/libxfce4util.h>
@@ -159,8 +160,6 @@ xfce_settings_manager_dialog_class_init (XfceSettingsManagerDialogClass *klass)
 static void
 xfce_settings_manager_dialog_init (XfceSettingsManagerDialog *dialog)
 {
-    GtkWidget *align;
-    GtkWidget *bbox;
     GtkWidget *dialog_vbox;
     GtkWidget *ebox;
     GtkWidget *entry;
@@ -168,6 +167,8 @@ xfce_settings_manager_dialog_init (XfceSettingsManagerDialog *dialog)
     GtkWidget *header;
     GtkWidget *scroll;
     GtkWidget *viewport;
+    GtkWidget *image;
+    GtkWidget *button;
     GList     *children;
     gchar     *path;
 
@@ -190,20 +191,25 @@ xfce_settings_manager_dialog_init (XfceSettingsManagerDialog *dialog)
       xfconf_channel_get_int (dialog->channel, "/last/window-height", 500));
     xfce_settings_manager_dialog_set_title (dialog, NULL, NULL, NULL);
 
-    dialog->button_back = xfce_gtk_button_new_mixed (GTK_STOCK_GO_BACK, _("All _Settings"));
-    bbox = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
-    gtk_container_add (GTK_CONTAINER (bbox), dialog->button_back);
+    dialog->button_back = gtk_dialog_add_button (GTK_DIALOG (dialog), _("All _Settings"), GTK_RESPONSE_NONE);
+    image = gtk_image_new_from_icon_name ("go-previous", GTK_ICON_SIZE_BUTTON);
+    gtk_button_set_image (GTK_BUTTON (dialog->button_back), image);
     gtk_widget_set_sensitive (dialog->button_back, FALSE);
     gtk_widget_show (dialog->button_back);
     g_signal_connect_swapped (G_OBJECT (dialog->button_back), "clicked",
         G_CALLBACK (xfce_settings_manager_dialog_go_back), dialog);
 
+
     dialog->button_help = gtk_dialog_add_button (GTK_DIALOG (dialog),
-                                                 GTK_STOCK_HELP, GTK_RESPONSE_HELP);
-    gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
+                                                 _("Help"), GTK_RESPONSE_HELP);
+    image = gtk_image_new_from_icon_name ("help-browser", GTK_ICON_SIZE_BUTTON);
+    gtk_button_set_image (GTK_BUTTON (dialog->button_help), image);
+    button = gtk_dialog_add_button (GTK_DIALOG (dialog), _("Close"), GTK_RESPONSE_CLOSE);
+    image = gtk_image_new_from_icon_name ("window-close", GTK_ICON_SIZE_BUTTON);
+    gtk_button_set_image (GTK_BUTTON (button), image);
 
     /* add box at start of the main box */
-    hbox = gtk_hbox_new (FALSE, 0);
+    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
     dialog_vbox = gtk_bin_get_child (GTK_BIN (dialog));
     gtk_box_pack_start (GTK_BOX (dialog_vbox), hbox, FALSE, TRUE, 0);
     gtk_box_reorder_child (GTK_BOX (dialog_vbox), hbox, 0);
@@ -224,14 +230,11 @@ xfce_settings_manager_dialog_init (XfceSettingsManagerDialog *dialog)
         G_CALLBACK (xfce_settings_manager_dialog_header_style), ebox);
     gtk_widget_show (ebox);
 
-    align = gtk_alignment_new (0.0f, 1.0f, 0.0f, 0.0f);
-    gtk_container_add (GTK_CONTAINER (ebox), align);
-    gtk_container_set_border_width (GTK_CONTAINER (align), 6);
-    gtk_widget_show (align);
-
     dialog->filter_entry = entry = gtk_entry_new ();
-    gtk_container_add (GTK_CONTAINER (align), entry);
-    gtk_entry_set_icon_from_stock (GTK_ENTRY (entry), GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_FIND);
+    gtk_container_add (GTK_CONTAINER (ebox), entry);
+    gtk_widget_set_halign (entry, GTK_ALIGN_START);
+    gtk_widget_set_valign (entry, GTK_ALIGN_END);
+    gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry), GTK_ENTRY_ICON_SECONDARY, "edit-find");
     gtk_entry_set_icon_activatable (GTK_ENTRY (entry), GTK_ENTRY_ICON_SECONDARY, FALSE);
     g_signal_connect (G_OBJECT (entry), "changed",
         G_CALLBACK (xfce_settings_manager_dialog_entry_changed), dialog);
@@ -255,7 +258,7 @@ xfce_settings_manager_dialog_init (XfceSettingsManagerDialog *dialog)
     gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport), GTK_SHADOW_NONE);
     gtk_widget_show (viewport);
 
-    dialog->category_box = gtk_vbox_new (FALSE, 6);
+    dialog->category_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
     gtk_container_add (GTK_CONTAINER (viewport), dialog->category_box);
     gtk_container_set_border_width (GTK_CONTAINER (dialog->category_box), 6);
     gtk_widget_show (dialog->category_box);
@@ -311,13 +314,10 @@ xfce_settings_manager_dialog_style_set (GtkWidget *widget,
                                         GtkStyle  *old_style)
 {
     XfceSettingsManagerDialog *dialog = XFCE_SETTINGS_MANAGER_DIALOG (widget);
+    GtkStyleContext *context;
 
-    GTK_WIDGET_CLASS (xfce_settings_manager_dialog_parent_class)->style_set (widget, old_style);
-
-    /* set viewport to color icon view uses for background */
-    gtk_widget_modify_bg (dialog->category_viewport,
-                          GTK_STATE_NORMAL,
-                          &widget->style->base[GTK_STATE_NORMAL]);
+    context = gtk_widget_get_style_context (dialog->category_viewport);
+    gtk_style_context_add_class (context, "view");
 }
 
 
@@ -329,6 +329,9 @@ xfce_settings_manager_dialog_response (GtkDialog *widget,
     XfceSettingsManagerDialog *dialog = XFCE_SETTINGS_MANAGER_DIALOG (widget);
     const gchar               *help_component;
 
+    if (response_id == GTK_RESPONSE_NONE)
+        return;
+
     if (response_id == GTK_RESPONSE_HELP)
     {
         if (dialog->help_component != NULL)
@@ -348,7 +351,7 @@ xfce_settings_manager_dialog_response (GtkDialog *widget,
         gint           width, height;
 
         /* Don't save the state for full-screen windows */
-        state = gdk_window_get_state (GTK_WIDGET (widget)->window);
+        state = gdk_window_get_state (gtk_widget_get_window(GTK_WIDGET(widget)));
 
         if ((state & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN)) == 0)
         {
@@ -370,8 +373,11 @@ xfce_settings_manager_dialog_header_style (GtkWidget *header,
                                            GtkStyle  *old_style,
                                            GtkWidget *ebox)
 {
-    /* use the header background */
-    gtk_widget_modify_bg (ebox, GTK_STATE_NORMAL, &header->style->base[GTK_STATE_NORMAL]);
+    GtkStyleContext *context;
+
+    context = gtk_widget_get_style_context (ebox);
+    gtk_style_context_add_class (context, "view");
+    gtk_style_context_add_class (context, "XfceHeading");
 }
 
 
@@ -591,7 +597,7 @@ xfce_settings_manager_dialog_go_back (XfceSettingsManagerDialog *dialog)
     GtkWidget *socket;
 
     /* make sure no cursor is shown */
-    gdk_window_set_cursor (GTK_WIDGET (dialog)->window, NULL);
+    gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET(dialog)), NULL);
 
     /* reset dialog info */
     xfce_settings_manager_dialog_set_title (dialog, NULL, NULL, NULL);
@@ -657,9 +663,9 @@ xfce_settings_manager_dialog_entry_changed (GtkWidget                 *entry,
         /* update entry */
         if (dialog->filter_text == NULL || filter_text == NULL)
         {
-            gtk_entry_set_icon_from_stock (GTK_ENTRY (dialog->filter_entry),
+            gtk_entry_set_icon_from_icon_name (GTK_ENTRY (dialog->filter_entry),
                 GTK_ENTRY_ICON_SECONDARY,
-                filter_text == NULL ? GTK_STOCK_FIND : GTK_STOCK_CLEAR);
+                filter_text == NULL ? "edit-find" : "edit-clear");
             gtk_entry_set_icon_activatable (GTK_ENTRY (dialog->filter_entry),
                 GTK_ENTRY_ICON_SECONDARY, filter_text != NULL);
         }
@@ -704,7 +710,7 @@ xfce_settings_manager_dialog_entry_key_press (GtkWidget                 *entry,
     GtkTreeModel   *model;
     const gchar    *text;
 
-    if (event->keyval == GDK_Escape)
+    if (event->keyval == GDK_KEY_Escape)
     {
         text = gtk_entry_get_text (GTK_ENTRY (entry));
         if (text != NULL && *text != '\0')
@@ -713,7 +719,7 @@ xfce_settings_manager_dialog_entry_key_press (GtkWidget                 *entry,
             return TRUE;
         }
     }
-    else if (event->keyval == GDK_Return)
+    else if (event->keyval == GDK_KEY_Return)
     {
         /* count visible children */
         n_visible_items = 0;
@@ -795,7 +801,7 @@ xfce_settings_manager_dialog_plug_added (GtkWidget                 *socket,
     gtk_widget_set_sensitive (dialog->filter_entry, FALSE);
 
     /* plug startup complete */
-    gdk_window_set_cursor (GTK_WIDGET (dialog)->window, NULL);
+    gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET(dialog)), NULL);
 }
 
 
@@ -821,6 +827,7 @@ xfce_settings_manager_dialog_spawn (XfceSettingsManagerDialog *dialog,
     const gchar    *command;
     gboolean        snotify;
     GdkScreen      *screen;
+    GdkDisplay     *display;
     GError         *error = NULL;
     GFile          *desktop_file;
     gchar          *filename;
@@ -859,9 +866,10 @@ xfce_settings_manager_dialog_spawn (XfceSettingsManagerDialog *dialog,
     if (pluggable)
     {
         /* fake startup notification */
-        cursor = gdk_cursor_new (GDK_WATCH);
-        gdk_window_set_cursor (GTK_WIDGET (dialog)->window, cursor);
-        gdk_cursor_unref (cursor);
+        display = gdk_display_get_default ();
+        cursor = gdk_cursor_new_for_display (display, GDK_WATCH);
+        gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET(dialog)), cursor);
+        g_object_unref (cursor);
 
         /* create fresh socket */
         socket = gtk_socket_new ();
@@ -876,10 +884,10 @@ xfce_settings_manager_dialog_spawn (XfceSettingsManagerDialog *dialog,
         dialog->socket_item = g_object_ref (item);
 
         /* spawn dialog with socket argument */
-        cmd = g_strdup_printf ("%s --socket-id=%d", command, gtk_socket_get_id (GTK_SOCKET (socket)));
+        cmd = g_strdup_printf ("%s --socket-id=%d", command, (gint)gtk_socket_get_id (GTK_SOCKET (socket)));
         if (!xfce_spawn_command_line_on_screen (screen, cmd, FALSE, FALSE, &error))
         {
-            gdk_window_set_cursor (GTK_WIDGET (dialog)->window, NULL);
+            gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET(dialog)), NULL);
 
             xfce_dialog_show_error (GTK_WINDOW (dialog), error,
                                     _("Unable to start \"%s\""), command);
@@ -958,7 +966,7 @@ static void
 xfce_settings_manager_dialog_scroll_to_item (GtkWidget                 *iconview,
                                              XfceSettingsManagerDialog *dialog)
 {
-    GtkAllocation *alloc;
+    GtkAllocation *alloc = g_new0 (GtkAllocation, 1);
     GtkTreePath   *path;
     gint           row, row_height;
     gdouble        rows;
@@ -971,8 +979,8 @@ xfce_settings_manager_dialog_scroll_to_item (GtkWidget                 *iconview
         row = exo_icon_view_get_item_row (EXO_ICON_VIEW (iconview), path);
         gtk_tree_path_free (path);
 
-        /* estinated row height */
-        alloc = &iconview->allocation;
+        /* estimated row height */
+        gtk_widget_get_allocation(GTK_WIDGET(iconview), alloc);
         rows = alloc->height / 56;
         row_height = alloc->height / MAX (1.0, (gint) rows);
 
@@ -981,9 +989,11 @@ xfce_settings_manager_dialog_scroll_to_item (GtkWidget                 *iconview
         upper = alloc->y + row_height * (row + 1);
 
         /* scroll so item is visible */
-        adjustment = gtk_viewport_get_vadjustment (GTK_VIEWPORT (dialog->category_viewport));
+        adjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (dialog->category_viewport));
         gtk_adjustment_clamp_page (adjustment, lower, upper);
     }
+
+    g_free (alloc);
 }
 
 
@@ -1036,7 +1046,6 @@ xfce_settings_manager_dialog_add_category (XfceSettingsManagerDialog *dialog,
                                            GarconMenuDirectory       *directory)
 {
     GtkTreeModel    *filter;
-    GtkWidget       *alignment;
     GtkWidget       *iconview;
     GtkWidget       *label;
     GtkWidget       *separator;
@@ -1055,7 +1064,7 @@ xfce_settings_manager_dialog_add_category (XfceSettingsManagerDialog *dialog,
         xfce_settings_manager_dialog_filter_category,
         category, xfce_settings_manager_dialog_category_free);
 
-    category->box = vbox = gtk_vbox_new (FALSE, 0);
+    category->box = vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
     gtk_box_pack_start (GTK_BOX (dialog->category_box), vbox, FALSE, TRUE, 0);
     gtk_widget_show (vbox);
 
@@ -1065,23 +1074,18 @@ xfce_settings_manager_dialog_add_category (XfceSettingsManagerDialog *dialog,
     pango_attr_list_insert (attrs, pango_attr_weight_new (PANGO_WEIGHT_BOLD));
     gtk_label_set_attributes (GTK_LABEL (label), attrs);
     pango_attr_list_unref (attrs);
-    gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f);
+    gtk_widget_set_halign (label, GTK_ALIGN_START);
+    gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
     gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
     gtk_widget_show (label);
 
     /* separate title and content using a horizontal line */
-    separator = gtk_hseparator_new ();
+    separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
     gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, TRUE, 0);
     gtk_widget_show (separator);
 
-    /* use an alignment to separate the category content from the title */
-    alignment = gtk_alignment_new (0.0f, 0.0f, 1.0f, 1.0f);
-    gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 6, 0, 0, 0);
-    gtk_container_add (GTK_CONTAINER (vbox), alignment);
-    gtk_widget_show (alignment);
-
     category->iconview = iconview = exo_icon_view_new_with_model (GTK_TREE_MODEL (filter));
-    gtk_container_add (GTK_CONTAINER (alignment), iconview);
+    gtk_container_add (GTK_CONTAINER (vbox), iconview);
     exo_icon_view_set_orientation (EXO_ICON_VIEW (iconview), GTK_ORIENTATION_HORIZONTAL);
     exo_icon_view_set_margin (EXO_ICON_VIEW (iconview), 0);
     exo_icon_view_set_single_click (EXO_ICON_VIEW (iconview), TRUE);
@@ -1116,14 +1120,16 @@ xfce_settings_manager_dialog_add_category (XfceSettingsManagerDialog *dialog,
                   "follow-state", TRUE,
                   NULL);
 
-    render = xfce_text_renderer_new ();
+    /* FIXME (maybe) - Use XfceTextRenderer */
+    //render = xfce_text_renderer_new ();
+    render = gtk_cell_renderer_text_new ();
     gtk_cell_layout_pack_end (GTK_CELL_LAYOUT (iconview), render, FALSE);
     gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (iconview), render, "text", COLUMN_NAME);
     g_object_set (G_OBJECT (render),
                   "wrap-mode", PANGO_WRAP_WORD,
                   "wrap-width", TEXT_WIDTH,
-                  "follow-prelit", TRUE,
-                  "follow-state", TRUE,
+                  //"follow-prelit", TRUE,
+                  //"follow-state", TRUE,
                   NULL);
 
     g_object_unref (G_OBJECT (filter));
diff --git a/xfce4-settings-manager/xfce-text-renderer.c b/xfce4-settings-manager/xfce-text-renderer.c
index d013a2e..65b521e 100644
--- a/xfce4-settings-manager/xfce-text-renderer.c
+++ b/xfce4-settings-manager/xfce-text-renderer.c
@@ -61,19 +61,11 @@ static void xfce_text_renderer_set_property (GObject               *object,
                                              guint                  prop_id,
                                              const GValue          *value,
                                              GParamSpec            *pspec);
-static void xfce_text_renderer_get_size     (GtkCellRenderer       *renderer,
-                                             GtkWidget             *widget,
-                                             GdkRectangle          *cell_area,
-                                             gint                  *x_offset,
-                                             gint                  *y_offset,
-                                             gint                  *width,
-                                             gint                  *height);
 static void xfce_text_renderer_render       (GtkCellRenderer       *renderer,
-                                             GdkWindow             *window,
+                                             cairo_t               *cr,
                                              GtkWidget             *widget,
-                                             GdkRectangle          *background_area,
-                                             GdkRectangle          *cell_area,
-                                             GdkRectangle          *expose_area,
+                                             const GdkRectangle    *background_area,
+                                             const GdkRectangle    *cell_area,
                                              GtkCellRendererState   flags);
 static void xfce_text_renderer_invalidate   (XfceTextRenderer      *text_renderer);
 static void xfce_text_renderer_set_widget   (XfceTextRenderer      *text_renderer,
@@ -123,7 +115,6 @@ xfce_text_renderer_class_init (XfceTextRendererClass *klass)
   gobject_class->set_property = xfce_text_renderer_set_property;
 
   gtkcell_renderer_class = GTK_CELL_RENDERER_CLASS (klass);
-  gtkcell_renderer_class->get_size = xfce_text_renderer_get_size;
   gtkcell_renderer_class->render = xfce_text_renderer_render;
 
   /**
@@ -315,80 +306,6 @@ xfce_text_renderer_set_property (GObject      *object,
 
 
 
-static void
-xfce_text_renderer_get_size (GtkCellRenderer *renderer,
-                             GtkWidget       *widget,
-                             GdkRectangle    *cell_area,
-                             gint            *x_offset,
-                             gint            *y_offset,
-                             gint            *width,
-                             gint            *height)
-{
-  XfceTextRenderer *text_renderer = XFCE_TEXT_RENDERER (renderer);
-  gint              text_length;
-  gint              text_width;
-  gint              text_height;
-
-  /* setup the new widget */
-  xfce_text_renderer_set_widget (text_renderer, widget);
-
-  /* we can guess the dimensions if we don't wrap */
-  if (text_renderer->wrap_width < 0)
-    {
-      /* determine the text_length in characters */
-      text_length = g_utf8_strlen (text_renderer->text, -1);
-
-      /* the approximation is usually 1-2 chars wrong, so wth */
-      text_length += 2;
-
-      /* calculate the appromixate text width/height */
-      text_width = text_renderer->char_width * text_length;
-      text_height = text_renderer->char_height;
-    }
-  else
-    {
-      /* calculate the real text dimension */
-      pango_layout_set_width (text_renderer->layout, text_renderer->wrap_width * PANGO_SCALE);
-      pango_layout_set_wrap (text_renderer->layout, text_renderer->wrap_mode);
-      pango_layout_set_text (text_renderer->layout, text_renderer->text, -1);
-      pango_layout_get_pixel_size (text_renderer->layout, &text_width, &text_height);
-    }
-
-  /* if we have to follow the state manually, we'll need
-   * to reserve some space to render the indicator to.
-   */
-  if (text_renderer->follow_state)
-    {
-      text_width += 2 * text_renderer->focus_width;
-      text_height += 2 * text_renderer->focus_width;
-    }
-
-  /* update width/height */
-  if (G_LIKELY (width != NULL))
-    *width = text_width + 2 * renderer->xpad;
-  if (G_LIKELY (height != NULL))
-    *height = text_height + 2 * renderer->ypad;
-
-  /* update the x/y offsets */
-  if (G_LIKELY (cell_area != NULL))
-    {
-      if (G_LIKELY (x_offset != NULL))
-        {
-          *x_offset = ((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) ? (1.0 - renderer->xalign) : renderer->xalign)
-                    * (cell_area->width - text_width - (2 * renderer->xpad));
-          *x_offset = MAX (*x_offset, 0);
-        }
-
-      if (G_LIKELY (y_offset != NULL))
-        {
-          *y_offset = renderer->yalign * (cell_area->height - text_height - (2 * renderer->ypad));
-          *y_offset = MAX (*y_offset, 0);
-        }
-    }
-}
-
-
-
 static PangoAttrList*
 xfce_pango_attr_list_wrap (PangoAttribute *attribute, ...)
 {
@@ -414,9 +331,6 @@ xfce_pango_attr_list_wrap (PangoAttribute *attribute, ...)
 
 
 
-
-
-
 /**
  * xfce_pango_attr_list_underline_single:
  *
@@ -439,40 +353,45 @@ xfce_pango_attr_list_underline_single (void)
 
 static void
 xfce_text_renderer_render (GtkCellRenderer     *renderer,
-                           GdkWindow           *window,
+                           cairo_t             *cr,
                            GtkWidget           *widget,
-                           GdkRectangle        *background_area,
-                           GdkRectangle        *cell_area,
-                           GdkRectangle        *expose_area,
+                           const GdkRectangle  *background_area,
+                           const GdkRectangle  *cell_area,
                            GtkCellRendererState flags)
 {
   XfceTextRenderer *text_renderer = XFCE_TEXT_RENDERER (renderer);
   GtkStateType      state;
-  cairo_t          *cr;
   gint              x0, x1, y0, y1;
   gint              text_width;
   gint              text_height;
   gint              x_offset;
   gint              y_offset;
+  gint              x_pad;
+  gint              y_pad;
+  gfloat            x_align;
+  gfloat            y_align;
+
+  GtkStyleContext  *ctx = gtk_widget_get_style_context (widget);
+  GdkRGBA          *color;
 
   /* setup the new widget */
   xfce_text_renderer_set_widget (text_renderer, widget);
 
   if ((flags & GTK_CELL_RENDERER_SELECTED) == GTK_CELL_RENDERER_SELECTED)
     {
-      if (GTK_WIDGET_HAS_FOCUS (widget))
+      if (gtk_widget_has_focus (widget))
         state = GTK_STATE_SELECTED;
       else
         state = GTK_STATE_ACTIVE;
     }
   else if ((flags & GTK_CELL_RENDERER_PRELIT) == GTK_CELL_RENDERER_PRELIT
-        && GTK_WIDGET_STATE (widget) == GTK_STATE_PRELIGHT)
+        && gtk_widget_get_state_flags (widget) & GTK_STATE_PRELIGHT)
     {
       state = GTK_STATE_PRELIGHT;
     }
   else
     {
-      if (GTK_WIDGET_STATE (widget) == GTK_STATE_INSENSITIVE)
+      if (gtk_widget_get_state_flags (widget) & GTK_STATE_INSENSITIVE)
         state = GTK_STATE_INSENSITIVE;
       else
         state = GTK_STATE_NORMAL;
@@ -508,13 +427,16 @@ xfce_text_renderer_render (GtkCellRenderer     *renderer,
       text_height += 2 * text_renderer->focus_width;
     }
 
+  gtk_cell_renderer_get_padding(renderer, &x_pad, &y_pad);
+  gtk_cell_renderer_get_alignment(renderer, &x_align, &y_align);
+
   /* calculate the real x-offset */
-  x_offset = ((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) ? (1.0 - renderer->xalign) : renderer->xalign)
-           * (cell_area->width - text_width - (2 * renderer->xpad));
+  x_offset = ((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) ? (1.0 - x_align) : x_align)
+           * (cell_area->width - text_width - (2 * x_pad));
   x_offset = MAX (x_offset, 0);
 
   /* calculate the real y-offset */
-  y_offset = renderer->yalign * (cell_area->height - text_height - (2 * renderer->ypad));
+  y_offset = y_align * (cell_area->height - text_height - (2 * y_pad));
   y_offset = MAX (y_offset, 0);
 
   /* render the state indicator */
@@ -526,10 +448,15 @@ xfce_text_renderer_render (GtkCellRenderer     *renderer,
       x1 = x0 + text_width;
       y1 = y0 + text_height;
 
+      /* get the color */
+      gtk_style_context_get (ctx,
+                             state,
+                             "background-color", &color,
+                             NULL);
+
       /* Cairo produces nicer results than using a polygon
        * and so we use it directly if possible.
        */
-      cr = gdk_cairo_create (window);
       cairo_move_to (cr, x0 + 5, y0);
       cairo_line_to (cr, x1 - 5, y0);
       cairo_curve_to (cr, x1 - 5, y0, x1, y0, x1, y0 + 5);
@@ -539,16 +466,15 @@ xfce_text_renderer_render (GtkCellRenderer     *renderer,
       cairo_curve_to (cr, x0 + 5, y1, x0, y1, x0, y1 - 5);
       cairo_line_to (cr, x0, y0 + 5);
       cairo_curve_to (cr, x0, y0 + 5, x0, y0, x0 + 5, y0);
-      gdk_cairo_set_source_color (cr, &widget->style->base[state]);
+      gdk_cairo_set_source_rgba (cr, color);
       cairo_fill (cr);
-      cairo_destroy (cr);
+      //cairo_destroy (cr);
     }
 
   /* draw the focus indicator */
   if (text_renderer->follow_state && (flags & GTK_CELL_RENDERER_FOCUSED) != 0)
     {
-      gtk_paint_focus (widget->style, window, GTK_WIDGET_STATE (widget), NULL, widget, "icon_view",
-                       cell_area->x + x_offset, cell_area->y + y_offset, text_width, text_height);
+      gtk_render_focus (ctx, cr, cell_area->x + x_offset, cell_area->y + y_offset, text_width, text_height);
     }
 
   /* get proper sizing for the layout drawing */
@@ -561,11 +487,10 @@ xfce_text_renderer_render (GtkCellRenderer     *renderer,
     }
 
   /* draw the text */
-  gtk_paint_layout (widget->style, window, state, TRUE,
-                    expose_area, widget, "cellrenderertext",
-                    cell_area->x + x_offset + renderer->xpad,
-                    cell_area->y + y_offset + renderer->ypad,
-                    text_renderer->layout);
+  gtk_render_layout (ctx, cr,
+                     cell_area->x + x_offset + x_pad,
+                     cell_area->y + y_offset + y_pad,
+                     text_renderer->layout);
 }
 
 
@@ -584,6 +509,7 @@ xfce_text_renderer_set_widget (XfceTextRenderer *text_renderer,
 {
   PangoFontMetrics *metrics;
   PangoContext     *context;
+  PangoFontDescription *desc;
   gint              focus_padding;
   gint              focus_line_width;
 
@@ -621,8 +547,10 @@ xfce_text_renderer_set_widget (XfceTextRenderer *text_renderer,
       /* we don't want to interpret line separators in file names */
       pango_layout_set_single_paragraph_mode (text_renderer->layout, TRUE);
 
+      desc = pango_context_get_font_description (context);
+
       /* calculate the average character dimensions */
-      metrics = pango_context_get_metrics (context, widget->style->font_desc, pango_context_get_language (context));
+      metrics = pango_context_get_metrics (context, desc, pango_context_get_language (context));
       text_renderer->char_width = PANGO_PIXELS (pango_font_metrics_get_approximate_char_width (metrics));
       text_renderer->char_height = PANGO_PIXELS (pango_font_metrics_get_ascent (metrics) + pango_font_metrics_get_descent (metrics));
       pango_font_metrics_unref (metrics);
@@ -653,4 +581,3 @@ xfce_text_renderer_new (void)
 {
   return g_object_new (XFCE_TYPE_TEXT_RENDERER, NULL);
 }
-
diff --git a/xfsettingsd/Makefile.am b/xfsettingsd/Makefile.am
index d5d1b8b..2d3ed9a 100644
--- a/xfsettingsd/Makefile.am
+++ b/xfsettingsd/Makefile.am
@@ -53,7 +53,13 @@ xfsettingsd_CFLAGS = \
 	$(LIBNOTIFY_CFLAGS) \
 	$(FONTCONFIG_CFLAGS) \
 	$(LIBINPUT_CFLAGS) \
-	$(PLATFORM_CFLAGS)
+	$(PLATFORM_CFLAGS) \
+    -DGTK_DISABLE_SINGLE_INCLUDES \
+    -DGDK_DISABLE_DEPRECATED \
+    -DGTK_DISABLE_DEPRECATED \
+    -DGSEAL_ENABLE \
+    -DGDK_PIXBUF_DISABLE_DEPRECATED \
+    -DG_DISABLE_DEPRECATED
 
 xfsettingsd_LDFLAGS = \
 	-no-undefined \
diff --git a/xfsettingsd/accessibility.c b/xfsettingsd/accessibility.c
index f79d130..247af80 100644
--- a/xfsettingsd/accessibility.c
+++ b/xfsettingsd/accessibility.c
@@ -118,7 +118,7 @@ xfce_accessibility_helper_init (XfceAccessibilityHelper *helper)
     helper->notification = NULL;
 #endif /* !HAVE_LIBNOTIFY */
 
-    if (XkbQueryExtension (GDK_DISPLAY (), &dummy, &dummy, &dummy, &dummy, &dummy))
+    if (XkbQueryExtension (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), &dummy, &dummy, &dummy, &dummy, &dummy))
     {
         /* open the channel */
         helper->channel = xfconf_channel_get ("accessibility");
@@ -135,7 +135,7 @@ xfce_accessibility_helper_init (XfceAccessibilityHelper *helper)
             g_critical ("Failed to connect to the notification daemon.");
 
         /* add event filter */
-        XkbSelectEvents (GDK_DISPLAY (), XkbUseCoreKbd, XkbControlsNotifyMask, XkbControlsNotifyMask);
+        XkbSelectEvents (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), XkbUseCoreKbd, XkbControlsNotifyMask, XkbControlsNotifyMask);
 
         /* monitor all window events */
         gdk_window_add_filter (NULL, xfce_accessibility_helper_event_filter, helper);
@@ -197,7 +197,7 @@ xfce_accessibility_helper_set_xkb (XfceAccessibilityHelper *helper,
             SET_FLAG (mask, XkbMouseKeysAccelMask);
 
         /* load the xkb controls into the structure */
-        XkbGetControls (GDK_DISPLAY (), mask, xkb);
+        XkbGetControls (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), mask, xkb);
 
         /* AccessXKeys */
         if (HAS_FLAG (mask, XkbAccessXKeysMask))
@@ -348,7 +348,7 @@ xfce_accessibility_helper_set_xkb (XfceAccessibilityHelper *helper,
         }
 
         /* set the modified controls */
-        if (!XkbSetControls (GDK_DISPLAY (), mask, xkb))
+        if (!XkbSetControls (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), mask, xkb))
             g_message ("Setting the xkb controls failed");
 
         /* free the structure */
diff --git a/xfsettingsd/clipboard-manager.c b/xfsettingsd/clipboard-manager.c
index 16246ef..ce7533f 100644
--- a/xfsettingsd/clipboard-manager.c
+++ b/xfsettingsd/clipboard-manager.c
@@ -868,19 +868,11 @@ clipboard_manager_watch_cb (GsdClipboardManager *manager,
         GdkDisplay *display;
 
         display = gdk_display_get_default ();
-#if GTK_CHECK_VERSION (2, 24, 0)
         gdkwin = gdk_x11_window_lookup_for_display (display, window);
-#else
-        gdkwin = gdk_window_lookup_for_display (display, window);
-#endif
 
         if (is_start) {
                 if (gdkwin == NULL) {
-#if GTK_CHECK_VERSION (2, 24, 0)
                         gdkwin = gdk_x11_window_foreign_new_for_display (display, window);
-#else
-                        gdkwin = gdk_window_foreign_new_for_display (display, window);
-#endif
                 } else {
                         g_object_ref (gdkwin);
                 }
diff --git a/xfsettingsd/keyboard-layout.c b/xfsettingsd/keyboard-layout.c
index 0c007e6..1ddc6bc 100644
--- a/xfsettingsd/keyboard-layout.c
+++ b/xfsettingsd/keyboard-layout.c
@@ -116,7 +116,7 @@ xfce_keyboard_layout_helper_init (XfceKeyboardLayoutHelper *helper)
     /* monitor channel changes */
     g_signal_connect (G_OBJECT (helper->channel), "property-changed", G_CALLBACK (xfce_keyboard_layout_helper_channel_property_changed), helper);
 
-    helper->engine = xkl_engine_get_instance (GDK_DISPLAY ());
+    helper->engine = xkl_engine_get_instance (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()));
     helper->config = xkl_config_rec_new ();
     xkl_config_rec_get_from_server (helper->config, helper->engine);
     helper->system_keyboard_model = g_strdup (helper->config->model);
diff --git a/xfsettingsd/keyboards.c b/xfsettingsd/keyboards.c
index e5c59de..2617105 100644
--- a/xfsettingsd/keyboards.c
+++ b/xfsettingsd/keyboards.c
@@ -182,7 +182,7 @@ xfce_keyboards_helper_set_auto_repeat_mode (XfceKeyboardsHelper *helper)
     values.auto_repeat_mode = repeat ? 1 : 0;
 
     gdk_error_trap_push ();
-    XChangeKeyboardControl (GDK_DISPLAY (), KBAutoRepeatMode, &values);
+    XChangeKeyboardControl (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), KBAutoRepeatMode, &values);
     if (gdk_error_trap_pop () != 0)
         g_critical ("Failed to change keyboard repeat mode");
 
@@ -208,14 +208,14 @@ xfce_keyboards_helper_set_repeat_rate (XfceKeyboardsHelper *helper)
     if (G_LIKELY (xkb))
     {
         /* load controls */
-        XkbGetControls (GDK_DISPLAY (), XkbRepeatKeysMask, xkb);
+        XkbGetControls (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), XkbRepeatKeysMask, xkb);
 
         /* set new values */
         xkb->ctrls->repeat_delay = delay;
         xkb->ctrls->repeat_interval = rate != 0 ? 1000 / rate : 0;
 
         /* set updated controls */
-        XkbSetControls (GDK_DISPLAY (), XkbRepeatKeysMask, xkb);
+        XkbSetControls (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), XkbRepeatKeysMask, xkb);
 
         xfsettings_dbg (XFSD_DEBUG_KEYBOARDS, "set key repeat (delay=%d, rate=%d)",
                         xkb->ctrls->repeat_delay, xkb->ctrls->repeat_interval);
@@ -327,7 +327,7 @@ xfce_keyboards_helper_device_is_keyboard (XID xid)
     XDeviceInfo *device_list;
     Atom         keyboard_type;
     gint         n, ndevices;
-    Display     *xdisplay = GDK_DISPLAY ();
+    Display     *xdisplay = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
 
     keyboard_type = XInternAtom (xdisplay, XI_KEYBOARD, True);
     device_list = XListInputDevices(xdisplay, &ndevices);
diff --git a/xfsettingsd/pointers.c b/xfsettingsd/pointers.c
index 78f8b28..dfa5683 100644
--- a/xfsettingsd/pointers.c
+++ b/xfsettingsd/pointers.c
@@ -281,7 +281,7 @@ static void
 xfce_pointers_helper_syndaemon_check (XfcePointersHelper *helper)
 {
 #ifdef DEVICE_PROPERTIES
-    Display     *xdisplay = GDK_DISPLAY ();
+    Display     *xdisplay = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
     XDeviceInfo *device_list;
     XDevice     *device;
     gint         n, ndevices;
@@ -926,7 +926,7 @@ static void
 xfce_pointers_helper_restore_devices (XfcePointersHelper *helper,
                                       XID                *xid)
 {
-    Display         *xdisplay = GDK_DISPLAY ();
+    Display         *xdisplay = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
     XDeviceInfo     *device_list, *device_info;
     gint             n, ndevices;
     XDevice         *device;
@@ -1040,7 +1040,7 @@ xfce_pointers_helper_channel_property_changed (XfconfChannel      *channel,
                                                const GValue       *value,
                                                XfcePointersHelper *helper)
 {
-    Display      *xdisplay = GDK_DISPLAY ();
+    Display      *xdisplay = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
     XDeviceInfo  *device_list, *device_info;
     XDevice      *device;
     gint          n, ndevices;
diff --git a/xfsettingsd/workspaces.c b/xfsettingsd/workspaces.c
index f1e6bc5..99d4ab2 100644
--- a/xfsettingsd/workspaces.c
+++ b/xfsettingsd/workspaces.c
@@ -461,9 +461,7 @@ xfce_workspaces_helper_wait_for_window_manager_destroyed (gpointer data)
   g_slice_free (WaitForWM, wfwm);
 
   /* set the names anyway... */
-  GDK_THREADS_ENTER ();
   xfce_workspaces_helper_set_names_real (helper);
-  GDK_THREADS_LEAVE ();
 }
 #endif
 
diff --git a/xfsettingsd/xsettings.c b/xfsettingsd/xsettings.c
index 7657465..383d932 100644
--- a/xfsettingsd/xsettings.c
+++ b/xfsettingsd/xsettings.c
@@ -394,7 +394,8 @@ xfce_xsettings_helper_prop_valid (const gchar  *prop_name,
     /* only accept properties in valid domains */
     if (!g_str_has_prefix (prop_name, "/Net/")
         && !g_str_has_prefix (prop_name, "/Xft/")
-        && !g_str_has_prefix (prop_name, "/Gtk/"))
+        && !g_str_has_prefix (prop_name, "/Gtk/")
+        && !g_str_has_prefix (prop_name, "/Gdk/"))
         return FALSE;
 
     /* notify if the property has an unsupported type */
@@ -1087,7 +1088,8 @@ xfce_xsettings_helper_register (XfceXSettingsHelper *helper,
 
     gdk_error_trap_push ();
 
-    n_screens = gdk_display_get_n_screens (gdkdisplay);
+    /* Previously, gdk_display_get_n_screens. Since Gtk 3.10, the number of screens is always 1. */
+    n_screens = 1;
     for (n = 0; n < n_screens; n++)
     {
         g_snprintf (atom_name, sizeof (atom_name), "_XSETTINGS_S%d", n);
diff --git a/xfsettingsd/xsettings.xml b/xfsettingsd/xsettings.xml
index 8f6ef3b..15e2202 100644
--- a/xfsettingsd/xsettings.xml
+++ b/xfsettingsd/xsettings.xml
@@ -43,4 +43,7 @@
     <property name="CursorThemeSize" type="int" value="0"/>
     <property name="DecorationLayout" type="string" value="menu:minimize,maximize,close"/>
   </property>
+  <property name="Gdk" type="empty">
+    <property name="WindowScalingFactor" type="uint" value="1"/>
+  </property>
 </channel>

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list