summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-11-24 18:19:46 +0100
committerStefano Karapetsas <[email protected]>2012-11-24 18:19:46 +0100
commit23536328cce34467f2a106662e2bb2c0d8507467 (patch)
tree4ea6149d1d6e8020a39eac943db7d19402cb5055
parent8c30f31702202aed1b7e8c21b204a44ac2dc37cc (diff)
downloadmate-applets-23536328cce34467f2a106662e2bb2c0d8507467.tar.bz2
mate-applets-23536328cce34467f2a106662e2bb2c0d8507467.tar.xz
drivemount: remove mateconf usage
-rw-r--r--drivemount/Makefile.am24
-rw-r--r--drivemount/drive-button.c26
-rw-r--r--drivemount/drivemount.c3
-rw-r--r--drivemount/drivemount.schemas.in64
4 files changed, 9 insertions, 108 deletions
diff --git a/drivemount/Makefile.am b/drivemount/Makefile.am
index e9a6f01f..b30a9cce 100644
--- a/drivemount/Makefile.am
+++ b/drivemount/Makefile.am
@@ -4,7 +4,7 @@ INCLUDES = \
-I. \
-I$(srcdir) \
-DDRIVEMOUNT_MENU_UI_DIR=\""$(uidir)"\" \
- $(MATE_APPLETS3_CFLAGS)
+ $(MATE_APPLETS4_CFLAGS)
libexec_PROGRAMS = drivemount_applet2
@@ -16,7 +16,7 @@ drivemount_applet2_SOURCES = \
drive-button.h
drivemount_applet2_LDADD = \
- $(MATE_APPLETS3_LIBS)
+ $(MATE_APPLETS4_LIBS)
appletdir = $(datadir)/mate-panel/applets
@@ -43,29 +43,11 @@ org.mate.panel.applet.DriveMountAppletFactory.service: $(service_in_files)
uidir = $(datadir)/mate-2.0/ui
ui_DATA = drivemount-applet-menu.xml
-schemasdir = $(MATECONF_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.mate.applets.DriveMountApplet.mate-panel-applet.in.in \
$(service_in_files) \
- $(schemas_in_files) \
$(ui_DATA)
-if MATECONF_SCHEMAS_INSTALL
-install-data-local:
- if test -z "$(DESTDIR)" ; then \
- for p in $(schemas_DATA) ; do \
- MATECONF_CONFIG_SOURCE=$(MATECONF_SCHEMA_CONFIG_SOURCE) $(MATECONFTOOL) --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 d692b490..bd738fb5 100644
--- a/drivemount/drive-button.c
+++ b/drivemount/drive-button.c
@@ -29,7 +29,6 @@
#include "drive-button.h"
#include <glib/gi18n.h>
#include <gdk/gdkkeysyms.h>
-#include <mateconf/mateconf-client.h>
#include <string.h>
@@ -40,8 +39,6 @@ enum {
CMD_EJECT
};
-#define MATECONF_ROOT_AUTOPLAY "/desktop/mate/volume_manager/"
-
/* type registration boilerplate code */
G_DEFINE_TYPE(DriveButton, drive_button, GTK_TYPE_BUTTON)
@@ -809,34 +806,23 @@ 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)
{
- MateConfClient *mateconf_client = mateconf_client_get_default ();
- char *command = mateconf_client_get_string (mateconf_client,
- autoplay_key, NULL);
-
- if (!command)
- command = g_strdup (dflt);
-
- run_command (self, command);
-
- g_free (command);
- g_object_unref (mateconf_client);
+ run_command (self, dflt);
}
static void
play_dvd (DriveButton *self, GtkWidget *item)
{
- play_autoplay_media (self, MATECONF_ROOT_AUTOPLAY "autoplay_dvd_command",
- "totem %d");
+ /* FIXME add an option to set this */
+ play_autoplay_media (self, "totem %d");
}
static void
play_cda (DriveButton *self, GtkWidget *item)
{
- play_autoplay_media (self, MATECONF_ROOT_AUTOPLAY "autoplay_cda_command",
- "sound-juicer -d %d");
+ /* FIXME add an option to set this */
+ play_autoplay_media (self, "sound-juicer -d %d");
}
static void
diff --git a/drivemount/drivemount.c b/drivemount/drivemount.c
index 8fd56b9b..27d5e969 100644
--- a/drivemount/drivemount.c
+++ b/drivemount/drivemount.c
@@ -175,9 +175,6 @@ applet_factory (MatePanelApplet *applet,
gtk_window_set_default_icon_name ("media-floppy");
mate_panel_applet_set_flags (applet, MATE_PANEL_APPLET_EXPAND_MINOR);
- mate_panel_applet_add_preferences (applet,
- "/schemas/apps/drivemount-applet/prefs",
- NULL);
mate_panel_applet_set_background_widget (applet, GTK_WIDGET (applet));
drive_list = drive_list_new ();
diff --git a/drivemount/drivemount.schemas.in b/drivemount/drivemount.schemas.in
deleted file mode 100644
index b078de25..00000000
--- a/drivemount/drivemount.schemas.in
+++ /dev/null
@@ -1,64 +0,0 @@
-<mateconfschemafile>
- <schemalist>
- <schema>
- <key>/schemas/apps/drivemount-applet/prefs/interval</key>
- <owner>drivemount-applet</owner>
- <type>int</type>
- <default>10</default>
- <locale name="C">
- <short>Interval timeout to check mount point status</short>
- <long>Time in seconds between status updates</long>
- </locale>
- </schema>
- <schema>
- <key>/schemas/apps/drivemount-applet/prefs/pixmap</key>
- <owner>drivemount-applet</owner>
- <type>int</type>
- <default>0</default>
- <locale name="C">
- <short></short>
- <long></long>
- </locale>
- </schema>
- <schema>
- <key>/schemas/apps/drivemount-applet/prefs/scale</key>
- <owner>drivemount-applet</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short></short>
- <long></long>
- </locale>
- </schema>
- <schema>
- <key>/schemas/apps/drivemount-applet/prefs/auto_eject</key>
- <owner>drivemount-applet</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short></short>
- <long></long>
- </locale>
- </schema>
- <schema>
- <key>/schemas/apps/drivemount-applet/prefs/mount_point</key>
- <owner>drivemount-applet</owner>
- <type>string</type>
- <default>/mnt/floppy</default>
- <locale name="C">
- <short></short>
- <long></long>
- </locale>
- </schema>
- <schema>
- <key>/schemas/apps/drivemount-applet/prefs/autofs_friendly</key>
- <owner>drivemount-applet</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short></short>
- <long></long>
- </locale>
- </schema>
- </schemalist>
-</mateconfschemafile>