summaryrefslogtreecommitdiff
path: root/plugins/datetime
diff options
context:
space:
mode:
authorhaxar <[email protected]>2012-02-21 20:13:04 -0800
committerhaxar <[email protected]>2012-02-21 20:13:04 -0800
commitddaceb232c8b537a7d29a9708928d3a3671b98e5 (patch)
treed874e557f2999f9550ad2b710f0231ed06f50ba8 /plugins/datetime
parentecd8a153901507f5d210d6f85103693ef81d49c3 (diff)
downloadmate-settings-daemon-ddaceb232c8b537a7d29a9708928d3a3671b98e5.tar.bz2
mate-settings-daemon-ddaceb232c8b537a7d29a9708928d3a3671b98e5.tar.xz
gsd to msd complete rename patch by NiceandGently; code changes commit
Diffstat (limited to 'plugins/datetime')
-rw-r--r--plugins/datetime/Makefile.am26
-rw-r--r--plugins/datetime/gsd-datetime-mechanism-main.c6
-rw-r--r--plugins/datetime/gsd-datetime-mechanism.c148
-rw-r--r--plugins/datetime/gsd-datetime-mechanism.h64
-rw-r--r--plugins/datetime/org.mate.SettingsDaemon.DateTimeMechanism.service.in2
5 files changed, 123 insertions, 123 deletions
diff --git a/plugins/datetime/Makefile.am b/plugins/datetime/Makefile.am
index 1ae28f7..061443f 100644
--- a/plugins/datetime/Makefile.am
+++ b/plugins/datetime/Makefile.am
@@ -5,30 +5,30 @@ polkitdir = $(datadir)/polkit-1/actions
dbus_services_in_files = org.mate.SettingsDaemon.DateTimeMechanism.service.in
polkit_in_files = org.mate.settingsdaemon.datetimemechanism.policy.in
-gsd-datetime-mechanism-glue.h: $(srcdir)/gsd-datetime-mechanism.xml
+msd-datetime-mechanism-glue.h: $(srcdir)/msd-datetime-mechanism.xml
$(AM_V_GEN)dbus-binding-tool \
- --prefix=gsd_datetime_mechanism --mode=glib-server \
- --output=gsd-datetime-mechanism-glue.h \
- $(srcdir)/gsd-datetime-mechanism.xml
+ --prefix=msd_datetime_mechanism --mode=glib-server \
+ --output=msd-datetime-mechanism-glue.h \
+ $(srcdir)/msd-datetime-mechanism.xml
if HAVE_POLKIT
-libexec_PROGRAMS = gsd-datetime-mechanism
+libexec_PROGRAMS = msd-datetime-mechanism
endif
-gsd_datetime_mechanism_SOURCES = \
- gsd-datetime-mechanism.c \
- gsd-datetime-mechanism.h \
- gsd-datetime-mechanism-main.c \
+msd_datetime_mechanism_SOURCES = \
+ msd-datetime-mechanism.c \
+ msd-datetime-mechanism.h \
+ msd-datetime-mechanism-main.c \
system-timezone.c \
system-timezone.h
if HAVE_POLKIT
-BUILT_SOURCES = gsd-datetime-mechanism-glue.h
+BUILT_SOURCES = msd-datetime-mechanism-glue.h
endif
AM_CFLAGS = $(SETTINGS_PLUGIN_CFLAGS) $(POLKIT_CFLAGS)
-gsd_datetime_mechanism_LDADD = $(POLKIT_LIBS) $(SETTINGS_PLUGIN_LIBS)
+msd_datetime_mechanism_LDADD = $(POLKIT_LIBS) $(SETTINGS_PLUGIN_LIBS)
if HAVE_POLKIT
@@ -52,9 +52,9 @@ EXTRA_DIST = \
$(dbus_services_in_files) \
org.mate.SettingsDaemon.DateTimeMechanism.conf \
$(polkit_in_files) \
- gsd-datetime-mechanism.xml
+ msd-datetime-mechanism.xml
CLEANFILES = \
org.mate.SettingsDaemon.DateTimeMechanism.service \
org.mate.settingsdaemon.datetimemechanism.policy \
- $(BUILT_SOURCES) \ No newline at end of file
+ $(BUILT_SOURCES)
diff --git a/plugins/datetime/gsd-datetime-mechanism-main.c b/plugins/datetime/gsd-datetime-mechanism-main.c
index 7d6089f..4d13630 100644
--- a/plugins/datetime/gsd-datetime-mechanism-main.c
+++ b/plugins/datetime/gsd-datetime-mechanism-main.c
@@ -39,7 +39,7 @@
#include <dbus/dbus-glib-lowlevel.h>
-#include "gsd-datetime-mechanism.h"
+#include "msd-datetime-mechanism.h"
static DBusGProxy *
get_bus_proxy (DBusGConnection *connection)
@@ -123,7 +123,7 @@ int
main (int argc, char **argv)
{
GMainLoop *loop;
- GsdDatetimeMechanism *mechanism;
+ MsdDatetimeMechanism *mechanism;
DBusGProxy *bus_proxy;
DBusGConnection *connection;
int ret;
@@ -152,7 +152,7 @@ main (int argc, char **argv)
goto out;
}
- mechanism = gsd_datetime_mechanism_new ();
+ mechanism = msd_datetime_mechanism_new ();
if (mechanism == NULL) {
goto out;
diff --git a/plugins/datetime/gsd-datetime-mechanism.c b/plugins/datetime/gsd-datetime-mechanism.c
index 5c18040..7b0d338 100644
--- a/plugins/datetime/gsd-datetime-mechanism.c
+++ b/plugins/datetime/gsd-datetime-mechanism.c
@@ -41,8 +41,8 @@
#include "system-timezone.h"
-#include "gsd-datetime-mechanism.h"
-#include "gsd-datetime-mechanism-glue.h"
+#include "msd-datetime-mechanism.h"
+#include "msd-datetime-mechanism-glue.h"
static gboolean
do_exit (gpointer user_data)
@@ -64,26 +64,26 @@ reset_killtimer (void)
timer_id = g_timeout_add_seconds (30, do_exit, NULL);
}
-struct GsdDatetimeMechanismPrivate
+struct MsdDatetimeMechanismPrivate
{
DBusGConnection *system_bus_connection;
DBusGProxy *system_bus_proxy;
PolkitAuthority *auth;
};
-static void gsd_datetime_mechanism_finalize (GObject *object);
+static void msd_datetime_mechanism_finalize (GObject *object);
-G_DEFINE_TYPE (GsdDatetimeMechanism, gsd_datetime_mechanism, G_TYPE_OBJECT)
+G_DEFINE_TYPE (MsdDatetimeMechanism, msd_datetime_mechanism, G_TYPE_OBJECT)
-#define GSD_DATETIME_MECHANISM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_DATETIME_TYPE_MECHANISM, GsdDatetimeMechanismPrivate))
+#define MSD_DATETIME_MECHANISM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_DATETIME_TYPE_MECHANISM, MsdDatetimeMechanismPrivate))
GQuark
-gsd_datetime_mechanism_error_quark (void)
+msd_datetime_mechanism_error_quark (void)
{
static GQuark ret = 0;
if (ret == 0) {
- ret = g_quark_from_static_string ("gsd_datetime_mechanism_error");
+ ret = g_quark_from_static_string ("msd_datetime_mechanism_error");
}
return ret;
@@ -93,7 +93,7 @@ gsd_datetime_mechanism_error_quark (void)
#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
GType
-gsd_datetime_mechanism_error_get_type (void)
+msd_datetime_mechanism_error_get_type (void)
{
static GType etype = 0;
@@ -101,15 +101,15 @@ gsd_datetime_mechanism_error_get_type (void)
{
static const GEnumValue values[] =
{
- ENUM_ENTRY (GSD_DATETIME_MECHANISM_ERROR_GENERAL, "GeneralError"),
- ENUM_ENTRY (GSD_DATETIME_MECHANISM_ERROR_NOT_PRIVILEGED, "NotPrivileged"),
- ENUM_ENTRY (GSD_DATETIME_MECHANISM_ERROR_INVALID_TIMEZONE_FILE, "InvalidTimezoneFile"),
+ ENUM_ENTRY (MSD_DATETIME_MECHANISM_ERROR_GENERAL, "GeneralError"),
+ ENUM_ENTRY (MSD_DATETIME_MECHANISM_ERROR_NOT_PRIVILEGED, "NotPrivileged"),
+ ENUM_ENTRY (MSD_DATETIME_MECHANISM_ERROR_INVALID_TIMEZONE_FILE, "InvalidTimezoneFile"),
{ 0, 0, 0 }
};
- g_assert (GSD_DATETIME_MECHANISM_NUM_ERRORS == G_N_ELEMENTS (values) - 1);
+ g_assert (MSD_DATETIME_MECHANISM_NUM_ERRORS == G_N_ELEMENTS (values) - 1);
- etype = g_enum_register_static ("GsdDatetimeMechanismError", values);
+ etype = g_enum_register_static ("MsdDatetimeMechanismError", values);
}
return etype;
@@ -117,13 +117,13 @@ gsd_datetime_mechanism_error_get_type (void)
static GObject *
-gsd_datetime_mechanism_constructor (GType type,
+msd_datetime_mechanism_constructor (GType type,
guint n_construct_properties,
GObjectConstructParam *construct_properties)
{
- GsdDatetimeMechanism *mechanism;
+ MsdDatetimeMechanism *mechanism;
- mechanism = GSD_DATETIME_MECHANISM (G_OBJECT_CLASS (gsd_datetime_mechanism_parent_class)->constructor (
+ mechanism = MSD_DATETIME_MECHANISM (G_OBJECT_CLASS (msd_datetime_mechanism_parent_class)->constructor (
type,
n_construct_properties,
construct_properties));
@@ -132,47 +132,47 @@ gsd_datetime_mechanism_constructor (GType type,
}
static void
-gsd_datetime_mechanism_class_init (GsdDatetimeMechanismClass *klass)
+msd_datetime_mechanism_class_init (MsdDatetimeMechanismClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructor = gsd_datetime_mechanism_constructor;
- object_class->finalize = gsd_datetime_mechanism_finalize;
+ object_class->constructor = msd_datetime_mechanism_constructor;
+ object_class->finalize = msd_datetime_mechanism_finalize;
- g_type_class_add_private (klass, sizeof (GsdDatetimeMechanismPrivate));
+ g_type_class_add_private (klass, sizeof (MsdDatetimeMechanismPrivate));
- dbus_g_object_type_install_info (GSD_DATETIME_TYPE_MECHANISM, &dbus_glib_gsd_datetime_mechanism_object_info);
+ dbus_g_object_type_install_info (MSD_DATETIME_TYPE_MECHANISM, &dbus_glib_msd_datetime_mechanism_object_info);
- dbus_g_error_domain_register (GSD_DATETIME_MECHANISM_ERROR, NULL, GSD_DATETIME_MECHANISM_TYPE_ERROR);
+ dbus_g_error_domain_register (MSD_DATETIME_MECHANISM_ERROR, NULL, MSD_DATETIME_MECHANISM_TYPE_ERROR);
}
static void
-gsd_datetime_mechanism_init (GsdDatetimeMechanism *mechanism)
+msd_datetime_mechanism_init (MsdDatetimeMechanism *mechanism)
{
- mechanism->priv = GSD_DATETIME_MECHANISM_GET_PRIVATE (mechanism);
+ mechanism->priv = MSD_DATETIME_MECHANISM_GET_PRIVATE (mechanism);
}
static void
-gsd_datetime_mechanism_finalize (GObject *object)
+msd_datetime_mechanism_finalize (GObject *object)
{
- GsdDatetimeMechanism *mechanism;
+ MsdDatetimeMechanism *mechanism;
g_return_if_fail (object != NULL);
- g_return_if_fail (GSD_DATETIME_IS_MECHANISM (object));
+ g_return_if_fail (MSD_DATETIME_IS_MECHANISM (object));
- mechanism = GSD_DATETIME_MECHANISM (object);
+ mechanism = MSD_DATETIME_MECHANISM (object);
g_return_if_fail (mechanism->priv != NULL);
g_object_unref (mechanism->priv->system_bus_proxy);
- G_OBJECT_CLASS (gsd_datetime_mechanism_parent_class)->finalize (object);
+ G_OBJECT_CLASS (msd_datetime_mechanism_parent_class)->finalize (object);
}
static gboolean
-register_mechanism (GsdDatetimeMechanism *mechanism)
+register_mechanism (MsdDatetimeMechanism *mechanism)
{
GError *error = NULL;
@@ -205,25 +205,25 @@ error:
}
-GsdDatetimeMechanism *
-gsd_datetime_mechanism_new (void)
+MsdDatetimeMechanism *
+msd_datetime_mechanism_new (void)
{
GObject *object;
gboolean res;
- object = g_object_new (GSD_DATETIME_TYPE_MECHANISM, NULL);
+ object = g_object_new (MSD_DATETIME_TYPE_MECHANISM, NULL);
- res = register_mechanism (GSD_DATETIME_MECHANISM (object));
+ res = register_mechanism (MSD_DATETIME_MECHANISM (object));
if (! res) {
g_object_unref (object);
return NULL;
}
- return GSD_DATETIME_MECHANISM (object);
+ return MSD_DATETIME_MECHANISM (object);
}
static gboolean
-_check_polkit_for_action (GsdDatetimeMechanism *mechanism, DBusGMethodInvocation *context, const char *action)
+_check_polkit_for_action (MsdDatetimeMechanism *mechanism, DBusGMethodInvocation *context, const char *action)
{
const char *sender;
GError *error;
@@ -252,8 +252,8 @@ _check_polkit_for_action (GsdDatetimeMechanism *mechanism, DBusGMethodInvocation
}
if (!polkit_authorization_result_get_is_authorized (result)) {
- error = g_error_new (GSD_DATETIME_MECHANISM_ERROR,
- GSD_DATETIME_MECHANISM_ERROR_NOT_PRIVILEGED,
+ error = g_error_new (MSD_DATETIME_MECHANISM_ERROR,
+ MSD_DATETIME_MECHANISM_ERROR_NOT_PRIVILEGED,
"Not Authorized for action %s", action);
dbus_g_method_return_error (context, error);
g_error_free (error);
@@ -269,7 +269,7 @@ _check_polkit_for_action (GsdDatetimeMechanism *mechanism, DBusGMethodInvocation
static gboolean
-_set_time (GsdDatetimeMechanism *mechanism,
+_set_time (MsdDatetimeMechanism *mechanism,
const struct timeval *tv,
DBusGMethodInvocation *context)
{
@@ -279,8 +279,8 @@ _set_time (GsdDatetimeMechanism *mechanism,
return FALSE;
if (settimeofday (tv, NULL) != 0) {
- error = g_error_new (GSD_DATETIME_MECHANISM_ERROR,
- GSD_DATETIME_MECHANISM_ERROR_GENERAL,
+ error = g_error_new (MSD_DATETIME_MECHANISM_ERROR,
+ MSD_DATETIME_MECHANISM_ERROR_GENERAL,
"Error calling settimeofday({%lld,%lld}): %s",
(gint64) tv->tv_sec, (gint64) tv->tv_usec,
strerror (errno));
@@ -294,8 +294,8 @@ _set_time (GsdDatetimeMechanism *mechanism,
int exit_status;
if (!g_spawn_command_line_sync ("/sbin/hwclock --systohc", NULL, NULL, &exit_status, &error)) {
GError *error2;
- error2 = g_error_new (GSD_DATETIME_MECHANISM_ERROR,
- GSD_DATETIME_MECHANISM_ERROR_GENERAL,
+ error2 = g_error_new (MSD_DATETIME_MECHANISM_ERROR,
+ MSD_DATETIME_MECHANISM_ERROR_GENERAL,
"Error spawning /sbin/hwclock: %s", error->message);
g_error_free (error);
dbus_g_method_return_error (context, error2);
@@ -303,8 +303,8 @@ _set_time (GsdDatetimeMechanism *mechanism,
return FALSE;
}
if (WEXITSTATUS (exit_status) != 0) {
- error = g_error_new (GSD_DATETIME_MECHANISM_ERROR,
- GSD_DATETIME_MECHANISM_ERROR_GENERAL,
+ error = g_error_new (MSD_DATETIME_MECHANISM_ERROR,
+ MSD_DATETIME_MECHANISM_ERROR_GENERAL,
"/sbin/hwclock returned %d", exit_status);
dbus_g_method_return_error (context, error);
g_error_free (error);
@@ -332,8 +332,8 @@ _rh_update_etc_sysconfig_clock (DBusGMethodInvocation *context, const char *key,
if (!g_file_get_contents ("/etc/sysconfig/clock", &data, &len, &error)) {
GError *error2;
- error2 = g_error_new (GSD_DATETIME_MECHANISM_ERROR,
- GSD_DATETIME_MECHANISM_ERROR_GENERAL,
+ error2 = g_error_new (MSD_DATETIME_MECHANISM_ERROR,
+ MSD_DATETIME_MECHANISM_ERROR_GENERAL,
"Error reading /etc/sysconfig/clock file: %s", error->message);
g_error_free (error);
dbus_g_method_return_error (context, error2);
@@ -364,8 +364,8 @@ _rh_update_etc_sysconfig_clock (DBusGMethodInvocation *context, const char *key,
len = strlen (data);
if (!g_file_set_contents ("/etc/sysconfig/clock", data, len, &error)) {
GError *error2;
- error2 = g_error_new (GSD_DATETIME_MECHANISM_ERROR,
- GSD_DATETIME_MECHANISM_ERROR_GENERAL,
+ error2 = g_error_new (MSD_DATETIME_MECHANISM_ERROR,
+ MSD_DATETIME_MECHANISM_ERROR_GENERAL,
"Error updating /etc/sysconfig/clock: %s", error->message);
g_error_free (error);
dbus_g_method_return_error (context, error2);
@@ -384,7 +384,7 @@ _rh_update_etc_sysconfig_clock (DBusGMethodInvocation *context, const char *key,
/* exported methods */
gboolean
-gsd_datetime_mechanism_set_time (GsdDatetimeMechanism *mechanism,
+msd_datetime_mechanism_set_time (MsdDatetimeMechanism *mechanism,
gint64 seconds_since_epoch,
DBusGMethodInvocation *context)
{
@@ -399,7 +399,7 @@ gsd_datetime_mechanism_set_time (GsdDatetimeMechanism *mechanism,
}
gboolean
-gsd_datetime_mechanism_adjust_time (GsdDatetimeMechanism *mechanism,
+msd_datetime_mechanism_adjust_time (MsdDatetimeMechanism *mechanism,
gint64 seconds_to_add,
DBusGMethodInvocation *context)
{
@@ -410,8 +410,8 @@ gsd_datetime_mechanism_adjust_time (GsdDatetimeMechanism *mechanism,
if (gettimeofday (&tv, NULL) != 0) {
GError *error;
- error = g_error_new (GSD_DATETIME_MECHANISM_ERROR,
- GSD_DATETIME_MECHANISM_ERROR_GENERAL,
+ error = g_error_new (MSD_DATETIME_MECHANISM_ERROR,
+ MSD_DATETIME_MECHANISM_ERROR_GENERAL,
"Error calling gettimeofday(): %s", strerror (errno));
dbus_g_method_return_error (context, error);
g_error_free (error);
@@ -424,7 +424,7 @@ gsd_datetime_mechanism_adjust_time (GsdDatetimeMechanism *mechanism,
gboolean
-gsd_datetime_mechanism_set_timezone (GsdDatetimeMechanism *mechanism,
+msd_datetime_mechanism_set_timezone (MsdDatetimeMechanism *mechanism,
const char *zone_file,
DBusGMethodInvocation *context)
{
@@ -443,11 +443,11 @@ gsd_datetime_mechanism_set_timezone (GsdDatetimeMechanism *mechanism,
int code;
if (error->code == SYSTEM_TIMEZONE_ERROR_INVALID_TIMEZONE_FILE)
- code = GSD_DATETIME_MECHANISM_ERROR_INVALID_TIMEZONE_FILE;
+ code = MSD_DATETIME_MECHANISM_ERROR_INVALID_TIMEZONE_FILE;
else
- code = GSD_DATETIME_MECHANISM_ERROR_GENERAL;
+ code = MSD_DATETIME_MECHANISM_ERROR_GENERAL;
- error2 = g_error_new (GSD_DATETIME_MECHANISM_ERROR,
+ error2 = g_error_new (MSD_DATETIME_MECHANISM_ERROR,
code, "%s", error->message);
g_error_free (error);
@@ -464,7 +464,7 @@ gsd_datetime_mechanism_set_timezone (GsdDatetimeMechanism *mechanism,
gboolean
-gsd_datetime_mechanism_get_timezone (GsdDatetimeMechanism *mechism,
+msd_datetime_mechanism_get_timezone (MsdDatetimeMechanism *mechism,
DBusGMethodInvocation *context)
{
gchar *timezone;
@@ -479,7 +479,7 @@ gsd_datetime_mechanism_get_timezone (GsdDatetimeMechanism *mechism,
}
gboolean
-gsd_datetime_mechanism_get_hardware_clock_using_utc (GsdDatetimeMechanism *mechanism,
+msd_datetime_mechanism_get_hardware_clock_using_utc (MsdDatetimeMechanism *mechanism,
DBusGMethodInvocation *context)
{
char **lines;
@@ -492,8 +492,8 @@ gsd_datetime_mechanism_get_hardware_clock_using_utc (GsdDatetimeMechanism *mech
if (!g_file_get_contents ("/etc/adjtime", &data, &len, &error)) {
GError *error2;
- error2 = g_error_new (GSD_DATETIME_MECHANISM_ERROR,
- GSD_DATETIME_MECHANISM_ERROR_GENERAL,
+ error2 = g_error_new (MSD_DATETIME_MECHANISM_ERROR,
+ MSD_DATETIME_MECHANISM_ERROR_GENERAL,
"Error reading /etc/adjtime file: %s", error->message);
g_error_free (error);
dbus_g_method_return_error (context, error2);
@@ -505,8 +505,8 @@ gsd_datetime_mechanism_get_hardware_clock_using_utc (GsdDatetimeMechanism *mech
g_free (data);
if (g_strv_length (lines) < 3) {
- error = g_error_new (GSD_DATETIME_MECHANISM_ERROR,
- GSD_DATETIME_MECHANISM_ERROR_GENERAL,
+ error = g_error_new (MSD_DATETIME_MECHANISM_ERROR,
+ MSD_DATETIME_MECHANISM_ERROR_GENERAL,
"Cannot parse /etc/adjtime");
dbus_g_method_return_error (context, error);
g_error_free (error);
@@ -519,8 +519,8 @@ gsd_datetime_mechanism_get_hardware_clock_using_utc (GsdDatetimeMechanism *mech
} else if (strcmp (lines[2], "LOCAL") == 0) {
is_utc = FALSE;
} else {
- error = g_error_new (GSD_DATETIME_MECHANISM_ERROR,
- GSD_DATETIME_MECHANISM_ERROR_GENERAL,
+ error = g_error_new (MSD_DATETIME_MECHANISM_ERROR,
+ MSD_DATETIME_MECHANISM_ERROR_GENERAL,
"Expected UTC or LOCAL at line 3 of /etc/adjtime; found '%s'", lines[2]);
dbus_g_method_return_error (context, error);
g_error_free (error);
@@ -533,7 +533,7 @@ gsd_datetime_mechanism_get_hardware_clock_using_utc (GsdDatetimeMechanism *mech
}
gboolean
-gsd_datetime_mechanism_set_hardware_clock_using_utc (GsdDatetimeMechanism *mechanism,
+msd_datetime_mechanism_set_hardware_clock_using_utc (MsdDatetimeMechanism *mechanism,
gboolean using_utc,
DBusGMethodInvocation *context)
{
@@ -552,8 +552,8 @@ gsd_datetime_mechanism_set_hardware_clock_using_utc (GsdDatetimeMechanism *mech
cmd = g_strdup_printf ("/sbin/hwclock %s --systohc", using_utc ? "--utc" : "--localtime");
if (!g_spawn_command_line_sync (cmd, NULL, NULL, &exit_status, &error)) {
GError *error2;
- error2 = g_error_new (GSD_DATETIME_MECHANISM_ERROR,
- GSD_DATETIME_MECHANISM_ERROR_GENERAL,
+ error2 = g_error_new (MSD_DATETIME_MECHANISM_ERROR,
+ MSD_DATETIME_MECHANISM_ERROR_GENERAL,
"Error spawning /sbin/hwclock: %s", error->message);
g_error_free (error);
dbus_g_method_return_error (context, error2);
@@ -563,8 +563,8 @@ gsd_datetime_mechanism_set_hardware_clock_using_utc (GsdDatetimeMechanism *mech
}
g_free (cmd);
if (WEXITSTATUS (exit_status) != 0) {
- error = g_error_new (GSD_DATETIME_MECHANISM_ERROR,
- GSD_DATETIME_MECHANISM_ERROR_GENERAL,
+ error = g_error_new (MSD_DATETIME_MECHANISM_ERROR,
+ MSD_DATETIME_MECHANISM_ERROR_GENERAL,
"/sbin/hwclock returned %d", exit_status);
dbus_g_method_return_error (context, error);
g_error_free (error);
@@ -580,7 +580,7 @@ gsd_datetime_mechanism_set_hardware_clock_using_utc (GsdDatetimeMechanism *mech
}
static void
-check_can_do (GsdDatetimeMechanism *mechanism,
+check_can_do (MsdDatetimeMechanism *mechanism,
const char *action,
DBusGMethodInvocation *context)
{
@@ -624,7 +624,7 @@ check_can_do (GsdDatetimeMechanism *mechanism,
gboolean
-gsd_datetime_mechanism_can_set_time (GsdDatetimeMechanism *mechanism,
+msd_datetime_mechanism_can_set_time (MsdDatetimeMechanism *mechanism,
DBusGMethodInvocation *context)
{
check_can_do (mechanism,
@@ -635,7 +635,7 @@ gsd_datetime_mechanism_can_set_time (GsdDatetimeMechanism *mechanism,
}
gboolean
-gsd_datetime_mechanism_can_set_timezone (GsdDatetimeMechanism *mechanism,
+msd_datetime_mechanism_can_set_timezone (MsdDatetimeMechanism *mechanism,
DBusGMethodInvocation *context)
{
check_can_do (mechanism,
diff --git a/plugins/datetime/gsd-datetime-mechanism.h b/plugins/datetime/gsd-datetime-mechanism.h
index 52b3b02..c8605b4 100644
--- a/plugins/datetime/gsd-datetime-mechanism.h
+++ b/plugins/datetime/gsd-datetime-mechanism.h
@@ -18,8 +18,8 @@
*
*/
-#ifndef GSD_DATETIME_MECHANISM_H
-#define GSD_DATETIME_MECHANISM_H
+#ifndef MSD_DATETIME_MECHANISM_H
+#define MSD_DATETIME_MECHANISM_H
#include <glib-object.h>
#include <dbus/dbus-glib.h>
@@ -28,69 +28,69 @@
extern "C" {
#endif
-#define GSD_DATETIME_TYPE_MECHANISM (gsd_datetime_mechanism_get_type ())
-#define GSD_DATETIME_MECHANISM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_DATETIME_TYPE_MECHANISM, GsdDatetimeMechanism))
-#define GSD_DATETIME_MECHANISM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_DATETIME_TYPE_MECHANISM, GsdDatetimeMechanismClass))
-#define GSD_DATETIME_IS_MECHANISM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_DATETIME_TYPE_MECHANISM))
-#define GSD_DATETIME_IS_MECHANISM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_DATETIME_TYPE_MECHANISM))
-#define GSD_DATETIME_MECHANISM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_DATETIME_TYPE_MECHANISM, GsdDatetimeMechanismClass))
+#define MSD_DATETIME_TYPE_MECHANISM (msd_datetime_mechanism_get_type ())
+#define MSD_DATETIME_MECHANISM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_DATETIME_TYPE_MECHANISM, MsdDatetimeMechanism))
+#define MSD_DATETIME_MECHANISM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_DATETIME_TYPE_MECHANISM, MsdDatetimeMechanismClass))
+#define MSD_DATETIME_IS_MECHANISM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_DATETIME_TYPE_MECHANISM))
+#define MSD_DATETIME_IS_MECHANISM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_DATETIME_TYPE_MECHANISM))
+#define MSD_DATETIME_MECHANISM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_DATETIME_TYPE_MECHANISM, MsdDatetimeMechanismClass))
-typedef struct GsdDatetimeMechanismPrivate GsdDatetimeMechanismPrivate;
+typedef struct MsdDatetimeMechanismPrivate MsdDatetimeMechanismPrivate;
typedef struct
{
GObject parent;
- GsdDatetimeMechanismPrivate *priv;
-} GsdDatetimeMechanism;
+ MsdDatetimeMechanismPrivate *priv;
+} MsdDatetimeMechanism;
typedef struct
{
GObjectClass parent_class;
-} GsdDatetimeMechanismClass;
+} MsdDatetimeMechanismClass;
typedef enum
{
- GSD_DATETIME_MECHANISM_ERROR_GENERAL,
- GSD_DATETIME_MECHANISM_ERROR_NOT_PRIVILEGED,
- GSD_DATETIME_MECHANISM_ERROR_INVALID_TIMEZONE_FILE,
- GSD_DATETIME_MECHANISM_NUM_ERRORS
-} GsdDatetimeMechanismError;
+ MSD_DATETIME_MECHANISM_ERROR_GENERAL,
+ MSD_DATETIME_MECHANISM_ERROR_NOT_PRIVILEGED,
+ MSD_DATETIME_MECHANISM_ERROR_INVALID_TIMEZONE_FILE,
+ MSD_DATETIME_MECHANISM_NUM_ERRORS
+} MsdDatetimeMechanismError;
-#define GSD_DATETIME_MECHANISM_ERROR gsd_datetime_mechanism_error_quark ()
+#define MSD_DATETIME_MECHANISM_ERROR msd_datetime_mechanism_error_quark ()
-GType gsd_datetime_mechanism_error_get_type (void);
-#define GSD_DATETIME_MECHANISM_TYPE_ERROR (gsd_datetime_mechanism_error_get_type ())
+GType msd_datetime_mechanism_error_get_type (void);
+#define MSD_DATETIME_MECHANISM_TYPE_ERROR (msd_datetime_mechanism_error_get_type ())
-GQuark gsd_datetime_mechanism_error_quark (void);
-GType gsd_datetime_mechanism_get_type (void);
-GsdDatetimeMechanism *gsd_datetime_mechanism_new (void);
+GQuark msd_datetime_mechanism_error_quark (void);
+GType msd_datetime_mechanism_get_type (void);
+MsdDatetimeMechanism *msd_datetime_mechanism_new (void);
/* exported methods */
-gboolean gsd_datetime_mechanism_get_timezone (GsdDatetimeMechanism *mechanism,
+gboolean msd_datetime_mechanism_get_timezone (MsdDatetimeMechanism *mechanism,
DBusGMethodInvocation *context);
-gboolean gsd_datetime_mechanism_set_timezone (GsdDatetimeMechanism *mechanism,
+gboolean msd_datetime_mechanism_set_timezone (MsdDatetimeMechanism *mechanism,
const char *zone_file,
DBusGMethodInvocation *context);
-gboolean gsd_datetime_mechanism_can_set_timezone (GsdDatetimeMechanism *mechanism,
+gboolean msd_datetime_mechanism_can_set_timezone (MsdDatetimeMechanism *mechanism,
DBusGMethodInvocation *context);
-gboolean gsd_datetime_mechanism_set_time (GsdDatetimeMechanism *mechanism,
+gboolean msd_datetime_mechanism_set_time (MsdDatetimeMechanism *mechanism,
gint64 seconds_since_epoch,
DBusGMethodInvocation *context);
-gboolean gsd_datetime_mechanism_can_set_time (GsdDatetimeMechanism *mechanism,
+gboolean msd_datetime_mechanism_can_set_time (MsdDatetimeMechanism *mechanism,
DBusGMethodInvocation *context);
-gboolean gsd_datetime_mechanism_adjust_time (GsdDatetimeMechanism *mechanism,
+gboolean msd_datetime_mechanism_adjust_time (MsdDatetimeMechanism *mechanism,
gint64 seconds_to_add,
DBusGMethodInvocation *context);
-gboolean gsd_datetime_mechanism_get_hardware_clock_using_utc (GsdDatetimeMechanism *mechanism,
+gboolean msd_datetime_mechanism_get_hardware_clock_using_utc (MsdDatetimeMechanism *mechanism,
DBusGMethodInvocation *context);
-gboolean gsd_datetime_mechanism_set_hardware_clock_using_utc (GsdDatetimeMechanism *mechanism,
+gboolean msd_datetime_mechanism_set_hardware_clock_using_utc (MsdDatetimeMechanism *mechanism,
gboolean using_utc,
DBusGMethodInvocation *context);
@@ -98,4 +98,4 @@ gboolean gsd_datetime_mechanism_set_hardware_clock_using_utc (GsdDat
}
#endif
-#endif /* GSD_DATETIME_MECHANISM_H */
+#endif /* MSD_DATETIME_MECHANISM_H */
diff --git a/plugins/datetime/org.mate.SettingsDaemon.DateTimeMechanism.service.in b/plugins/datetime/org.mate.SettingsDaemon.DateTimeMechanism.service.in
index ac7fa29..ffc3bba 100644
--- a/plugins/datetime/org.mate.SettingsDaemon.DateTimeMechanism.service.in
+++ b/plugins/datetime/org.mate.SettingsDaemon.DateTimeMechanism.service.in
@@ -1,4 +1,4 @@
[D-BUS Service]
Name=org.mate.SettingsDaemon.DateTimeMechanism
-Exec=@LIBEXECDIR@/gsd-datetime-mechanism
+Exec=@LIBEXECDIR@/msd-datetime-mechanism
User=root