[Xfce4-commits] <xfburn:master> Merge branch 'zombie'

David Mohr noreply at xfce.org
Sun Apr 15 23:34:08 CEST 2012


Updating branch refs/heads/master
         to c55ec22991adba9f40a0124f4ab78ab650ea9235 (commit)
       from 6275feb512d461a16e46a79a130fd9183038f580 (commit)

commit c55ec22991adba9f40a0124f4ab78ab650ea9235
Merge: 6275feb 293d5f4
Author: David Mohr <david at mcbf.net>
Date:   Sun Apr 15 15:30:29 2012 -0600

    Merge branch 'zombie'

commit 293d5f48588de941b894c79b0bca5c5c41fb9431
Author: David Mohr <david at mcbf.net>
Date:   Sat Apr 14 23:17:39 2012 -0600

    Fixed compiler errors and warnings after applying the patches

commit 0e2bdafe39c15183b88a554b23df11d2429b5faa
Author: David Mohr <david at mcbf.net>
Date:   Sat Apr 14 13:24:58 2012 -0600

    Bugfix to build man pages

commit b6ff70b2e0b9c9786ec8b21f4c727de50f29808e
Author: David Mohr <david at mcbf.net>
Date:   Sat Apr 14 13:14:31 2012 -0600

    Applying patch by skunnyk: port to xfce4ui.
    
    [PATCH] Port xfburn to libxfce4ui (for master, based on bug 7355)

commit b6470e6407bc4a72ebe5957aa59e589b2fc02903
Author: David Mohr <david at mcbf.net>
Date:   Sat Apr 14 13:06:38 2012 -0600

    Applying skunnyk's patch.
    
    [PATCH] Port xfburn to gio/udev (based on  #7355)

 INSTALL                                           |  233 +++++++--
 configure.in.in                                   |   54 +--
 docs/Makefile.am                                  |    2 +-
 xfburn/Makefile.am                                |   27 +-
 xfburn/xfburn-audio-composition.c                 |   98 ++--
 xfburn/xfburn-audio-disc-usage.c                  |    1 -
 xfburn/xfburn-blank-dialog.c                      |   21 +-
 xfburn/xfburn-blank-dialog.h                      |    1 +
 xfburn/xfburn-burn-audio-cd-composition-dialog.c  |    8 +-
 xfburn/xfburn-burn-audio-cd-composition-dialog.h  |    2 +-
 xfburn/xfburn-burn-data-cd-composition-dialog.h   |    2 +-
 xfburn/xfburn-burn-data-composition-base-dialog.c |   10 +-
 xfburn/xfburn-burn-data-composition-base-dialog.h |    2 +-
 xfburn/xfburn-burn-data-dvd-composition-dialog.h  |    2 +-
 xfburn/xfburn-burn-image-dialog.c                 |   10 +-
 xfburn/xfburn-burn-image-dialog.h                 |    2 +-
 xfburn/xfburn-compositions-notebook.c             |    4 +-
 xfburn/xfburn-copy-cd-dialog.h                    |    2 +-
 xfburn/xfburn-copy-dvd-dialog.h                   |    2 +-
 xfburn/xfburn-data-composition.c                  |  146 +++---
 xfburn/xfburn-data-disc-usage.c                   |    1 -
 xfburn/xfburn-device-box.c                        |    5 -
 xfburn/xfburn-device-list.c                       |   69 +--
 xfburn/xfburn-device.c                            |   10 +-
 xfburn/xfburn-directory-browser.c                 |   62 +--
 xfburn/xfburn-disc-usage.c                        |    6 +-
 xfburn/xfburn-file-browser.c                      |    1 -
 xfburn/xfburn-fs-browser.c                        |    1 -
 xfburn/xfburn-hal-manager.c                       |  555 ---------------------
 xfburn/xfburn-hal-manager.h                       |   68 ---
 xfburn/xfburn-main-window.c                       |  126 +++---
 xfburn/xfburn-main.c                              |   42 +--
 xfburn/xfburn-perform-burn.h                      |    2 +-
 xfburn/xfburn-preferences-dialog.c                |   20 +-
 xfburn/xfburn-progress-dialog.c                   |    4 +-
 xfburn/xfburn-settings.h                          |    1 +
 xfburn/xfburn-transcoder-basic.c                  |    4 +-
 xfburn/xfburn-transcoder-gst.c                    |    1 -
 xfburn/xfburn-udev-manager.c                      |  527 +++++++++++++++++++
 xfburn/xfburn-udev-manager.h                      |   68 +++
 40 files changed, 1085 insertions(+), 1117 deletions(-)

diff --git a/INSTALL b/INSTALL
index 54caf7c..a1e89e1 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,13 +1,25 @@
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
-Foundation, Inc.
+Installation Instructions
+*************************
 
-   This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
+Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
+Inc.
+
+   Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.  This file is offered as-is,
+without warranty of any kind.
 
 Basic Installation
 ==================
 
-   These are generic installation instructions.
+   Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.  Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below.  The lack of an optional feature in a given package is not
+necessarily a bug.  More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
 
    The `configure' shell script attempts to guess correct values for
 various system-dependent variables used during compilation.  It uses
@@ -20,9 +32,9 @@ debugging `configure').
 
    It can also use an optional file (typically called `config.cache'
 and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  (Caching is
+the results of its tests to speed up reconfiguring.  Caching is
 disabled by default to prevent problems with accidental use of stale
-cache files.)
+cache files.
 
    If you need to do unusual things to compile the package, please try
 to figure out how `configure' could check whether to do them, and mail
@@ -32,30 +44,37 @@ some point `config.cache' contains results you don't want to keep, you
 may remove or edit it.
 
    The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You only need
-`configure.ac' if you want to change it or regenerate `configure' using
-a newer version of `autoconf'.
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
 
-The simplest way to compile this package is:
+   The simplest way to compile this package is:
 
   1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.  If you're
-     using `csh' on an old version of System V, you might need to type
-     `sh ./configure' instead to prevent `csh' from trying to execute
-     `configure' itself.
+     `./configure' to configure the package for your system.
 
-     Running `configure' takes awhile.  While running, it prints some
-     messages telling which features it is checking for.
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
 
   2. Type `make' to compile the package.
 
   3. Optionally, type `make check' to run any self-tests that come with
-     the package.
+     the package, generally using the just-built uninstalled binaries.
 
   4. Type `make install' to install the programs and any data files and
-     documentation.
-
-  5. You can remove the program binaries and object files from the
+     documentation.  When installing into a prefix owned by root, it is
+     recommended that the package be configured and built as a regular
+     user, and only the `make install' phase executed with root
+     privileges.
+
+  5. Optionally, type `make installcheck' to repeat any self-tests, but
+     this time using the binaries in their final installed location.
+     This target does not install anything.  Running this target as a
+     regular user, particularly if the prior `make install' required
+     root privileges, verifies that the installation completed
+     correctly.
+
+  6. You can remove the program binaries and object files from the
      source code directory by typing `make clean'.  To also remove the
      files that `configure' created (so you can compile the package for
      a different kind of computer), type `make distclean'.  There is
@@ -64,6 +83,16 @@ The simplest way to compile this package is:
      all sorts of other programs in order to regenerate files that came
      with the distribution.
 
+  7. Often, you can also type `make uninstall' to remove the installed
+     files again.  In practice, not all packages have tested that
+     uninstallation works correctly, even though it is required by the
+     GNU Coding Standards.
+
+  8. Some packages, particularly those that use Automake, provide `make
+     distcheck', which can by used by developers to test that all other
+     targets like `make install' and `make uninstall' work correctly.
+     This target is generally not run by end users.
+
 Compilers and Options
 =====================
 
@@ -75,7 +104,7 @@ for details on some of the pertinent environment variables.
 by setting variables in the command line or in the environment.  Here
 is an example:
 
-     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
 
    *Note Defining Variables::, for more details.
 
@@ -84,44 +113,89 @@ Compiling For Multiple Architectures
 
    You can compile the package for more than one kind of computer at the
 same time, by placing the object files for each architecture in their
-own directory.  To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+own directory.  To do this, you can use GNU `make'.  `cd' to the
 directory where you want the object files and executables to go and run
 the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
+source code in the directory that `configure' is in and in `..'.  This
+is known as a "VPATH" build.
 
-   If you have to use a `make' that does not support the `VPATH'
-variable, you have to compile the package for one architecture at a
-time in the source code directory.  After you have installed the
-package for one architecture, use `make distclean' before reconfiguring
-for another architecture.
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
 
 Installation Names
 ==================
 
-   By default, `make install' will install the package's files in
-`/usr/local/bin', `/usr/local/man', etc.  You can specify an
-installation prefix other than `/usr/local' by giving `configure' the
-option `--prefix=PATH'.
+   By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
 
    You can specify separate installation prefixes for
 architecture-specific files and architecture-independent files.  If you
-give `configure' the option `--exec-prefix=PATH', the package will use
-PATH as the prefix for installing programs and libraries.
-Documentation and other data files will still use the regular prefix.
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
 
    In addition, if you use an unusual directory layout you can give
-options like `--bindir=PATH' to specify different values for particular
+options like `--bindir=DIR' to specify different values for particular
 kinds of files.  Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
+you can set and what kinds of files go in them.  In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+   The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+   The first method involves providing an override variable for each
+affected directory.  For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'.  Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated.  The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+   The second method involves providing the `DESTDIR' variable.  For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names.  The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters.  On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
 
    If the package supports it, you can cause programs to be installed
 with an extra prefix or suffix on their names by giving `configure' the
 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
 
-Optional Features
-=================
-
    Some packages pay attention to `--enable-FEATURE' options to
 `configure', where FEATURE indicates an optional part of the package.
 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
@@ -134,6 +208,50 @@ find the X include and library files automatically, but if it doesn't,
 you can use the `configure' options `--x-includes=DIR' and
 `--x-libraries=DIR' to specify their locations.
 
+   Some packages offer the ability to configure how verbose the
+execution of `make' will be.  For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   HP-UX `make' updates targets which have the same time stamps as
+their prerequisites, which makes it generally unusable when shipped
+generated files such as `configure' are involved.  Use GNU `make'
+instead.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+   On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'.  It is recommended to use the following options:
+
+     ./configure --prefix=/boot/common
+
 Specifying the System Type
 ==========================
 
@@ -149,14 +267,15 @@ type, such as `sun4', or a canonical name which has the form:
 
 where SYSTEM can have one of these forms:
 
-     OS KERNEL-OS
+     OS
+     KERNEL-OS
 
    See the file `config.sub' for the possible values of each field.  If
 `config.sub' isn't included in this package, then this package doesn't
 need to know the machine type.
 
    If you are _building_ compiler tools for cross-compiling, you should
-use the `--target=TYPE' option to select the type of system they will
+use the option `--target=TYPE' to select the type of system they will
 produce code for.
 
    If you want to _use_ a cross compiler, that generates code for a
@@ -186,9 +305,14 @@ them in the `configure' command line, using `VAR=value'.  For example:
 
      ./configure CC=/usr/local2/bin/gcc
 
-will cause the specified gcc to be used as the C compiler (unless it is
+causes the specified `gcc' to be used as the C compiler (unless it is
 overridden in the site shell script).
 
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
 `configure' Invocation
 ======================
 
@@ -197,7 +321,14 @@ operates.
 
 `--help'
 `-h'
-     Print a summary of the options to `configure', and exit.
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
 
 `--version'
 `-V'
@@ -224,6 +355,16 @@ operates.
      Look for the package's source code in directory DIR.  Usually
      `configure' can determine that directory automatically.
 
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
 `configure' also accepts some other, not widely useful, options.  Run
 `configure --help' for more details.
 
diff --git a/configure.in.in b/configure.in.in
index 16d216c..59e36c8 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -2,14 +2,14 @@ dnl $Id$
 
 dnl Version information
 m4_define([xfburn_version_major], [0])
-m4_define([xfburn_version_minor], [4])
-m4_define([xfburn_version_micro], [3])
+m4_define([xfburn_version_minor], [5])
+m4_define([xfburn_version_micro], [0])
 m4_define([xfburn_version_build], [@REVISION@])
 m4_define([xfburn_version_tag], [])
 m4_define([xfburn_version], [xfburn_version_major().xfburn_version_minor().xfburn_version_micro()ifelse(xfburn_version_tag(), [git], [xfburn_version_tag()-xfburn_version_build()], [xfburn_version_tag()])])
 
 dnl Initialize autoconf
-AC_COPYRIGHT([Copyright (c) 2005-2008 Jean-François Wauthy <pollux at xfce.org>, David Mohr <david at mcbf.net>])
+AC_COPYRIGHT([Copyright (c) 2005-2008 Jean-François Wauthy <pollux at xfce.org>, 2008-2012 David Mohr <david at mcbf.net>])
 AC_INIT([xfburn], [xfburn_version], [xfburn at xfce.org])
 
 dnl Initialize automake
@@ -33,48 +33,14 @@ XDT_CHECK_PACKAGE([LIBBURN], [libburn-1], [0.4.2])
 XDT_CHECK_PACKAGE([LIBISOFS], [libisofs-1], [0.6.2])
 XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.6.0])
 XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.10.0])
-XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.4.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0])
 XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.4], [], [XDT_CHECK_PACKAGE([EXO], [exo-1], [0.3.100])])
-XDT_CHECK_OPTIONAL_PACKAGE([THUNAR_VFS], [thunar-vfs-1], [0.3.0], [thunar-vfs],
-	AC_HELP_STRING([--disable-thunar-vfs],
-			[Disable the use of Thunar's VFS layer to show mime type and icons in file browser]))
-AM_CONDITIONAL([HAVE_THUNAR_VFS], [test "x$THUNAR_VFS_FOUND" = "xyes"])
-
-dnl **********************************
-dnl *** Optional support for D-BUS ***
-dnl **********************************
-dnl (taken from thunar-0.8.0)
-XDT_CHECK_OPTIONAL_PACKAGE([DBUS], [dbus-glib-1],
-                           [0.34], [dbus], [D-BUS support])
-
-dnl ********************************
-dnl *** Check for HAL (optional) ***
-dnl ********************************
-dnl (taken from libexo's configure.in.in rev.26877)
-XDT_CHECK_OPTIONAL_PACKAGE([HAL], [hal-storage], [0.5.7], [hal], [HAL support], [yes])
-if test x"$HAL_FOUND" = x"yes"; then
-  dnl # substituted into exo-hal-0.3.pc
-  HAL_STORAGE_DEPENDENCY="hal-storage"
-
-  dnl # Check if LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRWDL is declared
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS $HAL_CFLAGS"
-  AC_MSG_CHECKING([whether LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRWDL is declared])
-  AC_COMPILE_IFELSE(AC_LANG_SOURCE(
-  [#include <libhal-storage.h>
-    int main (int argc, char **argv) { return LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRWDL; }
-  ]),
-  [
-    AC_DEFINE([HAVE_LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRWDL], [1], [Define if LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRWDL present])
-    AC_MSG_RESULT([yes])
-  ],
-  [
-    AC_MSG_RESULT([no])
-  ])
-  CFLAGS="$save_CFLAGS"
-fi
-AC_SUBST([HAL_STORAGE_DEPENDENCY])
-
+XDT_CHECK_PACKAGE([LIBGIO], [gio-2.0], [2.22.0])
+XDT_CHECK_PACKAGE([LIBGIOUNIX], [gio-unix-2.0], [2.16.0])
+dnl **************************************
+dnl *** Optional support for udev ***
+dnl **************************************
+XDT_CHECK_OPTIONAL_PACKAGE([GUDEV], [gudev-1.0], [145], [gudev], [UDEV glib support], [yes])
 dnl **************************************
 dnl *** Optional support for gstreamer ***
 dnl **************************************
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 76257bd..69e6bb2 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -6,7 +6,7 @@ man_MANS = 					\
 
 if MAINTAINER_MODE
 %.1: %.xml
-	xsltproc -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
+	xsltproc http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
 endif
 
 EXTRA_DIST =					\
diff --git a/xfburn/Makefile.am b/xfburn/Makefile.am
index e606f56..afaf322 100644
--- a/xfburn/Makefile.am
+++ b/xfburn/Makefile.am
@@ -28,7 +28,7 @@ xfburn_headers = 							\
 	xfburn-composition.h						\
 	xfburn-compositions-notebook.h					\
 	xfburn-create-iso-progress-dialog.h				\
-	xfburn-hal-manager.h						\
+	xfburn-udev-manager.h						\
 	xfburn-device-box.h						\
 	xfburn-device.h							\
 	xfburn-device-list.h						\
@@ -69,7 +69,7 @@ xfburn_SOURCES =							\
 	xfburn-composition.c						\
 	xfburn-compositions-notebook.c					\
 	xfburn-settings.c						\
-	xfburn-hal-manager.c						\
+	xfburn-udev-manager.c						\
 	xfburn-device-box.c						\
 	xfburn-device.c							\
 	xfburn-device-list.c						\
@@ -95,9 +95,13 @@ xfburn_CFLAGS =								\
 	$(GTHREAD_CFLAGS)						\
 	$(LIBBURN_CFLAGS)						\
 	$(LIBISOFS_CFLAGS)						\
-	$(LIBXFCEGUI4_CFLAGS)						\
+	$(LIBXFCE4UI_CFLAGS)						\
 	$(EXO_CFLAGS)							\
-	$(THUNAR_VFS_CFLAGS)						\
+	$(GIO_CFLAGS)							\
+	$(GIO_UNIX_CFLAGS)						\
+	$(GLIB_CFLAGS)							\
+	$(GTHREAD_CFLAGS)						\
+	$(GTK_CFLAGS)							\
 	$(GST_CFLAGS)							\
 	$(GST_PBUTILS_CFLAGS)
 
@@ -106,19 +110,22 @@ xfburn_LDADD = 								\
 	$(GTHREAD_LIBS)							\
 	$(LIBBURN_LIBS)							\
 	$(LIBISOFS_LIBS)						\
-	$(LIBXFCEGUI4_LIBS)						\
+	$(LIBXFCE4UI_LIBS)						\
 	$(EXO_LIBS)							\
-	$(THUNAR_VFS_LIBS)						\
+	$(GIO_LIBS)							\
+	$(GIO_UNIX_LIBS)						\
+	$(GLIB_LIBS)							\
+	$(GTHREAD_LIBS)							\
+	$(GTK_LIBS)							\
 	$(GST_LIBS)							\
 	$(GST_PBUTILS_LIBS)
 
-if HAVE_HAL
+if HAVE_GUDEV
 xfburn_CFLAGS +=							\
-	$(HAL_CFLAGS)
+	$(GUDEV_CFLAGS)
 
 xfburn_LDADD += 							\
-	$(HAL_LIBS)
-	$(HAL_DBUS_LIBS)
+	$(GUDEV_LIBS)
 
 endif
 
diff --git a/xfburn/xfburn-audio-composition.c b/xfburn/xfburn-audio-composition.c
index 4e9ceae..f34ed4a 100644
--- a/xfburn/xfburn-audio-composition.c
+++ b/xfburn/xfburn-audio-composition.c
@@ -32,11 +32,9 @@
 
 #include <gtk/gtk.h>
 #include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 
-#ifdef HAVE_THUNAR_VFS
-#include <thunar-vfs/thunar-vfs.h>
-#endif
+#include <gio/gio.h>
 
 #include <exo/exo.h>
 
@@ -579,7 +577,7 @@ cb_begin_burn (XfburnDiscUsage * du, XfburnAudioComposition * dc)
     dialog = xfburn_burn_audio_cd_composition_dialog_new (src);
     break;
   case DVD_DISC:
-    xfce_err (_("Cannot burn audio onto a DVD."));
+    xfce_dialog_show_error (NULL, NULL, _("Cannot burn audio onto a DVD."));
     return;
     break;
   }
@@ -1023,7 +1021,7 @@ action_info (GtkAction * action, XfburnAudioComposition * dc)
 {
   XfburnAudioCompositionPrivate *priv = XFBURN_AUDIO_COMPOSITION_GET_PRIVATE (dc);
   
-  xfce_info (xfburn_transcoder_get_description (priv->trans));
+  xfce_dialog_show_info(NULL, NULL, "%s", xfburn_transcoder_get_description (priv->trans));
 }
 
 static void
@@ -1064,6 +1062,7 @@ static void
 set_modified (XfburnAudioCompositionPrivate *priv)
 {
   if (!(priv->modified)) {
+    /*
     XfburnMainWindow *mainwin;
     GtkUIManager *ui_manager;
     GtkActionGroup *action_group;
@@ -1073,7 +1072,6 @@ set_modified (XfburnAudioCompositionPrivate *priv)
   
     action_group = (GtkActionGroup *) gtk_ui_manager_get_action_groups (ui_manager)->data;
     
-    /*
     action = gtk_action_group_get_action (action_group, "save-composition");
     gtk_action_set_sensitive (GTK_ACTION (action), TRUE);
   */
@@ -1091,14 +1089,14 @@ notify_not_adding (XfburnAudioComposition * dc, GError *error)
   g_assert (error != NULL);
 
   if (error->domain != XFBURN_ERROR) {
-    xfce_warn (error->message);
+    xfce_dialog_show_warning(NULL, NULL, "%s", error->message);
     return;
   }
 
   if (g_hash_table_lookup (priv->warned_about, GINT_TO_POINTER (error->code)) == NULL) {
     g_hash_table_insert (priv->warned_about, GINT_TO_POINTER (error->code), did_warn);
 
-    xfce_warn (error->message);
+    xfce_dialog_show_warning(NULL, NULL, "%s", error->message);
   }
 }
 
@@ -1143,7 +1141,7 @@ thread_add_file_to_list_with_name (const gchar *name, XfburnAudioComposition * d
     
     gdk_threads_enter ();
     if (file_exists_on_same_level (model, tree_path, FALSE, name)) {
-      xfce_err (_("A file with the same name is already present in the composition."));
+      xfce_dialog_show_error (NULL, NULL, _("A file with the same name is already present in the composition."));
 
       gtk_tree_path_free (tree_path);
       gdk_threads_leave ();
@@ -1227,7 +1225,7 @@ thread_add_file_to_list_with_name (const gchar *name, XfburnAudioComposition * d
         if (g_hash_table_lookup (priv->warned_about, GINT_TO_POINTER (err_code)) == NULL) {
           g_hash_table_insert (priv->warned_about, GINT_TO_POINTER (err_code), did_warn);
           gdk_threads_enter ();
-          xfce_err (_("You can only have a maximum of 99 tracks."));
+          xfce_dialog_show_error (NULL, NULL, _("You can only have a maximum of 99 tracks."));
           gdk_threads_leave ();
         }
 
@@ -1477,7 +1475,7 @@ copy_entry_to (XfburnAudioComposition *dc, GtkTreeIter *src, GtkTreeIter *dest,
     
       /*
       if (file_exists_on_same_level (model, path_level, FALSE, name)) {
-        xfce_warn (_("A file named \"%s\" already exists in this directory, the file hasn't been added."), name);
+        xfce_dialog_warning(NULL, _("A file named \"%s\" already exists in this directory, the file hasn't been added."), name);
         goto cleanup;
       }
       */
@@ -1712,26 +1710,6 @@ cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guin
       for (i=0; files[i] != NULL && files[i][0] != '\0'; i++) {
         gchar *full_path;
 
-#ifdef HAVE_THUNAR_VFS
-        ThunarVfsPath *vfs_path;
-        GError *vfs_error = NULL;
-
-        vfs_path = thunar_vfs_path_new (files[i], &vfs_error);
-
-        if (vfs_error) {
-          g_warning ("Failed to create vfs path for '%s': %s", files[i], vfs_error->message);
-          g_error_free (vfs_error);
-          continue;
-        }
-
-        if (thunar_vfs_path_get_scheme (vfs_path) != THUNAR_VFS_PATH_SCHEME_FILE)
-          continue;
-        full_path = thunar_vfs_path_dup_string (vfs_path);
-
-        thunar_vfs_path_unref (vfs_path);
-
-#else /* no thunar-vfs */
-
         if (g_str_has_prefix (files[i], "file://"))
           full_path = g_build_filename (&files[i][7], NULL);
         else if (g_str_has_prefix (files[i], "file:"))
@@ -1741,7 +1719,8 @@ cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guin
 
         if (full_path[strlen (full_path) - 1] == '\r')
           full_path[strlen (full_path) - 1] = '\0';
-#endif
+
+        DBG ("Adding path '%s'", full_path);
 
         /* remember path to add it later in another thread */
         priv->full_paths_to_add = g_list_append (priv->full_paths_to_add, full_path);
@@ -1786,29 +1765,46 @@ cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guin
     }
   } 
   else if (sd->target == gdk_atom_intern ("text/uri-list", FALSE)) {
-#ifdef HAVE_THUNAR_VFS
     GList *vfs_paths = NULL;
     GList *vfs_path;
-    GError *error = NULL;
+    GList *lp;
     gchar *full_path;
+    gchar **uris;
+    gsize   n;
     gboolean ret = FALSE;
 
-    vfs_paths = thunar_vfs_path_list_from_string ((gchar *) sd->data, &error);
+    uris = g_uri_list_extract_uris ((gchar *) sd->data);
+
+    for (n = 0; uris != NULL && uris[n] != NULL; ++n)
+      vfs_paths = g_list_append (vfs_paths, g_file_new_for_uri (uris[n]));
+
+    g_strfreev (uris);
 
     if (G_LIKELY (vfs_paths != NULL)) {
       ThreadAddFilesDragParams *params;
       priv->full_paths_to_add = NULL;
       for (vfs_path = vfs_paths; vfs_path != NULL; vfs_path = g_list_next (vfs_path)) {
-        ThunarVfsPath *path = THUNAR_VFS_PATH (vfs_path->data);
-        if (thunar_vfs_path_get_scheme (path) != THUNAR_VFS_PATH_SCHEME_FILE)
+	GFile *path = vfs_path->data;
+	if (path == NULL)
           continue;
-        full_path = thunar_vfs_path_dup_string (path);
+	/* unable to handle non-local files */
+	if (G_UNLIKELY (!g_file_has_uri_scheme (path, "file"))) {
+            g_object_unref (path);
+	    continue;
+        }
+        full_path = g_file_get_path (path);
+        /* if there is no local path, use the URI (which always works) */
+        if (full_path == NULL)
+            full_path = g_file_get_uri (path);
+        /* release the location */
         g_debug ("adding uri path: %s", full_path);
-
         priv->full_paths_to_add = g_list_prepend (priv->full_paths_to_add, full_path);
         ret = TRUE;
       }
-      thunar_vfs_path_list_free (vfs_paths);
+
+      for (lp = vfs_paths; lp != NULL; lp = lp->next)
+        g_object_unref (lp->data);
+      g_list_free (vfs_paths);
 
       priv->full_paths_to_add = g_list_reverse (priv->full_paths_to_add);
       priv->path_where_insert = path_where_insert;
@@ -1831,18 +1827,10 @@ cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guin
         cb_adding_done (XFBURN_ADDING_PROGRESS (priv->progress), composition);
       }
     } else {
-      if (G_UNLIKELY (error != NULL))
-        g_warning ("text/uri-list drag failed because '%s'", error->message);
-      else
-        g_warning("There were no files in the uri list!");
+      g_warning("There were no files in the uri list!");
       gtk_drag_finish (dc, FALSE, FALSE, t);
       xfburn_default_cursor (priv->content);
     }
-#else
-    g_warning ("Receiving this type of drag and drop requires thunar-vfs support, sorry!");
-    gtk_drag_finish (dc, FALSE, FALSE, t);
-    xfburn_default_cursor (priv->content);
-#endif
   } 
   else {
     g_warning ("Trying to receive an unsupported drag target, this should not happen.");
@@ -1906,6 +1894,7 @@ typedef struct
   GQueue *queue_iter;
 } LoadParserStruct;
 
+/*
 static gint
 _find_attribute (const gchar ** attribute_names, const gchar * attr)
 {
@@ -1918,16 +1907,19 @@ _find_attribute (const gchar ** attribute_names, const gchar * attr)
 
   return -1;
 }
+*/
 
 static void
 load_composition_start (GMarkupParseContext * context, const gchar * element_name,
                         const gchar ** attribute_names, const gchar ** attribute_values,
                         gpointer data, GError ** error)
 {
+      g_error ("This method needs to get fixed, and does not work right now!");
+  
+      /*
   LoadParserStruct * parserinfo = (LoadParserStruct *) data;
   XfburnAudioCompositionPrivate *priv = XFBURN_AUDIO_COMPOSITION_GET_PRIVATE (parserinfo->dc);
 
-  
   if (!(parserinfo->started) && !strcmp (element_name, "xfburn-composition"))
     parserinfo->started = TRUE;
   else if (!(parserinfo->started))
@@ -1945,11 +1937,8 @@ load_composition_start (GMarkupParseContext * context, const gchar * element_nam
       model = gtk_tree_view_get_model (GTK_TREE_VIEW (priv->content));
       parent = g_queue_peek_head (parserinfo->queue_iter);
           
-      g_error ("This method needs to get fixed, and does not work right now!");
-      /*
       add_file_to_list_with_name (attribute_values[i], parserinfo->dc, model, attribute_values[j], &iter, 
                                   parent, GTK_TREE_VIEW_DROP_INTO_OR_AFTER);
-      */
     }
   } else if (!strcmp (element_name, "directory")) {
     int i, j;
@@ -1964,6 +1953,7 @@ load_composition_start (GMarkupParseContext * context, const gchar * element_nam
       //add_directory_to_list (attribute_values[i], parserinfo->dc, model, attribute_values[j], &iter, parent);    
     }
   }
+      */
 }
 
 static void
diff --git a/xfburn/xfburn-audio-disc-usage.c b/xfburn/xfburn-audio-disc-usage.c
index aaff765..3ee1260 100644
--- a/xfburn/xfburn-audio-disc-usage.c
+++ b/xfburn/xfburn-audio-disc-usage.c
@@ -22,7 +22,6 @@
 
 #include <gtk/gtk.h>
 #include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
 
 #include "xfburn-disc-usage.h"
 #include "xfburn-audio-disc-usage.h"
diff --git a/xfburn/xfburn-blank-dialog.c b/xfburn/xfburn-blank-dialog.c
index 4fe4eca..638770d 100644
--- a/xfburn/xfburn-blank-dialog.c
+++ b/xfburn/xfburn-blank-dialog.c
@@ -20,7 +20,7 @@
 #include <config.h>
 #endif /* !HAVE_CONFIG_H */
 
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 
 #include <libburn.h>
 
@@ -30,7 +30,7 @@
 #include "xfburn-device-box.h"
 #include "xfburn-device-list.h"
 #include "xfburn-stock.h"
-#include "xfburn-hal-manager.h"
+#include "xfburn-udev-manager.h"
 #include "xfburn-main.h"
 
 #include "xfburn-blank-dialog.h"
@@ -206,7 +206,7 @@ xfburn_blank_dialog_init (XfburnBlankDialog * obj)
   g_signal_connect (G_OBJECT (priv->device_box), "volume-changed", G_CALLBACK (cb_volume_changed), obj);
   gtk_widget_show (priv->device_box);
 
-  frame = xfce_create_framebox_with_content (_("Burning device"), priv->device_box);
+  frame = xfce_gtk_frame_box_new_with_content (_("Burning device"), priv->device_box);
   gtk_widget_show (frame);
   gtk_box_pack_start (box, frame, FALSE, FALSE, BORDER);
 
@@ -219,7 +219,7 @@ xfburn_blank_dialog_init (XfburnBlankDialog * obj)
   gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (priv->combo_type), cell, "text", BLANK_COMBO_NAME_COLUMN, NULL);
   gtk_widget_show (priv->combo_type);
 
-  frame = xfce_create_framebox_with_content (_("Blank mode"), priv->combo_type);
+  frame = xfce_gtk_frame_box_new_with_content (_("Blank mode"), priv->combo_type);
   gtk_widget_show (frame);
   gtk_box_pack_start (box, frame, FALSE, FALSE, BORDER);
 
@@ -227,7 +227,7 @@ xfburn_blank_dialog_init (XfburnBlankDialog * obj)
   vbox = gtk_vbox_new (FALSE, 0);
   gtk_widget_show (vbox);
 
-  frame = xfce_create_framebox_with_content (_("Options"), vbox);
+  frame = xfce_gtk_frame_box_new_with_content (_("Options"), vbox);
   gtk_widget_show (frame);
   gtk_box_pack_start (box, frame, FALSE, FALSE, BORDER);
 
@@ -241,7 +241,7 @@ xfburn_blank_dialog_init (XfburnBlankDialog * obj)
   gtk_widget_show (button);
   gtk_dialog_add_action_widget (GTK_DIALOG (obj), button, GTK_RESPONSE_CANCEL);
 
-  button = xfce_create_mixed_button ("xfburn-blank-cdrw", _("_Blank"));
+  button = xfce_gtk_button_new_mixed ("xfburn-blank-cdrw", _("_Blank"));
   gtk_widget_show (button);
   gtk_dialog_add_action_widget (GTK_DIALOG (obj), button, GTK_RESPONSE_OK);
   GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@@ -327,6 +327,7 @@ thread_blank_perform_blank (ThreadBlankParams * params, struct burn_drive_info *
 
   struct burn_drive *drive;
   enum burn_disc_status disc_state;
+  enum burn_drive_status drive_state;
   struct burn_progress progress;
 
   int ret;
@@ -412,8 +413,8 @@ thread_blank_perform_blank (ThreadBlankParams * params, struct burn_drive_info *
 
   xfburn_progress_dialog_set_status_with_text (XFBURN_PROGRESS_DIALOG (dialog_progress), XFBURN_PROGRESS_DIALOG_STATUS_RUNNING, _("Blanking disc..."));
 
-  while ((disc_state = burn_drive_get_status (drive, &progress)) != BURN_DRIVE_IDLE) {
-    //DBG ("disc_state = %d", disc_state);
+  while ((drive_state = burn_drive_get_status (drive, &progress)) != BURN_DRIVE_IDLE) {
+    //DBG ("drive_state = %d", drive_state);
     if(progress.sectors>0 && progress.sector>=0) {
       gdouble percent = 1.0 + ((gdouble) progress.sector+1.0) / ((gdouble) progress.sectors) * 98.0;
       
@@ -465,10 +466,10 @@ thread_blank (ThreadBlankParams * params)
  
   g_free (params);
 
-#ifdef HAVE_HAL
+#ifdef HAVE_GUDEV
   gdk_threads_enter ();
   DBG ("blanking done!");
-  xfburn_hal_manager_send_volume_changed ();
+  xfburn_udev_manager_send_volume_changed ();
   gdk_threads_leave ();
 #endif
 }
diff --git a/xfburn/xfburn-blank-dialog.h b/xfburn/xfburn-blank-dialog.h
index e4cb246..7d7191d 100644
--- a/xfburn/xfburn-blank-dialog.h
+++ b/xfburn/xfburn-blank-dialog.h
@@ -26,6 +26,7 @@
 #include "xfburn-global.h"
 
 #include <gtk/gtk.h>
+#include <libxfce4ui/libxfce4ui.h>
 
 G_BEGIN_DECLS
 
diff --git a/xfburn/xfburn-burn-audio-cd-composition-dialog.c b/xfburn/xfburn-burn-audio-cd-composition-dialog.c
index b015703..c8ce193 100644
--- a/xfburn/xfburn-burn-audio-cd-composition-dialog.c
+++ b/xfburn/xfburn-burn-audio-cd-composition-dialog.c
@@ -156,7 +156,7 @@ xfburn_burn_audio_cd_composition_dialog_constructor (GType type, guint n_constru
   g_signal_connect (G_OBJECT (priv->device_box), "volume-changed", G_CALLBACK (cb_volume_changed), obj);
   gtk_widget_show (priv->device_box);
 
-  priv->frame_device = xfce_create_framebox_with_content (_("Burning device"), priv->device_box);
+  priv->frame_device = xfce_gtk_frame_box_new_with_content (_("Burning device"), priv->device_box);
   gtk_widget_show (priv->frame_device);
   gtk_box_pack_start (box, priv->frame_device, FALSE, FALSE, BORDER);
 
@@ -168,7 +168,7 @@ xfburn_burn_audio_cd_composition_dialog_constructor (GType type, guint n_constru
     vbox = gtk_vbox_new (FALSE, 0);
     gtk_widget_show (vbox);
 
-    frame = xfce_create_framebox_with_content (_("Composition name"), vbox);
+    frame = xfce_gtk_frame_box_new_with_content (_("Composition name"), vbox);
     gtk_widget_show (frame);
     gtk_box_pack_start (box, frame, FALSE, FALSE, BORDER);
 
@@ -190,7 +190,7 @@ xfburn_burn_audio_cd_composition_dialog_constructor (GType type, guint n_constru
   vbox = gtk_vbox_new (FALSE, 0);
   gtk_widget_show (vbox);
 
-  frame = xfce_create_framebox_with_content (_("Options"), vbox);
+  frame = xfce_gtk_frame_box_new_with_content (_("Options"), vbox);
   gtk_widget_show (frame);
   gtk_box_pack_start (box, frame, FALSE, FALSE, BORDER);
 
@@ -218,7 +218,7 @@ xfburn_burn_audio_cd_composition_dialog_constructor (GType type, guint n_constru
   gtk_widget_show (button);
   gtk_dialog_add_action_widget (GTK_DIALOG (obj), button, GTK_RESPONSE_CANCEL);
 
-  priv->button_proceed = button = xfce_create_mixed_button ("xfburn-burn-cd", _("_Burn Composition"));
+  priv->button_proceed = button = xfce_gtk_button_new_mixed ("xfburn-burn-cd", _("_Burn Composition"));
 
   gtk_widget_show (button);
   gtk_dialog_add_action_widget (GTK_DIALOG (obj), button, GTK_RESPONSE_OK);
diff --git a/xfburn/xfburn-burn-audio-cd-composition-dialog.h b/xfburn/xfburn-burn-audio-cd-composition-dialog.h
index 495d095..6083e8d 100644
--- a/xfburn/xfburn-burn-audio-cd-composition-dialog.h
+++ b/xfburn/xfburn-burn-audio-cd-composition-dialog.h
@@ -24,7 +24,7 @@
 #endif /* !HAVE_CONFIG_H */
 
 #include <gtk/gtk.h>
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 
 #include <libisofs.h>
 
diff --git a/xfburn/xfburn-burn-data-cd-composition-dialog.h b/xfburn/xfburn-burn-data-cd-composition-dialog.h
index 10f1b56..723aa41 100644
--- a/xfburn/xfburn-burn-data-cd-composition-dialog.h
+++ b/xfburn/xfburn-burn-data-cd-composition-dialog.h
@@ -24,7 +24,7 @@
 #endif /* !HAVE_CONFIG_H */
 
 #include <gtk/gtk.h>
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 
 #include <libisofs.h>
 #include "xfburn-burn-data-composition-base-dialog.h"
diff --git a/xfburn/xfburn-burn-data-composition-base-dialog.c b/xfburn/xfburn-burn-data-composition-base-dialog.c
index e05a9b9..ab11281 100644
--- a/xfburn/xfburn-burn-data-composition-base-dialog.c
+++ b/xfburn/xfburn-burn-data-composition-base-dialog.c
@@ -192,7 +192,7 @@ xfburn_burn_data_composition_base_dialog_constructor (GType type, guint n_constr
 
   g_signal_connect (G_OBJECT (priv->device_box), "volume-changed", G_CALLBACK (cb_volume_changed), obj);
 
-  priv->frame_device = xfce_create_framebox_with_content (_("Burning device"), priv->device_box);
+  priv->frame_device = xfce_gtk_frame_box_new_with_content (_("Burning device"), priv->device_box);
   gtk_widget_show (priv->frame_device);
   gtk_box_pack_start (box, priv->frame_device, FALSE, FALSE, BORDER);
 
@@ -203,7 +203,7 @@ xfburn_burn_data_composition_base_dialog_constructor (GType type, guint n_constr
     vbox = gtk_vbox_new (FALSE, 0);
     gtk_widget_show (vbox);
 
-    frame = xfce_create_framebox_with_content (_("Composition name"), vbox);
+    frame = xfce_gtk_frame_box_new_with_content (_("Composition name"), vbox);
     gtk_widget_show (frame);
     gtk_box_pack_start (box, frame, FALSE, FALSE, BORDER);
 
@@ -224,7 +224,7 @@ xfburn_burn_data_composition_base_dialog_constructor (GType type, guint n_constr
   vbox = gtk_vbox_new (FALSE, 0);
   gtk_widget_show (vbox);
 
-  frame = xfce_create_framebox_with_content (_("Options"), vbox);
+  frame = xfce_gtk_frame_box_new_with_content (_("Options"), vbox);
   gtk_widget_show (frame);
   gtk_box_pack_start (box, frame, FALSE, FALSE, BORDER);
 
@@ -280,7 +280,7 @@ xfburn_burn_data_composition_base_dialog_constructor (GType type, guint n_constr
   gtk_widget_show (button);
   gtk_dialog_add_action_widget (GTK_DIALOG (obj), button, GTK_RESPONSE_CANCEL);
 
-  priv->button_proceed = button = xfce_create_mixed_button ("xfburn-burn-cd", _("_Burn Composition"));
+  priv->button_proceed = button = xfce_gtk_button_new_mixed ("xfburn-burn-cd", _("_Burn Composition"));
   /*
    * Disabled: change button_proceed functionality
   button = create_proceed_button (obj, "xfburn-burn-cd", "");
@@ -650,7 +650,7 @@ cb_dialog_response (XfburnBurnDataCompositionBaseDialog * dialog, gint response_
 
     if (iso_image_create_burn_source (priv->image, write_opts, &src) < 0) {
       /* could not create source */
-      xfce_err (_("Could not create ISO source structure."));
+      xfce_dialog_show_error (NULL, NULL, _("Could not create ISO source structure."));
       return;
     }
 
diff --git a/xfburn/xfburn-burn-data-composition-base-dialog.h b/xfburn/xfburn-burn-data-composition-base-dialog.h
index 82260e0..4380daa 100644
--- a/xfburn/xfburn-burn-data-composition-base-dialog.h
+++ b/xfburn/xfburn-burn-data-composition-base-dialog.h
@@ -24,7 +24,7 @@
 #endif /* !HAVE_CONFIG_H */
 
 #include <gtk/gtk.h>
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 
 #include <libisofs.h>
 
diff --git a/xfburn/xfburn-burn-data-dvd-composition-dialog.h b/xfburn/xfburn-burn-data-dvd-composition-dialog.h
index 9c4c0d6..263b9a1 100644
--- a/xfburn/xfburn-burn-data-dvd-composition-dialog.h
+++ b/xfburn/xfburn-burn-data-dvd-composition-dialog.h
@@ -24,7 +24,7 @@
 #endif /* !HAVE_CONFIG_H */
 
 #include <gtk/gtk.h>
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 
 #include <libisofs.h>
 #include "xfburn-burn-data-composition-base-dialog.h"
diff --git a/xfburn/xfburn-burn-image-dialog.c b/xfburn/xfburn-burn-image-dialog.c
index 2a78ad3..f14dc93 100644
--- a/xfburn/xfburn-burn-image-dialog.c
+++ b/xfburn/xfburn-burn-image-dialog.c
@@ -173,7 +173,7 @@ xfburn_burn_image_dialog_init (XfburnBurnImageDialog * obj)
   gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (priv->chooser_image), filter);
   gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (priv->chooser_image), filter);
 
-  frame = xfce_create_framebox_with_content (_("Image to burn"), priv->chooser_image);
+  frame = xfce_gtk_frame_box_new_with_content (_("Image to burn"), priv->chooser_image);
   gtk_widget_show (frame);
   gtk_box_pack_start (box, frame, FALSE, FALSE, BORDER);
   
@@ -188,7 +188,7 @@ xfburn_burn_image_dialog_init (XfburnBurnImageDialog * obj)
   priv->device_box = xfburn_device_box_new (SHOW_CD_WRITERS | SHOW_CDRW_WRITERS | SHOW_DVD_WRITERS | SHOW_MODE_SELECTION | SHOW_SPEED_SELECTION);
   gtk_widget_show (priv->device_box);
   
-  frame = xfce_create_framebox_with_content (_("Burning device"), priv->device_box);
+  frame = xfce_gtk_frame_box_new_with_content (_("Burning device"), priv->device_box);
   gtk_widget_show (frame);
   gtk_box_pack_start (box, frame, FALSE, FALSE, BORDER);
 
@@ -196,7 +196,7 @@ xfburn_burn_image_dialog_init (XfburnBurnImageDialog * obj)
   vbox = gtk_vbox_new (FALSE, 0);
   gtk_widget_show (vbox);
 
-  frame = xfce_create_framebox_with_content (_("Options"), vbox);
+  frame = xfce_gtk_frame_box_new_with_content (_("Options"), vbox);
   gtk_widget_show (frame);
   gtk_box_pack_start (box, frame, FALSE, FALSE, BORDER);
 
@@ -219,7 +219,7 @@ xfburn_burn_image_dialog_init (XfburnBurnImageDialog * obj)
   gtk_widget_show (button);
   gtk_dialog_add_action_widget (GTK_DIALOG (obj), button, GTK_RESPONSE_CANCEL);
 
-  priv->burn_button = xfce_create_mixed_button ("xfburn-burn-cd", _("_Burn image"));
+  priv->burn_button = xfce_gtk_button_new_mixed ("xfburn-burn-cd", _("_Burn image"));
   gtk_widget_show (priv->burn_button);
   g_signal_connect (G_OBJECT (priv->burn_button), "clicked", G_CALLBACK (cb_clicked_ok), obj);
   gtk_container_add (GTK_CONTAINER( GTK_DIALOG(obj)->action_area), priv->burn_button);
@@ -400,7 +400,7 @@ thread_burn_iso (ThreadBurnIsoParams * params)
 void
 burn_image_dialog_error (XfburnBurnImageDialog * dialog, const gchar * msg_error)
 {
-  xfce_err (msg_error);
+  xfce_dialog_show_error (NULL, NULL, "%s", msg_error); 
 }
 
 static void
diff --git a/xfburn/xfburn-burn-image-dialog.h b/xfburn/xfburn-burn-image-dialog.h
index d08073a..570bf6b 100644
--- a/xfburn/xfburn-burn-image-dialog.h
+++ b/xfburn/xfburn-burn-image-dialog.h
@@ -25,7 +25,7 @@
 
 #include <gtk/gtk.h>
 
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 
 #include "xfburn-global.h"
 
diff --git a/xfburn/xfburn-compositions-notebook.c b/xfburn/xfburn-compositions-notebook.c
index 8830723..e3f2389 100644
--- a/xfburn/xfburn-compositions-notebook.c
+++ b/xfburn/xfburn-compositions-notebook.c
@@ -146,10 +146,10 @@ cb_composition_close (XfburnNotebookTab *tab, GtkNotebook *notebook)
 static void
 cb_composition_name_changed (XfburnComposition *composition, const gchar * name, XfburnCompositionsNotebook *notebook)
 {
-  guint page_num;
+  //guint page_num;
   GtkWidget *tab, *menu_label;
   
-  page_num = gtk_notebook_page_num (GTK_NOTEBOOK (notebook), GTK_WIDGET (composition));
+  //page_num = gtk_notebook_page_num (GTK_NOTEBOOK (notebook), GTK_WIDGET (composition));
   
   tab = gtk_notebook_get_tab_label (GTK_NOTEBOOK (notebook), GTK_WIDGET (composition));
   xfburn_notebook_tab_set_label (XFBURN_NOTEBOOK_TAB (tab), name);
diff --git a/xfburn/xfburn-copy-cd-dialog.h b/xfburn/xfburn-copy-cd-dialog.h
index 671e9b0..65cbb1d 100644
--- a/xfburn/xfburn-copy-cd-dialog.h
+++ b/xfburn/xfburn-copy-cd-dialog.h
@@ -25,7 +25,7 @@
 
 #include <gtk/gtk.h>
 
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 
 G_BEGIN_DECLS
 
diff --git a/xfburn/xfburn-copy-dvd-dialog.h b/xfburn/xfburn-copy-dvd-dialog.h
index 807f15a..5fa0501 100644
--- a/xfburn/xfburn-copy-dvd-dialog.h
+++ b/xfburn/xfburn-copy-dvd-dialog.h
@@ -25,7 +25,7 @@
 
 #include <gtk/gtk.h>
 
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 
 G_BEGIN_DECLS
 
diff --git a/xfburn/xfburn-data-composition.c b/xfburn/xfburn-data-composition.c
index ef73f78..4ee22d1 100644
--- a/xfburn/xfburn-data-composition.c
+++ b/xfburn/xfburn-data-composition.c
@@ -35,11 +35,9 @@
 
 #include <gtk/gtk.h>
 #include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 
-#ifdef HAVE_THUNAR_VFS
-#include <thunar-vfs/thunar-vfs.h>
-#endif
+#include <gio/gio.h>
 
 #include <exo/exo.h>
 
@@ -288,9 +286,7 @@ xfburn_data_composition_init (XfburnDataComposition * composition)
 
   GtkTargetEntry gte_src[] =  { { "XFBURN_TREE_PATHS", GTK_TARGET_SAME_WIDGET, DATA_COMPOSITION_DND_TARGET_INSIDE } };
   GtkTargetEntry gte_dest[] = { { "XFBURN_TREE_PATHS", GTK_TARGET_SAME_WIDGET, DATA_COMPOSITION_DND_TARGET_INSIDE },
-#ifdef HAVE_THUNAR_VFS
                                 { "text/uri-list", 0, DATA_COMPOSITION_DND_TARGET_TEXT_URI_LIST },
-#endif
                                 { "text/plain;charset=utf-8", 0, DATA_COMPOSITION_DND_TARGET_TEXT_PLAIN },
                               };
 
@@ -675,7 +671,7 @@ cb_cell_file_edited (GtkCellRenderer * renderer, gchar * path, gchar * newtext,
   GtkTreePath *real_path;
 
   if (strlen (newtext) == 0) {
-    xfce_err (_("You must give a name to the file."));
+    xfce_dialog_show_error (NULL, NULL, _("You must give a name to the file."));
     return;
   }
     
@@ -684,7 +680,7 @@ cb_cell_file_edited (GtkCellRenderer * renderer, gchar * path, gchar * newtext,
 
   if (gtk_tree_model_get_iter (model, &iter, real_path)) {
     if (file_exists_on_same_level (model, real_path, TRUE, newtext)) {
-      xfce_err (_("A file with the same name is already present in the composition."));
+      xfce_dialog_show_error (NULL, NULL, _("A file with the same name is already present in the composition."));
     }
     else {
       gtk_tree_store_set (GTK_TREE_STORE (model), &iter, DATA_COMPOSITION_COLUMN_CONTENT, newtext, -1);
@@ -1035,6 +1031,7 @@ static void
 set_modified (XfburnDataCompositionPrivate *priv)
 {
   if (!(priv->modified)) {
+    /*
     XfburnMainWindow *mainwin;
     GtkUIManager *ui_manager;
     GtkActionGroup *action_group;
@@ -1044,10 +1041,9 @@ set_modified (XfburnDataCompositionPrivate *priv)
   
     action_group = (GtkActionGroup *) gtk_ui_manager_get_action_groups (ui_manager)->data;
     
-    /*
     action = gtk_action_group_get_action (action_group, "save-composition");
     gtk_action_set_sensitive (GTK_ACTION (action), TRUE);
-  */
+    */
     priv->modified = TRUE;
   }
 }
@@ -1120,7 +1116,7 @@ thread_add_file_to_list_with_name (const gchar *name, XfburnDataComposition * dc
     
     gdk_threads_enter ();
     if (file_exists_on_same_level (model, tree_path, FALSE, name)) {
-      xfce_err (_("A file with the same name is already present in the composition."));
+      xfce_dialog_show_error (NULL, NULL, _("A file with the same name is already present in the composition."));
 
       gtk_tree_path_free (tree_path);
       gdk_threads_leave ();
@@ -1188,18 +1184,18 @@ thread_add_file_to_list_with_name (const gchar *name, XfburnDataComposition * dc
     }
     /* new file */
     else if (S_ISREG (s.st_mode) || S_ISCHR(s.st_mode) || S_ISBLK(s.st_mode) || S_ISLNK (s.st_mode)) {
-#ifdef HAVE_THUNAR_VFS
       GdkScreen *screen;
       GtkIconTheme *icon_theme;
-      ThunarVfsMimeDatabase *mime_database = NULL;
-      ThunarVfsMimeInfo *mime_info = NULL;
-      const gchar *mime_icon_name = NULL;
-      GdkPixbuf *mime_icon = NULL;
+      GdkPixbuf *mime_icon_pixbuf = NULL;
       gint x,y;
+      GFile *file = NULL;
+      GFileInfo *info = NULL;
+      GIcon *mime_icon = NULL;
+      GtkIconInfo *icon_info = NULL;
 
       if (s.st_size > MAXIMUM_ISO_FILE_SIZE) {
         gdk_threads_enter ();
-        xfce_err (_("%s cannot be added to the composition, because it exceeds the maximum allowed file size for iso9660."), path);
+        xfce_dialog_show_error (NULL, NULL, _("%s cannot be added to the composition, because it exceeds the maximum allowed file size for iso9660."), path);
         gdk_threads_leave ();
 
         return FALSE;
@@ -1208,45 +1204,38 @@ thread_add_file_to_list_with_name (const gchar *name, XfburnDataComposition * dc
       gdk_threads_enter ();
       screen = gtk_widget_get_screen (GTK_WIDGET (dc));
       icon_theme = gtk_icon_theme_get_for_screen (screen);
-      
-      mime_database = thunar_vfs_mime_database_get_default ();
-      mime_info = thunar_vfs_mime_database_get_info_for_file (mime_database, path, NULL);
-          
       gtk_icon_size_lookup (GTK_ICON_SIZE_SMALL_TOOLBAR, &x, &y);
-      mime_icon_name = thunar_vfs_mime_info_lookup_icon_name (mime_info, icon_theme);
-      mime_icon = gtk_icon_theme_load_icon (icon_theme, mime_icon_name, x, 0, NULL);
-#endif
-	
+
+      file = g_file_new_for_path(path);
+      info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, G_FILE_QUERY_INFO_NONE, NULL, NULL);
+      mime_icon = g_content_type_get_icon (g_file_info_get_content_type (info));
+      if (mime_icon != NULL) {
+        icon_info = gtk_icon_theme_lookup_by_gicon (icon_theme, mime_icon, x, GTK_ICON_LOOKUP_USE_BUILTIN);
+        if (icon_info != NULL) {
+          mime_icon_pixbuf = gtk_icon_info_load_icon (icon_info, NULL);
+          gtk_icon_info_free (icon_info);
+        }
+      }
+
       gtk_tree_store_append (GTK_TREE_STORE (model), iter, parent);
 
       humansize = xfburn_humanreadable_filesize (s.st_size);
 
-#ifdef HAVE_THUNAR_VFS
       gtk_tree_store_set (GTK_TREE_STORE (model), iter,
-                          DATA_COMPOSITION_COLUMN_ICON, (G_IS_OBJECT (mime_icon) ? mime_icon : icon_file),
+                          DATA_COMPOSITION_COLUMN_ICON, (G_IS_OBJECT (mime_icon_pixbuf) ? mime_icon_pixbuf : icon_file),
                           DATA_COMPOSITION_COLUMN_CONTENT, name,
                           DATA_COMPOSITION_COLUMN_HUMANSIZE, humansize,
                           DATA_COMPOSITION_COLUMN_SIZE, (guint64) s.st_size, 
                           DATA_COMPOSITION_COLUMN_PATH, path,
                           DATA_COMPOSITION_COLUMN_TYPE, DATA_COMPOSITION_TYPE_FILE, -1);
-#else
-      gtk_tree_store_set (GTK_TREE_STORE (model), iter,
-                          DATA_COMPOSITION_COLUMN_ICON, icon_file,
-                          DATA_COMPOSITION_COLUMN_CONTENT, name,
-                          DATA_COMPOSITION_COLUMN_HUMANSIZE, humansize,
-                          DATA_COMPOSITION_COLUMN_SIZE, (guint64) s.st_size,
-                          DATA_COMPOSITION_COLUMN_PATH, path,
-                          DATA_COMPOSITION_COLUMN_TYPE, DATA_COMPOSITION_TYPE_FILE, -1);
-#endif
 
       xfburn_disc_usage_add_size (XFBURN_DISC_USAGE (priv->disc_usage), s.st_size);
-#ifdef HAVE_THUNAR_VFS
+
       if (G_LIKELY (G_IS_OBJECT (mime_icon)))
         g_object_unref (mime_icon);
-      thunar_vfs_mime_info_unref (mime_info);
-      g_object_unref (mime_database);
+      if (G_LIKELY (G_IS_OBJECT (file)))
+        g_object_unref(file);
       gdk_threads_leave ();
-#endif
     }
     g_free (humansize);
     g_free (parent);
@@ -1459,7 +1448,7 @@ copy_entry_to (XfburnDataComposition *dc, GtkTreeIter *src, GtkTreeIter *dest, G
       }
     
       if (file_exists_on_same_level (model, path_level, FALSE, name)) {
-        xfce_warn (_("A file named \"%s\" already exists in this directory, the file hasn't been added."), name);
+	xfce_dialog_show_warning(NULL, NULL, _("A file named \"%s\" already exists in this directory, the file hasn't been added."), name);
         goto cleanup;
       }
       
@@ -1673,26 +1662,6 @@ cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guin
       for (i=0; files[i] != NULL && files[i][0] != '\0'; i++) {
         gchar *full_path;
 
-#ifdef HAVE_THUNAR_VFS
-        ThunarVfsPath *vfs_path;
-        GError *vfs_error = NULL;
-
-        vfs_path = thunar_vfs_path_new (files[i], &vfs_error);
-
-        if (vfs_error) {
-          g_warning ("Failed to create vfs path for '%s': %s", files[i], vfs_error->message);
-          g_error_free (vfs_error);
-          continue;
-        }
-
-        if (thunar_vfs_path_get_scheme (vfs_path) != THUNAR_VFS_PATH_SCHEME_FILE)
-          continue;
-        full_path = thunar_vfs_path_dup_string (vfs_path);
-
-        thunar_vfs_path_unref (vfs_path);
-
-#else /* no thunar-vfs */
-
         if (g_str_has_prefix (files[i], "file://"))
           full_path = g_build_filename (&files[i][7], NULL);
         else if (g_str_has_prefix (files[i], "file:"))
@@ -1702,8 +1671,7 @@ cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guin
 
         if (full_path[strlen (full_path) - 1] == '\r')
           full_path[strlen (full_path) - 1] = '\0';
-#endif
-
+					
         DBG ("Adding path '%s'", full_path);
 
         /* remember path to add it later in another thread */
@@ -1731,26 +1699,44 @@ cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guin
     gtk_drag_finish (dc, TRUE, FALSE, t);
   } 
   else if (sd->target == gdk_atom_intern ("text/uri-list", FALSE)) {
-#ifdef HAVE_THUNAR_VFS
     GList *vfs_paths = NULL;
     GList *vfs_path;
-    GError *error = NULL;
+    GList *lp;
     gchar *full_path;
+    gchar **uris;
+    gsize   n;
+
+    uris = g_uri_list_extract_uris ((gchar *) sd->data);
 
-    vfs_paths = thunar_vfs_path_list_from_string ((gchar *) sd->data, &error);
+    for (n = 0; uris != NULL && uris[n] != NULL; ++n)
+      vfs_paths = g_list_append (vfs_paths, g_file_new_for_uri (uris[n]));
+
+    g_strfreev (uris);
 
     if (G_LIKELY (vfs_paths != NULL)) {
       ThreadAddFilesDragParams *params;
       priv->full_paths_to_add = NULL;
       for (vfs_path = vfs_paths; vfs_path != NULL; vfs_path = g_list_next (vfs_path)) {
-        ThunarVfsPath *path = THUNAR_VFS_PATH (vfs_path->data);
-        if (thunar_vfs_path_get_scheme (path) != THUNAR_VFS_PATH_SCHEME_FILE)
+	GFile *path = vfs_path->data;
+	if (path == NULL)
           continue;
-        full_path = thunar_vfs_path_dup_string (path);
+	/* unable to handle non-local files */
+	if (G_UNLIKELY (!g_file_has_uri_scheme (path, "file"))) {
+            g_object_unref (path);
+	    continue;
+        }
+        full_path = g_file_get_path (path);
+        /* if there is no local path, use the URI (which always works) */
+        if (full_path == NULL)
+            full_path = g_file_get_uri (path);
+        /* release the location */
         g_debug ("adding uri path: %s", full_path);
         priv->full_paths_to_add = g_list_prepend (priv->full_paths_to_add, full_path);
       }
-      thunar_vfs_path_list_free (vfs_paths);
+
+      for (lp = vfs_paths; lp != NULL; lp = lp->next)
+        g_object_unref (lp->data);
+      g_list_free (vfs_paths);
 
       priv->full_paths_to_add = g_list_reverse (priv->full_paths_to_add);
       /* FIXME: path_where_insert is always NULL here */
@@ -1769,18 +1755,10 @@ cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guin
 
       gtk_drag_finish (dc, TRUE, FALSE, t);
     } else {
-      if (G_UNLIKELY (error != NULL))
-        g_warning ("text/uri-list drag failed because '%s'", error->message);
-      else
-        g_warning("There were no files in the uri list!");
+      g_warning("There were no files in the uri list!");
       gtk_drag_finish (dc, FALSE, FALSE, t);
       xfburn_default_cursor (priv->content);
     }
-#else
-    g_warning ("Receiving this type of drag and drop requires thunar-vfs support, sorry!");
-    gtk_drag_finish (dc, FALSE, FALSE, t);
-    xfburn_default_cursor (priv->content);
-#endif
   } 
   else {
     g_warning ("Trying to receive an unsupported drag target, this should not happen.");
@@ -1883,7 +1861,7 @@ fill_image_with_composition (GtkTreeModel *model, IsoImage *image, IsoDir * pare
 
         if (r == 0) {
           /* The first string is the renamed name, the second one the original name */
-          xfce_warn (_("Duplicate filename '%s' for '%s'"), name, src);
+	  xfce_dialog_show_warning(NULL, NULL, _("Duplicate filename '%s' for '%s'"), name, src);
 
           g_free (basename);
           g_free (name);
@@ -1941,6 +1919,7 @@ typedef struct
   GQueue *queue_iter;
 } LoadParserStruct;
 
+/*
 static gint
 _find_attribute (const gchar ** attribute_names, const gchar * attr)
 {
@@ -1953,12 +1932,15 @@ _find_attribute (const gchar ** attribute_names, const gchar * attr)
 
   return -1;
 }
+*/
 
 static void
 load_composition_start (GMarkupParseContext * context, const gchar * element_name,
                         const gchar ** attribute_names, const gchar ** attribute_values,
                         gpointer data, GError ** error)
 {
+  g_error ("This method needs to get fixed, and does not work right now!");
+/*
   LoadParserStruct * parserinfo = (LoadParserStruct *) data;
   XfburnDataCompositionPrivate *priv = XFBURN_DATA_COMPOSITION_GET_PRIVATE (parserinfo->dc);
 
@@ -1980,11 +1962,8 @@ load_composition_start (GMarkupParseContext * context, const gchar * element_nam
       model = gtk_tree_view_get_model (GTK_TREE_VIEW (priv->content));
       parent = g_queue_peek_head (parserinfo->queue_iter);
           
-      g_error ("This method needs to get fixed, and does not work right now!");
-      /*
       add_file_to_list_with_name (attribute_values[i], parserinfo->dc, model, attribute_values[j], &iter, 
                                   parent, GTK_TREE_VIEW_DROP_INTO_OR_AFTER);
-      */
     }
   } else if (!strcmp (element_name, "directory")) {
     int i, j;
@@ -1999,6 +1978,7 @@ load_composition_start (GMarkupParseContext * context, const gchar * element_nam
       //add_directory_to_list (attribute_values[i], parserinfo->dc, model, attribute_values[j], &iter, parent);    
     }
   }
+  */
 }
 
 static void
diff --git a/xfburn/xfburn-data-disc-usage.c b/xfburn/xfburn-data-disc-usage.c
index d9fd177..a4d5cf4 100644
--- a/xfburn/xfburn-data-disc-usage.c
+++ b/xfburn/xfburn-data-disc-usage.c
@@ -22,7 +22,6 @@
 
 #include <gtk/gtk.h>
 #include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
 
 #include "xfburn-disc-usage.h"
 #include "xfburn-data-disc-usage.h"
diff --git a/xfburn/xfburn-device-box.c b/xfburn/xfburn-device-box.c
index a99d0e9..49b7d36 100644
--- a/xfburn/xfburn-device-box.c
+++ b/xfburn/xfburn-device-box.c
@@ -23,11 +23,6 @@
 
 #include <gtk/gtk.h>
 #include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
-
-#ifdef HAVE_THUNAR_VFS
-#include <thunar-vfs/thunar-vfs.h>
-#endif
 
 #include "xfburn-device-list.h"
 #include "xfburn-device-box.h"
diff --git a/xfburn/xfburn-device-list.c b/xfburn/xfburn-device-list.c
index 4a431d7..5def1aa 100644
--- a/xfburn/xfburn-device-list.c
+++ b/xfburn/xfburn-device-list.c
@@ -34,7 +34,7 @@
 #include <libburn.h>
 
 #include "xfburn-global.h"
-#include "xfburn-hal-manager.h"
+#include "xfburn-udev-manager.h"
 #include "xfburn-utils.h"
 
 #include "xfburn-device-list.h"
@@ -50,7 +50,7 @@ struct _XfburnDeviceListPrivate {
   gint num_burners;
   XfburnDevice *curr_device;
 
-#ifdef HAVE_HAL
+#ifdef HAVE_GUDEV
   gulong volume_changed_handlerid;
 #endif
 };
@@ -58,8 +58,8 @@ struct _XfburnDeviceListPrivate {
 void get_libburn_device_list (XfburnDeviceList *devlist);
 static void cb_combo_device_changed (GtkComboBox *combo, XfburnDeviceList *devlist);
 static void cb_refresh_clicked (GtkButton *button, XfburnDeviceList *devlist);
-#ifdef HAVE_HAL
-static void cb_volumes_changed (XfburnHalManager *halman, XfburnDeviceList *devlist);
+#ifdef HAVE_GUDEV
+static void cb_volumes_changed (XfburnUdevManager *udevman, XfburnDeviceList *devlist);
 #endif
 static XfburnDevice * get_selected_device (GtkComboBox *combo_device);
 static void refresh (XfburnDeviceList *devlist);
@@ -219,64 +219,23 @@ xfburn_device_list_class_init (XfburnDeviceListClass *klass)
   //klass->volume_changed = cb_volume_changed
 }
 
-#if 0
 static void
 xfburn_device_list_init (XfburnDeviceList *self)
 {
   XfburnDeviceListPrivate *priv = GET_PRIVATE (self);
 
-#ifdef HAVE_HAL
-  XfburnHalManager *halman = xfburn_hal_manager_get_global ();
+#ifdef HAVE_GUDEV
+  XfburnUdevManager *udevman = xfburn_udev_manager_get_global ();
 #endif
 
   DBG ("Constructing device list");
   xfburn_console_libburn_messages ();
 
-#ifdef HAVE_HAL
-  /* FIXME: hal_manager currently only returns burners, not readers */
-  priv->num_drives = priv->num_burners = xfburn_hal_manager_get_devices (halman, &priv->devices);
-  if (priv->num_burners < 1) {
-    /* if some error occurred while checking hal properties,
-       or hal for some reason did not find a device, then just
-       fall back on libburn */
-    g_message ("HAL said there are %d burners, checking libburn if it can detect any", priv->num_burners);
-
-    get_libburn_device_list (self);
-  }
-
-  priv->volume_changed_handlerid = g_signal_connect (G_OBJECT (xfburn_hal_manager_get_global ()), "volume-changed", G_CALLBACK (cb_volumes_changed), self);
-
-#else
-  get_libburn_device_list (self);
-#endif
-}
-#endif
-
-static void
-xfburn_device_list_init (XfburnDeviceList *self)
-{
-  XfburnDeviceListPrivate *priv = GET_PRIVATE (self);
-
-#ifdef HAVE_HAL
-  XfburnHalManager *halman = xfburn_hal_manager_get_global ();
-#endif
-
-  DBG ("Constructing device list");
-  xfburn_console_libburn_messages ();
-
-#ifdef HAVE_HAL
-  /* FIXME: hal_manager currently only returns burners, not readers */
-  priv->num_drives = priv->num_burners = xfburn_hal_manager_get_devices (halman, &priv->devices);
-  if (priv->num_burners < 1) {
-    /* if some error occurred while checking hal properties,
-       or hal for some reason did not find a device, then just
-       fall back on libburn */
-    g_message ("HAL said there are %d burners, checking libburn if it can detect any", priv->num_burners);
-
-    get_libburn_device_list (self);
-  }
-  priv->volume_changed_handlerid = g_signal_connect (G_OBJECT (xfburn_hal_manager_get_global ()), "volume-changed", G_CALLBACK (cb_volumes_changed), self);
-
+#ifdef HAVE_GUDEV
+  priv->devices = xfburn_udev_manager_get_devices (udevman, &priv->num_drives, &priv->num_burners);
+  if (priv->num_drives > 0 && priv->num_burners < 1)
+    g_warning ("There are %d drives in your system, but none are capable of burning", priv->num_drives);
+  priv->volume_changed_handlerid = g_signal_connect (G_OBJECT (xfburn_udev_manager_get_global ()), "volume-changed", G_CALLBACK (cb_volumes_changed), self);
 #else
   get_libburn_device_list (self);
 #endif
@@ -383,11 +342,11 @@ cb_combo_device_changed (GtkComboBox *combo, XfburnDeviceList *devlist)
   g_signal_emit (G_OBJECT (devlist), signals[VOLUME_CHANGE_END], 0, TRUE, device);
 }
 
-#ifdef HAVE_HAL
+#ifdef HAVE_GUDEV
 static void
-cb_volumes_changed (XfburnHalManager *halman, XfburnDeviceList *devlist)
+cb_volumes_changed (XfburnUdevManager *udevman, XfburnDeviceList *devlist)
 {
-  DBG ("Hal volume changed");
+  DBG ("Udev volume changed");
   refresh (devlist);
 }
 #endif
diff --git a/xfburn/xfburn-device.c b/xfburn/xfburn-device.c
index 73727db..a799013 100644
--- a/xfburn/xfburn-device.c
+++ b/xfburn/xfburn-device.c
@@ -25,7 +25,7 @@
 #include <unistd.h>
 
 #include "xfburn-device.h"
-#include "xfburn-hal-manager.h"
+#include "xfburn-udev-manager.h"
 
 /*- globals -*/
 
@@ -430,8 +430,8 @@ xfburn_device_grab (XfburnDevice * device, struct burn_drive_info **drive_info)
   gchar drive_addr[BURN_DRIVE_ADR_LEN];
   int i;
   const int max_checks = 4;
-#ifdef HAVE_HAL
-  XfburnHalManager *halman = xfburn_hal_manager_get_global ();
+#ifdef HAVE_GUDEV
+  XfburnUdevManager *udevman = xfburn_udev_manager_get_global ();
 #endif
 
   ret = burn_drive_convert_fs_adr (priv->addr, drive_addr);
@@ -448,8 +448,8 @@ xfburn_device_grab (XfburnDevice * device, struct burn_drive_info **drive_info)
     if (ret > 0)
       break;
     else if  (i < max_checks) {
-#ifdef HAVE_HAL 
-      if (!xfburn_hal_manager_check_ask_umount (halman, device))
+#ifdef HAVE_GUDEV
+      if (!xfburn_udev_manager_check_ask_umount (udevman, device))
         usleep(i*100001);
 #else
       usleep(i*100001);
diff --git a/xfburn/xfburn-directory-browser.c b/xfburn/xfburn-directory-browser.c
index f88a3f6..af6ba8c 100644
--- a/xfburn/xfburn-directory-browser.c
+++ b/xfburn/xfburn-directory-browser.c
@@ -26,11 +26,8 @@
 
 #include <gtk/gtk.h>
 #include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
 
-#ifdef HAVE_THUNAR_VFS
-#include <thunar-vfs/thunar-vfs.h>
-#endif
+#include <gio/gio.h>
 
 #include <exo/exo.h>
 
@@ -315,44 +312,35 @@ xfburn_directory_browser_load_path (XfburnDirectoryBrowser * browser, const gcha
       }
       else if ((s.st_mode & S_IFREG)) {
         GtkTreeIter iter;
-#ifdef HAVE_THUNAR_VFS
-		ThunarVfsMimeDatabase *mime_database = NULL;
-		ThunarVfsMimeInfo *mime_info = NULL;
-		const gchar *mime_icon_name = NULL;
-		GdkPixbuf *mime_icon = NULL;
-		const gchar *mime_str = NULL;
-#endif
-		
+        GFileInfo *mime_info = NULL;
+        GIcon *mime_icon = NULL;
+        GdkPixbuf *mime_icon_pixbuf = NULL;
+        const gchar *mime_str = NULL;
+        GFile *file = NULL;
+        const gchar *content_type = NULL;
+
         gtk_list_store_append (GTK_LIST_STORE (model), &iter);
-		
-#ifdef HAVE_THUNAR_VFS
-		mime_database = thunar_vfs_mime_database_get_default ();
-		mime_info = thunar_vfs_mime_database_get_info_for_file (mime_database, path_utf8, NULL);
-		
-		mime_icon_name = thunar_vfs_mime_info_lookup_icon_name (mime_info, icon_theme);
-		mime_icon = gtk_icon_theme_load_icon (icon_theme, mime_icon_name, x, 0, NULL);
-		
-		mime_str = thunar_vfs_mime_info_get_comment (mime_info);
-		
-		gtk_list_store_set (GTK_LIST_STORE (model), &iter,
-                            DIRECTORY_BROWSER_COLUMN_ICON, (G_IS_OBJECT (mime_icon) ? mime_icon : icon_file),
+
+        file = g_file_new_for_path(path_utf8);
+        mime_info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, G_FILE_QUERY_INFO_NONE, NULL, NULL);
+        content_type = g_file_info_get_content_type (mime_info);
+	mime_str = g_content_type_get_description (content_type);
+        mime_icon = g_content_type_get_icon (content_type);
+        if (mime_icon != NULL) {
+            GtkIconInfo *icon_info = gtk_icon_theme_lookup_by_gicon (icon_theme, mime_icon, x, GTK_ICON_LOOKUP_USE_BUILTIN);
+            if (icon_info != NULL) {
+                mime_icon_pixbuf = gtk_icon_info_load_icon (icon_info, NULL);
+                gtk_icon_info_free (icon_info);
+            }
+            g_object_unref (mime_icon);
+        }
+	gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+                            DIRECTORY_BROWSER_COLUMN_ICON, (G_IS_OBJECT (mime_icon_pixbuf) ? mime_icon_pixbuf : icon_file),
                             DIRECTORY_BROWSER_COLUMN_FILE, dir_entry,
                             DIRECTORY_BROWSER_COLUMN_HUMANSIZE, humansize,
                             DIRECTORY_BROWSER_COLUMN_SIZE, (guint64) s.st_size,
                             DIRECTORY_BROWSER_COLUMN_TYPE, mime_str, DIRECTORY_BROWSER_COLUMN_PATH, path_utf8, -1);
-		
-		if (G_LIKELY (G_IS_OBJECT (mime_icon)))
-		  g_object_unref (mime_icon);
-		thunar_vfs_mime_info_unref (mime_info);
-		g_object_unref (mime_database);
-#else
-        gtk_list_store_set (GTK_LIST_STORE (model), &iter,
-                            DIRECTORY_BROWSER_COLUMN_ICON, icon_file,
-                            DIRECTORY_BROWSER_COLUMN_FILE, dir_entry,
-                            DIRECTORY_BROWSER_COLUMN_HUMANSIZE, humansize,
-                            DIRECTORY_BROWSER_COLUMN_SIZE, (guint64) s.st_size,
-                            DIRECTORY_BROWSER_COLUMN_TYPE, _("File"), DIRECTORY_BROWSER_COLUMN_PATH, path_utf8, -1);
-#endif
+        g_object_unref(file);
       }
       g_free (humansize);
       g_free (path_utf8);
diff --git a/xfburn/xfburn-disc-usage.c b/xfburn/xfburn-disc-usage.c
index b94db7d..8bb67b9 100644
--- a/xfburn/xfburn-disc-usage.c
+++ b/xfburn/xfburn-disc-usage.c
@@ -30,7 +30,7 @@
 
 #include <gtk/gtk.h>
 #include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 
 #include "xfburn-disc-usage.h"
 #include "xfburn-global.h"
@@ -160,7 +160,7 @@ xfburn_disc_usage_constructor (GType type, guint n_construct_properties, GObject
   gtk_box_pack_start (GTK_BOX (disc_usage), disc_usage->combo, FALSE, FALSE, BORDER);
   gtk_widget_show (disc_usage->combo);
 
-  disc_usage->button = xfce_create_mixed_button (XFBURN_STOCK_BURN_CD, _("Proceed to Burn"));
+  disc_usage->button = xfce_gtk_button_new_mixed (XFBURN_STOCK_BURN_CD, _("Proceed to Burn"));
   gtk_box_pack_start (GTK_BOX (disc_usage), disc_usage->button, FALSE, FALSE, BORDER);
   gtk_widget_set_sensitive (disc_usage->button, FALSE);
   gtk_widget_show (disc_usage->button);
@@ -200,7 +200,7 @@ cb_button_clicked (GtkButton *button, XfburnDiscUsage *du)
   if (du->size <= class->labels[gtk_combo_box_get_active (GTK_COMBO_BOX (du->combo))].size) {
     g_signal_emit (G_OBJECT (du), signals[BEGIN_BURN], 0);
   } else {
-    xfce_err (_("You are trying to burn more onto the disc than it can hold."));
+    xfce_dialog_show_error (NULL, NULL, _("You are trying to burn more onto the disc than it can hold."));
   }
 }
 
diff --git a/xfburn/xfburn-file-browser.c b/xfburn/xfburn-file-browser.c
index 04d5596..4d3b182 100644
--- a/xfburn/xfburn-file-browser.c
+++ b/xfburn/xfburn-file-browser.c
@@ -26,7 +26,6 @@
 
 #include <gtk/gtk.h>
 #include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
 
 #include "xfburn-file-browser.h"
 #include "xfburn-fs-browser.h"
diff --git a/xfburn/xfburn-fs-browser.c b/xfburn/xfburn-fs-browser.c
index 54bc734..221e288 100644
--- a/xfburn/xfburn-fs-browser.c
+++ b/xfburn/xfburn-fs-browser.c
@@ -24,7 +24,6 @@
 #include <string.h>
 #endif
 
-#include <libxfcegui4/libxfcegui4.h>
 #include <libxfce4util/libxfce4util.h>
 
 #include "xfburn-fs-browser.h"
diff --git a/xfburn/xfburn-hal-manager.c b/xfburn/xfburn-hal-manager.c
deleted file mode 100644
index 3d64cad..0000000
--- a/xfburn/xfburn-hal-manager.c
+++ /dev/null
@@ -1,555 +0,0 @@
-/*
- *  Copyright (c) 2005-2006 Jean-François Wauthy (pollux at xfce.org)
- *  Copyright (c) 2008      David Mohr (dmohr at mcbf.net)
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program 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 Library General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifdef	HAVE_CONFIG_H
-#include <config.h>
-#endif /* !HAVE_CONFIG_H */
-
-#ifdef HAVE_HAL
-
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-
-#include <libhal-storage.h>
-
-#include <errno.h>
-
-#include <libxfce4util/libxfce4util.h>
-#ifdef HAVE_THUNAR_VFS
-# include <thunar-vfs/thunar-vfs.h>
-#endif
-#include <libxfcegui4/libxfcegui4.h>
-
-#include "xfburn-global.h"
-#include "xfburn-progress-dialog.h"
-#include "xfburn-device-list.h"
-
-#include "xfburn-hal-manager.h"
-
-static void xfburn_hal_manager_class_init (XfburnHalManagerClass * klass);
-static void xfburn_hal_manager_init (XfburnHalManager * obj);
-static void xfburn_hal_manager_finalize (GObject * object);
-
-static GObject * xfburn_hal_manager_new (void);
-
-static void hal_finalize (LibHalContext  *hal_context);
-static void cb_device_added (LibHalContext *ctx, const char *udi);
-static void cb_device_removed (LibHalContext *ctx, const char *udi);
-static void cb_prop_modified (LibHalContext *ctx, const char *udi, const char *key,
-                              dbus_bool_t is_removed, dbus_bool_t is_added);
-
-#define XFBURN_HAL_MANAGER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), XFBURN_TYPE_HAL_MANAGER, XfburnHalManagerPrivate))
-
-enum {
-  VOLUME_CHANGED,
-  LAST_SIGNAL,
-}; 
-
-typedef struct {
-  LibHalContext  *hal_context;
-  DBusConnection *dbus_connection;
-  gchar *error;
-
-#ifdef HAVE_THUNAR_VFS
-  ThunarVfsVolumeManager *thunar_volman;
-#endif
-} XfburnHalManagerPrivate;
-
-static XfburnHalManager *instance = NULL;
-
-/*********************/
-/* class declaration */
-/*********************/
-static XfburnProgressDialogClass *parent_class = NULL;
-static guint signals[LAST_SIGNAL];
-
-GType
-xfburn_hal_manager_get_type (void)
-{
-  static GType type = 0;
-
-  if (type == 0) {
-    static const GTypeInfo our_info = {
-      sizeof (XfburnHalManagerClass),
-      NULL,
-      NULL,
-      (GClassInitFunc) xfburn_hal_manager_class_init,
-      NULL,
-      NULL,
-      sizeof (XfburnHalManager),
-      0,
-      (GInstanceInitFunc) xfburn_hal_manager_init,
-      NULL
-    };
-
-    type = g_type_register_static (G_TYPE_OBJECT, "XfburnHalManager", &our_info, 0);
-  }
-
-  return type;
-}
-
-static void
-xfburn_hal_manager_class_init (XfburnHalManagerClass * klass)
-{
-  GObjectClass *object_class = G_OBJECT_CLASS (klass);
-  
-  g_type_class_add_private (klass, sizeof (XfburnHalManagerPrivate));
-  
-  parent_class = g_type_class_peek_parent (klass);
-
-  object_class->finalize = xfburn_hal_manager_finalize;
-
-  signals[VOLUME_CHANGED] = g_signal_new ("volume-changed", XFBURN_TYPE_HAL_MANAGER, G_SIGNAL_ACTION,
-                                          G_STRUCT_OFFSET (XfburnHalManagerClass, volume_changed),
-                                          NULL, NULL, g_cclosure_marshal_VOID__VOID,
-                                          G_TYPE_NONE, 0);
-}
-
-static void
-xfburn_hal_manager_init (XfburnHalManager * obj)
-{
-  XfburnHalManagerPrivate *priv = XFBURN_HAL_MANAGER_GET_PRIVATE (obj);
-  LibHalContext  *hal_context = NULL;
-  DBusError derror;
-  //GError *error = NULL;
-
-  DBusConnection *dbus_connection;
-  priv->error = NULL;
-
-  //if (instance != NULL)
-  //  g_error ("The HAL context was already there when trying to create a hal-manager!");
-  
-  /* dbus & hal init code taken from exo */
-  /* initialize D-Bus error */
-  dbus_error_init (&derror);
-
-  /* try to connect to the system bus */
-  dbus_connection = dbus_bus_get (DBUS_BUS_SYSTEM, &derror);
-  if (G_LIKELY (dbus_connection != NULL)) {
-    /* try to allocate a new HAL context */
-    hal_context = libhal_ctx_new ();
-    if (G_LIKELY (hal_context != NULL)) {
-      /* setup the D-Bus connection for the HAL context */
-      if (libhal_ctx_set_dbus_connection (hal_context, dbus_connection)) {
-
-        /* try to initialize the HAL context */
-        libhal_ctx_init (hal_context, &derror);
-      } else {
-        dbus_set_error_const (&derror, DBUS_ERROR_NO_MEMORY, g_strerror (ENOMEM));
-      }
-    } else {
-      /* record the allocation failure of the context */
-      dbus_set_error_const (&derror, DBUS_ERROR_NO_MEMORY, g_strerror (ENOMEM));
-    }
-  }
-
-  /* check if we failed */
-  if (dbus_error_is_set (&derror)) {
-    /* check if a HAL context was allocated */
-    if (G_UNLIKELY (hal_context != NULL)) {
-      /* drop the allocated HAL context */
-      hal_finalize (hal_context);
-      hal_context = NULL;
-      priv->error = "HAL";
-    } else {
-      priv->error = "DBus";
-    }
-    dbus_error_free (&derror);
-  } else {
-    if (!libhal_ctx_set_device_added (hal_context, cb_device_added))
-      g_warning ("Could not setup HAL callback for device_added");
-
-    if (!libhal_ctx_set_device_removed (hal_context, cb_device_removed))
-      g_warning ("Could not setup HAL callback for device_removed");
-
-    if (!libhal_ctx_set_device_property_modified (hal_context, cb_prop_modified))
-      g_warning ("Could not setup HAL callback for prop_modified");
-  }
-
-  priv->hal_context = hal_context;
-  priv->dbus_connection = dbus_connection;
-
-#ifdef HAVE_THUNAR_VFS
-  /* FIXME: for some weird reason the hal callbacks don't actually work, 
-   *        unless we also fetch an instance of thunar_vfs_volman. Why??
-   *    Not terrible though, because we'll need to use it eventually anyways */
-  priv->thunar_volman = thunar_vfs_volume_manager_get_default ();
-  if (priv->thunar_volman != NULL) {
-    //g_signal_connect (G_OBJECT (priv->thunar_volman), "volumes-added", G_CALLBACK (cb_volumes_changed), box);
-    //g_signal_connect (G_OBJECT (priv->thunar_volman), "volumes-removed", G_CALLBACK (cb_volumes_changed), box);
-  } else {
-    g_warning ("Error trying to access thunar-vfs-volume-manager!");
-  }
-  /*
-  */
-#endif
-}
-
-static void
-xfburn_hal_manager_finalize (GObject * object)
-{
-  XfburnHalManagerPrivate *priv = XFBURN_HAL_MANAGER_GET_PRIVATE (object);
-
-#ifdef HAVE_THUNAR_VFS
-  g_object_unref (priv->thunar_volman);
-#endif
-
-  hal_finalize (priv->hal_context);
-
-  G_OBJECT_CLASS (parent_class)->finalize (object);
-  instance = NULL;
-}
-
-/*           */
-/* internals */
-/*           */
-static void
-hal_finalize (LibHalContext  *hal_context)
-{
-  DBusError derror;
-
-  dbus_error_init (&derror);
-  libhal_ctx_shutdown (hal_context, &derror);
-  if (dbus_error_is_set (&derror)) {
-    DBG ("Error shutting hal down!");
-  }
-  dbus_error_free (&derror);
-  libhal_ctx_free (hal_context);
-}
-
-static void cb_device_added (LibHalContext *ctx, const char *udi)
-{
-  DBG ("HAL: device added");
-  g_signal_emit (instance, signals[VOLUME_CHANGED], 0);
-}
-
-static void cb_device_removed (LibHalContext *ctx, const char *udi)
-{
-  DBG ("HAL: device removed");
-  g_signal_emit (instance, signals[VOLUME_CHANGED], 0);
-}
-
-static void cb_prop_modified (LibHalContext *ctx, const char *udi,
-                              const char *key, dbus_bool_t is_removed, dbus_bool_t is_added)
-{
-  /* Lets ignore this for now,
-   * way too many of these get triggered when a disc is
-   * inserted or removed!
-  DBG ("HAL: property modified");
-  g_signal_emit (instance, signals[VOLUME_CHANGED], 0);
-  */
-}
-
-static GObject *
-xfburn_hal_manager_new (void)
-{
-  if (G_UNLIKELY (instance != NULL))
-    g_error ("Trying to create a second instance of hal manager!");
-  return g_object_new (XFBURN_TYPE_HAL_MANAGER, NULL);
-}
-
-/*        */
-/* public */
-/*        */
-
-gchar *
-xfburn_hal_manager_create_global (void)
-{
-  XfburnHalManagerPrivate *priv;
-
-  instance = XFBURN_HAL_MANAGER (xfburn_hal_manager_new ());
-
-  priv = XFBURN_HAL_MANAGER_GET_PRIVATE (instance);
-
-  if (priv->error) {
-    gchar *error_msg, *ret;
-
-    error_msg = g_strdup (priv->error);
-    xfburn_hal_manager_shutdown ();
-    ret = g_strdup_printf ("Failed to initialize %s!", error_msg);
-    g_free (error_msg);
-    return ret;
-  } else
-    return NULL;
-}
-
-XfburnHalManager *
-xfburn_hal_manager_get_global (void)
-{
-  if (G_UNLIKELY (instance == NULL))
-    g_error ("There is no instance of a hal manager!");
-  return instance;
-}
-
-void
-xfburn_hal_manager_shutdown (void)
-{
-  if (G_UNLIKELY (instance == NULL))
-    g_error ("There is no instance of a hal manager!");
-  g_object_unref (instance);
-  instance = NULL;
-}
-
-void
-xfburn_hal_manager_send_volume_changed (void)
-{
-  //gdk_threads_enter ();
-  g_signal_emit (instance, signals[VOLUME_CHANGED], 0);
-  //gdk_threads_leave ();
-}
-
-int 
-xfburn_hal_manager_get_devices (XfburnHalManager *halman, GList **device_list)
-{
-  XfburnHalManagerPrivate *priv = XFBURN_HAL_MANAGER_GET_PRIVATE (halman);
-  char **all_devices, **devices;
-  int num;
-  DBusError error;
-  int n_devices = 0;
-
-  dbus_error_init (&error);
-
-  all_devices = libhal_get_all_devices (priv->hal_context, &num, &error);
-
-  if (dbus_error_is_set (&error)) {
-    g_warning ("Could not get list of devices from HAL: %s", error.message);
-    return -1;
-  }
-
-  for (devices = all_devices; *devices != NULL; devices++) {
-    dbus_bool_t exists;
-    char **cap_list, **caps;
-    gboolean optical_drive = FALSE;
-
-    exists = libhal_device_property_exists (priv->hal_context, *devices, "info.capabilities", &error);
-    if (dbus_error_is_set (&error)) {
-      g_warning ("Error checking HAL property for %s: %s", *devices, error.message);
-      dbus_error_free (&error);
-      return -1;
-    }
-
-    if (!exists)
-      continue;
-
-    cap_list = libhal_device_get_property_strlist (priv->hal_context, *devices, "info.capabilities", &error);
-    if (dbus_error_is_set (&error)) {
-      g_warning ("Error getting HAL property for %s: %s", *devices, error.message);
-      dbus_error_free (&error);
-      return -1;
-    }
-
-    for (caps = cap_list; *caps != NULL; caps++) {
-      if (strcmp (*caps, "storage.cdrom") == 0) {
-        exists = libhal_device_property_exists (priv->hal_context, *devices, "storage.cdrom.write_speed", &error);
-        if (dbus_error_is_set (&error)) {
-          g_warning ("Error checking HAL property for %s: %s", *devices, error.message);
-          dbus_error_free (&error);
-          return -1;
-        }
-
-        if (!exists)
-          break;
-
-        optical_drive = TRUE;
-      }
-    }
-    libhal_free_string_array (cap_list);
-
-    if (optical_drive) {
-      XfburnDevice *device;
-      char *str, *str_vendor; 
-      const gchar *name;
-      gchar *addr = NULL;
-      gboolean dvdr = FALSE, dvdplusr = FALSE;
-
-      device = xfburn_device_new ();
-
-      /*
-      libhal_device_print (priv->hal_context, *devices, &error);
-      printf ("\n");
-
-      if (dbus_error_is_set (&error)) {
-        g_warning ("Error printing HAL device %s: %s", *devices, error.message);
-        dbus_error_free (&error);
-        return -1;
-      }
-      */
-
-      /* xfburn_device sets accessible = false by default */
-
-      str_vendor = libhal_device_get_property_string (priv->hal_context, *devices, "storage.vendor", &error);
-      if (dbus_error_is_set (&error)) {
-        g_warning ("Error getting HAL property for %s: %s", *devices, error.message);
-        dbus_error_free (&error);
-        goto not_a_device;
-      }
-
-      str = libhal_device_get_property_string (priv->hal_context, *devices, "storage.model", &error);
-      if (dbus_error_is_set (&error)) {
-        g_warning ("Error getting HAL property for %s: %s", *devices, error.message);
-        dbus_error_free (&error);
-        goto not_a_device;
-      }
-
-      name = xfburn_device_set_name (device, str_vendor, str);
-      libhal_free_string (str_vendor);
-      libhal_free_string (str);
-
-      addr = libhal_device_get_property_string (priv->hal_context, *devices, "block.device", &error);
-      if (dbus_error_is_set (&error)) {
-        g_warning ("Error getting HAL property for %s: %s", *devices, error.message);
-        dbus_error_free (&error);
-        goto not_a_device;
-      }
-
-#ifdef DEBUG_NULL_DEVICE
-      g_object_set (G_OBJECT (device), "address", "stdio:/dev/null", NULL);
-#else
-      g_object_set (G_OBJECT (device), "address", addr, NULL);
-#endif
-
-      g_object_set (G_OBJECT (device), "cdr", libhal_device_get_property_bool (priv->hal_context, *devices, "storage.cdrom.cdr", &error), NULL);
-      if (dbus_error_is_set (&error)) {
-        g_warning ("Error getting HAL property for %s: %s", *devices, error.message);
-        dbus_error_free (&error);
-        goto not_a_device;
-      }
-
-      g_object_set (G_OBJECT (device), "cdrw", libhal_device_get_property_bool (priv->hal_context, *devices, "storage.cdrom.cdrw", &error), NULL);
-      if (dbus_error_is_set (&error)) {
-        g_warning ("Error getting HAL property for %s: %s", *devices, error.message);
-        dbus_error_free (&error);
-        goto not_a_device;
-      }
-
-      dvdr = libhal_device_get_property_bool (priv->hal_context, *devices, "storage.cdrom.dvdr", &error);
-      if (dbus_error_is_set (&error)) {
-        g_warning ("Error getting HAL property for %s: %s", *devices, error.message);
-        dbus_error_free (&error);
-        goto not_a_device;
-      }
-
-      dvdplusr = libhal_device_get_property_bool (priv->hal_context, *devices, "storage.cdrom.dvdplusr", &error);
-      if (dbus_error_is_set (&error)) {
-        g_warning ("Error getting HAL property for %s: %s", *devices, error.message);
-        dbus_error_free (&error);
-        goto not_a_device;
-      }
-      g_object_set (G_OBJECT (device), "dvdr", dvdr | dvdplusr, NULL);
-
-      g_object_set (G_OBJECT (device), "dvdram", libhal_device_get_property_bool (priv->hal_context, *devices, "storage.cdrom.dvdram", &error), NULL);
-      if (dbus_error_is_set (&error)) {
-        g_warning ("Error getting HAL property for %s: %s", *devices, error.message);
-        dbus_error_free (&error);
-        goto not_a_device;
-      }
-
-      if (!xfburn_device_can_burn (device)) {
-        g_message ("Ignoring reader '%s' at '%s'", name, addr);
-        goto not_a_device;
-      }
-
-      DBG ("Found writer '%s' at '%s'", name, addr);
-      *device_list = g_list_append (*device_list, device);
-      n_devices++;
-      goto is_a_device;
-
-not_a_device:
-        g_object_unref (device);
-is_a_device:
-      libhal_free_string (addr);
-    }
-  }
-
-  libhal_free_string_array (all_devices);
-
-  return n_devices;
-}
-
-/* @Return TRUE if the drive is now accessible, FALSE if not.
- */
-gboolean
-xfburn_hal_manager_check_ask_umount (XfburnHalManager *halman, XfburnDevice *device)
-{
-  XfburnHalManagerPrivate *priv = XFBURN_HAL_MANAGER_GET_PRIVATE (halman);
-  LibHalVolume *vol;
-#ifdef HAVE_THUNAR_VFS
-  const char *mp;
-  ThunarVfsInfo *th_info;
-  ThunarVfsVolume *th_vol;
-  ThunarVfsPath *th_path;
-#endif
-  gboolean unmounted = FALSE;
-  gchar *addr;
-  
-  g_object_get (G_OBJECT (device), "address", &addr, NULL);
-  vol = libhal_volume_from_device_file (priv->hal_context, addr);
-  if (vol == NULL) {
-    /* if we can't get a volume, then we're assuming that there is no disc in the drive */
-    return TRUE;
-  }
-
-  if (!libhal_volume_is_mounted (vol))
-    return TRUE;
-
-#ifdef HAVE_THUNAR_VFS
-  mp = libhal_volume_get_mount_point (vol);
-  DBG ("%s is mounted at %s", addr, mp);
-
-
-  th_path = thunar_vfs_path_new (mp, NULL);
-  if (!th_path) {
-    g_warning ("Error getting thunar path for %s!", mp);
-    return FALSE;
-  }
-
-  th_info = thunar_vfs_info_new_for_path (th_path, NULL);
-  thunar_vfs_path_unref (th_path);
-  if (!th_info) {
-    g_warning ("Error getting thunar info for %s!", mp);
-    return FALSE;
-  }
-
-  th_vol = thunar_vfs_volume_manager_get_volume_by_info (priv->thunar_volman, th_info);
-  thunar_vfs_info_unref (th_info);
-
-  if (!th_vol) {
-    g_warning ("Error getting thunar volume for %s!", mp);
-    return FALSE;
-  }
-
-  if (!thunar_vfs_volume_is_mounted (th_vol)) {
-    return FALSE;
-  }
-
-  /* FIXME: ask if we should unmount? */
-  unmounted = thunar_vfs_volume_unmount (th_vol, NULL, NULL);
-  if (unmounted)
-    g_message ("Unmounted %s", mp);
-  else {
-    xfce_err ("Failed to unmount %s. Drive cannot be used for burning.", mp);
-    DBG ("Failed to unmount %s", mp);
-  }
-
-#endif
-  return unmounted;
-}
-
-#endif /* HAVE_HAL */
diff --git a/xfburn/xfburn-hal-manager.h b/xfburn/xfburn-hal-manager.h
deleted file mode 100644
index 89bdcf9..0000000
--- a/xfburn/xfburn-hal-manager.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- *  Copyright (c) 2005-2006 Jean-François Wauthy (pollux at xfce.org)
- *  Copyright (c) 2008      David Mohr (david at mcbf.net)
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program 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 Library General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef __XFBURN_HAL_MANAGER_H__
-#define __XFBURN_HAL_MANAGER_H__
-
-#ifdef HAVE_HAL
-
-#ifdef	HAVE_CONFIG_H
-#include <config.h>
-#endif /* !HAVE_CONFIG_H */
-
-#include <gtk/gtk.h>
-
-#include "xfburn-progress-dialog.h"
-#include "xfburn-device-list.h"
-
-G_BEGIN_DECLS
-
-#define XFBURN_TYPE_HAL_MANAGER         (xfburn_hal_manager_get_type ())
-#define XFBURN_HAL_MANAGER(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), XFBURN_TYPE_HAL_MANAGER, XfburnHalManager))
-#define XFBURN_HAL_MANAGER_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), XFBURN_TYPE_HAL_MANAGER, XfburnHalManagerClass))
-#define XFBURN_IS_HAL_MANAGER(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), XFBURN_TYPE_HAL_MANAGER))
-#define XFBURN_IS_HAL_MANAGER_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), XFBURN_TYPE_HAL_MANAGER))
-#define XFBURN_HAL_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), XFBURN_TYPE_HAL_MANAGER, XfburnHalManagerClass))
-
-typedef struct
-{
-  GObject parent;
-} XfburnHalManager;
-
-typedef struct
-{
-  XfburnProgressDialogClass parent_class;
-  
-  void (*volume_changed) (XfburnHalManager *halman);
-} XfburnHalManagerClass;
-
-GType xfburn_hal_manager_get_type (void);
-//GObject *xfburn_hal_manager_new (); /* use _create_global / _get_instance instead */
-gchar *xfburn_hal_manager_create_global (void);
-XfburnHalManager * xfburn_hal_manager_get_global (void);
-void xfburn_hal_manager_shutdown (void);
-void xfburn_hal_manager_send_volume_changed (void);
-int xfburn_hal_manager_get_devices (XfburnHalManager *halman, GList **devices);
-gboolean xfburn_hal_manager_check_ask_umount (XfburnHalManager *halman, XfburnDevice *device);
-
-G_END_DECLS
-
-#endif /* HAVE_HAL */
-
-#endif /* XFBURN_HAL_MANAGER_H */
diff --git a/xfburn/xfburn-main-window.c b/xfburn/xfburn-main-window.c
index 3451ac0..4b3b40c 100644
--- a/xfburn/xfburn-main-window.c
+++ b/xfburn/xfburn-main-window.c
@@ -22,7 +22,7 @@
 
 #include <gtk/gtk.h>
 #include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 
 #include <exo/exo.h>
 
@@ -479,79 +479,69 @@ action_quit (GtkAction * action, XfburnMainWindow * window)
 static void
 action_about (GtkAction * action, XfburnMainWindow * window)
 {
-  XfceAboutInfo *info;
-  GtkWidget *dialog;
   gint x, y;
-  GdkPixbuf *icon;
-  guint n;
-
-  static const struct
-  {
-    gchar *name, *email, *language;
-  } translators[] = {
-    {"Mohamed Magdy", "mohamed.m.k at gmail.com", "ar",},
-    {"Pau Rul lan Ferragut", "paurullan at bulma.net", "ca",},
-    {"Michal Várady", "miko.vaji at gmail.com", "cs",},
-    {"Enrico Tröger", "enrico.troeger at uvena.de", "de",},
-    {"Fabian Nowak", "timstery at arcor.de", "de",},
-    {"Nico Schümann", "nico at prog.nico22.de", "de",},
-    {"Stavros Giannouris", "stavrosg2002 at freemail.gr", "el",},
-    {"Jeff Bailes", "thepizzaking at gmail.com", "en_GB",},
-    {"Diego Rodriguez", "dieymir at yahoo.es", "es",},
-    {"Kristjan Siimson", "kristjan.siimson at gmail.com", "et",},
-    {"Piarres Beobide", "pi at beobide.net", "eu",},
-    {"Jari Rahkonen", "jari.rahkonen at pp1.inet.fi", "fi",},
-    {"Etienne Collet", "xanaxlnx at gmail.com", "fr",},
-    {"Maximilian Schleiss", "maximilian at xfce.org", "fr",},
-    {"Attila Szervác", "sas at 321.hu", "hu",},
-    {"Daichi Kawahata", "daichi at xfce.org", "ja",},
-    {"ByungHyun Choi", "byunghyun.choi at debianusers.org", "kr",},
-    {"Mantas", "mantaz at users.sourceforge.net", "lt",},
-    {"Rihards Prieditis", "RPrieditis at inbox.lv", "lv",},
-    {"Terje Uriansrud", "ter at operamail.com", "nb_NO",},
-    {"Stephan Arts", "psybsd at gmail.com", "nl",},
-    {"Szymon Kałasz", "szymon_maestro at gazeta.pl", "pl",},
-    {"Fábio Nogueira", "deb-user-ba at ubuntu.com", "pt_BR",},
-    {"Og Maciel", "omaciel at xfce.org", "pt_BR",},
-    {"Nuno Miguel", "nunis at netcabo.pt", "pt_PT",},
-    {"Sergey Fedoseev", "fedoseev.sergey at gmail.com", "ru",},
-    {"Besnik Bleta", "besnik at programeshqip.org", "sq",},
-    {"Maxim V. Dziumanenko", "mvd at mylinux.com.ua", "uk",},
-    {"Dmitry Nikitin", "", "uk",},
-    {"ﻢﺤﻣﺩ ﻊﻠﻳ ﺎﻠﻤﻜﻳ", "makki.ma at gmail.com", "ur",},
-    {"正龙 赵", "longer.zhao at gmail.com", "zh_CN",},
-    {"Cosmo Chene", "cosmolax at gmail.com", "zh_TW",},
-  };
+  GdkPixbuf *icon = NULL;
+  const gchar *auth[] = { "David Mohr david at mcbf.net Author/Maintainer",
+	  		  "Mario Đanić mario at libburnia-project.org Author/Maintainer",
+			  "Jean-François Wauthy pollux at xfce.org Retired author/maintainer",
+			  NULL };
+  const gchar *translators =
+    "Mohamed Magdy mohamed.m.k at gmail.com ar\n"
+    "Pau Rul lan Ferragut paurullan at bulma.net ca\n"
+    "Michal Várady miko.vaji at gmail.com cs\n"
+    "Enrico Tröger enrico.troeger at uvena.de de\n"
+    "Fabian Nowak timstery at arcor.de de\n"
+    "Nico Schümann nico at prog.nico22.de de\n"
+    "Stavros Giannouris stavrosg2002 at freemail.gr el\n"
+    "Jeff Bailes thepizzaking at gmail.com en_GB\n"
+    "Diego Rodriguez dieymir at yahoo.es es\n"
+    "Kristjan Siimson kristjan.siimson at gmail.com et\n"
+    "Piarres Beobide pi at beobide.net eu\n"
+    "Jari Rahkonen jari.rahkonen at pp1.inet.fi fi\n"
+    "Etienne Collet xanaxlnx at gmail.com fr\n"
+    "Maximilian Schleiss maximilian at xfce.org fr\n"
+    "Attila Szervác sas at 321.hu hu\n"
+    "Daichi Kawahata daichi at xfce.org ja\n"
+    "ByungHyun Choi byunghyun.choi at debianusers.org kr\n"
+    "Mantas mantaz at users.sourceforge.net lt\n"
+    "Rihards Prieditis RPrieditis at inbox.lv lv\n"
+    "Terje Uriansrud ter at operamail.com nb_NO\n"
+    "Stephan Arts psybsd at gmail.com nl\n"
+    "Szymon Kałasz szymon_maestro at gazeta.pl pl\n"
+    "Fábio Nogueira deb-user-ba at ubuntu.com pt_BR\n"
+    "Og Maciel omaciel at xfce.org pt_BR\n"
+    "Nuno Miguel nunis at netcabo.pt pt_PT\n"
+    "Sergey Fedoseev fedoseev.sergey at gmail.com ru\n"
+    "Besnik Bleta besnik at programeshqip.org sq\n"
+    "Maxim V. Dziumanenko mvd at mylinux.com.ua uk\n"
+    "Dmitry Nikitin  uk\n"
+    "ﻢﺤﻣﺩ ﻊﻠﻳ ﺎﻠﻤﻜﻳ makki.ma at gmail.com ur\n"
+    "正龙 赵 longer.zhao at gmail.com zh_CN\n"
+    "Cosmo Chene cosmolax at gmail.com zh_TW\n";
 
   gtk_icon_size_lookup (GTK_ICON_SIZE_DIALOG, &x, &y);
-  icon = xfce_themed_icon_load ("media-optical", x);
+  icon = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), "media-optical", x, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
   if (!icon)
-    icon = xfce_themed_icon_load ("media-cdrom", x);
+    icon = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), "media-cdrom", x, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
   if (!icon)
-    icon = xfce_themed_icon_load (GTK_STOCK_CDROM, x);
-
-  info = xfce_about_info_new ("Xfburn", VERSION, _("Another cd burning GUI"),
-                              XFCE_COPYRIGHT_TEXT ("2005-2008", "David Mohr, Mario Đanić, Jean-François Wauthy"), XFCE_LICENSE_GPL);
-  xfce_about_info_set_homepage (info, "http://www.xfce.org/projects/xfburn");
-  xfce_about_info_add_credit (info, "David Mohr", "david at mcbf.net", _("Author/Maintainer"));
-  xfce_about_info_add_credit (info, "Mario Đanić", "mario at libburnia-project.org", _("Author/Maintainer"));
-  xfce_about_info_add_credit (info, "Jean-François Wauthy", "pollux at xfce.org", _("Retired author/maintainer"));
-  
-
-  for (n = 0; n < G_N_ELEMENTS (translators); ++n) {
-    gchar *s;
-
-    s = g_strdup_printf (_("Translator (%s)"), translators[n].language);
-    xfce_about_info_add_credit (info, translators[n].name, translators[n].email, s);
-    g_free (s);
-  }
-
-  dialog = xfce_about_dialog_new_with_values (GTK_WINDOW (window), info, icon);
-  gtk_widget_set_size_request (GTK_WIDGET (dialog), 400, 300);
-  gtk_dialog_run (GTK_DIALOG (dialog));
-  gtk_widget_destroy (dialog);
+    icon = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), GTK_STOCK_CDROM, x, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
+
+#if !GTK_CHECK_VERSION (2, 18, 0)
+  gtk_about_dialog_set_email_hook (exo_gtk_url_about_dialog_hook, NULL, NULL);
+  gtk_about_dialog_set_url_hook (exo_gtk_url_about_dialog_hook, NULL, NULL);
+#endif
+  gtk_show_about_dialog(GTK_WINDOW (window),
+		  "logo", icon,
+		  "program-name", "Xfburn",
+		  "license", xfce_get_license_text (XFCE_LICENSE_TEXT_GPL),
+		  "version", VERSION,
+		  "comments", _("Another cd burning GUI"),
+		  "website", "http://www.xfce.org/projects/xfburn",
+		  "copyright", "2005-2008 David Mohr, Mario Đanić, Jean-François Wauthy",
+		  "authors", auth, 
+		  "translator-credits", translators,
+		  NULL);
 
-  xfce_about_info_free (info);
   if (G_LIKELY (icon != NULL))
     g_object_unref (G_OBJECT (icon));
 }
diff --git a/xfburn/xfburn-main.c b/xfburn/xfburn-main.c
index a3bd942..9bfd574 100644
--- a/xfburn/xfburn-main.c
+++ b/xfburn/xfburn-main.c
@@ -29,11 +29,7 @@
 #include <gtk/gtk.h>
 
 #include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
-
-#ifdef HAVE_THUNAR_VFS
-#include <thunar-vfs/thunar-vfs.h>
-#endif
+#include <libxfce4ui/libxfce4ui.h>
 
 #ifdef HAVE_GST
 #include <gst/gst.h>
@@ -48,7 +44,7 @@
 #include "xfburn-burn-image-dialog.h"
 #include "xfburn-main-window.h"
 #include "xfburn-blank-dialog.h"
-#include "xfburn-hal-manager.h"
+#include "xfburn-udev-manager.h"
 #include "xfburn-transcoder-basic.h"
 #include "xfburn-transcoder-gst.h"
 
@@ -189,7 +185,7 @@ main (int argc, char **argv)
   GtkWidget *mainwin;
   gint n_burners;
   GError *error = NULL;
-#ifdef HAVE_HAL
+#ifdef HAVE_GUDEV
   gchar *error_msg;
 #endif
   XfburnTranscoder *transcoder;
@@ -221,7 +217,7 @@ main (int argc, char **argv)
 
   if (!burn_initialize ()) {
     g_critical ("Unable to initialize libburn");
-    xfce_err (_("Unable to initialize the burning backend."));
+    xfce_dialog_show_error (NULL, NULL, _("Unable to initialize the burning backend."));
     gdk_threads_leave ();
     return EXIT_FAILURE;
   }
@@ -275,25 +271,15 @@ main (int argc, char **argv)
 
   xfburn_settings_init ();
   
-#ifdef HAVE_THUNAR_VFS
-  thunar_vfs_init ();
-  g_message ("Using Thunar-VFS %d.%d.%d", THUNAR_VFS_MAJOR_VERSION, THUNAR_VFS_MINOR_VERSION, THUNAR_VFS_MICRO_VERSION);
-#else
-  g_message ("Thunar-VFS not available, using default implementation");
-#endif
-  
-#ifdef HAVE_HAL
-  error_msg = xfburn_hal_manager_create_global ();
+#ifdef HAVE_GUDEV
+  error_msg = xfburn_udev_manager_create_global ();
   if (error_msg) {
-    xfce_err (error_msg);
-#ifdef HAVE_THUNAR_VFS
-    thunar_vfs_shutdown ();
-#endif
+    xfce_dialog_show_error (NULL, NULL, error_msg);
     gdk_threads_leave ();
     burn_finish ();
     return EXIT_FAILURE;
   } else {
-    g_message ("Using HAL");
+    g_message ("Using UDEV");
   }
 #endif
 
@@ -342,7 +328,7 @@ main (int argc, char **argv)
   }
 
   if (!xfburn_transcoder_is_initialized (transcoder, &error)) {
-    xfce_warn (_("Failed to initialize %s transcoder: %s\n\t(falling back to basic implementation)"), xfburn_transcoder_get_name (transcoder), error->message);
+    xfce_dialog_show_warning(NULL, NULL, _("Failed to initialize %s transcoder: %s\n\t(falling back to basic implementation)"), xfburn_transcoder_get_name (transcoder), error->message);
     g_error_free (error);
     g_object_unref (transcoder);
     transcoder = XFBURN_TRANSCODER (xfburn_transcoder_basic_new ());
@@ -375,7 +361,7 @@ main (int argc, char **argv)
       if (g_file_test (image_fullname, G_FILE_TEST_EXISTS))
 	xfburn_burn_image_dialog_set_filechooser_name (dialog, image_fullname);
       else
-	xfce_err ( g_strdup_printf ( _("Image file '%s' does not exist."), image_fullname));
+        xfce_dialog_show_error (NULL, NULL, _("Image file '%s' does not exist."), image_fullname);
     }
 
     gtk_dialog_run (GTK_DIALOG (dialog));
@@ -413,14 +399,10 @@ main (int argc, char **argv)
   g_object_unref (devlist);
   g_object_unref (transcoder);
 
-#ifdef HAVE_HAL
-  xfburn_hal_manager_shutdown ();
+#ifdef HAVE_GUDEV
+  xfburn_udev_manager_shutdown ();
 #endif
 
-#ifdef HAVE_THUNAR_VFS
-  thunar_vfs_shutdown ();
-#endif
-  
   xfburn_settings_flush ();
   xfburn_settings_free ();
   
diff --git a/xfburn/xfburn-perform-burn.h b/xfburn/xfburn-perform-burn.h
index d3504d4..b077a9e 100644
--- a/xfburn/xfburn-perform-burn.h
+++ b/xfburn/xfburn-perform-burn.h
@@ -25,7 +25,7 @@
 #endif
 
 #include <gtk/gtk.h>
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 
 #include <libburn.h>
 
diff --git a/xfburn/xfburn-preferences-dialog.c b/xfburn/xfburn-preferences-dialog.c
index 6e9d025..dee0002 100644
--- a/xfburn/xfburn-preferences-dialog.c
+++ b/xfburn/xfburn-preferences-dialog.c
@@ -20,7 +20,7 @@
 #include <config.h>
 #endif /* !HAVE_CONFIG_H */
 
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 #include <exo/exo.h>
 
 #include "xfburn-preferences-dialog.h"
@@ -185,7 +185,7 @@ xfburn_preferences_dialog_init (XfburnPreferencesDialog * obj)
   vbox2 = gtk_vbox_new (FALSE, 0);
   gtk_widget_show (vbox2);
 
-  frame = xfce_create_framebox_with_content (_("Temporary directory"), vbox2);
+  frame = xfce_gtk_frame_box_new_with_content (_("Temporary directory"), vbox2);
   gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, BORDER);
   gtk_widget_show (frame);
 
@@ -200,7 +200,7 @@ xfburn_preferences_dialog_init (XfburnPreferencesDialog * obj)
   vbox2 = gtk_vbox_new (FALSE, 0);
   gtk_widget_show (vbox2);
 
-  frame = xfce_create_framebox_with_content (_("File browser"), vbox2);
+  frame = xfce_gtk_frame_box_new_with_content (_("File browser"), vbox2);
   gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, BORDER);
   gtk_widget_show (frame);
 
@@ -240,7 +240,7 @@ xfburn_preferences_dialog_init (XfburnPreferencesDialog * obj)
   vbox2 = gtk_vbox_new (FALSE, 0);
   gtk_widget_show (vbox2);
 
-  frame = xfce_create_framebox_with_content (_("Detected devices"), vbox2);
+  frame = xfce_gtk_frame_box_new_with_content (_("Detected devices"), vbox2);
   gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, BORDER);
   gtk_widget_show (frame);
 
@@ -292,17 +292,17 @@ xfburn_preferences_dialog_init (XfburnPreferencesDialog * obj)
   gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, BORDER);
   gtk_widget_show (hbox);
 
-  priv->button_scan = xfce_create_mixed_button (GTK_STOCK_CDROM, _("Sc_an for devices"));
+  priv->button_scan = xfce_gtk_button_new_mixed (GTK_STOCK_CDROM, _("Sc_an for devices"));
   gtk_box_pack_end (GTK_BOX (hbox), priv->button_scan, FALSE, FALSE, BORDER);
   g_signal_connect (G_OBJECT (priv->button_scan), "clicked", G_CALLBACK (scan_button_clicked_cb), obj);
   gtk_widget_show (priv->button_scan);
 
   gtk_icon_size_lookup (GTK_ICON_SIZE_DIALOG, &x, &y);
-  icon = xfce_themed_icon_load ("media-optical", x);
+  icon = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), "media-optical", x, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
   if (!icon)
-    icon = xfce_themed_icon_load ("media-cdrom", x);
+    icon = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), "media-cdrom", x, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
   if (!icon)
-    icon = xfce_themed_icon_load (GTK_STOCK_CDROM, x);
+    icon = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), GTK_STOCK_CDROM, x, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
 
   
   gtk_list_store_append (icon_store, &iter);
@@ -326,7 +326,7 @@ xfburn_preferences_dialog_init (XfburnPreferencesDialog * obj)
   vbox3 = gtk_vbox_new (FALSE, 0);
   gtk_widget_show (vbox3);
 
-  frame = xfce_create_framebox_with_content (_("FIFO buffer size (in kb)"), vbox3);
+  frame = xfce_gtk_frame_box_new_with_content (_("FIFO buffer size (in kb)"), vbox3);
   gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, BORDER);
   gtk_widget_show (frame);
 
@@ -460,7 +460,7 @@ scan_button_clicked_cb (GtkWidget * button, gpointer user_data)
 static void 
 cb_show_hidden_clicked (GtkButton * Button, gpointer user_data)
 {
-  xfce_warn (_("Changing this setting only takes full effect after a program restart."));
+  xfce_dialog_show_warning(NULL, NULL, _("Changing this setting only takes full effect after a program restart."));
 }
 
 /* public */
diff --git a/xfburn/xfburn-progress-dialog.c b/xfburn/xfburn-progress-dialog.c
index b3a145b..1272e03 100644
--- a/xfburn/xfburn-progress-dialog.c
+++ b/xfburn/xfburn-progress-dialog.c
@@ -30,7 +30,7 @@
 
 #include <gtk/gtk.h>
 
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 
 #include "xfburn-progress-dialog.h"
 #include "xfburn-global.h"
@@ -603,7 +603,7 @@ xfburn_progress_dialog_burning_failed (XfburnProgressDialog * dialog, const gcha
   xfburn_progress_dialog_set_status_with_text (dialog, XFBURN_PROGRESS_DIALOG_STATUS_FAILED, _("Failure"));
 
   gdk_threads_enter ();
-  xfce_err (msg_error);
+  xfce_dialog_show_error (NULL, NULL, "%s", msg_error);
   gdk_threads_leave ();
 }
 
diff --git a/xfburn/xfburn-settings.h b/xfburn/xfburn-settings.h
index b25e7d5..098aad2 100644
--- a/xfburn/xfburn-settings.h
+++ b/xfburn/xfburn-settings.h
@@ -24,6 +24,7 @@
 #endif /* !HAVE_CONFIG_H */
 
 #include <glib.h>
+#include <glib-object.h>
 
 G_BEGIN_DECLS
 
diff --git a/xfburn/xfburn-transcoder-basic.c b/xfburn/xfburn-transcoder-basic.c
index d9aeb4d..2cc8b58 100644
--- a/xfburn/xfburn-transcoder-basic.c
+++ b/xfburn/xfburn-transcoder-basic.c
@@ -33,7 +33,7 @@
 #include <errno.h>
 
 #include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 
 #include <libburn.h>
 
@@ -235,7 +235,7 @@ is_valid_wav (const gchar *path)
   fd = open (path, 0);
 
   if (fd == -1) {
-    xfce_warn (_("Could not open %s."), path);
+    xfce_dialog_show_warning(NULL, "", _("Could not open %s."), path);
     return FALSE;
   }
 
diff --git a/xfburn/xfburn-transcoder-gst.c b/xfburn/xfburn-transcoder-gst.c
index da17d6f..b0955cf 100644
--- a/xfburn/xfburn-transcoder-gst.c
+++ b/xfburn/xfburn-transcoder-gst.c
@@ -36,7 +36,6 @@
 #include <errno.h>
 
 #include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
 
 #include <libburn.h>
 
diff --git a/xfburn/xfburn-udev-manager.c b/xfburn/xfburn-udev-manager.c
new file mode 100644
index 0000000..5de2daa
--- /dev/null
+++ b/xfburn/xfburn-udev-manager.c
@@ -0,0 +1,527 @@
+/*
+ *  Copyright (c) 2005-2006 Jean-François Wauthy (pollux at xfce.org)
+ *  Copyright (c) 2008      David Mohr (dmohr at mcbf.net)
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program 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 Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef	HAVE_CONFIG_H
+#include <config.h>
+#endif /* !HAVE_CONFIG_H */
+
+#ifdef HAVE_GUDEV
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#include <gio/gio.h>
+#include <gudev/gudev.h>
+
+#include <errno.h>
+
+#include <libxfce4util/libxfce4util.h>
+#include <libxfce4ui/libxfce4ui.h>
+
+#include "xfburn-global.h"
+#include "xfburn-progress-dialog.h"
+#include "xfburn-device-list.h"
+
+#include "xfburn-udev-manager.h"
+
+static void xfburn_udev_manager_class_init (XfburnUdevManagerClass * klass);
+static void xfburn_udev_manager_init (XfburnUdevManager * obj);
+static void xfburn_udev_manager_finalize (GObject * object);
+
+static GObject * xfburn_udev_manager_new (void);
+
+static void cb_device_monitor_uevent(GUdevClient  *client, const gchar  *action, GUdevDevice  *udevice, XfburnUdevManager *obj);
+
+#define XFBURN_UDEV_MANAGER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), XFBURN_TYPE_UDEV_MANAGER, XfburnUdevManagerPrivate))
+
+enum {
+  VOLUME_CHANGED,
+  LAST_SIGNAL,
+}; 
+
+typedef struct {
+  GUdevClient *client;
+  GVolumeMonitor *volume_monitor;
+  gchar *error;
+} XfburnUdevManagerPrivate;
+
+typedef struct {
+  GMainLoop *loop;
+  GCancellable *cancel;
+  guint timeout_id;
+  gboolean result;
+  GError *error;
+} XfburnUdevManagerGioOperation;
+
+static XfburnUdevManager *instance = NULL;
+
+/*********************/
+/* class declaration */
+/*********************/
+static XfburnProgressDialogClass *parent_class = NULL;
+static guint signals[LAST_SIGNAL];
+
+GType
+xfburn_udev_manager_get_type (void)
+{
+  static GType type = 0;
+
+  if (type == 0) {
+    static const GTypeInfo our_info = {
+      sizeof (XfburnUdevManagerClass),
+      NULL,
+      NULL,
+      (GClassInitFunc) xfburn_udev_manager_class_init,
+      NULL,
+      NULL,
+      sizeof (XfburnUdevManager),
+      0,
+      (GInstanceInitFunc) xfburn_udev_manager_init,
+      NULL
+    };
+
+    type = g_type_register_static (G_TYPE_OBJECT, "XfburnUdevManager", &our_info, 0);
+  }
+
+  return type;
+}
+
+static void
+xfburn_udev_manager_class_init (XfburnUdevManagerClass * klass)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+  
+  g_type_class_add_private (klass, sizeof (XfburnUdevManagerPrivate));
+  
+  parent_class = g_type_class_peek_parent (klass);
+
+  object_class->finalize = xfburn_udev_manager_finalize;
+
+  signals[VOLUME_CHANGED] = g_signal_new ("volume-changed", XFBURN_TYPE_UDEV_MANAGER, G_SIGNAL_ACTION,
+                                          G_STRUCT_OFFSET (XfburnUdevManagerClass, volume_changed),
+                                          NULL, NULL, g_cclosure_marshal_VOID__VOID,
+                                          G_TYPE_NONE, 0);
+}
+
+static void
+xfburn_udev_manager_init (XfburnUdevManager * obj)
+{
+  XfburnUdevManagerPrivate *priv = XFBURN_UDEV_MANAGER_GET_PRIVATE (obj);
+  const gchar* const subsystems[] = { "block", NULL };
+
+  priv->error = NULL;
+  priv->volume_monitor = NULL;
+  priv->client = g_udev_client_new (subsystems);
+  if (G_LIKELY (priv->client != NULL)) {
+    g_signal_connect (G_OBJECT (priv->client), "uevent",
+		      G_CALLBACK (cb_device_monitor_uevent), obj);
+
+    priv->volume_monitor = g_volume_monitor_get();
+    if (priv->volume_monitor != NULL) {
+      //g_signal_connect (G_OBJECT (priv->volume_monitor), "volume-added", G_CALLBACK (cb_volumes_changed), box);
+      //g_signal_connect (G_OBJECT (priv->volume_monitor), "volume-removed", G_CALLBACK (cb_volumes_changed), box);
+    } else {
+      g_warning ("Error trying to access g_volume_monitor!");
+    }
+  }
+}
+
+static void
+xfburn_udev_manager_finalize (GObject * object)
+{
+  XfburnUdevManagerPrivate *priv = XFBURN_UDEV_MANAGER_GET_PRIVATE (object);
+
+  g_object_unref (priv->volume_monitor);
+  g_object_unref (priv->client);
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+  instance = NULL;
+}
+
+static void cb_device_monitor_uevent(GUdevClient  *client,
+				     const gchar  *action,
+				     GUdevDevice  *udevice,
+				     XfburnUdevManager *obj)
+{
+  DBG ("UDEV: device uevent: %s", action);
+
+  if (g_str_equal (action, "remove") || g_str_equal (action, "add"))
+    g_signal_emit (instance, signals[VOLUME_CHANGED], 0);
+
+  /* Lets ignore this for now,
+   * way too many of these get triggered when a disc is
+   * inserted or removed!
+  DBG ("HAL: property modified");
+  g_signal_emit (instance, signals[VOLUME_CHANGED], 0);
+  */
+}
+
+static GObject *
+xfburn_udev_manager_new (void)
+{
+  if (G_UNLIKELY (instance != NULL))
+    g_error ("Trying to create a second instance of udev manager!");
+  return g_object_new (XFBURN_TYPE_UDEV_MANAGER, NULL);
+}
+
+/*        */
+/* public */
+/*        */
+
+gchar *
+xfburn_udev_manager_create_global (void)
+{
+  XfburnUdevManagerPrivate *priv;
+
+  instance = XFBURN_UDEV_MANAGER (xfburn_udev_manager_new ());
+
+  priv = XFBURN_UDEV_MANAGER_GET_PRIVATE (instance);
+
+  if (priv->error) {
+    gchar *error_msg, *ret;
+
+    error_msg = g_strdup (priv->error);
+    xfburn_udev_manager_shutdown ();
+    ret = g_strdup_printf ("Failed to initialize %s!", error_msg);
+    g_free (error_msg);
+    return ret;
+  } else
+    return NULL;
+}
+
+XfburnUdevManager *
+xfburn_udev_manager_get_global (void)
+{
+  if (G_UNLIKELY (instance == NULL))
+    g_error ("There is no instance of a udev manager!");
+  return instance;
+}
+
+void
+xfburn_udev_manager_shutdown (void)
+{
+  if (G_UNLIKELY (instance == NULL))
+    g_error ("There is no instance of a udev manager!");
+  g_object_unref (instance);
+  instance = NULL;
+}
+
+void
+xfburn_udev_manager_send_volume_changed (void)
+{
+  //gdk_threads_enter ();
+  g_signal_emit (instance, signals[VOLUME_CHANGED], 0);
+  //gdk_threads_leave ();
+}
+
+GList * 
+xfburn_udev_manager_get_devices (XfburnUdevManager *udevman, gint *drives, gint *burners)
+{
+  XfburnUdevManagerPrivate *priv = XFBURN_UDEV_MANAGER_GET_PRIVATE (udevman);
+  GList *devices, *l;
+  GList *device_list = NULL;
+
+  (*drives) = 0;
+  (*burners) = 0;
+
+  if (priv->client == NULL)
+    return NULL;
+
+  devices = g_udev_client_query_by_subsystem (priv->client, "block");
+  for (l = devices; l != NULL; l = l->next) {
+    const gchar *id_type = g_udev_device_get_property (l->data, "ID_TYPE");
+    if (g_strcmp0 (id_type, "cd") == 0) {
+      gboolean cdr = g_udev_device_get_property_as_boolean(l->data, "ID_CDROM_CD_R");
+      gboolean cdrw = g_udev_device_get_property_as_boolean(l->data, "ID_CDROM_CD_RW");
+      gboolean dvdr = g_udev_device_get_property_as_boolean(l->data, "ID_CDROM_DVD_R")
+      	           || g_udev_device_get_property_as_boolean(l->data, "ID_CDROM_DVD_RW")
+                   || g_udev_device_get_property_as_boolean(l->data, "ID_CDROM_DVD_PLUS_R")
+                   || g_udev_device_get_property_as_boolean(l->data, "ID_CDROM_DVD_PLUS_RW")
+                   || g_udev_device_get_property_as_boolean(l->data, "ID_CDROM_DVD_PLUS_R_DL");
+      gboolean dvdram = g_udev_device_get_property_as_boolean(l->data, "ID_CDROM_DVD_RAM");
+
+      (*drives)++;
+
+      if (cdr || dvdr || dvdram) {
+        XfburnDevice *device;
+        const gchar *addr, *name, *str_model, *str_vendor; 
+
+        device = xfburn_device_new ();
+
+	/* vendor */
+	str_vendor = g_udev_device_get_sysfs_attr(l->data, "device/vendor");
+        if (str_vendor == NULL)
+	  str_vendor = g_udev_device_get_property (l->data, "ID_VENDOR_FROM_DATABASE");
+        if (str_vendor == NULL)
+          str_vendor = g_udev_device_get_property (l->data, "ID_VENDOR");
+	if (str_vendor == NULL)
+          str_vendor = g_udev_device_get_sysfs_attr (l->data, "manufacturer");
+
+        /* model */
+	str_model = g_udev_device_get_sysfs_attr(l->data, "device/model");
+        if (str_model == NULL)
+          str_model = g_udev_device_get_property (l->data, "ID_MODEL_FROM_DATABASE");
+        if (str_model == NULL)
+          str_model = g_udev_device_get_property (l->data, "ID_MODEL");
+        if (str_model == NULL)
+          str_model = g_udev_device_get_sysfs_attr (l->data, "product");
+							
+        name = xfburn_device_set_name (device, str_vendor, str_model);
+
+        addr = g_udev_device_get_device_file(l->data);
+#ifdef DEBUG_NULL_DEVICE
+        g_object_set (G_OBJECT (device), "address", "stdio:/dev/null", NULL);
+#else
+        g_object_set (G_OBJECT (device), "address", addr, NULL);
+#endif
+
+        g_object_set (G_OBJECT (device), "cdr", cdr, NULL);
+        g_object_set (G_OBJECT (device), "cdrw", cdrw, NULL);
+        g_object_set (G_OBJECT (device), "dvdr", dvdr, NULL);
+        g_object_set (G_OBJECT (device), "dvdram", dvdram, NULL);
+
+        if (!xfburn_device_can_burn (device)) {
+          g_message ("Ignoring reader '%s' at '%s'", name, addr);
+          g_object_unref (device);
+        } else {
+          (*burners)++;
+          device_list = g_list_append (device_list, device);
+          DBG ("Found writer '%s' at '%s'", name, addr);
+        }
+      }
+    }
+    g_object_unref (l->data);
+  }
+  g_list_free (devices);
+  return device_list;
+}
+
+static void
+xfburn_udev_manager_gio_operation_end (gpointer callback_data)
+{
+  XfburnUdevManagerGioOperation *operation = callback_data;
+
+  if (!operation->loop)
+    return;
+  if (!g_main_loop_is_running (operation->loop))
+    return;
+  g_main_loop_quit (operation->loop);	
+}
+
+static void
+cb_device_umounted (GMount *mount,
+                    XfburnUdevManagerGioOperation *operation)
+{
+  xfburn_udev_manager_gio_operation_end (operation);
+  operation->result = TRUE;
+}
+
+static void
+cb_device_umount_finish (GObject *source,
+                         GAsyncResult *result,
+                         gpointer user_data)
+{
+  XfburnUdevManagerGioOperation *op = user_data;
+
+  if (!op->loop)
+    return;
+
+  op->result = g_mount_unmount_with_operation_finish (G_MOUNT (source),
+				     		    result,
+				     		    &op->error);
+
+  g_debug("Umount operation completed (result = %d)", op->result);
+
+  if (op->error) {
+    if (op->error->code == G_IO_ERROR_NOT_MOUNTED) {
+      /* That can happen sometimes */
+      g_error_free (op->error);
+      op->error = NULL;
+      op->result = TRUE;
+    }
+    /* Since there was an error. The "unmounted" signal won't be 
+     * emitted by GVolumeMonitor and therefore we'd get stuck if
+     * we didn't get out of the loop. */
+    xfburn_udev_manager_gio_operation_end (op);
+  } else if (!op->result) {
+    xfburn_udev_manager_gio_operation_end (op);
+  }
+}
+
+static void
+cb_gio_operation_cancelled (GCancellable *cancel,
+                            XfburnUdevManagerGioOperation *operation)
+{
+  operation->result = FALSE;
+  g_cancellable_cancel (operation->cancel);
+  if (operation->loop && g_main_loop_is_running (operation->loop))
+    g_main_loop_quit (operation->loop);
+}
+
+static gboolean
+cb_gio_operation_timeout (gpointer callback_data)
+{
+  XfburnUdevManagerGioOperation *operation = callback_data;
+
+  g_warning ("Volume/Disc operation timed out");
+
+  xfburn_udev_manager_gio_operation_end (operation);
+  operation->timeout_id = 0;
+  operation->result = FALSE;
+  return FALSE;
+}
+
+/* @Return TRUE if the drive is now accessible, FALSE if not.
+ */
+gboolean
+xfburn_udev_manager_check_ask_umount (XfburnUdevManager *udevman, XfburnDevice *device)
+{
+  XfburnUdevManagerPrivate *priv = XFBURN_UDEV_MANAGER_GET_PRIVATE (udevman);
+  gboolean unmounted = FALSE;
+  gchar *device_file;
+  GList *mounts;
+  GMount *mount = NULL;
+  GList *i;
+  gchar *mp;
+
+  if (priv->volume_monitor == NULL)
+    return FALSE;
+
+  mounts = g_volume_monitor_get_mounts (priv->volume_monitor);
+
+  g_object_get (G_OBJECT (device), "address", &device_file, NULL);
+  for (i = mounts; i != NULL; i = i->next) {
+    GVolume *v;
+
+    mount = G_MOUNT (i->data);
+    v = g_mount_get_volume (mount);
+    if (v != NULL) {
+      char *devname = NULL;
+      gboolean match;
+
+      devname = g_volume_get_identifier (v, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
+      match = g_str_equal (devname, device_file);
+
+      g_free (devname);
+      g_object_unref (v);
+
+      if (match)
+        break;
+    }
+    g_object_unref (mount);
+    mount = NULL;
+  }
+  g_list_free (mounts);
+
+  if (mount == NULL)
+    return TRUE;
+
+  if (g_mount_can_unmount (mount)) {
+    /* FIXME: ask if we should unmount? */
+    gulong umount_sig;
+    XfburnUdevManagerGioOperation *op;
+
+    op = g_new0 (XfburnUdevManagerGioOperation, 1);
+    op->cancel = g_cancellable_new();
+
+    umount_sig = g_signal_connect_after (mount,
+                                         "unmounted",
+                                         G_CALLBACK (cb_device_umounted),
+                                         op);
+
+    /* NOTE: we own a reference to mount
+     * object so no need to ref it even more */
+    g_mount_unmount_with_operation (mount,
+                                    G_MOUNT_UNMOUNT_NONE,
+                                    NULL,
+                                    op->cancel,
+                                    cb_device_umount_finish,
+                                    op);
+    DBG("Waiting for end of async operation");
+    g_cancellable_reset (op->cancel);
+    g_signal_connect (op->cancel,
+                      "cancelled",
+                      G_CALLBACK (cb_gio_operation_cancelled),
+                      op);
+
+    /* put a timeout (15 sec) */
+    op->timeout_id = g_timeout_add_seconds (15,
+                                            cb_gio_operation_timeout,
+                                            op);
+
+    op->loop = g_main_loop_new (NULL, FALSE);
+
+    GDK_THREADS_LEAVE ();
+    g_main_loop_run (op->loop);
+    GDK_THREADS_ENTER ();
+
+    g_main_loop_unref (op->loop);
+    op->loop = NULL;
+
+    if (op->timeout_id) {
+      g_source_remove (op->timeout_id);
+      op->timeout_id = 0;
+    }
+
+    if (op->error) {
+      g_warning ("Medium op finished with an error: %s", op->error->message);
+
+      if (op->error->code == G_IO_ERROR_FAILED_HANDLED) {
+        DBG("Error already handled and displayed by GIO");
+
+        /* means we shouldn't display any error message since 
+         * that was already done */
+        g_error_free (op->error);
+        op->error = NULL;
+      } else
+        g_error_free (op->error);
+
+      op->error = NULL;
+    }
+
+    unmounted = op->result;
+
+    if (op->cancel) {
+      g_cancellable_cancel (op->cancel);
+      g_object_unref (op->cancel);
+    }
+    if (op->timeout_id) {
+      g_source_remove (op->timeout_id);
+    }
+    if (op->loop && g_main_loop_is_running (op->loop))
+      g_main_loop_quit (op->loop);
+    g_signal_handler_disconnect (mount, umount_sig);
+  }
+
+  mp = g_mount_get_name(mount);
+  if (unmounted)
+    g_message ("Unmounted '%s'", mp);
+  else {
+    xfce_dialog_show_error (NULL, NULL, "Failed to unmount '%s'. Drive cannot be used for burning.", mp);
+    DBG ("Failed to unmount '%s'", mp);
+  }
+
+  g_free(mp);
+  g_object_unref (mount);
+
+  return unmounted;
+}
+
+#endif /* HAVE_GUDEV */
diff --git a/xfburn/xfburn-udev-manager.h b/xfburn/xfburn-udev-manager.h
new file mode 100644
index 0000000..0dbfbf6
--- /dev/null
+++ b/xfburn/xfburn-udev-manager.h
@@ -0,0 +1,68 @@
+/*
+ *  Copyright (c) 2005-2006 Jean-François Wauthy (pollux at xfce.org)
+ *  Copyright (c) 2008      David Mohr (david at mcbf.net)
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program 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 Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __XFBURN_UDEV_MANAGER_H__
+#define __XFBURN_UDEV_MANAGER_H__
+
+#ifdef HAVE_GUDEV
+
+#ifdef	HAVE_CONFIG_H
+#include <config.h>
+#endif /* !HAVE_CONFIG_H */
+
+#include <gtk/gtk.h>
+
+#include "xfburn-progress-dialog.h"
+#include "xfburn-device-list.h"
+
+G_BEGIN_DECLS
+
+#define XFBURN_TYPE_UDEV_MANAGER         (xfburn_udev_manager_get_type ())
+#define XFBURN_UDEV_MANAGER(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), XFBURN_TYPE_UDEV_MANAGER, XfburnUdevManager))
+#define XFBURN_UDEV_MANAGER_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), XFBURN_TYPE_UDEV_MANAGER, XfburnUdevManagerClass))
+#define XFBURN_IS_UDEV_MANAGER(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), XFBURN_TYPE_UDEV_MANAGER))
+#define XFBURN_IS_UDEV_MANAGER_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), XFBURN_TYPE_UDEV_MANAGER))
+#define XFBURN_UDEV_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), XFBURN_TYPE_UDEV_MANAGER, XfburnUdevManagerClass))
+
+typedef struct
+{
+  GObject parent;
+} XfburnUdevManager;
+
+typedef struct
+{
+  XfburnProgressDialogClass parent_class;
+  
+  void (*volume_changed) (XfburnUdevManager *udevman);
+} XfburnUdevManagerClass;
+
+GType xfburn_udev_manager_get_type (void);
+//GObject *xfburn_udev_manager_new (); /* use _create_global / _get_instance instead */
+gchar *xfburn_udev_manager_create_global (void);
+XfburnUdevManager * xfburn_udev_manager_get_global (void);
+void xfburn_udev_manager_shutdown (void);
+void xfburn_udev_manager_send_volume_changed (void);
+GList *xfburn_udev_manager_get_devices (XfburnUdevManager *udevman, gint *drives, gint *burners);
+gboolean xfburn_udev_manager_check_ask_umount (XfburnUdevManager *udevman, XfburnDevice *device);
+
+G_END_DECLS
+
+#endif /* HAVE_GUDEV */
+
+#endif /* XFBURN_UDEV_MANAGER_H */


More information about the Xfce4-commits mailing list