[gnome-applets/wip/gnome-3.10+: 9/29] drivemount: remove gconf



commit 76202983f7d1f2106df2b8db612719ad2583106b
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Jul 6 18:06:19 2014 +0300

    drivemount: remove gconf

 drivemount/Makefile.am           |   20 +-----------
 drivemount/drive-button.c        |   24 ++------------
 drivemount/drivemount.schemas.in |   64 --------------------------------------
 po/POTFILES.in                   |    1 -
 4 files changed, 5 insertions(+), 104 deletions(-)
---
diff --git a/drivemount/Makefile.am b/drivemount/Makefile.am
index 0cf4bc8..65bfab9 100644
--- a/drivemount/Makefile.am
+++ b/drivemount/Makefile.am
@@ -45,29 +45,11 @@ org.gnome.panel.applet.DriveMountAppletFactory.service: $(service_in_files)
 uidir = $(pkgdatadir)/ui
 ui_DATA = drivemount-applet-menu.xml
 
-schemasdir   = $(GCONF_SCHEMA_FILE_DIR)
-schemas_in_files = drivemount.schemas.in
-schemas_DATA = $(schemas_in_files:.schemas.in=.schemas)
-
- INTLTOOL_SCHEMAS_RULE@
-
-CLEANFILES = $(applet_DATA) $(applet_DATA).in $(service_DATA) $(schemas_DATA)
+CLEANFILES = $(applet_DATA) $(applet_DATA).in $(service_DATA)
 
 EXTRA_DIST = \
  org.gnome.applets.DriveMountApplet.panel-applet.in.in \
  $(service_in_files)                                   \
- $(schemas_in_files)                                   \
  $(ui_DATA)
 
-if GCONF_SCHEMAS_INSTALL
-install-data-local:
-       if test -z "$(DESTDIR)" ; then \
-               for p in $(schemas_DATA) ; do \
-               GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule 
$(top_builddir)/drivemount/$$p ; \
-               done ; \
-       fi
-else
-install-data-local:
-endif
-
 -include $(top_srcdir)/git.mk
diff --git a/drivemount/drive-button.c b/drivemount/drive-button.c
index 9bd83af..b036b69 100644
--- a/drivemount/drive-button.c
+++ b/drivemount/drive-button.c
@@ -30,7 +30,6 @@
 #include "drive-button.h"
 #include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
-#include <gconf/gconf-client.h>
 
 #include <string.h>
 
@@ -41,8 +40,6 @@ enum {
     CMD_EJECT
 };
 
-#define GCONF_ROOT_AUTOPLAY  "/desktop/gnome/volume_manager/"
-
 /* type registration boilerplate code */
 G_DEFINE_TYPE(DriveButton, drive_button, GTK_TYPE_BUTTON)
 
@@ -823,34 +820,21 @@ eject_drive (DriveButton *self, GtkWidget *item)
     }
 }
 static void
-play_autoplay_media (DriveButton *self, const char *autoplay_key, 
-                    const char *dflt)
+play_autoplay_media (DriveButton *self, const char *dflt)
 {
-       GConfClient *gconf_client = gconf_client_get_default ();
-       char *command = gconf_client_get_string (gconf_client,
-                       autoplay_key, NULL);
-
-       if (!command)
-           command = g_strdup (dflt);
-
-       run_command (self, command);
-
-       g_free (command);
-       g_object_unref (gconf_client);
+       run_command (self, dflt);
 }
 
 static void
 play_dvd (DriveButton *self, GtkWidget *item)
 {
-        play_autoplay_media (self, GCONF_ROOT_AUTOPLAY "autoplay_dvd_command",
-                            "totem %d");
+        play_autoplay_media (self, "totem %d");
 }
 
 static void
 play_cda (DriveButton *self, GtkWidget *item)
 {
-        play_autoplay_media (self, GCONF_ROOT_AUTOPLAY "autoplay_cda_command",
-                            "sound-juicer -d %d");
+        play_autoplay_media (self, "sound-juicer -d %d");
 }
 
 static void
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 021cfe0..c247619 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -27,7 +27,6 @@ cpufreq/src/cpufreq-popup.c
 cpufreq/src/cpufreq-selector/org.gnome.cpufreqselector.policy.in
 drivemount/drive-button.c
 drivemount/drivemount.c
-drivemount/drivemount.schemas.in
 [type: gettext/ini]drivemount/org.gnome.applets.DriveMountApplet.panel-applet.in.in
 geyes/geyes.c
 [type: gettext/ini]geyes/org.gnome.applets.GeyesApplet.panel-applet.in.in


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