Commit 80d2acac authored by Philippe Rouquier's avatar Philippe Rouquier

Have brasero use GSettings instead of GConf

It also refactors the code in several places.
parent 3994c4f7
...@@ -50,6 +50,8 @@ LT_INIT ...@@ -50,6 +50,8 @@ LT_INIT
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
dnl **************** Support GSettings *************************
GLIB_GSETTINGS
dnl **************** documentation ***************************** dnl **************** documentation *****************************
GNOME_DOC_INIT GNOME_DOC_INIT
...@@ -139,10 +141,10 @@ GLIB_REQUIRED=2.22.0 ...@@ -139,10 +141,10 @@ GLIB_REQUIRED=2.22.0
GTHREAD_REQUIRED=2.6.0 GTHREAD_REQUIRED=2.6.0
GMODULE_REQUIRED=2.6.0 GMODULE_REQUIRED=2.6.0
GMODULE_EXPORT_REQUIRED=2.6.0 GMODULE_EXPORT_REQUIRED=2.6.0
GIO_REQUIRED=2.22.0 GIO_REQUIRED=2.25.0
GDK_REQUIRED=2.6.0 GDK_REQUIRED=2.6.0
GTK_REQUIRED=2.19.7 GTK_REQUIRED=2.19.7
GCONF_REQUIRED=2.0.0 GCONF_REQUIRED=2.31.1
GSTREAMER_REQUIRED=0.10.15 GSTREAMER_REQUIRED=0.10.15
GSTREAMER_BASE_REQUIRED=0.10.0 GSTREAMER_BASE_REQUIRED=0.10.0
LIBXML2_REQUIRED=2.6.0 LIBXML2_REQUIRED=2.6.0
...@@ -597,18 +599,6 @@ else ...@@ -597,18 +599,6 @@ else
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale", [Location of package locale files]) AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale", [Location of package locale files])
fi fi
dnl ***** GCONF *************************
AC_ARG_ENABLE(schemas-install,AS_HELP_STRING([--disable-schemas-install],[Disable installation of the gconf schemas]))
AM_CONDITIONAL(SCHEMAS_INSTALL, test x$enable_schemas_install != xno)
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
if test x"$GCONFTOOL" = "xno"; then
AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
fi
AM_GCONF_SOURCE_2
dnl ****** END *********************** dnl ****** END ***********************
AC_CONFIG_FILES([ AC_CONFIG_FILES([
...@@ -624,6 +614,7 @@ docs/reference/libbrasero-burn/version.xml ...@@ -624,6 +614,7 @@ docs/reference/libbrasero-burn/version.xml
data/Makefile data/Makefile
data/brasero.desktop.in data/brasero.desktop.in
data/icons/Makefile data/icons/Makefile
data/mime/Makefile
help/Makefile help/Makefile
nautilus/Makefile nautilus/Makefile
nautilus/brasero-nautilus.desktop.in nautilus/brasero-nautilus.desktop.in
......
SUBDIRS = icons SUBDIRS = icons mime
@INTLTOOL_SCHEMAS_RULE@ convertdir=$(datadir)/GConf/gsettings
convert_DATA=brasero.convert
schemasdir = @GCONF_SCHEMA_FILE_DIR@ gsettings_SCHEMAS = org.gnome.brasero.gschema.xml
schemas_in_files = brasero.schemas.in @INTLTOOL_XML_NOMERGE_RULE@
schemas_DATA = $(schemas_in_files:.schemas.in=.schemas) @GSETTINGS_RULES@
@INTLTOOL_DESKTOP_RULE@
desktopdir=$(datadir)/applications desktopdir=$(datadir)/applications
desktop_in_files = brasero.desktop.in desktop_in_files = brasero.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_XML_RULE@ @INTLTOOL_DESKTOP_RULE@
MIMEFILES = brasero.xml.in
mimedir = $(datadir)/mime/packages
mime_DATA = brasero.xml
IMAGES= logo.png IMAGES= logo.png
CLEANFILES = $(desktop_DATA) \ CLEANFILES = $(desktop_DATA) \
$(mime_DATA) \
$(schemas_DATA) $(schemas_DATA)
EXTRA_DIST = brasero.xml \
$(desktop_in_files) \
$(schemas_in_files) \
$(MIMEFILES) \
$(IMAGES)
braserodistpixdir = $(datadir)/brasero/ EXTRA_DIST = $(desktop_in_files) \
braserodistpix_DATA = $(IMAGES) $(gsettings_SCHEMAS) \
$(convert_DATA)
UPDATE_MIME = \
if [ -f $(DESTDIR)$(datadir)/mime/packages/freedesktop.org.xml ] ; then \
if which update-mime-database>/dev/null 2>&1; then \
update-mime-database $(DESTDIR)$(datadir)/mime; \
fi \
fi
UPDATE_DESKTOP = \ UPDATE_DESKTOP = \
if [ -f $(DESTDIR)$(datadir)/applications/defaults.list ] ; then \ if [ -f $(DESTDIR)$(datadir)/applications/defaults.list ] ; then \
...@@ -50,21 +30,8 @@ UPDATE_DESKTOP = \ ...@@ -50,21 +30,8 @@ UPDATE_DESKTOP = \
fi \ fi \
fi fi
if GCONF_SCHEMAS_INSTALL
# don't do this if we are building in eg. rpm
install-data-local: $(schemas_DATA)
if test -z "$(DESTDIR)" ; then \
for p in $(schemas_DATA) ; do \
GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_builddir)/data/$$p ; \
done \
fi
else
install-data-local:
endif
install-data-hook: install-data-hook:
if UPDATE_CACHES if UPDATE_CACHES
$(UPDATE_MIME)
$(UPDATE_DESKTOP) $(UPDATE_DESKTOP)
else else
@true @true
...@@ -72,7 +39,6 @@ endif ...@@ -72,7 +39,6 @@ endif
uninstall-hook: uninstall-hook:
if UPDATE_CACHES if UPDATE_CACHES
$(UPDATE_MIME)
$(UPDATE_DESKTOP) $(UPDATE_DESKTOP)
else else
@true @true
......
[org.gnome.brasero.config]
tmpdir=/apps/brasero/drives/tmpdir
dao-flag=/apps/brasero/config/dao_flag
immed-flag=/apps/brasero/config/immed_flag
minbuf-value=/apps/brasero/config/minbug_value
raw-flag=/apps/brasero/config/raw_flag
checksum-files=/apps/brasero/config/checksum_files
checksum-image=/apps/brasero/config/checksum_image
[org.gnome.brasero.filter]
broken-sym=/apps/brasero/filter/broken_sym
replace-sym=/apps/brasero/filter/replace_sym
[org.gnome.brasero.display]
iso-folder=/apps/brasero/display/iso_folder
\ No newline at end of file
<gconfschemafile>
<schemalist>
<schema>
<key>/schemas/apps/brasero/nautilus-extension-debug</key>
<applyto>/apps/brasero/nautilus-extension-debug</applyto>
<owner>brasero</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Should Nautilus extension output debug statements</short>
<long>
Should Nautilus extension output debug statements. The value should be set to true if it should.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/brasero/config/engine-group</key>
<applyto>/apps/brasero/config/engine-group</applyto>
<owner>brasero</owner>
<type>string</type>
<default></default>
<locale name="C">
<short>Favourite burn engine</short>
<long>
Contains the name of the favourite burn engine suite installed. It will be used if possible.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/brasero/config/plugins</key>
<applyto>/apps/brasero/config/plugins</applyto>
<owner>brasero</owner>
<type>list</type>
<list_type>string</list_type>
<default>[]</default>
<locale name="C">
<short>White list of additional plugins to use</short>
<long>
Contains the list of additional plugins Brasero will use to burn discs. If set to NULL, Brasero will load them all.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/brasero/config/immed_flag</key>
<applyto>/apps/brasero/config/immed_flag</applyto>
<owner>brasero</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Enable the "-immed" flag with cdrecord</short>
<long>Whether to use the "-immed" flag with cdrecord. Use with caution (set to true) as it's only a workaround for some drives/setups.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/brasero/config/dao_flag</key>
<applyto>/apps/brasero/config/dao_flag</applyto>
<owner>brasero</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Whether to use the "-use-the-force-luke=dao" flag with growisofs</short>
<long>Whether to use the "-use-the-force-luke=dao" flag with
growisofs. Set to false, brasero won't use it; it may be a workaround for some drives/setups.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/brasero/config/minbuf_value</key>
<applyto>/apps/brasero/config/minbuf_value</applyto>
<owner>brasero</owner>
<type>int</type>
<default>0</default>
<locale name="C">
<short>Used in conjunction with the "-immed" flag with cdrecord</short>
<long>Used in conjunction with the "-immed" flag with cdrecord.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/brasero/config/raw_flag</key>
<applyto>/apps/brasero/config/raw_flag</applyto>
<owner>brasero</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Whether to use the "--driver generic-mmc-raw" flag with cdrdao</short>
<long>Whether to use the "--driver generic-mmc-raw" flag with
cdrdao. Set to True, brasero will use it; it may be a workaround for some drives/setups.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/brasero/display/viewer</key>
<applyto>/apps/brasero/display/viewer</applyto>
<owner>brasero</owner>
<type>bool</type>
<default>true</default>
<locale name="C">
<short>Enable file preview</short>
<long>Whether to display file preview. Set to true to use it.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/brasero/filter/hidden</key>
<applyto>/apps/brasero/filter/hidden</applyto>
<owner>brasero</owner>
<type>bool</type>
<default>true</default>
<locale name="C">
<short>Should brasero filter hidden files</short>
<long>Should brasero filter hidden files. Set to true, brasero will filter hidden files.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/brasero/filter/replace_sym</key>
<applyto>/apps/brasero/filter/replace_sym</applyto>
<owner>brasero</owner>
<type>bool</type>
<default>true</default>
<locale name="C">
<short>Replace symbolic links by their targets</short>
<long>Should brasero replace symbolic links by their target files in the project. Set to true, brasero will replace symbolic links.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/brasero/filter/broken_sym</key>
<applyto>/apps/brasero/filter/broken_sym</applyto>
<owner>brasero</owner>
<type>bool</type>
<default>true</default>
<locale name="C">
<short>Should brasero filter broken symbolic links</short>
<long>Should brasero filter broken symbolic links. Set to true, brasero will filter broken symbolic links.</long>
</locale>
</schema>
</schemalist>
</gconfschemafile>
MIMEFILES = brasero.xml.in
mimedir = $(datadir)/mime/packages
mime_DATA = brasero.xml
@INTLTOOL_XML_RULE@
CLEANFILES = $(mime_DATA)
EXTRA_DIST = $(MIMEFILES)
UPDATE_MIME = \
if [ -f $(DESTDIR)$(datadir)/mime/packages/freedesktop.org.xml ] ; then \
if which update-mime-database>/dev/null 2>&1; then \
update-mime-database $(DESTDIR)$(datadir)/mime; \
fi \
fi
install-data-hook:
if UPDATE_CACHES
$(UPDATE_MIME)
else
@true
endif
uninstall-hook:
if UPDATE_CACHES
$(UPDATE_MIME)
else
@true
endif
-include $(top_srcdir)/git.mk
<schemalist>
<schema id="org.gnome.brasero" path="/apps/brasero/">
<key name="nautilus-extension-debug" type="b">
<default>false</default>
<_summary>Should Nautilus extension output debug statements</_summary>
<_description>Should Nautilus extension output debug statements. The value should be set to true if it should.</_description>
</key>
<child name="config" schema="org.gnome.brasero.config"/>
<child name="display" schema="org.gnome.brasero.display"/>
<child name="filter" schema="org.gnome.brasero.filter"/>
</schema>
<schema id="org.gnome.brasero.config" path="/apps/brasero/config/">
<key name="checksum-image" type="i">
<default>0</default>
<_summary>The type of checksum used for images</_summary>
<_description>Set to 0 for MD5, 1 for SHA1 and 2 for SHA256</_description>
</key>
<key name="checksum-files" type="i">
<default>0</default>
<_summary>The type of checksum used for files</_summary>
<_description>Set to 0 for MD5, 1 for SHA1 and 2 for SHA256</_description>
</key>
<key name="tmpdir" type="s">
<default>''</default>
<_summary>Directory to use for temporary files</_summary>
<_description>Contains the path to the directory where brasero should store temporary files. If that value is empty, the default directory set for glib will be used.</_description>
</key>
<key name="engine-group" type="s">
<default>''</default>
<_summary>Favourite burn engine</_summary>
<_description>Contains the name of the favourite burn engine suite installed. It will be used if possible.</_description>
</key>
<key name="plugins" type="as">
<default>[]</default>
<_summary>White list of additional plugins to use</_summary>
<_description>Contains the list of additional plugins Brasero will use to burn discs. If set to NULL, Brasero will load them all.</_description>
</key>
<key name="immed-flag" type="b">
<default>false</default>
<_summary>Enable the "-immed" flag with cdrecord</_summary>
<_description>Whether to use the "-immed" flag with cdrecord. Use with caution (set to true) as it's only a workaround for some drives/setups.</_description>
</key>
<key name="dao-flag" type="b">
<default>false</default>
<_summary>Whether to use the "-use-the-force-luke=dao" flag with growisofs</_summary>
<_description>Whether to use the "-use-the-force-luke=dao" flag with growisofs. Set to false, brasero won't use it; it may be a workaround for some drives/setups.</_description>
</key>
<key name="minbuf-value" type="i">
<default>0</default>
<_summary>Used in conjunction with the "-immed" flag with cdrecord</_summary>
<_description>Used in conjunction with the "-immed" flag with cdrecord.</_description>
</key>
<key name="raw-flag" type="b">
<default>false</default>
<_summary>Whether to use the "--driver generic-mmc-raw" flag with cdrdao</_summary>
<_description>Whether to use the "--driver generic-mmc-raw" flag with cdrdao. Set to True, brasero will use it; it may be a workaround for some drives/setups.</_description>
</key>
</schema>
<schema id="org.gnome.brasero.display" path="/apps/brasero/display/">
<key name="iso-folder" type="s">
<default>''</default>
<_summary>The last browsed folder while looking for images to burn</_summary>
<_description>Contains the absolute path of the directory that was last browsed for images to burn</_description>
</key>
<key name="viewer" type="b">
<default>true</default>
<_summary>Enable file preview</_summary>
<_description>Whether to display file preview. Set to true to use it.</_description>
</key>
</schema>
<schema id="org.gnome.brasero.filter" path="/apps/brasero/filter/">
<key name="hidden" type="b">
<default>true</default>
<_summary>Should brasero filter hidden files</_summary>
<_description>Should brasero filter hidden files. Set to true, brasero will filter hidden files.</_description>
</key>
<key name="replace-sym" type="b">
<default>true</default>
<_summary>Replace symbolic links by their targets</_summary>
<_description>Should brasero replace symbolic links by their target files in the project. Set to true, brasero will replace symbolic links.</_description>
</key>
<key name="broken-sym" type="b">
<default>true</default>
<_summary>Should brasero filter broken symbolic links</_summary>
<_description>Should brasero filter broken symbolic links. Set to true, brasero will filter broken symbolic links.</_description>
</key>
</schema>
<schema id="org.gnome.brasero.plugins">
<key name="priority" type="i">
<default>0</default>
<_summary>The priority value for the plugin</_summary>
<_description>When several plugins are available for the same task, this value is used to determine which plugin should be given priority. 0 means the plugin's native priority is used. A positive value overrides the plugin's native priority. A negative value disables the plugin.</_description>
</key>
</schema>
<schema id="org.gnome.brasero.drives">
<key name="flags" type="i">
<default>1</default>
<_summary>Burning flags to be used</_summary>
<_description>This value represents the burning flags that were used in such a context the last time.</_description>
</key>
<key name="speed" type="i">
<default>0</default>
<_summary>The speed to be used</_summary>
<_description>This value represents the speed that was used in such a context the last time.</_description>
</key>
</schema>
</schemalist>
\ No newline at end of file
...@@ -2,7 +2,6 @@ prefix=@prefix@ ...@@ -2,7 +2,6 @@ prefix=@prefix@
exec_prefix=@exec_prefix@ exec_prefix=@exec_prefix@
libdir=@libdir@ libdir=@libdir@
includedir=@includedir@ includedir=@includedir@
gconf_serverdir=@libexecdir@
Name: libbrasero-burn Name: libbrasero-burn
......
...@@ -13,7 +13,6 @@ INCLUDES = \ ...@@ -13,7 +13,6 @@ INCLUDES = \
$(WARN_CFLAGS) \ $(WARN_CFLAGS) \
$(DISABLE_DEPRECATED) \ $(DISABLE_DEPRECATED) \
$(BRASERO_GMODULE_CFLAGS) \ $(BRASERO_GMODULE_CFLAGS) \
$(BRASERO_GCONF_CFLAGS) \
$(BRASERO_GLIB_CFLAGS) \ $(BRASERO_GLIB_CFLAGS) \
$(BRASERO_GIO_CFLAGS) \ $(BRASERO_GIO_CFLAGS) \
$(BRASERO_GTK_CFLAGS) \ $(BRASERO_GTK_CFLAGS) \
...@@ -65,7 +64,6 @@ libbrasero_burn_la_LIBADD = \ ...@@ -65,7 +64,6 @@ libbrasero_burn_la_LIBADD = \
$(BRASERO_GTHREAD_LIBS) \ $(BRASERO_GTHREAD_LIBS) \
$(BRASERO_GMODULE_LIBS) \ $(BRASERO_GMODULE_LIBS) \
$(BRASERO_GIO_LIBS) \ $(BRASERO_GIO_LIBS) \
$(BRASERO_GCONF_LIBS) \
$(BRASERO_GTK_LIBS) \ $(BRASERO_GTK_LIBS) \
$(BRASERO_GSTREAMER_LIBS) \ $(BRASERO_GSTREAMER_LIBS) \
$(BRASERO_DBUS_LIBS) \ $(BRASERO_DBUS_LIBS) \
......
...@@ -75,28 +75,6 @@ brasero_burn_caps_job_error_cb (BraseroJob *job, ...@@ -75,28 +75,6 @@ brasero_burn_caps_job_error_cb (BraseroJob *job,
BraseroBurnError error, BraseroBurnError error,
BraseroBurnCaps *caps) BraseroBurnCaps *caps)
{ {
#if 0
GError *error = NULL;
GConfClient *client;
/* This was originally to fix a bug in fedora 5 that prevents from
* sending SCSI commands as a normal user through cdrdao. There is a
* fallback fortunately with cdrecord and raw images but no on_the_fly
* burning.
* That could be used as a hook to know how a job runs and give a
* "penalty" to job types being too often faulty. There could also be
* a dialog to ask the user if he wants to use another backend.
*/
/* set it in GConf to remember that next time */
client = gconf_client_get_default ();
gconf_client_set_bool (client, GCONF_KEY_CDRDAO_DISABLED, TRUE, &error);
if (error) {
g_warning ("Can't write with GConf: %s", error->message);
g_error_free (error);
}
g_object_unref (client);
#endif
return BRASERO_BURN_ERR; return BRASERO_BURN_ERR;
} }
......
...@@ -42,8 +42,6 @@ ...@@ -42,8 +42,6 @@
#include <gio/gio.h> #include <gio/gio.h>
#include <gconf/gconf-client.h>
#include "brasero-units.h" #include "brasero-units.h"
#include "brasero-data-project.h" #include "brasero-data-project.h"
......
...@@ -37,8 +37,6 @@ ...@@ -37,8 +37,6 @@
#include <glib.h> #include <glib.h>
#include <glib/gi18n-lib.h> #include <glib/gi18n-lib.h>
#include <gconf/gconf-client.h>
#include "brasero-misc.h" #include "brasero-misc.h"
#include "brasero-data-vfs.h" #include "brasero-data-vfs.h"
...@@ -66,6 +64,8 @@ struct _BraseroDataVFSPrivate ...@@ -66,6 +64,8 @@ struct _BraseroDataVFSPrivate
BraseroIOJobBase *load_uri; BraseroIOJobBase *load_uri;
BraseroIOJobBase *load_contents; BraseroIOJobBase *load_contents;
GSettings *settings;
guint replace_sym:1; guint replace_sym:1;
guint filter_hidden:1; guint filter_hidden:1;
guint filter_broken_sym:1; guint filter_broken_sym:1;
...@@ -1030,63 +1030,25 @@ brasero_data_vfs_reset (BraseroDataProject *project, ...@@ -1030,63 +1030,25 @@ brasero_data_vfs_reset (BraseroDataProject *project,
} }
static void static void
brasero_data_vfs_filter_hidden_changed (GConfClient *client, brasero_data_vfs_settings_changed (GSettings *settings,
guint cxn, const gchar *key,
GConfEntry *entry, BraseroDataVFS *self)
gpointer data)
{
BraseroDataVFSPrivate *priv;
GConfValue *value;
priv = BRASERO_DATA_VFS_PRIVATE (data);
value = gconf_entry_get_value (entry);
if (value->type != GCONF_VALUE_BOOL)
return;
priv->filter_hidden = gconf_value_get_bool (value);
}
static void
brasero_data_vfs_filter_broken_sym_changed (GConfClient *client,
guint cxn,
GConfEntry *entry,
gpointer data)
{ {
BraseroDataVFSPrivate *priv; BraseroDataVFSPrivate *priv;
GConfValue *value;
priv = BRASERO_DATA_VFS_PRIVATE (data);
value = gconf_entry_get_value (entry);
if (value->type != GCONF_VALUE_BOOL)
return;
priv->filter_broken_sym = gconf_value_get_bool (value);
}
static void priv = BRASERO_DATA_VFS_PRIVATE (self);
brasero_data_vfs_replace_sym_changed (GConfClient *client,
guint cxn,
GConfEntry *entry,
gpointer data)
{
BraseroDataVFSPrivate *priv;
GConfValue *value;
priv = BRASERO_DATA_VFS_PRIVATE (data);
value = gconf_entry_get_value (entry);
if (value->type != GCONF_VALUE_BOOL)
return;
priv->replace_sym = gconf_value_get_bool (value); if (g_strcmp0 (key, BRASERO_PROPS_FILTER_REPLACE_SYMLINK))
priv->replace_sym = g_settings_get_boolean (settings, BRASERO_PROPS_FILTER_REPLACE_SYMLINK);
if (g_strcmp0 (key, BRASERO_PROPS_FILTER_BROKEN))
priv->filter_broken_sym = g_settings_get_boolean (settings, BRASERO_PROPS_FILTER_BROKEN);
if (g_strcmp0 (key, BRASERO_PROPS_FILTER_HIDDEN))
priv->filter_hidden = g_settings_get_boolean (settings, BRASERO_PROPS_FILTER_HIDDEN);
} }
static void static void
brasero_data_vfs_init (BraseroDataVFS *object) brasero_data_vfs_init (BraseroDataVFS *object)
{ {
GConfClient *client;
BraseroDataVFSPrivate *priv; BraseroDataVFSPrivate *priv;
priv = BRASERO_DATA_VFS_PRIVATE (object); priv = BRASERO_DATA_VFS_PRIVATE (object);
...@@ -1094,36 +1056,14 @@ brasero_data_vfs_init (BraseroDataVFS *object) ...@@ -1094,36 +1056,14 @@ brasero_data_vfs_init (BraseroDataVFS *object)
priv->filtered = brasero_filtered_uri_new (); priv->filtered = brasero_filtered_uri_new ();
/* load the fitering rules */ /* load the fitering rules */
client = gconf_client_get_default (); priv->settings = g_settings_new (BRASERO_SCHEMA_FILTER);
priv->replace_sym = gconf_client_get_bool (client, priv->replace_sym = g_settings_get_boolean (priv->settings, BRASERO_PROPS_FILTER_REPLACE_SYMLINK);
BRASERO_REPLACE_SYMLINK_KEY, priv->filter_broken_sym = g_settings_get_boolean (priv->settings, BRASERO_PROPS_FILTER_BROKEN);
NULL); priv->filter_hidden = g_settings_get_boolean (priv->settings, BRASERO_PROPS_FILTER_HIDDEN);
priv->filter_hidden = gconf_client_get_bool (client, g_signal_connect (priv->settings,
BRASERO_FILTER_HIDDEN_KEY, "changed",
NULL); G_CALLBACK (brasero_data_vfs_settings_changed),
priv->filter_broken_sym = gconf_client_get_bool (client, object);
BRASERO_FILTER_BROKEN_SYM_KEY,
NULL);
gconf_client_notify_add (client,
BRASERO_FILTER_HIDDEN_KEY,
brasero_data_vfs_filter_hidden_changed,
object,
NULL,
NULL);
gconf_client_notify_add (client,
BRASERO_FILTER_BROKEN_SYM_KEY,
brasero_data_vfs_filter_broken_sym_changed,
object,
NULL,
NULL);
gconf_client_notify_add (client,
BRASERO_REPLACE_SYMLINK_KEY,
brasero_data_vfs_replace_sym_changed,
object,
NULL,
NULL);
g_object_unref (client);
/* create the hash tables */ /* create the hash tables */
priv->loading = g_hash_table_new (g_str_hash, g_str_equal); priv->loading = g_hash_table_new (g_str_hash, g_str_equal);
...@@ -1154,6 +1094,11 @@ brasero_data_vfs_finalize (GObject *object) ...@@ -1154,6 +1094,11 @@ brasero_data_vfs_finalize (GObject *object)
priv->filtered = NULL; priv->filtered = NULL;
} }
if (priv->settings) {
g_object_unref (priv->settings);
priv->settings = NULL;
}
G_OBJECT_CLASS (brasero_data_vfs_parent_class)->finalize (object); G_OBJECT_CLASS (brasero_data_vfs_parent_class)->finalize (object);
} }